polyfills
polyfills copied to clipboard
[scoped-custom-element-registry] createElementNS is unsupported
Description
With the scoped-custom-element-registry polyfill installed. When calling createElementNS() via a shadowRoot an error is thrown.
Example
<div id="app"></div>
const appDiv = document.getElementById('app');
const shadowRoot = appDiv.attachShadow({ mode: 'open' });
const div = shadowRoot.createElementNS('http://www.w3.org/1999/xhtml', 'div');
Steps to reproduce
- Install the scoped-custom-element-registry polyfill
- Attach a shadow root to an element
- Call
shadowRoot.createElementNS()
Expected behavior
No error is thrown as the polyfill should support createElementNS as it is included in the spec.
Actual behavior
Error is thrown TypeError: .createElementNS is not a function
Version
@webcomponents/[email protected]
Browsers affected
- [X] Chrome
- [X] Firefox
- [X] Edge
- [X] Safari
- [x] IE 11