Home | History | Annotate | Download | only in webcomponentsjs
      1 webcomponents.js
      2 ================
      3 
      4 [![Join the chat at https://gitter.im/webcomponents/webcomponentsjs](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/webcomponents/webcomponentsjs?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
      5 
      6 A suite of polyfills supporting the [Web Components](http://webcomponents.org) specs:
      7 
      8 **Custom Elements**: allows authors to define their own custom tags ([spec](https://w3c.github.io/webcomponents/spec/custom/)).
      9 
     10 **HTML Imports**: a way to include and reuse HTML documents via other HTML documents ([spec](https://w3c.github.io/webcomponents/spec/imports/)).
     11 
     12 **Shadow DOM**: provides encapsulation by hiding DOM subtrees under shadow roots ([spec](https://w3c.github.io/webcomponents/spec/shadow/)).
     13 
     14 This also folds in polyfills for `MutationObserver` and `WeakMap`.
     15 
     16 
     17 ## Releases
     18 
     19 Pre-built (concatenated & minified) versions of the polyfills are maintained in the [tagged versions](https://github.com/webcomponents/webcomponentsjs/releases) of this repo. There are two variants:
     20 
     21 `webcomponents.js` includes all of the polyfills.
     22 
     23 `webcomponents-lite.js` includes all polyfills except for shadow DOM.
     24 
     25 
     26 ## Browser Support
     27 
     28 Our polyfills are intended to work in the latest versions of evergreen browsers. See below
     29 for our complete browser support matrix:
     30 
     31 | Polyfill   | IE10 | IE11+ | Chrome* | Firefox* | Safari 7+* | Chrome Android* | Mobile Safari* |
     32 | ---------- |:----:|:-----:|:-------:|:--------:|:----------:|:---------------:|:--------------:|
     33 | Custom Elements | ~ |  |  |  |  | |  |
     34 | HTML Imports | ~ |  |  |  | | |  |
     35 | Shadow DOM |  |  |  |  |  |  |  |
     36 | Templates |  |  |  | |  |  |  |
     37 
     38 
     39 *Indicates the current version of the browser
     40 
     41 ~Indicates support may be flaky. If using Custom Elements or HTML Imports with Shadow DOM,
     42 you will get the non-flaky Mutation Observer polyfill that Shadow DOM includes.
     43 
     44 The polyfills may work in older browsers, however require additional polyfills (such as classList)
     45 to be used. We cannot guarantee support for browsers outside of our compatibility matrix.
     46 
     47 
     48 ### Manually Building
     49 
     50 If you wish to build the polyfills yourself, you'll need `node` and `gulp` on your system:
     51 
     52  * install [node.js](http://nodejs.org/) using the instructions on their website
     53  * use `npm` to install [gulp.js](http://gulpjs.com/): `npm install -g gulp`
     54 
     55 Now you are ready to build the polyfills with:
     56 
     57     # install dependencies
     58     npm install
     59     # build
     60     gulp build
     61 
     62 The builds will be placed into the `dist/` directory.
     63 
     64 ## Contribute
     65 
     66 See the [contributing guide](CONTRIBUTING.md)
     67 
     68 ## License
     69 
     70 Everything in this repository is BSD style license unless otherwise specified.
     71 
     72 Copyright (c) 2015 The Polymer Authors. All rights reserved.
     73 
     74