Files
webcomponentsjs/README.md
2015-02-12 17:48:00 +00:00

2.2 KiB

webcomponents.js

Join the chat at https://gitter.im/webcomponents/webcomponentsjs

A suite of polyfills supporting the Web Components specs:

Custom Elements: allows authors to define their own custom tags (spec).

HTML Imports: a way to include and reuse HTML documents via other HTML documents (spec).

Shadow DOM: provides encapsulation by hiding DOM subtrees under shadow roots (spec).

This also folds in polyfills for MutationObserver and WeakMap.

Releases

Pre-built (concatenated & minified) versions of the polyfills are maintained in the tagged versions of this repo. There are two variants:

webcomponents.js includes all of the polyfills.

webcomponents-lite.js includes all polyfills except for shadow DOM.

Browser Support

Our polyfills are intended to work in the latest versions of evergreen browsers. See below for our complete browser support matrix:

| | IE10 | IE11+ | Chrome* | Firefox* | Safari 7+* | Chrome Android* | Mobile Safari* | |---|:---:|:---:|:---:|:---:|:---:|:---:| | Custom Elements | ~ | x | x | x | x | x| x | HTML Imports | ~ | x | x | x | x| x| x | Shadow DOM | x | x | x | x | x | x | x | Templates | x | x | x | x| x | x | x

*Indicates the current version of the browser ~Indicates support may be flaky

Manually Building

If you wish to build the polyfills yourself, you'll need node and gulp on your system:

  • install node.js using the instructions on their website
  • use npm to install gulp.js: npm install -g gulp

Now you are ready to build the polyfills with:

# install dependencies
npm install
# build
gulp build

The builds will be placed into the dist/ directory.

Contribute

See the contributing guide