Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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