Package-level declarations

Types

Link copied to clipboard
Link copied to clipboard

The DedicatedWorkerGlobalScope object (the Worker global scope) is accessible through the WorkerGlobalScope.self keyword.

Link copied to clipboard
open class SharedWorker(scriptURL: String, options: String = definedExternally) : EventTarget, AbstractWorker

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.

Link copied to clipboard

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

Link copied to clipboard
open class Worker(scriptURL: String, options: WorkerOptions = definedExternally) : EventTarget, AbstractWorker, MessageEventTarget

The Worker interface of the Web Workers API represents a background task that can be created via script, which can send messages back to its creator.

Link copied to clipboard
sealed external interface WorkerFactory<T : AbstractWorker>
Link copied to clipboard

The WorkerGlobalScope interface of the Web Workers API is an interface representing the scope of any worker.

Link copied to clipboard

The WorkerLocation interface defines the absolute location of the script executed by the Worker.

Link copied to clipboard

The WorkerNavigator interface represents a subset of the Navigator interface allowed to be accessed from a Worker.

Link copied to clipboard
interface WorkerOptions
Link copied to clipboard
sealed interface WorkerType

Functions

Link copied to clipboard
external fun importScripts(vararg urls: String)

The importScripts() method of the WorkerGlobalScope interface synchronously imports one or more scripts into the worker's scope.

external fun importScripts(vararg urls: URL)
Link copied to clipboard
fun SharedWorkerFactory(block: suspend CoroutineScope.(self: SharedWorkerGlobalScope) -> Unit): WorkerFactory<SharedWorker>
Link copied to clipboard
fun WorkerFactory(block: suspend CoroutineScope.(self: DedicatedWorkerGlobalScope) -> Unit): WorkerFactory<Worker>