Skip to content

Instantly share code, notes, and snippets.

@fabriciofmsilva
Last active June 10, 2019 14:56
Show Gist options
  • Save fabriciofmsilva/63493a36c638bd130aa7db0af14aa0a8 to your computer and use it in GitHub Desktop.
Save fabriciofmsilva/63493a36c638bd130aa7db0af14aa0a8 to your computer and use it in GitHub Desktop.
Web Components
// Extends for a native component
customElements.define('custom-footer', CustomFooter, { extends: 'footer' });

Web Components

Web Components is an umbrella term that refers to a set of four browser standards that work together to form the web's native component model.

  • elements let you quickly reuse portions of DOM
  • Custom Elements connect JS classes to custom HTML tags
  • Shadow DOM hides your shame from the rest of the page
  • JavaScript Modules to package and publish components
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment