Source code

Revision control

Other Tools

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