- From: Jake Archibald <notifications@github.com>
- Date: Fri, 28 Jun 2019 02:29:02 -0700
- To: w3c/ServiceWorker <ServiceWorker@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Friday, 28 June 2019 09:29:25 UTC
> I was also thinking of this as a way to allow top-level await, but only for a limited number of ticks What would we do if it exceeded that number of ticks? > This whole setup still seems rather suboptimal for the design of service workers. Yeah, it still feels like we'd have to tell developers "you can do this but oh god please don't do this". Looking at the PR, we could fail the install of a service worker if its `|evaluationPromise|.\[[PromiseState]]` is "pending". This would effectively prevent top-level `await` in service workers at install time. A top-level await could be introduced later, using something like `if (Date.now() > …)`, in which case we'd behave as above. -- 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/pull/1444#issuecomment-506669313
Received on Friday, 28 June 2019 09:29:25 UTC