Re: [w3c/ServiceWorker] Should we consider Worklets as clients? (#1502)

Conceptually worklets could be service worker clients, but it doesn't make much sense because worklets have opaque origins and cannot be visible to Client API.

```
3. Let origin be a unique opaque origin.
https://drafts.css-houdini.org/worklets/#script-settings-for-worklets
```

In addition to that, worklets don't have networking APIs including dynamic ```import()``` and Event mechanism (except for AudioWorklet's MessageEvent), so service workers cannot communicate with them.

```
Are not event API based. Instead classes are registered on the global scope, whose methods are to be invoked by the user agent.
https://drafts.css-houdini.org/worklets/#motivations
```

Note that worklet module script graph is fetched like the owner document's subresource request, so it can be intercepted by the owner document's active service worker.

Relevant issue: w3c/css-houdini-drafts#473

-- 
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/1502#issuecomment-580294336

Received on Thursday, 30 January 2020 15:01:22 UTC