diff --git a/source b/source index 166544155e6..98b8381fe6d 100644 --- a/source +++ b/source @@ -96297,8 +96297,6 @@ interface WorkerGlobalScope : EventTarget { readonly attribute WorkerNavigator navigator; void importScripts(DOMString... urls); - void close(); - attribute OnErrorEventHandler onerror; attribute EventHandler onlanguagechange; attribute EventHandler onoffline; @@ -96340,9 +96338,6 @@ interface WorkerGlobalScope : EventTarget {
workerGlobal . importScripts(urls...)
Fetches each URL in urls, executes them one-by-one in the order they are passed, and then returns (or throws if something went amiss).
- -
workerGlobal . close()
-
Aborts workerGlobal.
@@ -96359,24 +96354,6 @@ interface WorkerGlobalScope : EventTarget { WorkerGlobalScope object, this is not problematic as it cannot be observed from script.

-
- -

When a script invokes the close() - method on a WorkerGlobalScope object, the user agent must run the following steps - (atomically):

- -
    - -
  1. Discard any tasks that have been added to the - WorkerGlobalScope object's event loop's task - queues.

    - -
  2. Set the worker's WorkerGlobalScope object's closing flag to true. (This prevents any further - tasks from being queued.)

  3. - -
-

@@ -96403,6 +96380,9 @@ interface WorkerGlobalScope : EventTarget {
[Global=(Worker,DedicatedWorker),Exposed=DedicatedWorker]
 /*sealed*/ interface DedicatedWorkerGlobalScope : WorkerGlobalScope {
   void postMessage(any message, optional sequence<object> transfer = []);
+
+  void close();
+
   attribute EventHandler onmessage;
 };
@@ -96414,11 +96394,45 @@ interface WorkerGlobalScope : EventTarget {

All messages received by that port must immediately be retargeted at the DedicatedWorkerGlobalScope object.

+
+
dedicatedWorkerGlobal . postMessage(message [, + transfer ])
+
Clones message and transmits it to the Worker object associated with + dedicatedWorkerGlobal. transfer can be passed as a list of objects that are + to be transfered rather than cloned.
+ +
dedicatedWorkerGlobal . close()
+
Aborts dedicatedWorkerGlobal.
+
+

The postMessage() method on DedicatedWorkerGlobalScope objects must act as if, when invoked, it immediately invoked the method of the same name on the port, with the same arguments, and returned the same return value.

+
+ +

To close a worker, given a workerGlobal, run these steps:

+ +
    +
  1. Discard any tasks that have been added to + workerGlobal's event loop's task + queues.

    + +
  2. Set workerGlobal's closing + flag to true. (This prevents any further tasks from being queued.)

  3. +
+ +

The close() method, when + invoked, must close a worker with this DedicatedWorkerGlobalScope + object.

+ +
+ +
+

The following are the event handlers (and their corresponding event handler event types) that must be supported, as event handler IDL attributes, by objects implementing the DedicatedWorkerGlobalScope @@ -96442,6 +96456,9 @@ interface WorkerGlobalScope : EventTarget { /*sealed*/ interface SharedWorkerGlobalScope : WorkerGlobalScope { readonly attribute DOMString name; readonly attribute ApplicationCache applicationCache; // deprecated + + void close(); + attribute EventHandler onconnect; }; @@ -96459,6 +96476,10 @@ interface WorkerGlobalScope : EventTarget {

sharedWorkerGlobal . name
Returns sharedWorkerGlobal's name.
+ +
sharedWorkerGlobal . close()
+
Aborts sharedWorkerGlobal.
@@ -96468,8 +96489,14 @@ interface WorkerGlobalScope : EventTarget { data-x="concept-SharedWorkerGlobalScope-name">name. Its value represents the name that can be used to obtain a reference to the worker using the SharedWorker constructor.

+

The close() method, when + invoked, must close a worker with this SharedWorkerGlobalScope + object.

+
+
+

The following are the event handlers (and their corresponding event handler event types) that must be supported, as event handler IDL attributes, by objects implementing the SharedWorkerGlobalScope