Package org.w3c.workers

Platform and version requirements: JS

Kotlin JavaScript wrappers for the Web Workers API.

Types

Cache

abstract external class Cache

Exposes the JavaScript Cache to Kotlin

CacheBatchOperation

external interface CacheBatchOperation

CacheQueryOptions

external interface CacheQueryOptions

CacheStorage

abstract external class CacheStorage

Exposes the JavaScript CacheStorage to Kotlin

Client

abstract external class Client : 
    UnionClientOrMessagePortOrServiceWorker

Exposes the JavaScript Client to Kotlin

ClientQueryOptions

external interface ClientQueryOptions

ClientType

external interface ClientType

Clients

abstract external class Clients

Exposes the JavaScript Clients to Kotlin

ExtendableEvent

open external class ExtendableEvent : Event

Exposes the JavaScript ExtendableEvent to Kotlin

ExtendableEventInit

external interface ExtendableEventInit : EventInit

ExtendableMessageEvent

open external class ExtendableMessageEvent : ExtendableEvent

Exposes the JavaScript ExtendableMessageEvent to Kotlin

ExtendableMessageEventInit

external interface ExtendableMessageEventInit : 
    ExtendableEventInit

FetchEvent

open external class FetchEvent : ExtendableEvent

Exposes the JavaScript FetchEvent to Kotlin

FetchEventInit

external interface FetchEventInit : ExtendableEventInit

ForeignFetchEvent

open external class ForeignFetchEvent : ExtendableEvent

ForeignFetchEventInit

external interface ForeignFetchEventInit : 
    ExtendableEventInit

ForeignFetchOptions

external interface ForeignFetchOptions

ForeignFetchResponse

external interface ForeignFetchResponse

FrameType

external interface FrameType

FunctionalEvent

open external class FunctionalEvent : ExtendableEvent

InstallEvent

open external class InstallEvent : ExtendableEvent

Exposes the JavaScript InstallEvent to Kotlin

RegistrationOptions

external interface RegistrationOptions

ServiceWorker

abstract external class ServiceWorker : 
    EventTarget,
    AbstractWorker,
    UnionMessagePortOrServiceWorker,
    UnionClientOrMessagePortOrServiceWorker

Exposes the JavaScript ServiceWorker to Kotlin

ServiceWorkerContainer

abstract external class ServiceWorkerContainer : EventTarget

Exposes the JavaScript ServiceWorkerContainer to Kotlin

ServiceWorkerGlobalScope

abstract external class ServiceWorkerGlobalScope : 
    WorkerGlobalScope

Exposes the JavaScript ServiceWorkerGlobalScope to Kotlin

ServiceWorkerMessageEvent

open external class ServiceWorkerMessageEvent : Event

Exposes the JavaScript ServiceWorkerMessageEvent to Kotlin

ServiceWorkerMessageEventInit

external interface ServiceWorkerMessageEventInit : EventInit

ServiceWorkerRegistration

abstract external class ServiceWorkerRegistration : 
    EventTarget

Exposes the JavaScript ServiceWorkerRegistration to Kotlin

ServiceWorkerState

external interface ServiceWorkerState

UnionClientOrMessagePortOrServiceWorker

external interface UnionClientOrMessagePortOrServiceWorker

WindowClient

abstract external class WindowClient : Client

Exposes the JavaScript WindowClient to Kotlin

Functions

CacheBatchOperation

fun CacheBatchOperation(
    type: String? = null,
    request: Request? = null,
    response: Response? = null,
    options: CacheQueryOptions? = null
): CacheBatchOperation

CacheQueryOptions

fun CacheQueryOptions(
    ignoreSearch: Boolean? = false,
    ignoreMethod: Boolean? = false,
    ignoreVary: Boolean? = false,
    cacheName: String? = null
): CacheQueryOptions

ClientQueryOptions

fun ClientQueryOptions(
    includeUncontrolled: Boolean? = false,
    type: ClientType? = ClientType.WINDOW
): ClientQueryOptions

ExtendableEventInit

fun ExtendableEventInit(
    bubbles: Boolean? = false,
    cancelable: Boolean? = false,
    composed: Boolean? = false
): ExtendableEventInit

ExtendableMessageEventInit

fun ExtendableMessageEventInit(
    data: Any? = null,
    origin: String? = null,
    lastEventId: String? = null,
    source: UnionClientOrMessagePortOrServiceWorker? = null,
    ports: Array<MessagePort>? = null,
    bubbles: Boolean? = false,
    cancelable: Boolean? = false,
    composed: Boolean? = false
): ExtendableMessageEventInit

FetchEventInit

fun FetchEventInit(
    request: Request?,
    clientId: String? = null,
    isReload: Boolean? = false,
    bubbles: Boolean? = false,
    cancelable: Boolean? = false,
    composed: Boolean? = false
): FetchEventInit

ForeignFetchEventInit

fun ForeignFetchEventInit(
    request: Request?,
    origin: String? = "null",
    bubbles: Boolean? = false,
    cancelable: Boolean? = false,
    composed: Boolean? = false
): ForeignFetchEventInit

ForeignFetchOptions

fun ForeignFetchOptions(
    scopes: Array<String>?,
    origins: Array<String>?
): ForeignFetchOptions

ForeignFetchResponse

fun ForeignFetchResponse(
    response: Response?,
    origin: String? = null,
    headers: Array<String>? = null
): ForeignFetchResponse

RegistrationOptions

fun RegistrationOptions(
    scope: String? = null,
    type: WorkerType? = WorkerType.CLASSIC
): RegistrationOptions

ServiceWorkerMessageEventInit

fun ServiceWorkerMessageEventInit(
    data: Any? = null,
    origin: String? = null,
    lastEventId: String? = null,
    source: UnionMessagePortOrServiceWorker? = null,
    ports: Array<MessagePort>? = null,
    bubbles: Boolean? = false,
    cancelable: Boolean? = false,
    composed: Boolean? = false
): ServiceWorkerMessageEventInit

Companion Object Properties

ACTIVATED

val ServiceWorkerState.Companion.ACTIVATED: ServiceWorkerState

ACTIVATING

val ServiceWorkerState.Companion.ACTIVATING: ServiceWorkerState

ALL

val ClientType.Companion.ALL: ClientType

AUXILIARY

val FrameType.Companion.AUXILIARY: FrameType

INSTALLED

val ServiceWorkerState.Companion.INSTALLED: ServiceWorkerState

INSTALLING

val ServiceWorkerState.Companion.INSTALLING: ServiceWorkerState

NESTED

val FrameType.Companion.NESTED: FrameType

NONE

val FrameType.Companion.NONE: FrameType

REDUNDANT

val ServiceWorkerState.Companion.REDUNDANT: ServiceWorkerState

SHAREDWORKER

val ClientType.Companion.SHAREDWORKER: ClientType

TOP_LEVEL

val FrameType.Companion.TOP_LEVEL: FrameType

WINDOW

val ClientType.Companion.WINDOW: ClientType

WORKER

val ClientType.Companion.WORKER: ClientType