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