webcomponentsjs

v1.0.2
The popular WebComponents polyfill in a nice, frequently updated NPM package
webcomponents

webcomponentsjs NPM version

The popular WebComponents polyfill in a nice, frequently updated NPM package.

Usage

Install webcomponentsjs as a dependency:

npm install webcomponentsjs

The polyfill traditionally comes in two standard sizes and this version adds an additional one that is significantly smaller!

full

includes the Custom Elements, HTML Imports, Shadow DOM and Templates polyfills. (260kb)

lite

includes everything from the full polyfill except for the Shadow DOM. (79kb)

micro

Includes polyfills for only Custom Elements and Templates. NOTE: The micro package doesn't include the polyfill for the [URL()] (https://developer.mozilla.org/en-US/docs/Web/API/URL/URL) object because they were only needed for the HTMLImports polyfill. (40kb)

To use it, import it as a dependency from your code:

import "webcomponentsjs"

If you want to load the lite or micro versions, use:

import "webcomponentsjs/lite"

or

import "webcomponentsjs/micro"

That's it!

npm i webcomponentsjs

Metadata

  • ISC
  • Whatever
  • Frederik Wessberg
  • released 3/16/2016

Downloads

Maintainers