Is there a polyfill for the Web Components v1 spec available? I'm looking for a way to create components using customElements.define
instead of document.registerElement
.
Webcomponentjs polyfill for v1 spec
553 views Asked by Niranjan Borawake At
2
If you want to polyfill only Custom Elements v1 (implementing
customeElements.define
) you have the choice between 2 polyfills:If you want to polyfill the whole Web Components stack, you can use the v1 branch of the webcomponentsjs polyfill, since the current release (v0.7.23) doesn't implement yet the Custom Element and Shadow DOM "v1" Living Standards. Note that it is not merged in the master yet and subject to changes.
You can also only load the useful polyfills depending of your needs:
HTMLImport.js
in the current webcomponentsjs releaseTemplate.js
in the current webcomponentsjs release