1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
content / test / data / remove_frame_on_load.html [blame]
<html>
<head>
<title>Remove frame on load of about:blank</title>
<script>
var f;
window.addEventListener('load', function() {
f = document.querySelector('iframe')
f.onload = function() {
if (f.contentWindow.location.href == 'about:blank')
f.parentNode.removeChild(f);
};
});
</script>
</head>
<body>
<p>Navigate the frame to about:blank page to cause it to be removed.</p>
<iframe src="/cross-site/b.com/title2.html"></iframe>
</body>
</html>