Re: [w3c/ServiceWorker] Clarify dynamic-imported scripts are never installed (#1356)

> I think it was in part the synchronous nature as it would effectively block the event loop.

Ok.  I guess I don't recall that.

I don't think the fact `import()` is asynchronous addresses the concerns about sites using it accidentally after install when the resource won't be offlined.  We explicitly tried to remove that footgun for importScripts and it feels weird to add it back for import().

Or are you saying import() resources should be offlined whenever its used?

I guess someone needs to actually write a PR to make `import()` do anything offline in service workers.  AFAICT there is nothing in the service worker spec which says it should use offline resources.  For example, there is nothing that says `import()` should use or modify `script resource map` like we do for importScripts here:

https://w3c.github.io/ServiceWorker/#importscripts

Of course, maybe I don't understand the module stuff since I don't see where Run Service Worker uses `script resource map` for loading static module imports either:

https://w3c.github.io/ServiceWorker/#run-service-worker-algorithm

Sorry if I'm just confused.

-- 
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/1356#issuecomment-425434161

Received on Friday, 28 September 2018 13:24:19 UTC