navigator.html (816B)
1 <!-- 2 Any copyright is dedicated to the Public Domain. 3 http://creativecommons.org/publicdomain/zero/1.0/ 4 --> 5 <!DOCTYPE HTML> 6 <html> 7 <head> 8 <title>Bug 982726 - test match_all not crashing</title> 9 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" /> 10 </head> 11 <body> 12 <p id="display"></p> 13 <div id="content" style="display: none"></div> 14 <pre id="test"></pre> 15 <script class="testbody" type="text/javascript"> 16 17 if (!parent) { 18 dump("sw_clients/navigator.html shouldn't be launched directly!\n"); 19 } 20 21 window.addEventListener("message", function(event) { 22 if (event.data.type === "NAVIGATE") { 23 window.location = event.data.url; 24 } 25 }); 26 27 navigator.serviceWorker.ready.then(function() { 28 parent.postMessage("NAVIGATOR_READY", "*"); 29 }); 30 31 </script> 32 </pre> 33 </body> 34 </html>