DedicatedWorkerGlobalScope class

The object (the Worker global scope) is accessible through the self keyword. Some additional global functions, namespaces objects, and constructors, not typically associated with the worker global scope, but available on it, are listed in the JavaScript Reference. See also: Functions available to workers.

EventTarget

WorkerGlobalScope

DedicatedWorkerGlobalScope

Implemented types
Available extensions
Annotations
  • @JS()
  • @staticInterop

Constructors

DedicatedWorkerGlobalScope()
factory

Properties

caches CacheStorage

Available on WindowOrWorkerGlobalScope, provided by the PropsWindowOrWorkerGlobalScope extension

no setter
crossOriginIsolated bool

Available on WindowOrWorkerGlobalScope, provided by the PropsWindowOrWorkerGlobalScope extension

no setter
crypto Crypto

Available on WindowOrWorkerGlobalScope, provided by the PropsWindowOrWorkerGlobalScope extension

no setter
fonts FontFaceSet

Available on FontFaceSource, provided by the PropsFontFaceSource extension

no setter
hashCode int
The hash code for this object.
no setterinherited
indexedDB IDBFactory

Available on WindowOrWorkerGlobalScope, provided by the PropsWindowOrWorkerGlobalScope extension

no setter
isSecureContext bool

Available on WindowOrWorkerGlobalScope, provided by the PropsWindowOrWorkerGlobalScope extension

no setter
location WorkerLocation

Available on WorkerGlobalScope, provided by the PropsWorkerGlobalScope extension

no setter
name String

Available on DedicatedWorkerGlobalScope, provided by the PropsDedicatedWorkerGlobalScope extension

no setter

Available on WorkerGlobalScope, provided by the PropsWorkerGlobalScope extension

no setter
onerror OnErrorEventHandlerNonNull?

Available on WorkerGlobalScope, provided by the PropsWorkerGlobalScope extension

getter/setter pair
onlanguagechange EventHandlerNonNull<Event>?

Available on WorkerGlobalScope, provided by the PropsWorkerGlobalScope extension

getter/setter pair
onmessage EventHandlerNonNull<Event>?

Available on DedicatedWorkerGlobalScope, provided by the PropsDedicatedWorkerGlobalScope extension

getter/setter pair
onmessageerror EventHandlerNonNull<Event>?

Available on DedicatedWorkerGlobalScope, provided by the PropsDedicatedWorkerGlobalScope extension

getter/setter pair
onoffline EventHandlerNonNull<Event>?

Available on WorkerGlobalScope, provided by the PropsWorkerGlobalScope extension

getter/setter pair
ononline EventHandlerNonNull<Event>?

Available on WorkerGlobalScope, provided by the PropsWorkerGlobalScope extension

getter/setter pair
onrejectionhandled EventHandlerNonNull<Event>?

Available on WorkerGlobalScope, provided by the PropsWorkerGlobalScope extension

getter/setter pair
onrtctransform EventHandlerNonNull<Event>?

Available on DedicatedWorkerGlobalScope, provided by the PropsDedicatedWorkerGlobalScope extension

getter/setter pair
onunhandledrejection EventHandlerNonNull<Event>?

Available on WorkerGlobalScope, provided by the PropsWorkerGlobalScope extension

getter/setter pair
origin String

Available on WindowOrWorkerGlobalScope, provided by the PropsWindowOrWorkerGlobalScope extension

no setter
performance Performance

Available on WindowOrWorkerGlobalScope, provided by the PropsWindowOrWorkerGlobalScope extension

no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scheduler Scheduler

Available on WindowOrWorkerGlobalScope, provided by the PropsWindowOrWorkerGlobalScope extension

no setter
self WorkerGlobalScope

Available on WorkerGlobalScope, provided by the PropsWorkerGlobalScope extension

no setter
trustedTypes TrustedTypePolicyFactory

Available on WindowOrWorkerGlobalScope, provided by the PropsWindowOrWorkerGlobalScope extension

no setter

Methods

addEventListener(String type, EventListener? callback, [dynamic options]) → void

Available on EventTarget, provided by the PropsEventTarget extension

atob(String data) String

Available on WindowOrWorkerGlobalScope, provided by the PropsWindowOrWorkerGlobalScope extension

btoa(String data) String

Available on WindowOrWorkerGlobalScope, provided by the PropsWindowOrWorkerGlobalScope extension

cancelAnimationFrame(int handle) → void

Available on AnimationFrameProvider, provided by the PropsAnimationFrameProvider extension

clearInterval([int? id = 0]) → void

Available on WindowOrWorkerGlobalScope, provided by the PropsWindowOrWorkerGlobalScope extension

clearTimeout([int? id = 0]) → void

Available on WindowOrWorkerGlobalScope, provided by the PropsWindowOrWorkerGlobalScope extension

close() → void

Available on DedicatedWorkerGlobalScope, provided by the PropsDedicatedWorkerGlobalScope extension

createImageBitmap(dynamic image, [int? sx, int? sy, int? sw, int? sh, ImageBitmapOptions? options]) Future<ImageBitmap>

Available on WindowOrWorkerGlobalScope, provided by the PropsWindowOrWorkerGlobalScope extension

dispatchEvent(Event event) bool

Available on EventTarget, provided by the PropsEventTarget extension

fetch(dynamic input, [RequestInit? init]) Future<Response>

Available on WindowOrWorkerGlobalScope, provided by the PropsWindowOrWorkerGlobalScope extension

importScripts([String? urls1, String? urls2, String? urls3]) → void

Available on WorkerGlobalScope, provided by the PropsWorkerGlobalScope extension

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
postMessage(dynamic message, Iterable transfer) → void

Available on DedicatedWorkerGlobalScope, provided by the PropsDedicatedWorkerGlobalScope extension

queueMicrotask(VoidFunction callback) → void

Available on WindowOrWorkerGlobalScope, provided by the PropsWindowOrWorkerGlobalScope extension

removeEventListener(String type, EventListener? callback, [dynamic options]) → void

Available on EventTarget, provided by the PropsEventTarget extension

reportError(dynamic e) → void

Available on WindowOrWorkerGlobalScope, provided by the PropsWindowOrWorkerGlobalScope extension

requestAnimationFrame(FrameRequestCallback callback) int

Available on AnimationFrameProvider, provided by the PropsAnimationFrameProvider extension

setInterval(dynamic handler, [int? timeout = 0, dynamic arguments1, dynamic arguments2, dynamic arguments3]) int

Available on WindowOrWorkerGlobalScope, provided by the PropsWindowOrWorkerGlobalScope extension

setTimeout(dynamic handler, [int? timeout = 0, dynamic arguments1, dynamic arguments2, dynamic arguments3]) int

Available on WindowOrWorkerGlobalScope, provided by the PropsWindowOrWorkerGlobalScope extension

structuredClone(dynamic value, [StructuredSerializeOptions? options]) → dynamic

Available on WindowOrWorkerGlobalScope, provided by the PropsWindowOrWorkerGlobalScope extension

toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited