Skip to content

Instantly share code, notes, and snippets.

@YonatanKra
Created January 1, 2021 20:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save YonatanKra/b0117e332b7351efe8d8587c7f9ce2a6 to your computer and use it in GitHub Desktop.
Save YonatanKra/b0117e332b7351efe8d8587c7f9ce2a6 to your computer and use it in GitHub Desktop.
import './app.element.css';
export class AppElement extends HTMLElement {
public static observedAttributes = [];
connectedCallback() {
const title = 'custom-webpack';
this.innerHTML = `
<header class="flex">
<h1>Welcome to ${title}!</h1>
</header>
<main>
<h2>Welcome to our app!</h2>
</main>
`;
}
}
customElements.define('custom-webpack-root', AppElement);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment