SharedWorkerGlobalScope class
The object (the SharedWorker 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 the complete list of functions available to workers.
EventTarget
WorkerGlobalScope
SharedWorkerGlobalScope
- Implemented types
- Available extensions
- Annotations
-
- @JS()
- @staticInterop
Constructors
-
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 SharedWorkerGlobalScope, provided by the PropsSharedWorkerGlobalScope extension
no setter -
Available on WorkerGlobalScope, provided by the PropsWorkerGlobalScope extension
no setter -
onconnect
↔ EventHandlerNonNull<
Event> ? -
Available on SharedWorkerGlobalScope, provided by the PropsSharedWorkerGlobalScope extension
getter/setter pair - 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 -
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 -
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
-
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 SharedWorkerGlobalScope, provided by the PropsSharedWorkerGlobalScope 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
-
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
-
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