@Generated(value="org.realityforge.webtack")
@JsType(isNative=true,
namespace="<global>",
name="WorkerGlobalScope")
public class WorkerGlobalScope
extends EventTarget
| Modifier and Type | Field and Description |
|---|---|
@JsNullable OnErrorEventHandler |
onerror
The onerror property of the WorkerGlobalScope interface represents an EventHandler to be called when the error event occurs and bubbles through the Worker.
|
@JsNullable EventHandler |
onlanguagechange
The onlanguagechange property of the WorkerGlobalScope interface represents an EventHandler to be called when the languagechange event occurs and bubbles through the Worker.
|
@JsNullable EventHandler |
onoffline
The onoffline property of the WorkerGlobalScope interface represents an EventHandler to be called when the offline event occurs and bubbles through the Worker.
|
@JsNullable EventHandler |
ononline
The ononline property of the WorkerGlobalScope interface represents an EventHandler to be called when the online event occurs and bubbles through the Worker.
|
@JsNullable PromiseRejectionEventHandler |
onrejectionhandled |
@JsNullable PromiseRejectionEventHandler |
onunhandledrejection |
| Modifier | Constructor and Description |
|---|---|
protected |
WorkerGlobalScope() |
| Modifier and Type | Method and Description |
|---|---|
void |
addLanguagechangeListener(EventListener callback) |
void |
addLanguagechangeListener(EventListener callback,
AddEventListenerOptions options) |
void |
addLanguagechangeListener(EventListener callback,
boolean useCapture) |
void |
addOfflineListener(EventListener callback) |
void |
addOfflineListener(EventListener callback,
AddEventListenerOptions options) |
void |
addOfflineListener(EventListener callback,
boolean useCapture) |
void |
addOnlineListener(EventListener callback) |
void |
addOnlineListener(EventListener callback,
AddEventListenerOptions options) |
void |
addOnlineListener(EventListener callback,
boolean useCapture) |
void |
addRejectionhandledListener(PromiseRejectionEventListener callback) |
void |
addRejectionhandledListener(PromiseRejectionEventListener callback,
AddEventListenerOptions options) |
void |
addRejectionhandledListener(PromiseRejectionEventListener callback,
boolean useCapture) |
void |
addUnhandledrejectionListener(PromiseRejectionEventListener callback) |
void |
addUnhandledrejectionListener(PromiseRejectionEventListener callback,
AddEventListenerOptions options) |
void |
addUnhandledrejectionListener(PromiseRejectionEventListener callback,
boolean useCapture) |
@JsNonNull java.lang.String |
atob(java.lang.String data)
The WindowOrWorkerGlobalScope.atob() function decodes a string of data which has been encoded using Base64 encoding.
|
@JsNonNull java.lang.String |
btoa(java.lang.String data)
The WindowOrWorkerGlobalScope.btoa() method creates a Base64-encoded ASCII string from a binary string (i.e., a String object in which each character in the string is treated as a byte of binary data).
|
CacheStorage |
caches()
The caches read-only property of the WindowOrWorkerGlobalScope interface returns the CacheStorage object associated with the current context.
|
void |
clearInterval()
The clearInterval() method of the WindowOrWorkerGlobalScope mixin cancels a timed, repeating action which was previously established by a call to setInterval().
|
void |
clearInterval(int handle)
The clearInterval() method of the WindowOrWorkerGlobalScope mixin cancels a timed, repeating action which was previously established by a call to setInterval().
|
void |
clearTimeout()
The clearTimeout() method of the WindowOrWorkerGlobalScope mixin cancels a timeout previously established by calling setTimeout().
|
void |
clearTimeout(int handle)
The clearTimeout() method of the WindowOrWorkerGlobalScope mixin cancels a timeout previously established by calling setTimeout().
|
@JsNonNull Promise<ImageBitmap> |
createImageBitmap(ImageBitmapSource image)
The createImageBitmap() method creates a bitmap from a given source, optionally cropped to contain only a portion of that source.
|
@JsNonNull Promise<ImageBitmap> |
createImageBitmap(ImageBitmapSource image,
ImageBitmapOptions options)
The createImageBitmap() method creates a bitmap from a given source, optionally cropped to contain only a portion of that source.
|
@JsNonNull Promise<ImageBitmap> |
createImageBitmap(ImageBitmapSource image,
int sx,
int sy,
int sw,
int sh)
The createImageBitmap() method creates a bitmap from a given source, optionally cropped to contain only a portion of that source.
|
@JsNonNull Promise<ImageBitmap> |
createImageBitmap(ImageBitmapSource image,
int sx,
int sy,
int sw,
int sh,
ImageBitmapOptions options)
The createImageBitmap() method creates a bitmap from a given source, optionally cropped to contain only a portion of that source.
|
boolean |
crossOriginIsolated()
The crossOriginIsolated read-only property of the WindowOrWorkerGlobalScope interface returns a boolean value that indicates whether a SharedArrayBuffer can be sent via a Window.postMessage() call.
|
Crypto |
crypto() |
@JsNonNull Promise<Response> |
fetch(Request input)
The fetch() method of the WindowOrWorkerGlobalScope mixin starts the process of fetching a resource from the network, returning a promise which is fulfilled once the response is available.
|
@JsNonNull Promise<Response> |
fetch(RequestInfo input)
The fetch() method of the WindowOrWorkerGlobalScope mixin starts the process of fetching a resource from the network, returning a promise which is fulfilled once the response is available.
|
@JsNonNull Promise<Response> |
fetch(RequestInfo input,
RequestInit init)
The fetch() method of the WindowOrWorkerGlobalScope mixin starts the process of fetching a resource from the network, returning a promise which is fulfilled once the response is available.
|
@JsNonNull Promise<Response> |
fetch(Request input,
RequestInit init)
The fetch() method of the WindowOrWorkerGlobalScope mixin starts the process of fetching a resource from the network, returning a promise which is fulfilled once the response is available.
|
@JsNonNull Promise<Response> |
fetch(java.lang.String input)
The fetch() method of the WindowOrWorkerGlobalScope mixin starts the process of fetching a resource from the network, returning a promise which is fulfilled once the response is available.
|
@JsNonNull Promise<Response> |
fetch(java.lang.String input,
RequestInit init)
The fetch() method of the WindowOrWorkerGlobalScope mixin starts the process of fetching a resource from the network, returning a promise which is fulfilled once the response is available.
|
void |
importScripts(java.lang.String... urls)
The importScripts() method of the WorkerGlobalScope interface synchronously imports one or more scripts into the worker's scope.
|
IDBFactory |
indexedDB()
The indexedDB read-only property of the WindowOrWorkerGlobalScope mixin provides a mechanism for applications to asynchronously access the capabilities of indexed databases.
|
boolean |
isIndexedDBSupported() |
boolean |
isSecureContext()
The isSecureContext read-only property of the WindowOrWorkerGlobalScope interface returns a boolean indicating whether the current context is secure (true) or not (false).
|
WorkerLocation |
location()
The location read-only property of the WorkerGlobalScope interface returns the WorkerLocation associated with the worker.
|
WorkerNavigator |
navigator()
The navigator read-only property of the WorkerGlobalScope interface returns the WorkerNavigator associated with the worker.
|
java.lang.String |
origin()
The origin read-only property of the WindowOrWorkerGlobalScope interface returns the origin of the global scope, serialized as a string.
|
Performance |
performance()
The performance read-only property of the WorkerGlobalScope interface returns a Performance object to be used on the worker.
|
void |
queueMicrotask(VoidFunction callback)
The queueMicrotask() method, which is exposed on the Window or Worker interface, queues a microtask to be executed at a safe time prior to control returning to the browser's event loop.
|
void |
removeLanguagechangeListener(EventListener callback) |
void |
removeLanguagechangeListener(EventListener callback,
boolean useCapture) |
void |
removeLanguagechangeListener(EventListener callback,
EventListenerOptions options) |
void |
removeOfflineListener(EventListener callback) |
void |
removeOfflineListener(EventListener callback,
boolean useCapture) |
void |
removeOfflineListener(EventListener callback,
EventListenerOptions options) |
void |
removeOnlineListener(EventListener callback) |
void |
removeOnlineListener(EventListener callback,
boolean useCapture) |
void |
removeOnlineListener(EventListener callback,
EventListenerOptions options) |
void |
removeRejectionhandledListener(PromiseRejectionEventListener callback) |
void |
removeRejectionhandledListener(PromiseRejectionEventListener callback,
boolean useCapture) |
void |
removeRejectionhandledListener(PromiseRejectionEventListener callback,
EventListenerOptions options) |
void |
removeUnhandledrejectionListener(PromiseRejectionEventListener callback) |
void |
removeUnhandledrejectionListener(PromiseRejectionEventListener callback,
boolean useCapture) |
void |
removeUnhandledrejectionListener(PromiseRejectionEventListener callback,
EventListenerOptions options) |
void |
reportError(java.lang.Object e) |
WorkerGlobalScope |
self()
The self read-only property of the WorkerGlobalScope interface returns a reference to the WorkerGlobalScope itself.
|
int |
setInterval(TimerHandler handler)
The setInterval() method, offered on the Window and Worker interfaces, repeatedly calls a function or executes a code snippet, with a fixed time delay between each call.
|
int |
setInterval(TimerHandler handler,
int timeout)
The setInterval() method, offered on the Window and Worker interfaces, repeatedly calls a function or executes a code snippet, with a fixed time delay between each call.
|
int |
setTimeout(TimerHandler handler)
The setTimeout() method of the WindowOrWorkerGlobalScope mixin (and successor to Window.setTimeout()) sets a timer which executes a function or specified piece of code once the timer expires.
|
int |
setTimeout(TimerHandler handler,
int timeout)
The setTimeout() method of the WindowOrWorkerGlobalScope mixin (and successor to Window.setTimeout()) sets a timer which executes a function or specified piece of code once the timer expires.
|
@JsNullable jsinterop.base.Any |
structuredClone(java.lang.Object value) |
@JsNullable jsinterop.base.Any |
structuredClone(java.lang.Object value,
StructuredSerializeOptions options) |
addEventListener, addEventListener, addEventListener, dispatchEvent, removeEventListener, removeEventListener, removeEventListenerassign, create, create, defineProperties, defineProperty, defineProperty, entries, freeze, fromEntries, getOwnPropertyDescriptor, getOwnPropertyDescriptor, getOwnPropertyDescriptors, getOwnPropertyNames, getOwnPropertySymbols, getPrototypeOf, hasOwnProperty, hasOwnProperty, is, isExtensible, isFrozen, isPrototypeOf, isSealed, keys, preventExtensions, propertyIsEnumerable, seal, setPrototypeOf, toString_, valueOf_, valuespublic @JsNullable OnErrorEventHandler onerror
public @JsNullable EventHandler onlanguagechange
public @JsNullable EventHandler onoffline
public @JsNullable EventHandler ononline
public @JsNullable PromiseRejectionEventHandler onrejectionhandled
public @JsNullable PromiseRejectionEventHandler onunhandledrejection
@JsProperty(name="caches") @Nonnull public CacheStorage caches()
@JsProperty(name="crossOriginIsolated") public boolean crossOriginIsolated()
@JsProperty(name="crypto") @Nonnull public Crypto crypto()
@JsOverlay public final boolean isIndexedDBSupported()
@JsProperty(name="indexedDB") @Nonnull public IDBFactory indexedDB()
@JsProperty(name="isSecureContext") public boolean isSecureContext()
@JsProperty(name="location") @Nonnull public WorkerLocation location()
@JsProperty(name="navigator") @Nonnull public WorkerNavigator navigator()
@JsProperty(name="origin") @Nonnull public java.lang.String origin()
@JsProperty(name="performance") @Nonnull public Performance performance()
@JsProperty(name="self") @Nonnull public WorkerGlobalScope self()
public void importScripts(@Nonnull
java.lang.String... urls)
public @JsNonNull java.lang.String atob(@Nonnull
java.lang.String data)
public @JsNonNull java.lang.String btoa(@Nonnull
java.lang.String data)
public void clearInterval(int handle)
public void clearInterval()
public void clearTimeout(int handle)
public void clearTimeout()
public @JsNonNull Promise<ImageBitmap> createImageBitmap(@Nonnull ImageBitmapSource image, @Nonnull ImageBitmapOptions options)
public @JsNonNull Promise<ImageBitmap> createImageBitmap(@Nonnull ImageBitmapSource image)
public @JsNonNull Promise<ImageBitmap> createImageBitmap(@Nonnull ImageBitmapSource image, int sx, int sy, int sw, int sh, @Nonnull ImageBitmapOptions options)
public @JsNonNull Promise<ImageBitmap> createImageBitmap(@Nonnull ImageBitmapSource image, int sx, int sy, int sw, int sh)
public void queueMicrotask(@Nonnull
VoidFunction callback)
public void reportError(@Nullable
java.lang.Object e)
public @JsNullable jsinterop.base.Any structuredClone(@Nullable
java.lang.Object value,
@Nonnull
StructuredSerializeOptions options)
public @JsNullable jsinterop.base.Any structuredClone(@Nullable
java.lang.Object value)
public @JsNonNull Promise<Response> fetch(@Nonnull RequestInfo input, @Nonnull RequestInit init)
public @JsNonNull Promise<Response> fetch(@Nonnull Request input, @Nonnull RequestInit init)
public @JsNonNull Promise<Response> fetch(@Nonnull java.lang.String input, @Nonnull RequestInit init)
public @JsNonNull Promise<Response> fetch(@Nonnull RequestInfo input)
public @JsNonNull Promise<Response> fetch(@Nonnull Request input)
public @JsNonNull Promise<Response> fetch(@Nonnull java.lang.String input)
public int setInterval(@Nonnull
TimerHandler handler,
int timeout)
public int setInterval(@Nonnull
TimerHandler handler)
public int setTimeout(@Nonnull
TimerHandler handler,
int timeout)
public int setTimeout(@Nonnull
TimerHandler handler)
@JsOverlay
public final void addUnhandledrejectionListener(@Nonnull
PromiseRejectionEventListener callback,
@Nonnull
AddEventListenerOptions options)
@JsOverlay
public final void addUnhandledrejectionListener(@Nonnull
PromiseRejectionEventListener callback,
boolean useCapture)
@JsOverlay
public final void addUnhandledrejectionListener(@Nonnull
PromiseRejectionEventListener callback)
@JsOverlay
public final void removeUnhandledrejectionListener(@Nonnull
PromiseRejectionEventListener callback,
@Nonnull
EventListenerOptions options)
@JsOverlay
public final void removeUnhandledrejectionListener(@Nonnull
PromiseRejectionEventListener callback,
boolean useCapture)
@JsOverlay
public final void removeUnhandledrejectionListener(@Nonnull
PromiseRejectionEventListener callback)
@JsOverlay
public final void addRejectionhandledListener(@Nonnull
PromiseRejectionEventListener callback,
@Nonnull
AddEventListenerOptions options)
@JsOverlay
public final void addRejectionhandledListener(@Nonnull
PromiseRejectionEventListener callback,
boolean useCapture)
@JsOverlay
public final void addRejectionhandledListener(@Nonnull
PromiseRejectionEventListener callback)
@JsOverlay
public final void removeRejectionhandledListener(@Nonnull
PromiseRejectionEventListener callback,
@Nonnull
EventListenerOptions options)
@JsOverlay
public final void removeRejectionhandledListener(@Nonnull
PromiseRejectionEventListener callback,
boolean useCapture)
@JsOverlay
public final void removeRejectionhandledListener(@Nonnull
PromiseRejectionEventListener callback)
@JsOverlay
public final void addLanguagechangeListener(@Nonnull
EventListener callback,
@Nonnull
AddEventListenerOptions options)
@JsOverlay
public final void addLanguagechangeListener(@Nonnull
EventListener callback,
boolean useCapture)
@JsOverlay
public final void addLanguagechangeListener(@Nonnull
EventListener callback)
@JsOverlay
public final void removeLanguagechangeListener(@Nonnull
EventListener callback,
@Nonnull
EventListenerOptions options)
@JsOverlay
public final void removeLanguagechangeListener(@Nonnull
EventListener callback,
boolean useCapture)
@JsOverlay
public final void removeLanguagechangeListener(@Nonnull
EventListener callback)
@JsOverlay
public final void addOfflineListener(@Nonnull
EventListener callback,
@Nonnull
AddEventListenerOptions options)
@JsOverlay
public final void addOfflineListener(@Nonnull
EventListener callback,
boolean useCapture)
@JsOverlay
public final void addOfflineListener(@Nonnull
EventListener callback)
@JsOverlay
public final void removeOfflineListener(@Nonnull
EventListener callback,
@Nonnull
EventListenerOptions options)
@JsOverlay
public final void removeOfflineListener(@Nonnull
EventListener callback,
boolean useCapture)
@JsOverlay
public final void removeOfflineListener(@Nonnull
EventListener callback)
@JsOverlay
public final void addOnlineListener(@Nonnull
EventListener callback,
@Nonnull
AddEventListenerOptions options)
@JsOverlay
public final void addOnlineListener(@Nonnull
EventListener callback,
boolean useCapture)
@JsOverlay
public final void addOnlineListener(@Nonnull
EventListener callback)
@JsOverlay
public final void removeOnlineListener(@Nonnull
EventListener callback,
@Nonnull
EventListenerOptions options)
@JsOverlay
public final void removeOnlineListener(@Nonnull
EventListener callback,
boolean useCapture)
@JsOverlay
public final void removeOnlineListener(@Nonnull
EventListener callback)