It seems like the spec has deprecated document.registerElement
.
If this is the case, is there a polyfill for this?
The link you point to says the spec was changed to use customElements.define()
, not that anything changed in Firefox.
As far as I can tell, registerElement
is only available in Firefox as an experimental implementation (disabled by default), which was not updated to track the spec (support the .define()
method) as of v57.
The polyfill for Web Components v1 (which is the version with customElements.define()
) is currently at https://github.com/webcomponents/custom-elements