SharedWorker

open class SharedWorker(scriptURL: String, options: String = definedExternally) : EventTarget, AbstractWorker(source)

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.

MDN Reference

Constructors

Link copied to clipboard
constructor(scriptURL: URL, options: String = definedExternally)
constructor(scriptURL: String, options: WorkerOptions)
constructor(scriptURL: URL, options: WorkerOptions)
constructor(scriptURL: String, options: String = definedExternally)

Properties

Link copied to clipboard

Returns sharedWorker's MessagePort object which can be used to communicate with the global environment.

Functions

Link copied to clipboard
Link copied to clipboard