1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
content / test / data / input_in_iframe.html [blame]
<!DOCTYPE html>
<html>
<head>
<style>
body, html, iframe {
width: 100%;
height: 100%;
margin: 0;
}
iframe {
border: 0;
}
#space {
width: 200px;
height: 200px;
}
</style>
<script>
loaded = false;
notifyBrowser = null;
function notifyWhenLoaded() {
if (loaded)
return "OUTER_LOADED";
return new Promise(resolve => {
window.notifyBrowser = resolve;
});
}
window.addEventListener('load', () => {
window.loaded = true;
if (window.notifyBrowser)
window.notifyBrowser('OUTER_LOADED');
});
</script>
</head>
<body>
<div id="space"></div>
<iframe src="input_box.html" >
</body>
</html>