blob: 0e9b54b5235e6d93be667b8e4e4a004838b48a45 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
<html>
<body>
<h3>test iframe</h3>
<script>
"use strict";
window.onload = function() {
window.onhashchange = function() {
window.parent.postMessage("updated-iframe-url", "*");
};
// NOTE: without the this setTimeout the location change is not fired
// even without the "fire only for top level windows" fix
setTimeout(function() {
window.location.hash = "updated-iframe-url";
}, 0);
};
</script>
</body>
</html>
|