Skip to content

Commit 86d385f

Browse files
authored
iframe.html
The iframe playground HTML Document file for this directory.
1 parent 4ff8db7 commit 86d385f

File tree

1 file changed

+39
-0
lines changed
  • Programming Tools/Blockly/blockly-1.20181105.0/blockly-1.20181105.0/tests/playgrounds

1 file changed

+39
-0
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta charset="utf-8">
5+
<title>Blockly &lt;iframe&gt; Playground</title>
6+
<style>
7+
html, body {
8+
border: 0;
9+
margin: 0;
10+
padding: 0;
11+
font-family: sans-serif;
12+
}
13+
h1#title {
14+
border: 0;
15+
margin: 2px;
16+
padding: 0;
17+
width: %100;
18+
}
19+
#playground-iframe {
20+
border: 0;
21+
width: %100;
22+
}
23+
</style>
24+
<script type="text/javascript">
25+
var onWindowResize = function() {
26+
var iframe = document.getElementById('playground-iframe');
27+
var top = iframe.getBoundingClientRect().top;
28+
iframe.height = window.innerHeight - top;
29+
iframe.width = window.innerWidth;
30+
};
31+
window.addEventListener("resize", onWindowResize);
32+
window.addEventListener("load", onWindowResize);
33+
</script>
34+
</head>
35+
<body>
36+
<h1 id="title">Outer Frame</h1>
37+
<iframe id="playground-iframe" src="../playground.html">
38+
</body>
39+
</html>

0 commit comments

Comments
 (0)