Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / frames / resources / iframe-onload-remove-self-no-crash.js
blob2d3771e1d401749b704aa9bbe2fe6f25e537d993
1 function onWindowLoad() {
2 var doc = top.document;
3 var b = doc.body;
5 var x = doc.getElementById('x');
6 if (x) {
7 b.removeChild(x);
10 x = doc.createElement("iframe");
11 x.setAttribute('id','x');
12 // appendChild triggers load
13 b.appendChild(x);
16 window.addEventListener("load", onWindowLoad, false);