WindowOrWorkerGlobalScope

O mixin WindowOrWorkerGlobalScope descreve vários recursos comuns às interfaces Window e WorkerGlobalScope. Cada uma dessas interfaces pode, obviamente, adicionar mais recursos além dos listados abaixo.

Nota: WindowOrWorkerGlobalScope é um mixin e não uma interface; você não pode atualmente criar um objeto do tipo WindowOrWorkerGlobalScope.

Properties

These properties are defined on the WindowOrWorkerGlobalScope mixin, and implemented by Window and WorkerGlobalScope (en-US).

WindowOrWorkerGlobalScope.caches (en-US) Somente leitura

Returns the CacheStorage (en-US) object associated with the current context. This object enables functionality such as storing assets for offline use, and generating custom responses to requests.

WindowOrWorkerGlobalScope.indexedDB (en-US) Somente leitura

Provides a mechanism for applications to asynchronously access capabilities of indexed databases; returns an IDBFactory object.

WindowOrWorkerGlobalScope.isSecureContext (en-US) Somente leitura

Returns a boolean indicating whether the current context is secure (true) or not (false).

WindowOrWorkerGlobalScope.origin (en-US) Somente leitura

Returns the origin of the global scope, serialized as a string.

Methods

These properties are defined on the WindowOrWorkerGlobalScope mixin, and implemented by Window and WorkerGlobalScope (en-US).

WindowOrWorkerGlobalScope.atob()

Decodes a string of data which has been encoded using base-64 encoding.

WindowOrWorkerGlobalScope.btoa() (en-US)

Creates a base-64 encoded ASCII string from a string of binary data.

WindowOrWorkerGlobalScope.clearInterval() (en-US)

Cancels the repeated execution set using WindowOrWorkerGlobalScope.setInterval().

WindowOrWorkerGlobalScope.clearTimeout()

Cancels the delayed execution set using WindowOrWorkerGlobalScope.setTimeout() (en-US).

WindowOrWorkerGlobalScope.createImageBitmap() (en-US)

Accepts a variety of different image sources, and returns a Promise (en-US) which resolves to an ImageBitmap (en-US). Optionally the source is cropped to the rectangle of pixels originating at (sx, sy) with width sw, and height sh.

WindowOrWorkerGlobalScope.fetch()

Starts the process of fetching a resource from the network.

WindowOrWorkerGlobalScope.setInterval()

Schedules a function to execute every time a given number of milliseconds elapses.

WindowOrWorkerGlobalScope.setTimeout() (en-US)

Schedules a function to execute in a given amount of time.

Specifications

Specification Status Comment
HTML Living Standard
The definition of 'WindowOrWorkerGlobalScope mixin' in that specification.
Padrão em tempo real This is where the main mixin is defined.
Fetch
The definition of 'fetch()' in that specification.
Padrão em tempo real Definition of the fetch() method.
Service Workers
The definition of 'caches' in that specification.
Rascunho atual Definition of the caches property.
Indexed Database API 2.0
The definition of 'indexedDB' in that specification.
Recomendação Definition of the indexedDB property.
Secure Contexts
The definition of 'isSecureContext' in that specification.
Candidata a Recomendação Definition of the isSecureContext property.

See also