Skip to content

Instantly share code, notes, and snippets.

@joehonton
Created February 5, 2020 05:46
Show Gist options
  • Save joehonton/b62e3399b53acb315edd91a4a1f52002 to your computer and use it in GitHub Desktop.
Save joehonton/b62e3399b53acb315edd91a4a1f52002 to your computer and use it in GitHub Desktop.
async connectedCallback() {
var htmlFragment = await this.fetchTemplate();
var styleElement = await this.fetchCSS();
this.attachShadow({mode: 'open'});
this.shadowRoot.appendChild(htmlFragment);
this.shadowRoot.appendChild(styleElement);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment