Skip to content

Instantly share code, notes, and snippets.

@IrisCZ
Last active September 20, 2019 14:08
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 IrisCZ/0bc4a1d5328a843df9e0568b4bfb5b4b to your computer and use it in GitHub Desktop.
Save IrisCZ/0bc4a1d5328a843df9e0568b4bfb5b4b to your computer and use it in GitHub Desktop.
class FormContainer extends HTMLElement {
constructor () {
super();
const shadowRoot = this.attachShadow({ mode: 'open' });
shadowRoot.innerHTML = `
<main id="${this.id}">
<slot></slot>
</main>
`;
}
}
customElements.define('form-container', FormContainer);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment