Re: [w3c/ServiceWorker] Top-level await integration for ServiceWorkers running modules (#1407)

Sorry to be late for the discussion.

This might be already discussed, but how about, in Step 9 of https://w3c.github.io/ServiceWorker/#update-algorithm, checking `script`'s record's `[[Async]]` and if it is true, reject the updating just like ordinal fetch errors? (i.e. replacing `If the algorithm asynchronously completes with null, then:` with `If the algorithm asynchronously completes with null or the asynchronous completion value's record's [[Async]] is true, then:` and removes the allowAwait argument from https://github.com/whatwg/html/pull/4352)

I'm wondering if we can remove the top-level await allowance flag from fetching algorithm, because the top-level await allowance is more like an attribute of the calling context of module fetching (i.e. disallow TLA on top-level SW script fetch, [allow TLA dynamic import](https://github.com/w3c/ServiceWorker/issues/1407#issuecomment-532033118) on SW if we would allow dynamic import on SW), rather than an attribute of global scope nor fetching itself.


-- 
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/1407#issuecomment-555256984

Received on Monday, 18 November 2019 23:23:48 UTC