Jquery: $.fn.append may fail in Microsoft Edge

Created on 28 Jul 2016  路  3Comments  路  Source: jquery/jquery

Description

If you attempt to append HTML to a popup window, jQuery evaluates the markup, and creates a documentFragment (from the context's ownerDocument) if there are multiple top-level sibling elements. jQuery will then attempt to append the documentFragment to the second window, which fails in all versions of Microsoft Edge.

Reproduction:

<div id="elements">
    <span>A</span> 
    <span>B</span>
</div>
var win = window.open("");
$(win.document.body).append( $("#elements").html() );

Microsoft Edge throws _No such interface supported_.

Link to test case

Fiddle: https://jsfiddle.net/kmfc3ph3/

Bug Manipulation

Most helpful comment

Works in other browsers including latest IE and specification says window.open could be used like this.

Confirmed in other words

All 3 comments

Works in other browsers including latest IE and specification says window.open could be used like this.

Confirmed in other words

Is there any progress on this? It appears to still be an issue in 1709 version of windows 10.

Pull requests are welcome.

Was this page helpful?
0 / 5 - 0 ratings