- From: Kinuko Yasuda <notifications@github.com>
- Date: Thu, 29 Jan 2015 22:56:06 -0800
- To: slightlyoff/ServiceWorker <ServiceWorker@noreply.github.com>
Received on Friday, 30 January 2015 06:56:37 UTC
Currently when an IFRAME is created without src= it's not controlled by any SW, so opening a document inside the iframe and loading subresources by frame.contentDocument.write(...) doesn't handled by SW either. Per spec document.open() (and write()) does similar to 'navigation' but open and navigation are not really the same concept: https://html.spec.whatwg.org/multipage/webappapis.html#dom-document-open https://html.spec.whatwg.org/multipage/browsers.html#navigate More specifically, should the following code should show the same controller twice for the parent and iframe? <!doctype html> <iframe id=x></iframe> <script> var x = document.getElementById('x'); console.log(navigator.serviceWorker.controller); // <-- for parent doc console.log(x.contentWindow.navigator.serviceWorker.controller); // for iframe </script> Related chromium issue: https://code.google.com/p/chromium/issues/detail?id=439697 (As a side note: from implementor's pov making no-src iframe controlled by SW is not that straightforward) --- Reply to this email directly or view it on GitHub: https://github.com/slightlyoff/ServiceWorker/issues/612
Received on Friday, 30 January 2015 06:56:37 UTC