polyfills icon indicating copy to clipboard operation
polyfills copied to clipboard

[scoped-custom-element-registry] createElementNS is unsupported

Open danwulff opened this issue 2 years ago • 0 comments

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

  1. Install the scoped-custom-element-registry polyfill
  2. Attach a shadow root to an element
  3. 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

danwulff avatar Sep 14 '23 13:09 danwulff