You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 20, 2019. It is now read-only.
A suite of polyfills supporting the [Web Components](http://webcomponents.org) specs.
6
+
A suite of polyfills supporting the [Web Components](http://webcomponents.org) specs:
7
7
8
8
-**Custom Elements**: allows authors to define their own custom tags ([spec](https://w3c.github.io/webcomponents/spec/custom/)).
9
9
-**HTML Imports**: a way to include and reuse HTML documents via other HTML documents ([spec](https://w3c.github.io/webcomponents/spec/imports/)).
10
10
-**Shadow DOM**: provides encapsulation by hiding DOM subtrees under shadow roots ([spec](https://w3c.github.io/webcomponents/spec/shadow/)).
11
11
12
-
## Releases
12
+
## How to use
13
13
14
-
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 several variants:
14
+
The polyfills are built (concatenated & minified) into several bundles that target
15
+
different browsers and spec readiness:
15
16
16
-
-`webcomponents-lite.js` includes all of the polyfills.
17
-
-`webcomponents-loader.js` is a custom loader that dynamically load a minified polyfill
18
-
bundle, using feature detection. The bundles that can be loaded are:
19
-
-`webcomponents-hi` -- HTML Imports (needed by Safari Tech Preview)
20
-
-`webcomponents-hi-ce` -- HTML Imports and Custom Elements (needed by Safari 10)
21
-
-`webcomponents-hi-ce-sd` -- HTML Imports, Custom Elements and Shady DOM/CSS (needed by Safari 9, Firefox, Edge)
22
-
-`webcomponents-lite` -- HTML Imports, Custom Elements, Shady DOM/CSS and generic platform polyfills (such as Template, ES6 Promise, Constructable events, etc.) (needed by Internet Explorer 11)
17
+
-`webcomponents-hi` -- HTML Imports (needed by Safari Tech Preview)
18
+
-`webcomponents-hi-ce` -- HTML Imports and Custom Elements (needed by Safari 10)
19
+
-`webcomponents-hi-sd-ce` -- HTML Imports, Custom Elements and Shady DOM/CSS (needed by Safari 9, Firefox, Edge)
20
+
-`webcomponents-sd-ce` -- Custom Elements and Shady DOM/CSS (no HTML Imports)
21
+
-`webcomponents-lite` -- all of the polyfills: HTML Imports, Custom Elements, Shady DOM/CSS and generic platform polyfills (such as Template, ES6 Promise, Constructable events, etc.) (needed by Internet Explorer 11)
22
+
23
+
If you are only targetting a specific browser, you can just use the bundle that's
24
+
needed by it; alternatively, if you're using server-side rendering, you can
25
+
send the polyfill bundle that's necessary for the browser making that request.
26
+
27
+
## `webcomponents-loader.js`
28
+
29
+
Alternatively, this repo also comes with `webcomponents-loader.js`, a client-side
30
+
loader that dynamically loads the correct polyfill bundle, using feature detection.
31
+
Note that because the bundle will be loaded asynchronously, you should wait for the `WebComponentsReady` before you can safely assume that all the polyfills have
32
+
loaded and are ready to be used (i.e. if you want to dynamically load other custom
@@ -34,13 +61,13 @@ for our complete browser support matrix:
34
61
35
62
\*Indicates the current version of the browser
36
63
37
-
The polyfills may work in older browsers, however require additional polyfills (such as classList)
38
-
to be used. We cannot guarantee support for browsers outside of our compatibility matrix.
64
+
The polyfills may work in older browsers, however require additional polyfills (such as classList, or other [platform](https://github.com/webcomponents/webcomponents-platform)
65
+
polyfills) to be used. We cannot guarantee support for browsers outside of our compatibility matrix.
39
66
40
67
41
68
### Manually Building
42
69
43
-
If you wish to build the polyfills yourself, you'll need `node` and `npm` on your system:
70
+
If you wish to build the bundles yourself, you'll need `node` and `npm` on your system:
44
71
45
72
* install [node.js](http://nodejs.org/) using the instructions on their website
46
73
* use `npm` to install [gulp.js](http://gulpjs.com/): `npm install -g gulp`
0 commit comments