- From: Jungkee Song <notifications@github.com>
- Date: Wed, 07 Dec 2016 21:36:23 -0800
- To: w3c/ServiceWorker <ServiceWorker@noreply.github.com>
- Message-ID: <w3c/ServiceWorker/issues/1021/265657342@github.com>
Our thought flow over the discussion has been: 1. No sync API should be allowed in SW, and `importScripts()` is one. So, let's allow it only during install events: https://github.com/w3c/ServiceWorker/issues/730 2. (1) prevents even the cached imported scripts from being executed in the later events. So, let's remove this restriction: https://github.com/w3c/ServiceWorker/issues/642#issuecomment-137631700 (2) sort of assumed that a specific service worker version and its (cached) imported script resources should map 1:1. So, it currently sets the flag upon a successful install. > @mattto and @wanderview say implementations flip the switch after the first synchronous run of the service worker script. This is a question about until when we should allow fetching the scripts from the network: either until the first SW run during an Update or until the successful install of a SW version. In addition to that, https://github.com/w3c/ServiceWorker/issues/839#issuecomment-265345278 should be discussed in this thread as well - whether we should allow the imported scripts to run in async tasks or not. @jakearchibald's example above suggests a usage where cached imported scripts can be used in async tasks while offline. -- 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-265657342
Received on Thursday, 8 December 2016 05:36:56 UTC