<!DOCTYPE HTML> <html> <head> <title>Bug 1045891</title> </head> <body> <script type="text/javascript"> page_id = window.location.hash.substring(1); try { if ('serviceWorker' in navigator) { navigator.serviceWorker.register( 'file_child-src_service_worker.js', { scope: './' + page_id + '/' } ).then(function(reg) { // registration worked reg.unregister().then(function() { window.parent.postMessage({id:page_id, message:"allowed"}, 'http://mochi.test:8888'); }); }).catch(function(error) { // registration failed window.parent.postMessage({id:page_id, message:"blocked"}, 'http://mochi.test:8888'); }); }; } catch(ex) { window.parent.postMessage({id:page_id, message:"exception"}, 'http://mochi.test:8888'); } </script> </body> </html>