SharedWorkerGlobalScope class

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

Constructors

SharedWorkerGlobalScope()
factory

Properties

addEventListener → ({void Function<K$>(WorkerGlobalScopeEventMap<K$> type, dynamic listener(K$), [Object? options]) $1, void Function(String type, Object listener, [Object? options]) $2})

Available on WorkerGlobalScope, provided by the WorkerGlobalScope$Typings extension

Overload accessor: $1, $2
no setter
addEventListener ↔ void Function(String, [Object?, Object?])

Available on EventTarget, provided by the EventTarget$Typings extension

getter/setter pair
addEventListener → ({void Function<K$>(SharedWorkerGlobalScopeEventMap<K$> type, dynamic listener(K$), [Object? options]) $1, void Function(String type, Object listener, [Object? options]) $2})

Available on SharedWorkerGlobalScope, provided by the SharedWorkerGlobalScope$Typings extension

Overload accessor: $1, $2
no setter
atob String Function(String)

Available on WindowOrWorkerGlobalScope, provided by the WindowOrWorkerGlobalScope$Typings extension

getter/setter pair
btoa String Function(String)

Available on WindowOrWorkerGlobalScope, provided by the WindowOrWorkerGlobalScope$Typings extension

getter/setter pair
caches CacheStorage

Available on WindowOrWorkerGlobalScope, provided by the WindowOrWorkerGlobalScope$Typings extension

Available only in secure contexts.
no setter
clearInterval ↔ void Function([num?])

Available on WindowOrWorkerGlobalScope, provided by the WindowOrWorkerGlobalScope$Typings extension

getter/setter pair
clearTimeout ↔ void Function([num?])

Available on WindowOrWorkerGlobalScope, provided by the WindowOrWorkerGlobalScope$Typings extension

getter/setter pair
close ↔ void Function()

Available on SharedWorkerGlobalScope, provided by the SharedWorkerGlobalScope$Typings extension

getter/setter pair
createImageBitmap → ({Future<ImageBitmap> Function(Object image, [ImageBitmapOptions? options]) $1, Future<ImageBitmap> Function(Object image, num sx, num sy, num sw, num sh, [ImageBitmapOptions? options]) $2})

Available on WindowOrWorkerGlobalScope, provided by the WindowOrWorkerGlobalScope$Typings extension

Overload accessor: $1, $2
no setter
crossOriginIsolated bool

Available on WindowOrWorkerGlobalScope, provided by the WindowOrWorkerGlobalScope$Typings extension

MDN Reference
no setter
crypto Crypto

Available on WindowOrWorkerGlobalScope, provided by the WindowOrWorkerGlobalScope$Typings extension

MDN Reference
no setter
dispatchEvent bool Function(Event)

Available on EventTarget, provided by the EventTarget$Typings extension

getter/setter pair
fetch Future<Response> Function(Object, [RequestInit?])

Available on WindowOrWorkerGlobalScope, provided by the WindowOrWorkerGlobalScope$Typings extension

getter/setter pair
fonts FontFaceSet

Available on FontFaceSource, provided by the FontFaceSource$Typings extension

MDN Reference
no setter
hashCode int
The hash code for this object.
no setterinherited
importScripts ↔ void Function([Iterable?])

Available on WorkerGlobalScope, provided by the WorkerGlobalScope$Typings extension

getter/setter pair
indexedDB IDBFactory

Available on WindowOrWorkerGlobalScope, provided by the WindowOrWorkerGlobalScope$Typings extension

MDN Reference
no setter
isSecureContext bool

Available on WindowOrWorkerGlobalScope, provided by the WindowOrWorkerGlobalScope$Typings extension

MDN Reference
no setter
location WorkerLocation

Available on WorkerGlobalScope, provided by the WorkerGlobalScope$Typings extension

Returns workerGlobal's WorkerLocation object.
no setter
name String

Available on SharedWorkerGlobalScope, provided by the SharedWorkerGlobalScope$Typings extension

Returns sharedWorkerGlobal's name, i.e. the value given to the SharedWorker constructor. Multiple SharedWorker objects can correspond to the same shared worker (and SharedWorkerGlobalScope), by reusing the same name.
no setter

Available on WorkerGlobalScope, provided by the WorkerGlobalScope$Typings extension

Returns workerGlobal's WorkerNavigator object.
no setter
onconnect ↔ dynamic Function(MessageEvent)?

Available on SharedWorkerGlobalScope, provided by the SharedWorkerGlobalScope$Typings extension

MDN Reference
getter/setter pair
onerror ↔ dynamic Function(ErrorEvent)?

Available on WorkerGlobalScope, provided by the WorkerGlobalScope$Typings extension

MDN Reference
getter/setter pair
onlanguagechange ↔ dynamic Function(Event)?

Available on WorkerGlobalScope, provided by the WorkerGlobalScope$Typings extension

MDN Reference
getter/setter pair
onoffline ↔ dynamic Function(Event)?

Available on WorkerGlobalScope, provided by the WorkerGlobalScope$Typings extension

MDN Reference
getter/setter pair
ononline ↔ dynamic Function(Event)?

Available on WorkerGlobalScope, provided by the WorkerGlobalScope$Typings extension

MDN Reference
getter/setter pair
onrejectionhandled ↔ dynamic Function(PromiseRejectionEvent)?

Available on WorkerGlobalScope, provided by the WorkerGlobalScope$Typings extension

getter/setter pair
onunhandledrejection ↔ dynamic Function(PromiseRejectionEvent)?

Available on WorkerGlobalScope, provided by the WorkerGlobalScope$Typings extension

getter/setter pair
origin String

Available on WindowOrWorkerGlobalScope, provided by the WindowOrWorkerGlobalScope$Typings extension

MDN Reference
no setter
performance Performance

Available on WindowOrWorkerGlobalScope, provided by the WindowOrWorkerGlobalScope$Typings extension

MDN Reference
no setter
queueMicrotask ↔ void Function(VoidFunction)

Available on WindowOrWorkerGlobalScope, provided by the WindowOrWorkerGlobalScope$Typings extension

getter/setter pair
removeEventListener → ({void Function<K$>(SharedWorkerGlobalScopeEventMap<K$> type, dynamic listener(K$), [Object? options]) $1, void Function(String type, Object listener, [Object? options]) $2})

Available on SharedWorkerGlobalScope, provided by the SharedWorkerGlobalScope$Typings extension

Overload accessor: $1, $2
no setter
removeEventListener ↔ void Function(String, [Object?, Object?])

Available on EventTarget, provided by the EventTarget$Typings extension

getter/setter pair
removeEventListener → ({void Function<K$>(WorkerGlobalScopeEventMap<K$> type, dynamic listener(K$), [Object? options]) $1, void Function(String type, Object listener, [Object? options]) $2})

Available on WorkerGlobalScope, provided by the WorkerGlobalScope$Typings extension

Overload accessor: $1, $2
no setter
reportError ↔ void Function([dynamic])

Available on WindowOrWorkerGlobalScope, provided by the WindowOrWorkerGlobalScope$Typings extension

getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
self → _Intersection7

Available on WorkerGlobalScope, provided by the WorkerGlobalScope$Typings extension

Returns workerGlobal.
no setter
setInterval num Function(Object, [num?, Iterable?])

Available on WindowOrWorkerGlobalScope, provided by the WindowOrWorkerGlobalScope$Typings extension

getter/setter pair
setTimeout num Function(Object, [num?, Iterable?])

Available on WindowOrWorkerGlobalScope, provided by the WindowOrWorkerGlobalScope$Typings extension

getter/setter pair
structuredClone ↔ T Function<T>(T, [StructuredSerializeOptions?])

Available on WindowOrWorkerGlobalScope, provided by the WindowOrWorkerGlobalScope$Typings extension

getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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