SharedWorkerGlobalScope

The SharedWorkerGlobalScope object (the SharedWorker global scope) is accessible through the window.self keyword.

MDN Reference

Properties

Link copied to clipboard
Link copied to clipboard

The location read-only property of the WorkerGlobalScope interface returns the WorkerLocation associated with the worker.

Link copied to clipboard

The name read-only property of the that the SharedWorker.SharedWorker constructor can pass to get a reference to the SharedWorkerGlobalScope.

Link copied to clipboard

The navigator read-only property of the WorkerGlobalScope interface returns the WorkerNavigator associated with the worker.

Functions

Link copied to clipboard
fun close()

The close() method of the SharedWorkerGlobalScope interface discards any tasks queued in the SharedWorkerGlobalScope's event loop, effectively closing this particular scope.

Link copied to clipboard
Link copied to clipboard
open operator fun get(key: JsString): JsAny?
Link copied to clipboard
open operator fun set(key: JsString, value: JsAny?)
Link copied to clipboard