Re: [ServiceWorker] importScripts() should throw? (#642)

> It seems we should allow importScripts() to run at the top level in addition to the install event.

Yes, this is what I've concerned about too. What I suggested is to remove the step checking the _importscripts allowed flag_ in the importScripts(urls) entirely. Then, for the top level worker script evaluation, importScripts will be allowed to run, and naturally this top level evaluation runs only once as the Run Service Worker algorithm checks whether the worker's already running and returns early there if so. And as such, it seems we don't have to confine the evaluation to oninstall handler as that just a once time event for certain script version.

---
Reply to this email directly or view it on GitHub:
https://github.com/slightlyoff/ServiceWorker/issues/642#issuecomment-137893131

Received on Saturday, 5 September 2015 02:00:40 UTC