getElementById is not implemented on DocumentFragment

Fixed Issue #15153720

Details

Author
Tim v.
Created
Dec 19, 2017
Privacy
This issue is public.
Found in
  • Microsoft Edge
Standard affected
DOM Standard

Found in build #
16
Reports
Reported by 1 person

Sign in to watch or report this issue.

Steps to reproduce

Per https://dom.spec.whatwg.org/#interface-nonelementparentnode DocumentFragment must implement the mixin NonElementParentNode which defines the method getElementById. The corresponding test is on https://w3c-test.org/dom/interfaces.html called "DocumentFragment interface: operation getElementById(DOMString)" which fails in Edge, but passes in all other browsers.

You can run an example JSBin at http://jsbin.com/gazelomefo/edit?html,console,output which should show up function getElementById() { [native code] }, but shows undefined in Edge 16 instead.

In our case, it crashes our website, as we are cloning the template.content (which is a DocumentFragment) and call getElementById on it.

Attachments

Comments and activity

  • Microsoft Edge Team

    Changed Assigned To to “Steven K.”

  • Hi Tim,

    I was able to repo this issue in 16299.125.

    I ran the same test page on a recent development build and that test is now passing.  See the attached screenshot.

    Thank you for the submission,

    Steve

  • Microsoft Edge Team

    Changed Status to “Fixed”

You need to sign in to your Microsoft account to add a comment.

Sign in