W3cubDocs

/Haxe JavaScript

SharedWorker

package js.html

extends EventTarget

Available on js

The SharedWorker interface represents a specific kind of worker that can be accessed from several browsing contexts, such as several windows, iframes or even workers. They implement an interface different than dedicated workers and have a different global scope, SharedWorkerGlobalScope.

Documentation SharedWorker by Mozilla Contributors, licensed under CC-BY-SA 2.5.

See also:

Constructor

new(scriptURL:String, ?options:String)

new(scriptURL:String, ?options:Null<WorkerOptions>)

Throws:

null

DOMError

Variables

onerror:Function

read onlyport:MessagePort

Returns a MessagePort object used to communicate and control the shared worker.

© 2005–2020 Haxe Foundation
Licensed under a MIT license.
https://api.haxe.org/js/html/SharedWorker.html