From 17525591619f64962b181a4d4b3de7735c16c4c9 Mon Sep 17 00:00:00 2001
From: Domenic Denicola Shared workers receive message ports through When a user agent is to run a worker for a script with
SharedWorkerGlobalScope
object is created, in the run a worker
+ algorithm.
connect
events on their SharedWorkerGlobalScope
object for each
@@ -96712,8 +96714,9 @@ interface SharedWorkerGlobalScope : WorkerGlobalScope {
Worker
or SharedWorker
object worker, URL
url, environment settings object outside settings,
- MessagePort
outside port, and a WorkerOptions
dictionary
- options, it must run the following steps:MessagePort
outside port, a WorkerOptions
dictionary
+ options, and an optional string name, it must run the following steps.
+ (name is always provided when worker is a SharedWorker
.)
If is shared is true, then:
+ +Set worker global scope's constructor url to + url.
Set worker global scope's name to name.
Let destination be "sharedworker
" if is
shared is true, and "worker
" otherwise.
Let urlString be the resulting URL string and urlRecord be - the resulting URL record.
+Otherwise, let urlRecord be the resulting URL record.
Any same-origin URL will do, including blob:
URLs.
If there exists a SharedWorkerGlobalScope
object whose closing flag is false, whose name is exactly equal to name,
- whose constructor url is
- equal to urlString, and whose relevant settings object's
- origin is same origin with
- outside settings's origin, then
- set worker global scope to that SharedWorkerGlobalScope
- object.
SharedWorkerGlobalScope
object.
If worker global scope is not null, but the user agent has been @@ -97454,7 +97469,8 @@ interface SharedWorker : EventTarget {
Otherwise, run a worker given worker, urlRecord, - outside settings, outside port, and options.