Skip to content

Instantly share code, notes, and snippets.

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 BenOsodrac/252cd05b980d59228c834fbf65496730 to your computer and use it in GitHub Desktop.
Save BenOsodrac/252cd05b980d59228c834fbf65496730 to your computer and use it in GitHub Desktop.
class Card extends HTMLElement {
constructor() {
super();
const shadowRoot = this.attachShadow({mode: 'open'});
shadowRoot.innerHTML = `
<style>.card { … }</style>
<div class="card">…</div>`;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment