1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
<html> <head></head> <body> <script type="text/javascript"> window.addEventListener('message', function(evt) { navigator.serviceWorker.ready.then(function() { evt.ports[0].postMessage("WOW!"); }); }, false); </script> </body> </html>