From 319a49eb59c0cb749461792378919d2a42739358 Mon Sep 17 00:00:00 2001 From: Jungkee Song Date: Sat, 5 Sep 2015 11:09:14 +0900 Subject: [PATCH] Remove importscripts allowed flag --- spec/service_worker/index.html | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/spec/service_worker/index.html b/spec/service_worker/index.html index 675dbe70..84f01abf 100644 --- a/spec/service_worker/index.html +++ b/spec/service_worker/index.html @@ -890,7 +890,7 @@

ServiceWorkerGlobalScope

}; -

A ServiceWorkerGlobalScope object represents the global execution context of a service worker. A ServiceWorkerGlobalScope object has an associated service worker (a service worker). A ServiceWorkerGlobalScope object has an associated importscripts allowed flag. It is initially unset.

+

A ServiceWorkerGlobalScope object represents the global execution context of a service worker. A ServiceWorkerGlobalScope object has an associated service worker (a service worker).

ServiceWorkerGlobalScope object provides generic, event-driven, time-limited script execution contexts that run at an origin. Once successfully registered, a service worker is started, kept alive and killed by their relationship to events, not service worker clients. Any type of synchronous requests must not be initiated inside of a service worker.

The close() method inherited from WorkerGlobalScope, when called on the context object, should throw an "InvalidAccessError" exception.

@@ -2265,13 +2265,7 @@

importScripts(urls)

When the importScripts(urls) method is called on a ServiceWorkerGlobalScope object, the user agent must import scripts into worker global scope, with the following options:

-

To validate the state, the user agent must run the following step:

- - -
    -
  1. If the settings object's global object's importscripts allowed flag is unset, throw an "InvalidStateError" exception and abort these steps.
  2. -
-
+

To validate the state, the user agent must do nothing.

To get a fetch result, the user agent must run the following steps:

@@ -2680,7 +2674,7 @@

Install

  • Queue a task task to run the following substeps:
    1. Create a trusted event e that uses the ExtendableEvent interface, with the event type install, which does not bubble, is not cancelable, and has no default action.
    2. -
    3. Dispatch e at installingWorker's environment settings object's global object globalObject. During the execution of dispatch algorithm, set globalObject's importscripts allowed flag when e's dispatch flag is set, and unset globalObject's importscripts allowed flag when e's dispatch flag is unset.
    4. +
    5. Dispatch e at installingWorker's environment settings object's global object globalObject.
    6. Let extendLifetimePromises be an empty array.
    7. For each event listener invoked: