appendChild/insertBefore for DocumentFragment returns an object with no keys and prototype instead of DocumentFragment

Confirmed Issue #8701828 • Assigned to Sanket J.

Details

Author
Roman
Created
Aug 30, 2016
Privacy
This issue is public.
Found in
  • Microsoft Edge
Found in build #
14.14393
Reports
Reported by 2 people

Sign in to watch or report this issue.

Steps to reproduce

Test case:

var a = document.createDocumentFragment();
var b = document.createDocumentFragment();
var res = b.appendChild(a);
console.log(res === a); // false
console.log(Object.getPrototypeOf(res)); // null
console.log(Object.keys(res)); // []

Expected res is equals to a, but object with no keys and prototype returns. This object also can’t to be a WeakMap key and throws an exception.

var map = new WeakMap();
map.set(res, 123); // WeakMap.prototype.set: 'key' is not an object

The same is for insertBefore method and Element as destination.
Reproduced on Microsoft EdgeHTML 14.14393, but I also saw it before upgrade from 13 to 14.

Attachments

0 attachments

    Comments and activity

    • Microsoft Edge Team

      Changed Assigned To to “Brad E.”

      Changed Assigned To to “Travis L.”

      Changed Assigned To from “Travis L.” to “Sanket J.”

      Changed Status to “Confirmed”

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

    Sign in