- From: Ben Kelly <notifications@github.com>
- Date: Thu, 18 Jan 2018 21:31:00 +0000 (UTC)
- To: w3c/ServiceWorker <ServiceWorker@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Thursday, 18 January 2018 21:31:28 UTC
Currently the spec says:
>When the request’s url is local, if the service worker client's responsible browsing context is a nested browsing context or the service worker client is a worker client, the service worker client inherits the service worker registration from its parent browsing context’s environment or from the environment of a Document in the service worker client's global object's owner set, respectively, if it exists.
Is this correct for a situation like this?
```javascript
// script running in window foo.com/uncontrolled.html
// no controlling worker
// register a service worker
let reg = await navigator.serviceWorker.register('sw.js', { scope: './controlled' });
await wait_for_State(reg.installing, 'activated');
// create a frame controlled by the SW
var f = await with_iframe('./controlled/frame.html');
// The controlled frame creates a blob:// URL
var blobURL = f.contentWindow.makeBlobURL();
// Create a worker from the blob URL.
// Should the worker be controlled by the frame's SW or uncontrolled?
// Spec currently says uncontrolled.
var w = new Worker(blobURL);
```
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/ServiceWorker/issues/1261
Received on Thursday, 18 January 2018 21:31:28 UTC