Skip to content

$.fn.append may fail in Microsoft Edge #3251

@jonathansampson

Description

@jonathansampson

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/

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions