Created
January 1, 2021 20:56
-
-
Save YonatanKra/b0117e332b7351efe8d8587c7f9ce2a6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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