b0a9dfaeba9d — Josiah Ulfers 4 years ago
Add test for iframe #1
1 files changed, 14 insertions(+), 0 deletions(-)

M _static/test.html
M _static/test.html +14 -0
@@ 169,6 169,20 @@ pointerTrap.onclick = function () {
 }
 </script>
 
+<h2>Iframe</h2>
+
+<p>To test cross-domain iframes, this page needs to be published somewhere, such as <a href="http://keyboard-savior-xtreme.readthedocs.io/en/latest/_static/test.html">http://keyboard-savior-xtreme.readthedocs.io/en/latest/_static/test.html</a>, then loaded while hosting this test page on <a href="http://localhost:8000/_static/test.html">http://localhost:8000/_static/test.html</a>.
+</p>
+
+<script>
+'use strict'
+document.write('<p>my location: ' + window.location + '</p>')
+document.write('<p>top location: ' + window.top.location + '</p>')
+if (window.location.hostname !== 'localhost') {
+  document.write('<iframe src="http://localhost:8000/_static/test.html"></iframe>')
+}
+</script>
+
 <script>
 'use strict'
 window.linkToSafety = document.getElementsByTagName('a')[0]