Re: [w3c/ServiceWorker] When should "imported scripts updated flag" be unset? (#1021)

> We could achieve this by allowing import() to go via the fetch event. Maybe that's the less magic solution?

I don't think that would work if `import()` is called before the install event.  Or if the script needs code from the `import()` in order to handle fetch events.

A general problem will be how to handle the race between `import()` async modules loading and life cycle events.  I guess the most straightforward way to handle that would be for script to use `import()` in an install event so it can use `waitUntil()` to guarantee the load completes.

Still, I feel like that can be handled at a later time.  I'd like to see `import()` ship on window and regular workers first.

-- 
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/1021#issuecomment-266489192

Received on Monday, 12 December 2016 17:30:31 UTC