blob: e1a2e811c9c84317856e30aba05de027070f2142 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
<!doctype html>
1
<script>
function f() {
opener.postMessage("original", "*");
if (opener.data.length >= 2) {
// If we proceed here, then our document.write will be racing with the
// setTimeout in our opener. Just stop.
return;
}
setTimeout(function () {
document.open();
document.write("<!doctype html>2<script>opener.postMessage('written', '*');<\/script>");
document.close();
});
}
window.onload = f
</script>
|