WebWorkersAPI
Types
cache
Provides a storage mechanism for Request / Response object pairs that are cached, for example as part of the ServiceWorker life cycle. Note that the Cache interface is exposed to windowed scopes as well as workers. You don't have to use it in conjunction with service workers, even though it is defined in the service worker spec.See Cache on MDN
typecache= {}cacheQueryOptions
typecacheQueryOptions= {mutableignoreSearch?:bool,mutableignoreMethod?:bool,mutableignoreVary?:bool,}Record fields
ignoreSearch
ignoreMethod
ignoreVary
cacheStorage
The storage for Cache objects.See CacheStorage on MDN
typecacheStorage= {}Module
There are methods and helpers defined in CacheStorage.
multiCacheQueryOptions
typemultiCacheQueryOptions= {mutableignoreSearch?:bool,mutableignoreMethod?:bool,mutableignoreVary?:bool,mutablecacheName?:string,}Record fields
ignoreSearch
ignoreMethod
ignoreVary
cacheName
sharedWorkerGlobalScope
TheSharedWorkerGlobalScope object (theSharedWorker global scope) isaccessible through the self keyword. Some additional global functions,namespaces objects, and constructors, not typically associated with the workerglobal scope, but available on it, are listed in the JavaScript Reference. Seethe complete list of functions available to workers.
typesharedWorkerGlobalScope= {caches:cacheStorage,crossOriginIsolated:bool,name:option<string>,}Record fields
name
Module
There are methods and helpers defined in SharedWorkerGlobalScope.
workerGlobalScope
The WorkerGlobalScope interface of the Web Workers API is an interface representing the scope of any worker.Workers have no browsing context; this scope contains the information usually conveyed by Window objects —in this case event handlers, the console or the associated WorkerNavigator object.Each WorkerGlobalScope has its own event loop.See WorkerGlobalScope on MDN
typeworkerGlobalScope= {caches:cacheStorage,crossOriginIsolated:bool,}Record fields
Module
There are methods and helpers defined in WorkerGlobalScope.
workerOptions
An object containing option properties that can set when creating theobject instance.
typeworkerOptions= {mutabletype_?:workerType,mutablecredentials?:WebAPI.FetchAPI.requestCredentials,mutablename?:string,}Record fields
type_
credentials
name
workerType
typeworkerType=| @as("classic")Classic| @as("module")Module