Re: [whatwg/fetch] Adds "audioworklet" and "paintworklet" as destinations. (#527)

I'm now writing tests for service worker interception ([crbug](https://bugs.chromium.org/p/chromium/issues/detail?id=773778)) and came across questions about dynamic ```import``` on WorkletGlobalScope.

- Should we clarify in the Worklet spec that dynamic ```import()``` on WorkletGlobalScope must use the custom fetch algorithm like [addModule()](https://drafts.css-houdini.org/worklets/#fetch-a-worklet-script) (see "To perform the fetch given request, perform the following steps:")? The current spec says nothing about dynamic ```import()```. If needed, I'll file a spec issue in the Worklet repository.

- What's the consensus of ServiceWorker interception for dynamic ```import()```? Should it be handled by owner document's service worker or never handled because WorkletGlobalScope has an opaque origin? The latter option sounds reasonable if we consider dynamic ```import()``` as networking APIs like ```fetch()```. On the other hand, it also sounds a bit odd because dynamic ```import()``` goes through [the Worklet's module responses map](https://drafts.css-houdini.org/worklets/#module-responses-map) logic shared with ```addModule()``` (static ```import```).

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/fetch/pull/527#issuecomment-342038491

Received on Monday, 6 November 2017 03:39:08 UTC