Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
<!DOCTYPE html>
<meta charset="utf-8">
<title>host of cloned 'a' element</title>
var a = document.createElement('a');
a.href = '';
a = a.cloneNode(false);
document.write('<p> ' + + '<\/p>');
document.write('<p> ' + + '<\/p>');

nanto commented Nov 9, 2014

Open console and run the following code in any page.

var iframe = document.createElement('iframe');
iframe.src = '';

We expect to be '' but in IE it becomes a host of parent document.


nanto commented Nov 9, 2014

This behavior of IE was referred to in (written in Japanese).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment