The WindowOrWorkerGlobalScope mixin describes several features common to the Window and WorkerGlobalScope interfaces.
Note: WindowOrWorkerGlobalScope is a mixin and not an interface; you can't actually create an object of type WindowOrWorkerGlobalScope.
- Companion:
- object
Value members
Concrete methods
Returns the CacheStorage object associated with the current context. This object enables functionality such as storing assets for offline use, and generating custom responses to requests.
Returns the CacheStorage object associated with the current context. This object enables functionality such as storing assets for offline use, and generating custom responses to requests.
Accepts a variety of different image sources, and returns a Promise which resolves to an ImageBitmap. Optionally the source is cropped to the rectangle of pixels originating at (sx, sy) with width sw, and height sh.
Accepts a variety of different image sources, and returns a Promise which resolves to an ImageBitmap. Optionally the source is cropped to the rectangle of pixels originating at (sx, sy) with width sw, and height sh.
Returns a boolean value that indicates whether a SharedArrayBuffer can be sent via a Window.postMessage() call.
Returns a boolean value that indicates whether a SharedArrayBuffer can be sent via a Window.postMessage() call.
Starts the process of fetching a resource from the network.
Starts the process of fetching a resource from the network.
Provides a mechanism for applications to asynchronously access capabilities of indexed databases.
Provides a mechanism for applications to asynchronously access capabilities of indexed databases.
Returns a boolean indicating whether the current context is secure or not.
Returns a boolean indicating whether the current context is secure or not.
Returns the origin of the global scope, serialized as a string.
Returns the origin of the global scope, serialized as a string.
Enqueues a microtask—a short function to be executed after execution of the JavaScript code completes and control isn't being returned to a JavaScript caller, but before handling callbacks and other tasks.
Enqueues a microtask—a short function to be executed after execution of the JavaScript code completes and control isn't being returned to a JavaScript caller, but before handling callbacks and other tasks.
This lets your code run without interfering with other, possibly higher priority, code, but before the browser runtime regains control, potentially depending upon the work you need to complete.
Inherited methods
Decodes a string of data which has been encoded using base-64 encoding.
Decodes a string of data which has been encoded using base-64 encoding.
- Inherited from:
- WindowBase64
Creates a base-64 encoded ASCII string from a "string" of binary data.
Creates a base-64 encoded ASCII string from a "string" of binary data.
- Inherited from:
- WindowBase64
Cancels repeated action which was set up using setInterval.
Cancels repeated action which was set up using setInterval.
- Inherited from:
- WindowTimers
Clears the delay set by window.setTimeout().
Clears the delay set by window.setTimeout().
- Inherited from:
- WindowTimers
Calls a function or executes a code snippet repeatedly, with a fixed time delay between each call to that function.
Calls a function or executes a code snippet repeatedly, with a fixed time delay between each call to that function.
- Inherited from:
- WindowTimers
Calls a function or executes a code snippet after a specified delay.
Calls a function or executes a code snippet after a specified delay.
- Inherited from:
- WindowTimers