blob: 1e2afec6fa395b5fe090e243ef4ad9339a922533 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
<html>
<head>
<meta charset="utf-8">
</head>
<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>
|