diff options
Diffstat (limited to 'cli/dts/lib.webworker.d.ts')
-rw-r--r-- | cli/dts/lib.webworker.d.ts | 1482 |
1 files changed, 762 insertions, 720 deletions
diff --git a/cli/dts/lib.webworker.d.ts b/cli/dts/lib.webworker.d.ts index 528778ffd..7c1e0fa63 100644 --- a/cli/dts/lib.webworker.d.ts +++ b/cli/dts/lib.webworker.d.ts @@ -25,14 +25,15 @@ and limitations under the License. interface AddEventListenerOptions extends EventListenerOptions { once?: boolean; passive?: boolean; + signal?: AbortSignal; } interface AesCbcParams extends Algorithm { - iv: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer; + iv: BufferSource; } interface AesCtrParams extends Algorithm { - counter: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer; + counter: BufferSource; length: number; } @@ -41,8 +42,8 @@ interface AesDerivedKeyParams extends Algorithm { } interface AesGcmParams extends Algorithm { - additionalData?: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer; - iv: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer; + additionalData?: BufferSource; + iv: BufferSource; tagLength?: number; } @@ -58,6 +59,14 @@ interface Algorithm { name: string; } +interface AudioConfiguration { + bitrate?: number; + channels?: string; + contentType: string; + samplerate?: number; + spatialRendering?: boolean; +} + interface BlobPropertyBag { endings?: EndingType; type?: string; @@ -69,11 +78,6 @@ interface CacheQueryOptions { ignoreVary?: boolean; } -interface CanvasRenderingContext2DSettings { - alpha?: boolean; - desynchronized?: boolean; -} - interface ClientQueryOptions { includeUncontrolled?: boolean; type?: ClientTypes; @@ -144,11 +148,6 @@ interface DOMRectInit { y?: number; } -interface DevicePermissionDescriptor extends PermissionDescriptor { - deviceId?: string; - name: "camera" | "microphone" | "speaker"; -} - interface EcKeyGenParams extends Algorithm { namedCurve: NamedCurve; } @@ -200,6 +199,7 @@ interface ExtendableMessageEventInit extends ExtendableEventInit { interface FetchEventInit extends ExtendableEventInit { clientId?: string; + handled?: Promise<undefined>; preloadResponse?: Promise<any>; replacesClientId?: string; request: Request; @@ -210,14 +210,28 @@ interface FilePropertyBag extends BlobPropertyBag { lastModified?: number; } +interface FontFaceDescriptors { + display?: string; + featureSettings?: string; + stretch?: string; + style?: string; + unicodeRange?: string; + variant?: string; + weight?: string; +} + +interface FontFaceSetLoadEventInit extends EventInit { + fontfaces?: FontFace[]; +} + interface GetNotificationOptions { tag?: string; } interface HkdfParams extends Algorithm { hash: HashAlgorithmIdentifier; - info: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer; - salt: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer; + info: BufferSource; + salt: BufferSource; } interface HmacImportParams extends Algorithm { @@ -230,6 +244,11 @@ interface HmacKeyGenParams extends Algorithm { length?: number; } +interface IDBDatabaseInfo { + name?: string; + version?: number; +} + interface IDBIndexParameters { multiEntry?: boolean; unique?: boolean; @@ -258,9 +277,8 @@ interface ImageBitmapRenderingContextSettings { alpha?: boolean; } -interface ImageEncodeOptions { - quality?: number; - type?: string; +interface ImageDataSettings { + colorSpace?: PredefinedColorSpace; } interface ImportMeta { @@ -292,6 +310,33 @@ interface KeyAlgorithm { name: string; } +interface MediaCapabilitiesDecodingInfo extends MediaCapabilitiesInfo { + configuration?: MediaDecodingConfiguration; +} + +interface MediaCapabilitiesEncodingInfo extends MediaCapabilitiesInfo { + configuration?: MediaEncodingConfiguration; +} + +interface MediaCapabilitiesInfo { + powerEfficient: boolean; + smooth: boolean; + supported: boolean; +} + +interface MediaConfiguration { + audio?: AudioConfiguration; + video?: VideoConfiguration; +} + +interface MediaDecodingConfiguration extends MediaConfiguration { + type: MediaDecodingType; +} + +interface MediaEncodingConfiguration extends MediaConfiguration { + type: MediaEncodingType; +} + interface MessageEventInit<T = any> extends EventInit { data?: T; lastEventId?: string; @@ -300,20 +345,10 @@ interface MessageEventInit<T = any> extends EventInit { source?: MessageEventSource | null; } -interface MidiPermissionDescriptor extends PermissionDescriptor { - name: "midi"; - sysex?: boolean; -} - interface MultiCacheQueryOptions extends CacheQueryOptions { cacheName?: string; } -interface NavigationPreloadState { - enabled?: boolean; - headerValue?: string; -} - interface NotificationAction { action: string; icon?: string; @@ -338,14 +373,26 @@ interface NotificationOptions { requireInteraction?: boolean; silent?: boolean; tag?: string; - timestamp?: number; + timestamp?: DOMTimeStamp; vibrate?: VibratePattern; } interface Pbkdf2Params extends Algorithm { hash: HashAlgorithmIdentifier; iterations: number; - salt: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer; + salt: BufferSource; +} + +interface PerformanceMarkOptions { + detail?: any; + startTime?: DOMHighResTimeStamp; +} + +interface PerformanceMeasureOptions { + detail?: any; + duration?: DOMHighResTimeStamp; + end?: string | DOMHighResTimeStamp; + start?: string | DOMHighResTimeStamp; } interface PerformanceObserverInit { @@ -377,14 +424,9 @@ interface PushEventInit extends ExtendableEventInit { data?: PushMessageDataInit; } -interface PushPermissionDescriptor extends PermissionDescriptor { - name: "push"; - userVisibleOnly?: boolean; -} - interface PushSubscriptionJSON { endpoint?: string; - expirationTime?: number | null; + expirationTime?: DOMTimeStamp | null; keys?: Record<string, string>; } @@ -508,7 +550,7 @@ interface RsaKeyGenParams extends Algorithm { } interface RsaOaepParams extends Algorithm { - label?: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer; + label?: BufferSource; } interface RsaOtherPrimesInfo { @@ -521,6 +563,21 @@ interface RsaPssParams extends Algorithm { saltLength: number; } +interface SecurityPolicyViolationEventInit extends EventInit { + blockedURI?: string; + columnNumber?: number; + disposition: SecurityPolicyViolationEventDisposition; + documentURI: string; + effectiveDirective: string; + lineNumber?: number; + originalPolicy: string; + referrer?: string; + sample?: string; + sourceFile?: string; + statusCode: number; + violatedDirective: string; +} + interface StorageEstimate { quota?: number; usage?: number; @@ -550,11 +607,6 @@ interface StreamPipeOptions { signal?: AbortSignal; } -interface SyncEventInit extends ExtendableEventInit { - lastChance?: boolean; - tag: string; -} - interface TextDecodeOptions { stream?: boolean; } @@ -592,6 +644,18 @@ interface UnderlyingSource<R = any> { type?: undefined; } +interface VideoConfiguration { + bitrate: number; + colorGamut?: ColorGamut; + contentType: string; + framerate: number; + hdrMetadataType?: HdrMetadataType; + height: number; + scalabilityMode?: string; + transferFunction?: TransferFunction; + width: number; +} + interface WebGLContextAttributes { alpha?: boolean; antialias?: boolean; @@ -614,10 +678,6 @@ interface WorkerOptions { type?: WorkerType; } -interface EventListener { - (evt: Event): void; -} - /** The ANGLE_instanced_arrays extension is part of the WebGL API and allows to draw the same object, or groups of similar objects multiple times, if they share the same vertex data, primitive count and type. */ interface ANGLE_instanced_arrays { drawArraysInstancedANGLE(mode: GLenum, first: GLint, count: GLsizei, primcount: GLsizei): void; @@ -677,14 +737,6 @@ interface AbstractWorker { removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; } -interface AesCfbParams extends Algorithm { - iv: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer; -} - -interface AesCmacParams extends Algorithm { - length: number; -} - interface AnimationFrameProvider { cancelAnimationFrame(handle: number): void; requestAnimationFrame(callback: FrameRequestCallback): number; @@ -787,43 +839,6 @@ declare var CacheStorage: { new(): CacheStorage; }; -interface CanvasCompositing { - globalAlpha: number; - globalCompositeOperation: string; -} - -interface CanvasDrawImage { - drawImage(image: CanvasImageSource, dx: number, dy: number): void; - drawImage(image: CanvasImageSource, dx: number, dy: number, dw: number, dh: number): void; - drawImage(image: CanvasImageSource, sx: number, sy: number, sw: number, sh: number, dx: number, dy: number, dw: number, dh: number): void; -} - -interface CanvasDrawPath { - beginPath(): void; - clip(fillRule?: CanvasFillRule): void; - clip(path: Path2D, fillRule?: CanvasFillRule): void; - fill(fillRule?: CanvasFillRule): void; - fill(path: Path2D, fillRule?: CanvasFillRule): void; - isPointInPath(x: number, y: number, fillRule?: CanvasFillRule): boolean; - isPointInPath(path: Path2D, x: number, y: number, fillRule?: CanvasFillRule): boolean; - isPointInStroke(x: number, y: number): boolean; - isPointInStroke(path: Path2D, x: number, y: number): boolean; - stroke(): void; - stroke(path: Path2D): void; -} - -interface CanvasFillStrokeStyles { - fillStyle: string | CanvasGradient | CanvasPattern; - strokeStyle: string | CanvasGradient | CanvasPattern; - createLinearGradient(x0: number, y0: number, x1: number, y1: number): CanvasGradient; - createPattern(image: CanvasImageSource, repetition: string | null): CanvasPattern | null; - createRadialGradient(x0: number, y0: number, r0: number, x1: number, y1: number, r1: number): CanvasGradient; -} - -interface CanvasFilters { - filter: string; -} - /** An opaque object describing a gradient. It is returned by the methods CanvasRenderingContext2D.createLinearGradient() or CanvasRenderingContext2D.createRadialGradient(). */ interface CanvasGradient { /** @@ -839,41 +854,18 @@ declare var CanvasGradient: { new(): CanvasGradient; }; -interface CanvasImageData { - createImageData(sw: number, sh: number): ImageData; - createImageData(imagedata: ImageData): ImageData; - getImageData(sx: number, sy: number, sw: number, sh: number): ImageData; - putImageData(imagedata: ImageData, dx: number, dy: number): void; - putImageData(imagedata: ImageData, dx: number, dy: number, dirtyX: number, dirtyY: number, dirtyWidth: number, dirtyHeight: number): void; -} - -interface CanvasImageSmoothing { - imageSmoothingEnabled: boolean; - imageSmoothingQuality: ImageSmoothingQuality; -} - interface CanvasPath { - arc(x: number, y: number, radius: number, startAngle: number, endAngle: number, anticlockwise?: boolean): void; + arc(x: number, y: number, radius: number, startAngle: number, endAngle: number, counterclockwise?: boolean): void; arcTo(x1: number, y1: number, x2: number, y2: number, radius: number): void; bezierCurveTo(cp1x: number, cp1y: number, cp2x: number, cp2y: number, x: number, y: number): void; closePath(): void; - ellipse(x: number, y: number, radiusX: number, radiusY: number, rotation: number, startAngle: number, endAngle: number, anticlockwise?: boolean): void; + ellipse(x: number, y: number, radiusX: number, radiusY: number, rotation: number, startAngle: number, endAngle: number, counterclockwise?: boolean): void; lineTo(x: number, y: number): void; moveTo(x: number, y: number): void; quadraticCurveTo(cpx: number, cpy: number, x: number, y: number): void; rect(x: number, y: number, w: number, h: number): void; } -interface CanvasPathDrawingStyles { - lineCap: CanvasLineCap; - lineDashOffset: number; - lineJoin: CanvasLineJoin; - lineWidth: number; - miterLimit: number; - getLineDash(): number[]; - setLineDash(segments: number[]): void; -} - /** An opaque object describing a pattern, based on an image, a canvas, or a video, created by the CanvasRenderingContext2D.createPattern() method. */ interface CanvasPattern { /** @@ -887,55 +879,14 @@ declare var CanvasPattern: { new(): CanvasPattern; }; -interface CanvasRect { - clearRect(x: number, y: number, w: number, h: number): void; - fillRect(x: number, y: number, w: number, h: number): void; - strokeRect(x: number, y: number, w: number, h: number): void; -} - -interface CanvasShadowStyles { - shadowBlur: number; - shadowColor: string; - shadowOffsetX: number; - shadowOffsetY: number; -} - -interface CanvasState { - restore(): void; - save(): void; -} - -interface CanvasText { - fillText(text: string, x: number, y: number, maxWidth?: number): void; - measureText(text: string): TextMetrics; - strokeText(text: string, x: number, y: number, maxWidth?: number): void; -} - -interface CanvasTextDrawingStyles { - direction: CanvasDirection; - font: string; - textAlign: CanvasTextAlign; - textBaseline: CanvasTextBaseline; -} - -interface CanvasTransform { - getTransform(): DOMMatrix; - resetTransform(): void; - rotate(angle: number): void; - scale(x: number, y: number): void; - setTransform(a: number, b: number, c: number, d: number, e: number, f: number): void; - setTransform(transform?: DOMMatrix2DInit): void; - transform(a: number, b: number, c: number, d: number, e: number, f: number): void; - translate(x: number, y: number): void; -} - /** The Client interface represents an executable context such as a Worker, or a SharedWorker. Window clients are represented by the more-specific WindowClient. You can get Client/WindowClient objects from methods such as Clients.matchAll() and Clients.get(). */ interface Client { readonly frameType: FrameType; readonly id: string; readonly type: ClientTypes; readonly url: string; - postMessage(message: any, transfer?: Transferable[]): void; + postMessage(message: any, transfer: Transferable[]): void; + postMessage(message: any, options?: PostMessageOptions): void; } declare var Client: { @@ -948,7 +899,7 @@ interface Clients { claim(): Promise<void>; get(id: string): Promise<Client | undefined>; matchAll<T extends ClientQueryOptions>(options?: T): Promise<ReadonlyArray<T["type"] extends "window" ? WindowClient : Client>>; - openWindow(url: string): Promise<WindowClient | null>; + openWindow(url: string | URL): Promise<WindowClient | null>; } declare var Clients: { @@ -977,15 +928,6 @@ declare var CloseEvent: { new(type: string, eventInitDict?: CloseEventInit): CloseEvent; }; -interface ConcatParams extends Algorithm { - algorithmId: Uint8Array; - hash?: string | Algorithm; - partyUInfo: Uint8Array; - partyVInfo: Uint8Array; - privateInfo?: Uint8Array; - publicInfo?: Uint8Array; -} - /** This Streams API interface provides a built-in byte length queuing strategy that can be used when constructing streams. */ interface CountQueuingStrategy extends QueuingStrategy { readonly highWaterMark: number; @@ -1000,7 +942,7 @@ declare var CountQueuingStrategy: { /** Basic cryptography features available in the current context. It allows access to a cryptographically strong random number generator and to cryptographic primitives. */ interface Crypto { readonly subtle: SubtleCrypto; - getRandomValues<T extends Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | null>(array: T): T; + getRandomValues<T extends ArrayBufferView | null>(array: T): T; } declare var Crypto: { @@ -1026,12 +968,13 @@ interface CustomEvent<T = any> extends Event { * Returns any custom data event was created with. Typically used for synthetic events. */ readonly detail: T; - initCustomEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, detailArg: T): void; + /** @deprecated */ + initCustomEvent(type: string, bubbles?: boolean, cancelable?: boolean, detail?: T): void; } declare var CustomEvent: { prototype: CustomEvent; - new<T>(typeArg: string, eventInitDict?: CustomEventInit<T>): CustomEvent<T>; + new<T>(type: string, eventInitDict?: CustomEventInit<T>): CustomEvent<T>; }; /** An abnormal event (called an exception) which occurs as a result of calling a method or accessing a property of a web API. */ @@ -1323,28 +1266,22 @@ declare var DedicatedWorkerGlobalScope: { new(): DedicatedWorkerGlobalScope; }; -interface DhImportKeyParams extends Algorithm { - generator: Uint8Array; - prime: Uint8Array; -} - -interface DhKeyAlgorithm extends KeyAlgorithm { - generator: Uint8Array; - prime: Uint8Array; +interface EXT_blend_minmax { + readonly MAX_EXT: GLenum; + readonly MIN_EXT: GLenum; } -interface DhKeyDeriveParams extends Algorithm { - public: CryptoKey; +interface EXT_color_buffer_float { } -interface DhKeyGenParams extends Algorithm { - generator: Uint8Array; - prime: Uint8Array; +interface EXT_color_buffer_half_float { + readonly FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT: GLenum; + readonly RGB16F_EXT: GLenum; + readonly RGBA16F_EXT: GLenum; + readonly UNSIGNED_NORMALIZED_EXT: GLenum; } -interface EXT_blend_minmax { - readonly MAX_EXT: GLenum; - readonly MIN_EXT: GLenum; +interface EXT_float_blend { } /** The EXT_frag_depth extension is part of the WebGL API and enables to set a depth value of a fragment from within the fragment shader. */ @@ -1361,6 +1298,13 @@ interface EXT_sRGB { interface EXT_shader_texture_lod { } +interface EXT_texture_compression_rgtc { + readonly COMPRESSED_RED_GREEN_RGTC2_EXT: GLenum; + readonly COMPRESSED_RED_RGTC1_EXT: GLenum; + readonly COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT: GLenum; + readonly COMPRESSED_SIGNED_RED_RGTC1_EXT: GLenum; +} + /** The EXT_texture_filter_anisotropic extension is part of the WebGL API and exposes two constants for anisotropic filtering (AF). */ interface EXT_texture_filter_anisotropic { readonly MAX_TEXTURE_MAX_ANISOTROPY_EXT: GLenum; @@ -1412,6 +1356,7 @@ interface Event { * Returns true if event was dispatched by the user agent, and false otherwise. */ readonly isTrusted: boolean; + /** @deprecated */ returnValue: boolean; /** @deprecated */ readonly srcElement: EventTarget | null; @@ -1422,7 +1367,7 @@ interface Event { /** * Returns the event's timestamp as the number of milliseconds measured relative to the time origin. */ - readonly timeStamp: number; + readonly timeStamp: DOMHighResTimeStamp; /** * Returns the type of event, e.g. "click", "hashchange", or "submit". */ @@ -1431,6 +1376,7 @@ interface Event { * Returns the invocation target objects of event's path (objects on which listeners will be invoked), except for any nodes in shadow trees of which the shadow root's mode is "closed" that are not reachable from event's currentTarget. */ composedPath(): EventTarget[]; + /** @deprecated */ initEvent(type: string, bubbles?: boolean, cancelable?: boolean): void; /** * If invoked when the cancelable attribute value is true, and while executing a listener for the event with passive set to false, signals to the operation that caused event to be dispatched that it needs to be canceled. @@ -1459,8 +1405,12 @@ declare var Event: { readonly NONE: number; }; +interface EventListener { + (evt: Event): void; +} + interface EventListenerObject { - handleEvent(evt: Event): void; + handleEvent(object: Event): void; } interface EventSourceEventMap { @@ -1500,7 +1450,7 @@ interface EventSource extends EventTarget { declare var EventSource: { prototype: EventSource; - new(url: string, eventSourceInitDict?: EventSourceInit): EventSource; + new(url: string | URL, eventSourceInitDict?: EventSourceInit): EventSource; readonly CLOSED: number; readonly CONNECTING: number; readonly OPEN: number; @@ -1519,9 +1469,11 @@ interface EventTarget { * * When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed. * + * If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted. + * * The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture. */ - addEventListener(type: string, listener: EventListenerOrEventListenerObject | null, options?: boolean | AddEventListenerOptions): void; + addEventListener(type: string, callback: EventListenerOrEventListenerObject | null, options?: AddEventListenerOptions | boolean): void; /** * Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise. */ @@ -1564,10 +1516,10 @@ declare var ExtendableMessageEvent: { /** This is the event type for fetch events dispatched on the service worker global scope. It contains information about the fetch, including the request and how the receiver will treat the response. It provides the event.respondWith() method, which allows us to provide a response to this fetch. */ interface FetchEvent extends ExtendableEvent { readonly clientId: string; - readonly preloadResponse: Promise<any>; + readonly handled: Promise<undefined>; readonly request: Request; readonly resultingClientId: string; - respondWith(r: Response | Promise<Response>): void; + respondWith(r: Response | PromiseLike<Response>): void; } declare var FetchEvent: { @@ -1579,6 +1531,7 @@ declare var FetchEvent: { interface File extends Blob { readonly lastModified: number; readonly name: string; + readonly webkitRelativePath: string; } declare var File: { @@ -1643,6 +1596,7 @@ declare var FileReader: { /** Allows to read File or Blob objects in a synchronous way. */ interface FileReaderSync { readAsArrayBuffer(blob: Blob): ArrayBuffer; + /** @deprecated */ readAsBinaryString(blob: Blob): string; readAsDataURL(blob: Blob): string; readAsText(blob: Blob, encoding?: string): string; @@ -1653,6 +1607,68 @@ declare var FileReaderSync: { new(): FileReaderSync; }; +interface FontFace { + ascentOverride: string; + descentOverride: string; + display: string; + family: string; + featureSettings: string; + lineGapOverride: string; + readonly loaded: Promise<FontFace>; + readonly status: FontFaceLoadStatus; + stretch: string; + style: string; + unicodeRange: string; + variant: string; + variationSettings: string; + weight: string; + load(): Promise<FontFace>; +} + +declare var FontFace: { + prototype: FontFace; + new(family: string, source: string | BinaryData, descriptors?: FontFaceDescriptors): FontFace; +}; + +interface FontFaceSetEventMap { + "loading": Event; + "loadingdone": Event; + "loadingerror": Event; +} + +interface FontFaceSet extends EventTarget { + onloading: ((this: FontFaceSet, ev: Event) => any) | null; + onloadingdone: ((this: FontFaceSet, ev: Event) => any) | null; + onloadingerror: ((this: FontFaceSet, ev: Event) => any) | null; + readonly ready: Promise<FontFaceSet>; + readonly status: FontFaceSetLoadStatus; + check(font: string, text?: string): boolean; + load(font: string, text?: string): Promise<FontFace[]>; + forEach(callbackfn: (value: FontFace, key: FontFace, parent: FontFaceSet) => void, thisArg?: any): void; + addEventListener<K extends keyof FontFaceSetEventMap>(type: K, listener: (this: FontFaceSet, ev: FontFaceSetEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; + removeEventListener<K extends keyof FontFaceSetEventMap>(type: K, listener: (this: FontFaceSet, ev: FontFaceSetEventMap[K]) => any, options?: boolean | EventListenerOptions): void; + removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; +} + +declare var FontFaceSet: { + prototype: FontFaceSet; + new(initialFaces: FontFace[]): FontFaceSet; +}; + +interface FontFaceSetLoadEvent extends Event { + readonly fontfaces: ReadonlyArray<FontFace>; +} + +declare var FontFaceSetLoadEvent: { + prototype: FontFaceSetLoadEvent; + new(type: string, eventInitDict?: FontFaceSetLoadEventInit): FontFaceSetLoadEvent; +}; + +interface FontFaceSource { + readonly fonts: FontFaceSet; +} + /** Provides a way to easily construct a set of key/value pairs representing form fields and their values, which can then be easily sent using the XMLHttpRequest.send() method. It uses the same format a form would use if the encoding type were set to "multipart/form-data". */ interface FormData { append(name: string, value: string | Blob, fileName?: string): void; @@ -1689,9 +1705,6 @@ declare var Headers: { new(init?: HeadersInit): Headers; }; -interface IDBArrayKey extends Array<IDBValidKey> { -} - /** This IndexedDB API interface represents a cursor for traversing or iterating over multiple records in a database. */ interface IDBCursor { /** @@ -1706,6 +1719,7 @@ interface IDBCursor { * Returns the effective key of the cursor. Throws a "InvalidStateError" DOMException if the cursor is advancing or is finished. */ readonly primaryKey: IDBValidKey; + readonly request: IDBRequest; /** * Returns the IDBObjectStore or IDBIndex the cursor was opened from. */ @@ -1820,6 +1834,7 @@ interface IDBFactory { * Throws a "DataError" DOMException if either input is not a valid key. */ cmp(first: any, second: any): number; + databases(): Promise<IDBDatabaseInfo[]>; /** * Attempts to delete the named database. If the database already exists and there are open connections that don't close in response to a versionchange event, the request will be blocked until all they close. If the request is successful request's result will be null. */ @@ -1853,13 +1868,13 @@ interface IDBIndex { * * If successful, request's result will be the count. */ - count(key?: IDBValidKey | IDBKeyRange): IDBRequest<number>; + count(query?: IDBValidKey | IDBKeyRange): IDBRequest<number>; /** * Retrieves the value of the first record matching the given key or key range in query. * * If successful, request's result will be the value, or undefined if there was no matching record. */ - get(key: IDBValidKey | IDBKeyRange): IDBRequest<any | undefined>; + get(query: IDBValidKey | IDBKeyRange): IDBRequest<any>; /** * Retrieves the values of the records matching the given key or key range in query (up to count if given). * @@ -1877,7 +1892,7 @@ interface IDBIndex { * * If successful, request's result will be the key, or undefined if there was no matching record. */ - getKey(key: IDBValidKey | IDBKeyRange): IDBRequest<IDBValidKey | undefined>; + getKey(query: IDBValidKey | IDBKeyRange): IDBRequest<IDBValidKey | undefined>; /** * Opens a cursor over the records matching query, ordered by direction. If query is null, all records in index are matched. * @@ -1985,7 +2000,7 @@ interface IDBObjectStore { * * If successful, request's result will be the count. */ - count(key?: IDBValidKey | IDBKeyRange): IDBRequest<number>; + count(query?: IDBValidKey | IDBKeyRange): IDBRequest<number>; /** * Creates a new index in store with the given name, keyPath and options and returns a new IDBIndex. If the keyPath and options define constraints that cannot be satisfied with the data already in store the upgrade transaction will abort with a "ConstraintError" DOMException. * @@ -1997,7 +2012,7 @@ interface IDBObjectStore { * * If successful, request's result will be undefined. */ - delete(key: IDBValidKey | IDBKeyRange): IDBRequest<undefined>; + delete(query: IDBValidKey | IDBKeyRange): IDBRequest<undefined>; /** * Deletes the index in store with the given name. * @@ -2009,7 +2024,7 @@ interface IDBObjectStore { * * If successful, request's result will be the value, or undefined if there was no matching record. */ - get(query: IDBValidKey | IDBKeyRange): IDBRequest<any | undefined>; + get(query: IDBValidKey | IDBKeyRange): IDBRequest<any>; /** * Retrieves the values of the records matching the given key or key range in query (up to count if given). * @@ -2132,7 +2147,7 @@ interface IDBTransaction extends EventTarget { /** * If the transaction was aborted, returns the error (a DOMException) providing the reason. */ - readonly error: DOMException; + readonly error: DOMException | null; /** * Returns the mode the transaction was created with ("readonly" or "readwrite"), or "versionchange" for an upgrade transaction. */ @@ -2148,6 +2163,7 @@ interface IDBTransaction extends EventTarget { * Aborts the transaction. All pending requests will fail with a "AbortError" DOMException and all changes made to the database will be reverted. */ abort(): void; + commit(): void; /** * Returns an IDBObjectStore in the transaction's scope. */ @@ -2196,10 +2212,6 @@ declare var ImageBitmap: { interface ImageBitmapRenderingContext { /** - * Returns the canvas element that the context is bound to. - */ - readonly canvas: OffscreenCanvas; - /** * Transfers the underlying bitmap data from imageBitmap to context, and the bitmap becomes the contents of the canvas element to which context is bound. */ transferFromImageBitmap(bitmap: ImageBitmap | null): void; @@ -2228,8 +2240,22 @@ interface ImageData { declare var ImageData: { prototype: ImageData; - new(sw: number, sh: number): ImageData; - new(data: Uint8ClampedArray, sw: number, sh?: number): ImageData; + new(sw: number, sh: number, settings?: ImageDataSettings): ImageData; + new(data: Uint8ClampedArray, sw: number, sh?: number, settings?: ImageDataSettings): ImageData; +}; + +interface KHR_parallel_shader_compile { + readonly COMPLETION_STATUS_KHR: GLenum; +} + +interface MediaCapabilities { + decodingInfo(configuration: MediaDecodingConfiguration): Promise<MediaCapabilitiesDecodingInfo>; + encodingInfo(configuration: MediaEncodingConfiguration): Promise<MediaCapabilitiesEncodingInfo>; +} + +declare var MediaCapabilities: { + prototype: MediaCapabilities; + new(): MediaCapabilities; }; /** This Channel Messaging API interface allows us to create a new message channel and send data through it via its two MessagePort properties. */ @@ -2271,6 +2297,8 @@ interface MessageEvent<T = any> extends Event { * Returns the WindowProxy of the source window, for cross-document messaging, and the MessagePort being attached, in the connect event fired at SharedWorkerGlobalScope objects. */ readonly source: MessageEventSource | null; + /** @deprecated */ + initMessageEvent(type: string, bubbles?: boolean, cancelable?: boolean, data?: any, origin?: string, lastEventId?: string, source?: MessageEventSource | null, ports?: MessagePort[]): void; } declare var MessageEvent: { @@ -2313,27 +2341,20 @@ declare var MessagePort: { new(): MessagePort; }; -interface NavigationPreloadManager { - disable(): Promise<void>; - enable(): Promise<void>; - getState(): Promise<NavigationPreloadState>; - setHeaderValue(value: string): Promise<void>; -} - -declare var NavigationPreloadManager: { - prototype: NavigationPreloadManager; - new(): NavigationPreloadManager; -}; - interface NavigatorConcurrentHardware { readonly hardwareConcurrency: number; } interface NavigatorID { + /** @deprecated */ readonly appCodeName: string; + /** @deprecated */ readonly appName: string; + /** @deprecated */ readonly appVersion: string; + /** @deprecated */ readonly platform: string; + /** @deprecated */ readonly product: string; readonly userAgent: string; } @@ -2343,6 +2364,10 @@ interface NavigatorLanguage { readonly languages: ReadonlyArray<string>; } +interface NavigatorNetworkInformation { + readonly connection: NetworkInformation; +} + interface NavigatorOnLine { readonly onLine: boolean; } @@ -2351,6 +2376,15 @@ interface NavigatorStorage { readonly storage: StorageManager; } +interface NetworkInformation extends EventTarget { + readonly type: ConnectionType; +} + +declare var NetworkInformation: { + prototype: NetworkInformation; + new(): NetworkInformation; +}; + interface NotificationEventMap { "click": Event; "close": Event; @@ -2360,25 +2394,17 @@ interface NotificationEventMap { /** This Notifications API interface is used to configure and display desktop notifications to the user. */ interface Notification extends EventTarget { - readonly actions: ReadonlyArray<NotificationAction>; - readonly badge: string; readonly body: string; readonly data: any; readonly dir: NotificationDirection; readonly icon: string; - readonly image: string; readonly lang: string; onclick: ((this: Notification, ev: Event) => any) | null; onclose: ((this: Notification, ev: Event) => any) | null; onerror: ((this: Notification, ev: Event) => any) | null; onshow: ((this: Notification, ev: Event) => any) | null; - readonly renotify: boolean; - readonly requireInteraction: boolean; - readonly silent: boolean; readonly tag: string; - readonly timestamp: number; readonly title: string; - readonly vibrate: ReadonlyArray<number>; close(): void; addEventListener<K extends keyof NotificationEventMap>(type: K, listener: (this: Notification, ev: NotificationEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; @@ -2389,7 +2415,6 @@ interface Notification extends EventTarget { declare var Notification: { prototype: Notification; new(title: string, options?: NotificationOptions): Notification; - readonly maxActions: number; readonly permission: NotificationPermission; }; @@ -2408,6 +2433,9 @@ declare var NotificationEvent: { interface OES_element_index_uint { } +interface OES_fbo_render_mipmap { +} + /** The OES_standard_derivatives extension is part of the WebGL API and adds the GLSL derivative functions dFdx, dFdy, and fwidth. */ interface OES_standard_derivatives { readonly FRAGMENT_SHADER_DERIVATIVE_HINT_OES: GLenum; @@ -2438,58 +2466,18 @@ interface OES_vertex_array_object { readonly VERTEX_ARRAY_BINDING_OES: GLenum; } -interface OffscreenCanvas extends EventTarget { - /** - * These attributes return the dimensions of the OffscreenCanvas object's bitmap. - * - * They can be set, to replace the bitmap with a new, transparent black bitmap of the specified dimensions (effectively resizing it). - */ - height: number; - /** - * These attributes return the dimensions of the OffscreenCanvas object's bitmap. - * - * They can be set, to replace the bitmap with a new, transparent black bitmap of the specified dimensions (effectively resizing it). - */ - width: number; - /** - * Returns a promise that will fulfill with a new Blob object representing a file containing the image in the OffscreenCanvas object. - * - * The argument, if provided, is a dictionary that controls the encoding options of the image file to be created. The type field specifies the file format and has a default value of "image/png"; that type is also used if the requested type isn't supported. If the image format supports variable quality (such as "image/jpeg"), then the quality field is a number in the range 0.0 to 1.0 inclusive indicating the desired quality level for the resulting image. - */ - convertToBlob(options?: ImageEncodeOptions): Promise<Blob>; - /** - * Returns an object that exposes an API for drawing on the OffscreenCanvas object. contextId specifies the desired API: "2d", "bitmaprenderer", "webgl", or "webgl2". options is handled by that API. - * - * This specification defines the "2d" context below, which is similar but distinct from the "2d" context that is created from a canvas element. The WebGL specifications define the "webgl" and "webgl2" contexts. [WEBGL] - * - * Returns null if the canvas has already been initialized with another context type (e.g., trying to get a "2d" context after getting a "webgl" context). - */ - getContext(contextId: "2d", options?: CanvasRenderingContext2DSettings): OffscreenCanvasRenderingContext2D | null; - getContext(contextId: "bitmaprenderer", options?: ImageBitmapRenderingContextSettings): ImageBitmapRenderingContext | null; - getContext(contextId: "webgl", options?: WebGLContextAttributes): WebGLRenderingContext | null; - getContext(contextId: "webgl2", options?: WebGLContextAttributes): WebGL2RenderingContext | null; - getContext(contextId: OffscreenRenderingContextId, options?: any): OffscreenRenderingContext | null; - /** - * Returns a newly created ImageBitmap object with the image in the OffscreenCanvas object. The image in the OffscreenCanvas object is replaced with a new blank image. - */ - transferToImageBitmap(): ImageBitmap; +interface OVR_multiview2 { + framebufferTextureMultiviewOVR(target: GLenum, attachment: GLenum, texture: WebGLTexture | null, level: GLint, baseViewIndex: GLint, numViews: GLsizei): void; + readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_BASE_VIEW_INDEX_OVR: GLenum; + readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_NUM_VIEWS_OVR: GLenum; + readonly FRAMEBUFFER_INCOMPLETE_VIEW_TARGETS_OVR: GLenum; + readonly MAX_VIEWS_OVR: GLenum; } -declare var OffscreenCanvas: { - prototype: OffscreenCanvas; - new(width: number, height: number): OffscreenCanvas; -}; - -interface OffscreenCanvasRenderingContext2D extends CanvasCompositing, CanvasDrawImage, CanvasDrawPath, CanvasFillStrokeStyles, CanvasFilters, CanvasImageData, CanvasImageSmoothing, CanvasPath, CanvasPathDrawingStyles, CanvasRect, CanvasShadowStyles, CanvasState, CanvasText, CanvasTextDrawingStyles, CanvasTransform { - readonly canvas: OffscreenCanvas; - commit(): void; +/** @deprecated this is not available in most browsers */ +interface OffscreenCanvas extends EventTarget { } -declare var OffscreenCanvasRenderingContext2D: { - prototype: OffscreenCanvasRenderingContext2D; - new(): OffscreenCanvasRenderingContext2D; -}; - /** This Canvas 2D API interface is used to declare a path that can then be used on a CanvasRenderingContext2D object. The path methods of the CanvasRenderingContext2D interface are also present on this interface, which gives you the convenience of being able to retain and replay your path whenever desired. */ interface Path2D extends CanvasPath { /** @@ -2510,16 +2498,16 @@ interface PerformanceEventMap { /** Provides access to performance-related information for the current page. It's part of the High Resolution Time API, but is enhanced by the Performance Timeline API, the Navigation Timing API, the User Timing API, and the Resource Timing API. */ interface Performance extends EventTarget { onresourcetimingbufferfull: ((this: Performance, ev: Event) => any) | null; - readonly timeOrigin: number; + readonly timeOrigin: DOMHighResTimeStamp; clearMarks(markName?: string): void; clearMeasures(measureName?: string): void; clearResourceTimings(): void; getEntries(): PerformanceEntryList; getEntriesByName(name: string, type?: string): PerformanceEntryList; getEntriesByType(type: string): PerformanceEntryList; - mark(markName: string): void; - measure(measureName: string, startMark?: string, endMark?: string): void; - now(): number; + mark(markName: string, markOptions?: PerformanceMarkOptions): PerformanceMark; + measure(measureName: string, startOrMeasureOptions?: string | PerformanceMeasureOptions, endMark?: string): PerformanceMeasure; + now(): DOMHighResTimeStamp; setResourceTimingBufferSize(maxSize: number): void; toJSON(): any; addEventListener<K extends keyof PerformanceEventMap>(type: K, listener: (this: Performance, ev: PerformanceEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; @@ -2535,10 +2523,10 @@ declare var Performance: { /** Encapsulates a single performance metric that is part of the performance timeline. A performance entry can be directly created by making a performance mark or measure (for example by calling the mark() method) at an explicit point in an application. Performance entries are also created in indirect ways such as loading a resource (such as an image). */ interface PerformanceEntry { - readonly duration: number; + readonly duration: DOMHighResTimeStamp; readonly entryType: string; readonly name: string; - readonly startTime: number; + readonly startTime: DOMHighResTimeStamp; toJSON(): any; } @@ -2549,15 +2537,17 @@ declare var PerformanceEntry: { /** PerformanceMark is an abstract interface for PerformanceEntry objects with an entryType of "mark". Entries of this type are created by calling performance.mark() to add a named DOMHighResTimeStamp (the mark) to the browser's performance timeline. */ interface PerformanceMark extends PerformanceEntry { + readonly detail: any; } declare var PerformanceMark: { prototype: PerformanceMark; - new(): PerformanceMark; + new(markName: string, markOptions?: PerformanceMarkOptions): PerformanceMark; }; /** PerformanceMeasure is an abstract interface for PerformanceEntry objects with an entryType of "measure". Entries of this type are created by calling performance.measure() to add a named DOMHighResTimeStamp (the measure) between two marks to the browser's performance timeline. */ interface PerformanceMeasure extends PerformanceEntry { + readonly detail: any; } declare var PerformanceMeasure: { @@ -2590,23 +2580,24 @@ declare var PerformanceObserverEntryList: { /** Enables retrieval and analysis of detailed network timing data regarding the loading of an application's resources. An application can use the timing metrics to determine, for example, the length of time it takes to fetch a specific resource, such as an XMLHttpRequest, <SVG>, image, or script. */ interface PerformanceResourceTiming extends PerformanceEntry { - readonly connectEnd: number; - readonly connectStart: number; + readonly connectEnd: DOMHighResTimeStamp; + readonly connectStart: DOMHighResTimeStamp; readonly decodedBodySize: number; - readonly domainLookupEnd: number; - readonly domainLookupStart: number; + readonly domainLookupEnd: DOMHighResTimeStamp; + readonly domainLookupStart: DOMHighResTimeStamp; readonly encodedBodySize: number; - readonly fetchStart: number; + readonly fetchStart: DOMHighResTimeStamp; readonly initiatorType: string; readonly nextHopProtocol: string; - readonly redirectEnd: number; - readonly redirectStart: number; - readonly requestStart: number; - readonly responseEnd: number; - readonly responseStart: number; - readonly secureConnectionStart: number; + readonly redirectEnd: DOMHighResTimeStamp; + readonly redirectStart: DOMHighResTimeStamp; + readonly requestStart: DOMHighResTimeStamp; + readonly responseEnd: DOMHighResTimeStamp; + readonly responseStart: DOMHighResTimeStamp; + readonly secureConnectionStart: DOMHighResTimeStamp; + readonly serverTiming: ReadonlyArray<PerformanceServerTiming>; readonly transferSize: number; - readonly workerStart: number; + readonly workerStart: DOMHighResTimeStamp; toJSON(): any; } @@ -2615,6 +2606,18 @@ declare var PerformanceResourceTiming: { new(): PerformanceResourceTiming; }; +interface PerformanceServerTiming { + readonly description: string; + readonly duration: DOMHighResTimeStamp; + readonly name: string; + toJSON(): any; +} + +declare var PerformanceServerTiming: { + prototype: PerformanceServerTiming; + new(): PerformanceServerTiming; +}; + interface PermissionStatusEventMap { "change": Event; } @@ -2634,7 +2637,7 @@ declare var PermissionStatus: { }; interface Permissions { - query(permissionDesc: PermissionDescriptor | DevicePermissionDescriptor | MidiPermissionDescriptor | PushPermissionDescriptor): Promise<PermissionStatus>; + query(permissionDesc: PermissionDescriptor): Promise<PermissionStatus>; } declare var Permissions: { @@ -2704,7 +2707,6 @@ declare var PushMessageData: { /** This Push API interface provides a subcription's URL endpoint and allows unsubscription from a push service. */ interface PushSubscription { readonly endpoint: string; - readonly expirationTime: number | null; readonly options: PushSubscriptionOptions; getKey(name: PushEncryptionKeyName): ArrayBuffer | null; toJSON(): PushSubscriptionJSON; @@ -2718,7 +2720,6 @@ declare var PushSubscription: { interface PushSubscriptionOptions { readonly applicationServerKey: ArrayBuffer | null; - readonly userVisibleOnly: boolean; } declare var PushSubscriptionOptions: { @@ -2732,8 +2733,9 @@ interface ReadableStream<R = any> { cancel(reason?: any): Promise<void>; getReader(): ReadableStreamDefaultReader<R>; pipeThrough<T>(transform: ReadableWritablePair<T, R>, options?: StreamPipeOptions): ReadableStream<T>; - pipeTo(dest: WritableStream<R>, options?: StreamPipeOptions): Promise<void>; + pipeTo(destination: WritableStream<R>, options?: StreamPipeOptions): Promise<void>; tee(): [ReadableStream<R>, ReadableStream<R>]; + forEach(callbackfn: (value: any, key: number, parent: ReadableStream<R>) => void, thisArg?: any): void; } declare var ReadableStream: { @@ -2744,7 +2746,7 @@ declare var ReadableStream: { interface ReadableStreamDefaultController<R = any> { readonly desiredSize: number | null; close(): void; - enqueue(chunk: R): void; + enqueue(chunk?: R): void; error(e?: any): void; } @@ -2791,14 +2793,6 @@ interface Request extends Body { */ readonly integrity: string; /** - * Returns a boolean indicating whether or not request is for a history navigation (a.k.a. back-foward navigation). - */ - readonly isHistoryNavigation: boolean; - /** - * Returns a boolean indicating whether or not request is for a reload navigation. - */ - readonly isReloadNavigation: boolean; - /** * Returns a boolean indicating whether or not request can outlive the global in which it was created. */ readonly keepalive: boolean; @@ -2845,7 +2839,6 @@ interface Response extends Body { readonly redirected: boolean; readonly status: number; readonly statusText: string; - readonly trailer: Promise<Headers>; readonly type: ResponseType; readonly url: string; clone(): Response; @@ -2855,7 +2848,28 @@ declare var Response: { prototype: Response; new(body?: BodyInit | null, init?: ResponseInit): Response; error(): Response; - redirect(url: string, status?: number): Response; + redirect(url: string | URL, status?: number): Response; +}; + +/** Inherits from Event, and represents the event object of an event sent on a document or worker when its content security policy is violated. */ +interface SecurityPolicyViolationEvent extends Event { + readonly blockedURI: string; + readonly columnNumber: number; + readonly disposition: SecurityPolicyViolationEventDisposition; + readonly documentURI: string; + readonly effectiveDirective: string; + readonly lineNumber: number; + readonly originalPolicy: string; + readonly referrer: string; + readonly sample: string; + readonly sourceFile: string; + readonly statusCode: number; + readonly violatedDirective: string; +} + +declare var SecurityPolicyViolationEvent: { + prototype: SecurityPolicyViolationEvent; + new(type: string, eventInitDict?: SecurityPolicyViolationEventInit): SecurityPolicyViolationEvent; }; interface ServiceWorkerEventMap extends AbstractWorkerEventMap { @@ -2893,7 +2907,7 @@ interface ServiceWorkerContainer extends EventTarget { onmessage: ((this: ServiceWorkerContainer, ev: MessageEvent) => any) | null; onmessageerror: ((this: ServiceWorkerContainer, ev: MessageEvent) => any) | null; readonly ready: Promise<ServiceWorkerRegistration>; - getRegistration(clientURL?: string): Promise<ServiceWorkerRegistration | undefined>; + getRegistration(clientURL?: string | URL): Promise<ServiceWorkerRegistration | undefined>; getRegistrations(): Promise<ReadonlyArray<ServiceWorkerRegistration>>; register(scriptURL: string | URL, options?: RegistrationOptions): Promise<ServiceWorkerRegistration>; startMessages(): void; @@ -2917,7 +2931,6 @@ interface ServiceWorkerGlobalScopeEventMap extends WorkerGlobalScopeEventMap { "notificationclick": NotificationEvent; "notificationclose": NotificationEvent; "push": PushEvent; - "sync": SyncEvent; } /** This ServiceWorker API interface represents the global execution context of a service worker. */ @@ -2931,9 +2944,7 @@ interface ServiceWorkerGlobalScope extends WorkerGlobalScope { onnotificationclick: ((this: ServiceWorkerGlobalScope, ev: NotificationEvent) => any) | null; onnotificationclose: ((this: ServiceWorkerGlobalScope, ev: NotificationEvent) => any) | null; onpush: ((this: ServiceWorkerGlobalScope, ev: PushEvent) => any) | null; - onsync: ((this: ServiceWorkerGlobalScope, ev: SyncEvent) => any) | null; readonly registration: ServiceWorkerRegistration; - readonly serviceWorker: ServiceWorker; skipWaiting(): Promise<void>; addEventListener<K extends keyof ServiceWorkerGlobalScopeEventMap>(type: K, listener: (this: ServiceWorkerGlobalScope, ev: ServiceWorkerGlobalScopeEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; @@ -2954,11 +2965,9 @@ interface ServiceWorkerRegistrationEventMap { interface ServiceWorkerRegistration extends EventTarget { readonly active: ServiceWorker | null; readonly installing: ServiceWorker | null; - readonly navigationPreload: NavigationPreloadManager; onupdatefound: ((this: ServiceWorkerRegistration, ev: Event) => any) | null; readonly pushManager: PushManager; readonly scope: string; - readonly sync: SyncManager; readonly updateViaCache: ServiceWorkerUpdateViaCache; readonly waiting: ServiceWorker | null; getNotifications(filter?: GetNotificationOptions): Promise<Notification[]>; @@ -2976,22 +2985,6 @@ declare var ServiceWorkerRegistration: { new(): ServiceWorkerRegistration; }; -interface SharedWorker extends EventTarget, AbstractWorker { - /** - * Returns sharedWorker's MessagePort object which can be used to communicate with the global environment. - */ - readonly port: MessagePort; - addEventListener<K extends keyof AbstractWorkerEventMap>(type: K, listener: (this: SharedWorker, ev: AbstractWorkerEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; - removeEventListener<K extends keyof AbstractWorkerEventMap>(type: K, listener: (this: SharedWorker, ev: AbstractWorkerEventMap[K]) => any, options?: boolean | EventListenerOptions): void; - removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; -} - -declare var SharedWorker: { - prototype: SharedWorker; - new(scriptURL: string, options?: string | WorkerOptions): SharedWorker; -}; - interface SharedWorkerGlobalScopeEventMap extends WorkerGlobalScopeEventMap { "connect": MessageEvent; } @@ -3029,24 +3022,22 @@ declare var StorageManager: { /** This Web Crypto API interface provides a number of low-level cryptographic functions. It is accessed via the Crypto.subtle properties available in a window context (via Window.crypto). */ interface SubtleCrypto { - decrypt(algorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesCmacParams | AesGcmParams | AesCfbParams, key: CryptoKey, data: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer): Promise<ArrayBuffer>; - deriveBits(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | DhKeyDeriveParams | ConcatParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, length: number): Promise<ArrayBuffer>; - deriveKey(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | DhKeyDeriveParams | ConcatParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, derivedKeyType: string | AesDerivedKeyParams | HmacImportParams | ConcatParams | HkdfParams | Pbkdf2Params, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey>; - digest(algorithm: AlgorithmIdentifier, data: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer): Promise<ArrayBuffer>; - encrypt(algorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesCmacParams | AesGcmParams | AesCfbParams, key: CryptoKey, data: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer): Promise<ArrayBuffer>; + decrypt(algorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams, key: CryptoKey, data: BufferSource): Promise<any>; + deriveBits(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, length: number): Promise<ArrayBuffer>; + deriveKey(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, derivedKeyType: AlgorithmIdentifier | AesDerivedKeyParams | HmacImportParams | HkdfParams | Pbkdf2Params, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey>; + digest(algorithm: AlgorithmIdentifier, data: BufferSource): Promise<ArrayBuffer>; + encrypt(algorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams, key: CryptoKey, data: BufferSource): Promise<any>; exportKey(format: "jwk", key: CryptoKey): Promise<JsonWebKey>; - exportKey(format: "raw" | "pkcs8" | "spki", key: CryptoKey): Promise<ArrayBuffer>; - exportKey(format: string, key: CryptoKey): Promise<JsonWebKey | ArrayBuffer>; - generateKey(algorithm: RsaHashedKeyGenParams | EcKeyGenParams | DhKeyGenParams, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKeyPair>; + exportKey(format: Exclude<KeyFormat, "jwk">, key: CryptoKey): Promise<ArrayBuffer>; + generateKey(algorithm: RsaHashedKeyGenParams | EcKeyGenParams, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKeyPair>; generateKey(algorithm: AesKeyGenParams | HmacKeyGenParams | Pbkdf2Params, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey>; generateKey(algorithm: AlgorithmIdentifier, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKeyPair | CryptoKey>; - importKey(format: "jwk", keyData: JsonWebKey, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | DhImportKeyParams | AesKeyAlgorithm, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey>; - importKey(format: "raw" | "pkcs8" | "spki", keyData: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | DhImportKeyParams | AesKeyAlgorithm, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey>; - importKey(format: string, keyData: JsonWebKey | Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | DhImportKeyParams | AesKeyAlgorithm, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey>; - sign(algorithm: AlgorithmIdentifier | RsaPssParams | EcdsaParams | AesCmacParams, key: CryptoKey, data: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer): Promise<ArrayBuffer>; - unwrapKey(format: "raw" | "pkcs8" | "spki" | "jwk" | string, wrappedKey: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer, unwrappingKey: CryptoKey, unwrapAlgorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesCmacParams | AesGcmParams | AesCfbParams, unwrappedKeyAlgorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | DhImportKeyParams | AesKeyAlgorithm, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey>; - verify(algorithm: AlgorithmIdentifier | RsaPssParams | EcdsaParams | AesCmacParams, key: CryptoKey, signature: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer, data: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer): Promise<boolean>; - wrapKey(format: "raw" | "pkcs8" | "spki" | "jwk" | string, key: CryptoKey, wrappingKey: CryptoKey, wrapAlgorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesCmacParams | AesGcmParams | AesCfbParams): Promise<ArrayBuffer>; + importKey(format: "jwk", keyData: JsonWebKey, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey>; + importKey(format: Exclude<KeyFormat, "jwk">, keyData: BufferSource, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey>; + sign(algorithm: AlgorithmIdentifier | RsaPssParams | EcdsaParams, key: CryptoKey, data: BufferSource): Promise<ArrayBuffer>; + unwrapKey(format: KeyFormat, wrappedKey: BufferSource, unwrappingKey: CryptoKey, unwrapAlgorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams, unwrappedKeyAlgorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey>; + verify(algorithm: AlgorithmIdentifier | RsaPssParams | EcdsaParams, key: CryptoKey, signature: BufferSource, data: BufferSource): Promise<boolean>; + wrapKey(format: KeyFormat, key: CryptoKey, wrappingKey: CryptoKey, wrapAlgorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams): Promise<ArrayBuffer>; } declare var SubtleCrypto: { @@ -3054,28 +3045,6 @@ declare var SubtleCrypto: { new(): SubtleCrypto; }; -/** A sync action that is dispatched on the ServiceWorkerGlobalScope of a ServiceWorker. */ -interface SyncEvent extends ExtendableEvent { - readonly lastChance: boolean; - readonly tag: string; -} - -declare var SyncEvent: { - prototype: SyncEvent; - new(type: string, init: SyncEventInit): SyncEvent; -}; - -/** This ServiceWorker API interface provides an interface for registering and listing sync registrations. */ -interface SyncManager { - getTags(): Promise<string[]>; - register(tag: string): Promise<void>; -} - -declare var SyncManager: { - prototype: SyncManager; - new(): SyncManager; -}; - /** A decoder for a specific method, that is a specific character encoding, like utf-8, iso-8859-2, koi8, cp1261, gbk, etc. A decoder takes a stream of bytes as input and emits a stream of code points. For a more scalable, non-native library, see StringView – a C-like representation of strings based on typed arrays. */ interface TextDecoder extends TextDecoderCommon { /** @@ -3179,6 +3148,14 @@ interface TextMetrics { /** * Returns the measurement described below. */ + readonly fontBoundingBoxAscent: number; + /** + * Returns the measurement described below. + */ + readonly fontBoundingBoxDescent: number; + /** + * Returns the measurement described below. + */ readonly width: number; } @@ -3199,7 +3176,7 @@ declare var TransformStream: { interface TransformStreamDefaultController<O = any> { readonly desiredSize: number | null; - enqueue(chunk: O): void; + enqueue(chunk?: O): void; error(reason?: any): void; terminate(): void; } @@ -3229,7 +3206,7 @@ interface URL { declare var URL: { prototype: URL; - new(url: string, base?: string | URL): URL; + new(url: string | URL, base?: string | URL): URL; createObjectURL(object: any): string; revokeObjectURL(url: string): void; }; @@ -3311,6 +3288,30 @@ interface WEBGL_compressed_texture_astc { readonly COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR: GLenum; } +interface WEBGL_compressed_texture_etc { + readonly COMPRESSED_R11_EAC: GLenum; + readonly COMPRESSED_RG11_EAC: GLenum; + readonly COMPRESSED_RGB8_ETC2: GLenum; + readonly COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2: GLenum; + readonly COMPRESSED_RGBA8_ETC2_EAC: GLenum; + readonly COMPRESSED_SIGNED_R11_EAC: GLenum; + readonly COMPRESSED_SIGNED_RG11_EAC: GLenum; + readonly COMPRESSED_SRGB8_ALPHA8_ETC2_EAC: GLenum; + readonly COMPRESSED_SRGB8_ETC2: GLenum; + readonly COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2: GLenum; +} + +interface WEBGL_compressed_texture_etc1 { + readonly COMPRESSED_RGB_ETC1_WEBGL: GLenum; +} + +interface WEBGL_compressed_texture_pvrtc { + readonly COMPRESSED_RGBA_PVRTC_2BPPV1_IMG: GLenum; + readonly COMPRESSED_RGBA_PVRTC_4BPPV1_IMG: GLenum; + readonly COMPRESSED_RGB_PVRTC_2BPPV1_IMG: GLenum; + readonly COMPRESSED_RGB_PVRTC_4BPPV1_IMG: GLenum; +} + /** The WEBGL_compressed_texture_s3tc extension is part of the WebGL API and exposes four S3TC compressed texture formats. */ interface WEBGL_compressed_texture_s3tc { readonly COMPRESSED_RGBA_S3TC_DXT1_EXT: GLenum; @@ -3390,6 +3391,269 @@ interface WebGL2RenderingContext extends WebGL2RenderingContextBase, WebGL2Rende declare var WebGL2RenderingContext: { prototype: WebGL2RenderingContext; new(): WebGL2RenderingContext; + readonly ACTIVE_UNIFORM_BLOCKS: GLenum; + readonly ALREADY_SIGNALED: GLenum; + readonly ANY_SAMPLES_PASSED: GLenum; + readonly ANY_SAMPLES_PASSED_CONSERVATIVE: GLenum; + readonly COLOR: GLenum; + readonly COLOR_ATTACHMENT1: GLenum; + readonly COLOR_ATTACHMENT10: GLenum; + readonly COLOR_ATTACHMENT11: GLenum; + readonly COLOR_ATTACHMENT12: GLenum; + readonly COLOR_ATTACHMENT13: GLenum; + readonly COLOR_ATTACHMENT14: GLenum; + readonly COLOR_ATTACHMENT15: GLenum; + readonly COLOR_ATTACHMENT2: GLenum; + readonly COLOR_ATTACHMENT3: GLenum; + readonly COLOR_ATTACHMENT4: GLenum; + readonly COLOR_ATTACHMENT5: GLenum; + readonly COLOR_ATTACHMENT6: GLenum; + readonly COLOR_ATTACHMENT7: GLenum; + readonly COLOR_ATTACHMENT8: GLenum; + readonly COLOR_ATTACHMENT9: GLenum; + readonly COMPARE_REF_TO_TEXTURE: GLenum; + readonly CONDITION_SATISFIED: GLenum; + readonly COPY_READ_BUFFER: GLenum; + readonly COPY_READ_BUFFER_BINDING: GLenum; + readonly COPY_WRITE_BUFFER: GLenum; + readonly COPY_WRITE_BUFFER_BINDING: GLenum; + readonly CURRENT_QUERY: GLenum; + readonly DEPTH: GLenum; + readonly DEPTH24_STENCIL8: GLenum; + readonly DEPTH32F_STENCIL8: GLenum; + readonly DEPTH_COMPONENT24: GLenum; + readonly DEPTH_COMPONENT32F: GLenum; + readonly DRAW_BUFFER0: GLenum; + readonly DRAW_BUFFER1: GLenum; + readonly DRAW_BUFFER10: GLenum; + readonly DRAW_BUFFER11: GLenum; + readonly DRAW_BUFFER12: GLenum; + readonly DRAW_BUFFER13: GLenum; + readonly DRAW_BUFFER14: GLenum; + readonly DRAW_BUFFER15: GLenum; + readonly DRAW_BUFFER2: GLenum; + readonly DRAW_BUFFER3: GLenum; + readonly DRAW_BUFFER4: GLenum; + readonly DRAW_BUFFER5: GLenum; + readonly DRAW_BUFFER6: GLenum; + readonly DRAW_BUFFER7: GLenum; + readonly DRAW_BUFFER8: GLenum; + readonly DRAW_BUFFER9: GLenum; + readonly DRAW_FRAMEBUFFER: GLenum; + readonly DRAW_FRAMEBUFFER_BINDING: GLenum; + readonly DYNAMIC_COPY: GLenum; + readonly DYNAMIC_READ: GLenum; + readonly FLOAT_32_UNSIGNED_INT_24_8_REV: GLenum; + readonly FLOAT_MAT2x3: GLenum; + readonly FLOAT_MAT2x4: GLenum; + readonly FLOAT_MAT3x2: GLenum; + readonly FLOAT_MAT3x4: GLenum; + readonly FLOAT_MAT4x2: GLenum; + readonly FLOAT_MAT4x3: GLenum; + readonly FRAGMENT_SHADER_DERIVATIVE_HINT: GLenum; + readonly FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE: GLenum; + readonly FRAMEBUFFER_ATTACHMENT_BLUE_SIZE: GLenum; + readonly FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING: GLenum; + readonly FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE: GLenum; + readonly FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE: GLenum; + readonly FRAMEBUFFER_ATTACHMENT_GREEN_SIZE: GLenum; + readonly FRAMEBUFFER_ATTACHMENT_RED_SIZE: GLenum; + readonly FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE: GLenum; + readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER: GLenum; + readonly FRAMEBUFFER_DEFAULT: GLenum; + readonly FRAMEBUFFER_INCOMPLETE_MULTISAMPLE: GLenum; + readonly HALF_FLOAT: GLenum; + readonly INTERLEAVED_ATTRIBS: GLenum; + readonly INT_2_10_10_10_REV: GLenum; + readonly INT_SAMPLER_2D: GLenum; + readonly INT_SAMPLER_2D_ARRAY: GLenum; + readonly INT_SAMPLER_3D: GLenum; + readonly INT_SAMPLER_CUBE: GLenum; + readonly INVALID_INDEX: GLenum; + readonly MAX: GLenum; + readonly MAX_3D_TEXTURE_SIZE: GLenum; + readonly MAX_ARRAY_TEXTURE_LAYERS: GLenum; + readonly MAX_CLIENT_WAIT_TIMEOUT_WEBGL: GLenum; + readonly MAX_COLOR_ATTACHMENTS: GLenum; + readonly MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS: GLenum; + readonly MAX_COMBINED_UNIFORM_BLOCKS: GLenum; + readonly MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS: GLenum; + readonly MAX_DRAW_BUFFERS: GLenum; + readonly MAX_ELEMENTS_INDICES: GLenum; + readonly MAX_ELEMENTS_VERTICES: GLenum; + readonly MAX_ELEMENT_INDEX: GLenum; + readonly MAX_FRAGMENT_INPUT_COMPONENTS: GLenum; + readonly MAX_FRAGMENT_UNIFORM_BLOCKS: GLenum; + readonly MAX_FRAGMENT_UNIFORM_COMPONENTS: GLenum; + readonly MAX_PROGRAM_TEXEL_OFFSET: GLenum; + readonly MAX_SAMPLES: GLenum; + readonly MAX_SERVER_WAIT_TIMEOUT: GLenum; + readonly MAX_TEXTURE_LOD_BIAS: GLenum; + readonly MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS: GLenum; + readonly MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS: GLenum; + readonly MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS: GLenum; + readonly MAX_UNIFORM_BLOCK_SIZE: GLenum; + readonly MAX_UNIFORM_BUFFER_BINDINGS: GLenum; + readonly MAX_VARYING_COMPONENTS: GLenum; + readonly MAX_VERTEX_OUTPUT_COMPONENTS: GLenum; + readonly MAX_VERTEX_UNIFORM_BLOCKS: GLenum; + readonly MAX_VERTEX_UNIFORM_COMPONENTS: GLenum; + readonly MIN: GLenum; + readonly MIN_PROGRAM_TEXEL_OFFSET: GLenum; + readonly OBJECT_TYPE: GLenum; + readonly PACK_ROW_LENGTH: GLenum; + readonly PACK_SKIP_PIXELS: GLenum; + readonly PACK_SKIP_ROWS: GLenum; + readonly PIXEL_PACK_BUFFER: GLenum; + readonly PIXEL_PACK_BUFFER_BINDING: GLenum; + readonly PIXEL_UNPACK_BUFFER: GLenum; + readonly PIXEL_UNPACK_BUFFER_BINDING: GLenum; + readonly QUERY_RESULT: GLenum; + readonly QUERY_RESULT_AVAILABLE: GLenum; + readonly R11F_G11F_B10F: GLenum; + readonly R16F: GLenum; + readonly R16I: GLenum; + readonly R16UI: GLenum; + readonly R32F: GLenum; + readonly R32I: GLenum; + readonly R32UI: GLenum; + readonly R8: GLenum; + readonly R8I: GLenum; + readonly R8UI: GLenum; + readonly R8_SNORM: GLenum; + readonly RASTERIZER_DISCARD: GLenum; + readonly READ_BUFFER: GLenum; + readonly READ_FRAMEBUFFER: GLenum; + readonly READ_FRAMEBUFFER_BINDING: GLenum; + readonly RED: GLenum; + readonly RED_INTEGER: GLenum; + readonly RENDERBUFFER_SAMPLES: GLenum; + readonly RG: GLenum; + readonly RG16F: GLenum; + readonly RG16I: GLenum; + readonly RG16UI: GLenum; + readonly RG32F: GLenum; + readonly RG32I: GLenum; + readonly RG32UI: GLenum; + readonly RG8: GLenum; + readonly RG8I: GLenum; + readonly RG8UI: GLenum; + readonly RG8_SNORM: GLenum; + readonly RGB10_A2: GLenum; + readonly RGB10_A2UI: GLenum; + readonly RGB16F: GLenum; + readonly RGB16I: GLenum; + readonly RGB16UI: GLenum; + readonly RGB32F: GLenum; + readonly RGB32I: GLenum; + readonly RGB32UI: GLenum; + readonly RGB8: GLenum; + readonly RGB8I: GLenum; + readonly RGB8UI: GLenum; + readonly RGB8_SNORM: GLenum; + readonly RGB9_E5: GLenum; + readonly RGBA16F: GLenum; + readonly RGBA16I: GLenum; + readonly RGBA16UI: GLenum; + readonly RGBA32F: GLenum; + readonly RGBA32I: GLenum; + readonly RGBA32UI: GLenum; + readonly RGBA8: GLenum; + readonly RGBA8I: GLenum; + readonly RGBA8UI: GLenum; + readonly RGBA8_SNORM: GLenum; + readonly RGBA_INTEGER: GLenum; + readonly RGB_INTEGER: GLenum; + readonly RG_INTEGER: GLenum; + readonly SAMPLER_2D_ARRAY: GLenum; + readonly SAMPLER_2D_ARRAY_SHADOW: GLenum; + readonly SAMPLER_2D_SHADOW: GLenum; + readonly SAMPLER_3D: GLenum; + readonly SAMPLER_BINDING: GLenum; + readonly SAMPLER_CUBE_SHADOW: GLenum; + readonly SEPARATE_ATTRIBS: GLenum; + readonly SIGNALED: GLenum; + readonly SIGNED_NORMALIZED: GLenum; + readonly SRGB: GLenum; + readonly SRGB8: GLenum; + readonly SRGB8_ALPHA8: GLenum; + readonly STATIC_COPY: GLenum; + readonly STATIC_READ: GLenum; + readonly STENCIL: GLenum; + readonly STREAM_COPY: GLenum; + readonly STREAM_READ: GLenum; + readonly SYNC_CONDITION: GLenum; + readonly SYNC_FENCE: GLenum; + readonly SYNC_FLAGS: GLenum; + readonly SYNC_FLUSH_COMMANDS_BIT: GLenum; + readonly SYNC_GPU_COMMANDS_COMPLETE: GLenum; + readonly SYNC_STATUS: GLenum; + readonly TEXTURE_2D_ARRAY: GLenum; + readonly TEXTURE_3D: GLenum; + readonly TEXTURE_BASE_LEVEL: GLenum; + readonly TEXTURE_BINDING_2D_ARRAY: GLenum; + readonly TEXTURE_BINDING_3D: GLenum; + readonly TEXTURE_COMPARE_FUNC: GLenum; + readonly TEXTURE_COMPARE_MODE: GLenum; + readonly TEXTURE_IMMUTABLE_FORMAT: GLenum; + readonly TEXTURE_IMMUTABLE_LEVELS: GLenum; + readonly TEXTURE_MAX_LEVEL: GLenum; + readonly TEXTURE_MAX_LOD: GLenum; + readonly TEXTURE_MIN_LOD: GLenum; + readonly TEXTURE_WRAP_R: GLenum; + readonly TIMEOUT_EXPIRED: GLenum; + readonly TIMEOUT_IGNORED: GLint64; + readonly TRANSFORM_FEEDBACK: GLenum; + readonly TRANSFORM_FEEDBACK_ACTIVE: GLenum; + readonly TRANSFORM_FEEDBACK_BINDING: GLenum; + readonly TRANSFORM_FEEDBACK_BUFFER: GLenum; + readonly TRANSFORM_FEEDBACK_BUFFER_BINDING: GLenum; + readonly TRANSFORM_FEEDBACK_BUFFER_MODE: GLenum; + readonly TRANSFORM_FEEDBACK_BUFFER_SIZE: GLenum; + readonly TRANSFORM_FEEDBACK_BUFFER_START: GLenum; + readonly TRANSFORM_FEEDBACK_PAUSED: GLenum; + readonly TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN: GLenum; + readonly TRANSFORM_FEEDBACK_VARYINGS: GLenum; + readonly UNIFORM_ARRAY_STRIDE: GLenum; + readonly UNIFORM_BLOCK_ACTIVE_UNIFORMS: GLenum; + readonly UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES: GLenum; + readonly UNIFORM_BLOCK_BINDING: GLenum; + readonly UNIFORM_BLOCK_DATA_SIZE: GLenum; + readonly UNIFORM_BLOCK_INDEX: GLenum; + readonly UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER: GLenum; + readonly UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER: GLenum; + readonly UNIFORM_BUFFER: GLenum; + readonly UNIFORM_BUFFER_BINDING: GLenum; + readonly UNIFORM_BUFFER_OFFSET_ALIGNMENT: GLenum; + readonly UNIFORM_BUFFER_SIZE: GLenum; + readonly UNIFORM_BUFFER_START: GLenum; + readonly UNIFORM_IS_ROW_MAJOR: GLenum; + readonly UNIFORM_MATRIX_STRIDE: GLenum; + readonly UNIFORM_OFFSET: GLenum; + readonly UNIFORM_SIZE: GLenum; + readonly UNIFORM_TYPE: GLenum; + readonly UNPACK_IMAGE_HEIGHT: GLenum; + readonly UNPACK_ROW_LENGTH: GLenum; + readonly UNPACK_SKIP_IMAGES: GLenum; + readonly UNPACK_SKIP_PIXELS: GLenum; + readonly UNPACK_SKIP_ROWS: GLenum; + readonly UNSIGNALED: GLenum; + readonly UNSIGNED_INT_10F_11F_11F_REV: GLenum; + readonly UNSIGNED_INT_24_8: GLenum; + readonly UNSIGNED_INT_2_10_10_10_REV: GLenum; + readonly UNSIGNED_INT_5_9_9_9_REV: GLenum; + readonly UNSIGNED_INT_SAMPLER_2D: GLenum; + readonly UNSIGNED_INT_SAMPLER_2D_ARRAY: GLenum; + readonly UNSIGNED_INT_SAMPLER_3D: GLenum; + readonly UNSIGNED_INT_SAMPLER_CUBE: GLenum; + readonly UNSIGNED_INT_VEC2: GLenum; + readonly UNSIGNED_INT_VEC3: GLenum; + readonly UNSIGNED_INT_VEC4: GLenum; + readonly UNSIGNED_NORMALIZED: GLenum; + readonly VERTEX_ARRAY_BINDING: GLenum; + readonly VERTEX_ATTRIB_ARRAY_DIVISOR: GLenum; + readonly VERTEX_ATTRIB_ARRAY_INTEGER: GLenum; + readonly WAIT_FAILED: GLenum; readonly ACTIVE_ATTRIBUTES: GLenum; readonly ACTIVE_TEXTURE: GLenum; readonly ACTIVE_UNIFORMS: GLenum; @@ -3686,269 +3950,6 @@ declare var WebGL2RenderingContext: { readonly VERTEX_SHADER: GLenum; readonly VIEWPORT: GLenum; readonly ZERO: GLenum; - readonly ACTIVE_UNIFORM_BLOCKS: GLenum; - readonly ALREADY_SIGNALED: GLenum; - readonly ANY_SAMPLES_PASSED: GLenum; - readonly ANY_SAMPLES_PASSED_CONSERVATIVE: GLenum; - readonly COLOR: GLenum; - readonly COLOR_ATTACHMENT1: GLenum; - readonly COLOR_ATTACHMENT10: GLenum; - readonly COLOR_ATTACHMENT11: GLenum; - readonly COLOR_ATTACHMENT12: GLenum; - readonly COLOR_ATTACHMENT13: GLenum; - readonly COLOR_ATTACHMENT14: GLenum; - readonly COLOR_ATTACHMENT15: GLenum; - readonly COLOR_ATTACHMENT2: GLenum; - readonly COLOR_ATTACHMENT3: GLenum; - readonly COLOR_ATTACHMENT4: GLenum; - readonly COLOR_ATTACHMENT5: GLenum; - readonly COLOR_ATTACHMENT6: GLenum; - readonly COLOR_ATTACHMENT7: GLenum; - readonly COLOR_ATTACHMENT8: GLenum; - readonly COLOR_ATTACHMENT9: GLenum; - readonly COMPARE_REF_TO_TEXTURE: GLenum; - readonly CONDITION_SATISFIED: GLenum; - readonly COPY_READ_BUFFER: GLenum; - readonly COPY_READ_BUFFER_BINDING: GLenum; - readonly COPY_WRITE_BUFFER: GLenum; - readonly COPY_WRITE_BUFFER_BINDING: GLenum; - readonly CURRENT_QUERY: GLenum; - readonly DEPTH: GLenum; - readonly DEPTH24_STENCIL8: GLenum; - readonly DEPTH32F_STENCIL8: GLenum; - readonly DEPTH_COMPONENT24: GLenum; - readonly DEPTH_COMPONENT32F: GLenum; - readonly DRAW_BUFFER0: GLenum; - readonly DRAW_BUFFER1: GLenum; - readonly DRAW_BUFFER10: GLenum; - readonly DRAW_BUFFER11: GLenum; - readonly DRAW_BUFFER12: GLenum; - readonly DRAW_BUFFER13: GLenum; - readonly DRAW_BUFFER14: GLenum; - readonly DRAW_BUFFER15: GLenum; - readonly DRAW_BUFFER2: GLenum; - readonly DRAW_BUFFER3: GLenum; - readonly DRAW_BUFFER4: GLenum; - readonly DRAW_BUFFER5: GLenum; - readonly DRAW_BUFFER6: GLenum; - readonly DRAW_BUFFER7: GLenum; - readonly DRAW_BUFFER8: GLenum; - readonly DRAW_BUFFER9: GLenum; - readonly DRAW_FRAMEBUFFER: GLenum; - readonly DRAW_FRAMEBUFFER_BINDING: GLenum; - readonly DYNAMIC_COPY: GLenum; - readonly DYNAMIC_READ: GLenum; - readonly FLOAT_32_UNSIGNED_INT_24_8_REV: GLenum; - readonly FLOAT_MAT2x3: GLenum; - readonly FLOAT_MAT2x4: GLenum; - readonly FLOAT_MAT3x2: GLenum; - readonly FLOAT_MAT3x4: GLenum; - readonly FLOAT_MAT4x2: GLenum; - readonly FLOAT_MAT4x3: GLenum; - readonly FRAGMENT_SHADER_DERIVATIVE_HINT: GLenum; - readonly FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE: GLenum; - readonly FRAMEBUFFER_ATTACHMENT_BLUE_SIZE: GLenum; - readonly FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING: GLenum; - readonly FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE: GLenum; - readonly FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE: GLenum; - readonly FRAMEBUFFER_ATTACHMENT_GREEN_SIZE: GLenum; - readonly FRAMEBUFFER_ATTACHMENT_RED_SIZE: GLenum; - readonly FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE: GLenum; - readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER: GLenum; - readonly FRAMEBUFFER_DEFAULT: GLenum; - readonly FRAMEBUFFER_INCOMPLETE_MULTISAMPLE: GLenum; - readonly HALF_FLOAT: GLenum; - readonly INTERLEAVED_ATTRIBS: GLenum; - readonly INT_2_10_10_10_REV: GLenum; - readonly INT_SAMPLER_2D: GLenum; - readonly INT_SAMPLER_2D_ARRAY: GLenum; - readonly INT_SAMPLER_3D: GLenum; - readonly INT_SAMPLER_CUBE: GLenum; - readonly INVALID_INDEX: GLenum; - readonly MAX: GLenum; - readonly MAX_3D_TEXTURE_SIZE: GLenum; - readonly MAX_ARRAY_TEXTURE_LAYERS: GLenum; - readonly MAX_CLIENT_WAIT_TIMEOUT_WEBGL: GLenum; - readonly MAX_COLOR_ATTACHMENTS: GLenum; - readonly MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS: GLenum; - readonly MAX_COMBINED_UNIFORM_BLOCKS: GLenum; - readonly MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS: GLenum; - readonly MAX_DRAW_BUFFERS: GLenum; - readonly MAX_ELEMENTS_INDICES: GLenum; - readonly MAX_ELEMENTS_VERTICES: GLenum; - readonly MAX_ELEMENT_INDEX: GLenum; - readonly MAX_FRAGMENT_INPUT_COMPONENTS: GLenum; - readonly MAX_FRAGMENT_UNIFORM_BLOCKS: GLenum; - readonly MAX_FRAGMENT_UNIFORM_COMPONENTS: GLenum; - readonly MAX_PROGRAM_TEXEL_OFFSET: GLenum; - readonly MAX_SAMPLES: GLenum; - readonly MAX_SERVER_WAIT_TIMEOUT: GLenum; - readonly MAX_TEXTURE_LOD_BIAS: GLenum; - readonly MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS: GLenum; - readonly MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS: GLenum; - readonly MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS: GLenum; - readonly MAX_UNIFORM_BLOCK_SIZE: GLenum; - readonly MAX_UNIFORM_BUFFER_BINDINGS: GLenum; - readonly MAX_VARYING_COMPONENTS: GLenum; - readonly MAX_VERTEX_OUTPUT_COMPONENTS: GLenum; - readonly MAX_VERTEX_UNIFORM_BLOCKS: GLenum; - readonly MAX_VERTEX_UNIFORM_COMPONENTS: GLenum; - readonly MIN: GLenum; - readonly MIN_PROGRAM_TEXEL_OFFSET: GLenum; - readonly OBJECT_TYPE: GLenum; - readonly PACK_ROW_LENGTH: GLenum; - readonly PACK_SKIP_PIXELS: GLenum; - readonly PACK_SKIP_ROWS: GLenum; - readonly PIXEL_PACK_BUFFER: GLenum; - readonly PIXEL_PACK_BUFFER_BINDING: GLenum; - readonly PIXEL_UNPACK_BUFFER: GLenum; - readonly PIXEL_UNPACK_BUFFER_BINDING: GLenum; - readonly QUERY_RESULT: GLenum; - readonly QUERY_RESULT_AVAILABLE: GLenum; - readonly R11F_G11F_B10F: GLenum; - readonly R16F: GLenum; - readonly R16I: GLenum; - readonly R16UI: GLenum; - readonly R32F: GLenum; - readonly R32I: GLenum; - readonly R32UI: GLenum; - readonly R8: GLenum; - readonly R8I: GLenum; - readonly R8UI: GLenum; - readonly R8_SNORM: GLenum; - readonly RASTERIZER_DISCARD: GLenum; - readonly READ_BUFFER: GLenum; - readonly READ_FRAMEBUFFER: GLenum; - readonly READ_FRAMEBUFFER_BINDING: GLenum; - readonly RED: GLenum; - readonly RED_INTEGER: GLenum; - readonly RENDERBUFFER_SAMPLES: GLenum; - readonly RG: GLenum; - readonly RG16F: GLenum; - readonly RG16I: GLenum; - readonly RG16UI: GLenum; - readonly RG32F: GLenum; - readonly RG32I: GLenum; - readonly RG32UI: GLenum; - readonly RG8: GLenum; - readonly RG8I: GLenum; - readonly RG8UI: GLenum; - readonly RG8_SNORM: GLenum; - readonly RGB10_A2: GLenum; - readonly RGB10_A2UI: GLenum; - readonly RGB16F: GLenum; - readonly RGB16I: GLenum; - readonly RGB16UI: GLenum; - readonly RGB32F: GLenum; - readonly RGB32I: GLenum; - readonly RGB32UI: GLenum; - readonly RGB8: GLenum; - readonly RGB8I: GLenum; - readonly RGB8UI: GLenum; - readonly RGB8_SNORM: GLenum; - readonly RGB9_E5: GLenum; - readonly RGBA16F: GLenum; - readonly RGBA16I: GLenum; - readonly RGBA16UI: GLenum; - readonly RGBA32F: GLenum; - readonly RGBA32I: GLenum; - readonly RGBA32UI: GLenum; - readonly RGBA8: GLenum; - readonly RGBA8I: GLenum; - readonly RGBA8UI: GLenum; - readonly RGBA8_SNORM: GLenum; - readonly RGBA_INTEGER: GLenum; - readonly RGB_INTEGER: GLenum; - readonly RG_INTEGER: GLenum; - readonly SAMPLER_2D_ARRAY: GLenum; - readonly SAMPLER_2D_ARRAY_SHADOW: GLenum; - readonly SAMPLER_2D_SHADOW: GLenum; - readonly SAMPLER_3D: GLenum; - readonly SAMPLER_BINDING: GLenum; - readonly SAMPLER_CUBE_SHADOW: GLenum; - readonly SEPARATE_ATTRIBS: GLenum; - readonly SIGNALED: GLenum; - readonly SIGNED_NORMALIZED: GLenum; - readonly SRGB: GLenum; - readonly SRGB8: GLenum; - readonly SRGB8_ALPHA8: GLenum; - readonly STATIC_COPY: GLenum; - readonly STATIC_READ: GLenum; - readonly STENCIL: GLenum; - readonly STREAM_COPY: GLenum; - readonly STREAM_READ: GLenum; - readonly SYNC_CONDITION: GLenum; - readonly SYNC_FENCE: GLenum; - readonly SYNC_FLAGS: GLenum; - readonly SYNC_FLUSH_COMMANDS_BIT: GLenum; - readonly SYNC_GPU_COMMANDS_COMPLETE: GLenum; - readonly SYNC_STATUS: GLenum; - readonly TEXTURE_2D_ARRAY: GLenum; - readonly TEXTURE_3D: GLenum; - readonly TEXTURE_BASE_LEVEL: GLenum; - readonly TEXTURE_BINDING_2D_ARRAY: GLenum; - readonly TEXTURE_BINDING_3D: GLenum; - readonly TEXTURE_COMPARE_FUNC: GLenum; - readonly TEXTURE_COMPARE_MODE: GLenum; - readonly TEXTURE_IMMUTABLE_FORMAT: GLenum; - readonly TEXTURE_IMMUTABLE_LEVELS: GLenum; - readonly TEXTURE_MAX_LEVEL: GLenum; - readonly TEXTURE_MAX_LOD: GLenum; - readonly TEXTURE_MIN_LOD: GLenum; - readonly TEXTURE_WRAP_R: GLenum; - readonly TIMEOUT_EXPIRED: GLenum; - readonly TIMEOUT_IGNORED: GLint64; - readonly TRANSFORM_FEEDBACK: GLenum; - readonly TRANSFORM_FEEDBACK_ACTIVE: GLenum; - readonly TRANSFORM_FEEDBACK_BINDING: GLenum; - readonly TRANSFORM_FEEDBACK_BUFFER: GLenum; - readonly TRANSFORM_FEEDBACK_BUFFER_BINDING: GLenum; - readonly TRANSFORM_FEEDBACK_BUFFER_MODE: GLenum; - readonly TRANSFORM_FEEDBACK_BUFFER_SIZE: GLenum; - readonly TRANSFORM_FEEDBACK_BUFFER_START: GLenum; - readonly TRANSFORM_FEEDBACK_PAUSED: GLenum; - readonly TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN: GLenum; - readonly TRANSFORM_FEEDBACK_VARYINGS: GLenum; - readonly UNIFORM_ARRAY_STRIDE: GLenum; - readonly UNIFORM_BLOCK_ACTIVE_UNIFORMS: GLenum; - readonly UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES: GLenum; - readonly UNIFORM_BLOCK_BINDING: GLenum; - readonly UNIFORM_BLOCK_DATA_SIZE: GLenum; - readonly UNIFORM_BLOCK_INDEX: GLenum; - readonly UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER: GLenum; - readonly UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER: GLenum; - readonly UNIFORM_BUFFER: GLenum; - readonly UNIFORM_BUFFER_BINDING: GLenum; - readonly UNIFORM_BUFFER_OFFSET_ALIGNMENT: GLenum; - readonly UNIFORM_BUFFER_SIZE: GLenum; - readonly UNIFORM_BUFFER_START: GLenum; - readonly UNIFORM_IS_ROW_MAJOR: GLenum; - readonly UNIFORM_MATRIX_STRIDE: GLenum; - readonly UNIFORM_OFFSET: GLenum; - readonly UNIFORM_SIZE: GLenum; - readonly UNIFORM_TYPE: GLenum; - readonly UNPACK_IMAGE_HEIGHT: GLenum; - readonly UNPACK_ROW_LENGTH: GLenum; - readonly UNPACK_SKIP_IMAGES: GLenum; - readonly UNPACK_SKIP_PIXELS: GLenum; - readonly UNPACK_SKIP_ROWS: GLenum; - readonly UNSIGNALED: GLenum; - readonly UNSIGNED_INT_10F_11F_11F_REV: GLenum; - readonly UNSIGNED_INT_24_8: GLenum; - readonly UNSIGNED_INT_2_10_10_10_REV: GLenum; - readonly UNSIGNED_INT_5_9_9_9_REV: GLenum; - readonly UNSIGNED_INT_SAMPLER_2D: GLenum; - readonly UNSIGNED_INT_SAMPLER_2D_ARRAY: GLenum; - readonly UNSIGNED_INT_SAMPLER_3D: GLenum; - readonly UNSIGNED_INT_SAMPLER_CUBE: GLenum; - readonly UNSIGNED_INT_VEC2: GLenum; - readonly UNSIGNED_INT_VEC3: GLenum; - readonly UNSIGNED_INT_VEC4: GLenum; - readonly UNSIGNED_NORMALIZED: GLenum; - readonly VERTEX_ARRAY_BINDING: GLenum; - readonly VERTEX_ATTRIB_ARRAY_DIVISOR: GLenum; - readonly VERTEX_ATTRIB_ARRAY_INTEGER: GLenum; - readonly WAIT_FAILED: GLenum; }; interface WebGL2RenderingContextBase { @@ -4720,7 +4721,6 @@ declare var WebGLRenderingContext: { }; interface WebGLRenderingContextBase { - readonly canvas: OffscreenCanvas; readonly drawingBufferHeight: GLsizei; readonly drawingBufferWidth: GLsizei; activeTexture(texture: GLenum): void; @@ -4781,13 +4781,21 @@ interface WebGLRenderingContextBase { getContextAttributes(): WebGLContextAttributes | null; getError(): GLenum; getExtension(extensionName: "EXT_blend_minmax"): EXT_blend_minmax | null; + getExtension(extensionName: "EXT_color_buffer_float"): EXT_color_buffer_float | null; + getExtension(extensionName: "EXT_color_buffer_half_float"): EXT_color_buffer_half_float | null; + getExtension(extensionName: "EXT_float_blend"): EXT_float_blend | null; getExtension(extensionName: "EXT_texture_filter_anisotropic"): EXT_texture_filter_anisotropic | null; getExtension(extensionName: "EXT_frag_depth"): EXT_frag_depth | null; getExtension(extensionName: "EXT_shader_texture_lod"): EXT_shader_texture_lod | null; getExtension(extensionName: "EXT_sRGB"): EXT_sRGB | null; + getExtension(extensionName: "KHR_parallel_shader_compile"): KHR_parallel_shader_compile | null; getExtension(extensionName: "OES_vertex_array_object"): OES_vertex_array_object | null; + getExtension(extensionName: "OVR_multiview2"): OVR_multiview2 | null; getExtension(extensionName: "WEBGL_color_buffer_float"): WEBGL_color_buffer_float | null; getExtension(extensionName: "WEBGL_compressed_texture_astc"): WEBGL_compressed_texture_astc | null; + getExtension(extensionName: "WEBGL_compressed_texture_etc"): WEBGL_compressed_texture_etc | null; + getExtension(extensionName: "WEBGL_compressed_texture_etc1"): WEBGL_compressed_texture_etc1 | null; + getExtension(extensionName: "WEBGL_compressed_texture_pvrtc"): WEBGL_compressed_texture_pvrtc | null; getExtension(extensionName: "WEBGL_compressed_texture_s3tc_srgb"): WEBGL_compressed_texture_s3tc_srgb | null; getExtension(extensionName: "WEBGL_debug_shaders"): WEBGL_debug_shaders | null; getExtension(extensionName: "WEBGL_draw_buffers"): WEBGL_draw_buffers | null; @@ -4802,7 +4810,7 @@ interface WebGLRenderingContextBase { getExtension(extensionName: "OES_standard_derivatives"): OES_standard_derivatives | null; getExtension(extensionName: "OES_element_index_uint"): OES_element_index_uint | null; getExtension(extensionName: "ANGLE_instanced_arrays"): ANGLE_instanced_arrays | null; - getExtension(extensionName: string): any; + getExtension(name: string): any; getFramebufferAttachmentParameter(target: GLenum, attachment: GLenum, pname: GLenum): any; getParameter(pname: GLenum): any; getProgramInfoLog(program: WebGLProgram): string | null; @@ -5320,7 +5328,7 @@ interface WebSocket extends EventTarget { declare var WebSocket: { prototype: WebSocket; - new(url: string, protocols?: string | string[]): WebSocket; + new(url: string | URL, protocols?: string | string[]): WebSocket; readonly CLOSED: number; readonly CLOSING: number; readonly CONNECTING: number; @@ -5332,7 +5340,7 @@ interface WindowClient extends Client { readonly focused: boolean; readonly visibilityState: VisibilityState; focus(): Promise<WindowClient>; - navigate(url: string): Promise<WindowClient | null>; + navigate(url: string | URL): Promise<WindowClient | null>; } declare var WindowClient: { @@ -5342,6 +5350,7 @@ declare var WindowClient: { interface WindowOrWorkerGlobalScope { readonly caches: CacheStorage; + readonly crossOriginIsolated: boolean; readonly crypto: Crypto; readonly indexedDB: IDBFactory; readonly isSecureContext: boolean; @@ -5385,7 +5394,7 @@ interface Worker extends EventTarget, AbstractWorker { declare var Worker: { prototype: Worker; - new(stringUrl: string | URL, options?: WorkerOptions): Worker; + new(scriptURL: string | URL, options?: WorkerOptions): Worker; }; interface WorkerGlobalScopeEventMap { @@ -5398,11 +5407,14 @@ interface WorkerGlobalScopeEventMap { } /** This Web Workers API interface is an interface representing the scope of any worker. Workers have no browsing context; this scope contains the information usually conveyed by Window objects — in this case event handlers, the console or the associated WorkerNavigator object. Each WorkerGlobalScope has its own event loop. */ -interface WorkerGlobalScope extends EventTarget, WindowOrWorkerGlobalScope { +interface WorkerGlobalScope extends EventTarget, FontFaceSource, WindowOrWorkerGlobalScope { /** * Returns workerGlobal's WorkerLocation object. */ readonly location: WorkerLocation; + /** + * Returns workerGlobal's WorkerNavigator object. + */ readonly navigator: WorkerNavigator; onerror: ((this: WorkerGlobalScope, ev: ErrorEvent) => any) | null; onlanguagechange: ((this: WorkerGlobalScope, ev: Event) => any) | null; @@ -5417,7 +5429,7 @@ interface WorkerGlobalScope extends EventTarget, WindowOrWorkerGlobalScope { /** * Fetches each URL in urls, executes them one-by-one in the order they are passed, and then returns (or throws if something went amiss). */ - importScripts(...urls: string[]): void; + importScripts(...urls: (string | URL)[]): void; addEventListener<K extends keyof WorkerGlobalScopeEventMap>(type: K, listener: (this: WorkerGlobalScope, ev: WorkerGlobalScopeEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeEventListener<K extends keyof WorkerGlobalScopeEventMap>(type: K, listener: (this: WorkerGlobalScope, ev: WorkerGlobalScopeEventMap[K]) => any, options?: boolean | EventListenerOptions): void; @@ -5449,8 +5461,8 @@ declare var WorkerLocation: { }; /** A subset of the Navigator interface allowed to be accessed from a Worker. Such an object is initialized for each worker and is available via the WorkerGlobalScope.navigator property obtained by calling window.self.navigator. */ -interface WorkerNavigator extends NavigatorConcurrentHardware, NavigatorID, NavigatorLanguage, NavigatorOnLine, NavigatorStorage { - readonly permissions: Permissions; +interface WorkerNavigator extends NavigatorConcurrentHardware, NavigatorID, NavigatorLanguage, NavigatorNetworkInformation, NavigatorOnLine, NavigatorStorage { + readonly mediaCapabilities: MediaCapabilities; } declare var WorkerNavigator: { @@ -5462,6 +5474,7 @@ declare var WorkerNavigator: { interface WritableStream<W = any> { readonly locked: boolean; abort(reason?: any): Promise<void>; + close(): Promise<void>; getWriter(): WritableStreamDefaultWriter<W>; } @@ -5488,7 +5501,7 @@ interface WritableStreamDefaultWriter<W = any> { abort(reason?: any): Promise<void>; close(): Promise<void>; releaseLock(): void; - write(chunk: W): Promise<void>; + write(chunk?: W): Promise<void>; } declare var WritableStreamDefaultWriter: { @@ -5508,11 +5521,11 @@ interface XMLHttpRequest extends XMLHttpRequestEventTarget { */ readonly readyState: number; /** - * Returns the response's body. + * Returns the response body. */ readonly response: any; /** - * Returns the text response. + * Returns response as text. * * Throws an "InvalidStateError" DOMException if responseType is not the empty string or "text". */ @@ -5533,7 +5546,7 @@ interface XMLHttpRequest extends XMLHttpRequestEventTarget { readonly status: number; readonly statusText: string; /** - * Can be set to a time in milliseconds. When set to a non-zero value will cause fetching to terminate after the given time has passed. When the time has passed, the request has not yet completed, and the synchronous flag is unset, a timeout event will then be dispatched, or a "TimeoutError" DOMException will be thrown otherwise (for the send() method). + * Can be set to a time in milliseconds. When set to a non-zero value will cause fetching to terminate after the given time has passed. When the time has passed, the request has not yet completed, and this's synchronous flag is unset, a timeout event will then be dispatched, or a "TimeoutError" DOMException will be thrown otherwise (for the send() method). * * When set: throws an "InvalidAccessError" DOMException if the synchronous flag is set and current global object is a Window object. */ @@ -5557,16 +5570,16 @@ interface XMLHttpRequest extends XMLHttpRequestEventTarget { /** * Sets the request method, request URL, and synchronous flag. * - * Throws a "SyntaxError" DOMException if either method is not a valid HTTP method or url cannot be parsed. + * Throws a "SyntaxError" DOMException if either method is not a valid method or url cannot be parsed. * * Throws a "SecurityError" DOMException if method is a case-insensitive match for `CONNECT`, `TRACE`, or `TRACK`. * * Throws an "InvalidAccessError" DOMException if async is false, current global object is a Window object, and the timeout attribute is not zero or the responseType attribute is not the empty string. */ - open(method: string, url: string): void; - open(method: string, url: string, async: boolean, username?: string | null, password?: string | null): void; + open(method: string, url: string | URL): void; + open(method: string, url: string | URL, async: boolean, username?: string | null, password?: string | null): void; /** - * Acts as if the `Content-Type` header value for response is mime. (It does not actually change the header though.) + * Acts as if the `Content-Type` header value for a response is mime. (It does not change the header.) * * Throws an "InvalidStateError" DOMException if state is loading or done. */ @@ -5576,7 +5589,7 @@ interface XMLHttpRequest extends XMLHttpRequestEventTarget { * * Throws an "InvalidStateError" DOMException if either state is not opened or the send() flag is set. */ - send(body?: BodyInit | null): void; + send(body?: XMLHttpRequestBodyInit | null): void; /** * Combines a header in author request headers. * @@ -5647,10 +5660,7 @@ declare var XMLHttpRequestUpload: { new(): XMLHttpRequestUpload; }; -declare type EventListenerOrEventListenerObject = EventListener | EventListenerObject; - interface Console { - memory: any; assert(condition?: boolean, ...data: any[]): void; clear(): void; count(label?: string): void; @@ -5659,7 +5669,6 @@ interface Console { dir(item?: any, options?: any): void; dirxml(...data: any[]): void; error(...data: any[]): void; - exception(message?: string, ...optionalParams: any[]): void; group(...data: any[]): void; groupCollapsed(...data: any[]): void; groupEnd(): void; @@ -5677,6 +5686,14 @@ interface Console { declare var console: Console; declare namespace WebAssembly { + interface CompileError extends Error { + } + + var CompileError: { + prototype: CompileError; + new(): CompileError; + }; + interface Global { value: any; valueOf(): any; @@ -5696,6 +5713,14 @@ declare namespace WebAssembly { new(module: Module, importObject?: Imports): Instance; }; + interface LinkError extends Error { + } + + var LinkError: { + prototype: LinkError; + new(): LinkError; + }; + interface Memory { readonly buffer: ArrayBuffer; grow(delta: number): number; @@ -5717,16 +5742,24 @@ declare namespace WebAssembly { imports(moduleObject: Module): ModuleImportDescriptor[]; }; + interface RuntimeError extends Error { + } + + var RuntimeError: { + prototype: RuntimeError; + new(): RuntimeError; + }; + interface Table { readonly length: number; - get(index: number): Function | null; - grow(delta: number): number; - set(index: number, value: Function | null): void; + get(index: number): any; + grow(delta: number, value?: any): number; + set(index: number, value?: any): void; } var Table: { prototype: Table; - new(descriptor: TableDescriptor): Table; + new(descriptor: TableDescriptor, value?: any): Table; }; interface GlobalDescriptor { @@ -5763,23 +5796,23 @@ declare namespace WebAssembly { } type ImportExportKind = "function" | "global" | "memory" | "table"; - type TableKind = "anyfunc"; - type ValueType = "f32" | "f64" | "i32" | "i64"; + type TableKind = "anyfunc" | "externref"; + type ValueType = "anyfunc" | "externref" | "f32" | "f64" | "i32" | "i64"; type ExportValue = Function | Global | Memory | Table; type Exports = Record<string, ExportValue>; type ImportValue = ExportValue | number; - type ModuleImports = Record<string, ImportValue>; type Imports = Record<string, ModuleImports>; + type ModuleImports = Record<string, ImportValue>; function compile(bytes: BufferSource): Promise<Module>; - function compileStreaming(source: Response | Promise<Response>): Promise<Module>; + function compileStreaming(source: Response | PromiseLike<Response>): Promise<Module>; function instantiate(bytes: BufferSource, importObject?: Imports): Promise<WebAssemblyInstantiatedSource>; function instantiate(moduleObject: Module, importObject?: Imports): Promise<Instance>; - function instantiateStreaming(response: Response | PromiseLike<Response>, importObject?: Imports): Promise<WebAssemblyInstantiatedSource>; + function instantiateStreaming(source: Response | PromiseLike<Response>, importObject?: Imports): Promise<WebAssemblyInstantiatedSource>; function validate(bytes: BufferSource): boolean; } interface FrameRequestCallback { - (time: number): void; + (time: DOMHighResTimeStamp): void; } interface OnErrorEventHandlerNonNull { @@ -5791,7 +5824,7 @@ interface PerformanceObserverCallback { } interface QueuingStrategySize<T = any> { - (chunk: T): number; + (chunk?: T): number; } interface TransformerFlushCallback<O> { @@ -5799,7 +5832,7 @@ interface TransformerFlushCallback<O> { } interface TransformerStartCallback<O> { - (controller: TransformStreamDefaultController<O>): void | PromiseLike<void>; + (controller: TransformStreamDefaultController<O>): any; } interface TransformerTransformCallback<I, O> { @@ -5807,7 +5840,7 @@ interface TransformerTransformCallback<I, O> { } interface UnderlyingSinkAbortCallback { - (reason: any): void | PromiseLike<void>; + (reason?: any): void | PromiseLike<void>; } interface UnderlyingSinkCloseCallback { @@ -5815,7 +5848,7 @@ interface UnderlyingSinkCloseCallback { } interface UnderlyingSinkStartCallback { - (controller: WritableStreamDefaultController): void | PromiseLike<void>; + (controller: WritableStreamDefaultController): any; } interface UnderlyingSinkWriteCallback<W> { @@ -5823,7 +5856,7 @@ interface UnderlyingSinkWriteCallback<W> { } interface UnderlyingSourceCancelCallback { - (reason: any): void | PromiseLike<void>; + (reason?: any): void | PromiseLike<void>; } interface UnderlyingSourcePullCallback<R> { @@ -5831,7 +5864,7 @@ interface UnderlyingSourcePullCallback<R> { } interface UnderlyingSourceStartCallback<R> { - (controller: ReadableStreamController<R>): void | PromiseLike<void>; + (controller: ReadableStreamController<R>): any; } interface VoidFunction { @@ -5861,6 +5894,9 @@ declare function dispatchEvent(event: Event): boolean; * Returns workerGlobal's WorkerLocation object. */ declare var location: WorkerLocation; +/** + * Returns workerGlobal's WorkerNavigator object. + */ declare var navigator: WorkerNavigator; declare var onerror: ((this: DedicatedWorkerGlobalScope, ev: ErrorEvent) => any) | null; declare var onlanguagechange: ((this: DedicatedWorkerGlobalScope, ev: Event) => any) | null; @@ -5875,12 +5911,14 @@ declare var self: WorkerGlobalScope & typeof globalThis; /** * Fetches each URL in urls, executes them one-by-one in the order they are passed, and then returns (or throws if something went amiss). */ -declare function importScripts(...urls: string[]): void; +declare function importScripts(...urls: (string | URL)[]): void; /** * Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise. */ declare function dispatchEvent(event: Event): boolean; +declare var fonts: FontFaceSet; declare var caches: CacheStorage; +declare var crossOriginIsolated: boolean; declare var crypto: Crypto; declare var indexedDB: IDBFactory; declare var isSecureContext: boolean; @@ -5902,85 +5940,89 @@ declare function addEventListener<K extends keyof DedicatedWorkerGlobalScopeEven declare function addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; declare function removeEventListener<K extends keyof DedicatedWorkerGlobalScopeEventMap>(type: K, listener: (this: DedicatedWorkerGlobalScope, ev: DedicatedWorkerGlobalScopeEventMap[K]) => any, options?: boolean | EventListenerOptions): void; declare function removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; -type HeadersInit = Headers | string[][] | Record<string, string>; -type BodyInit = Blob | BufferSource | FormData | URLSearchParams | ReadableStream<Uint8Array> | string; -type RequestInfo = Request | string; +type AlgorithmIdentifier = Algorithm | string; +type BigInteger = Uint8Array; +type BinaryData = ArrayBuffer | ArrayBufferView; type BlobPart = BufferSource | Blob | string; -type DOMHighResTimeStamp = number; +type BodyInit = ReadableStream | XMLHttpRequestBodyInit; +type BufferSource = ArrayBufferView | ArrayBuffer; type CanvasImageSource = ImageBitmap | OffscreenCanvas; -type OffscreenRenderingContext = OffscreenCanvasRenderingContext2D | ImageBitmapRenderingContext | WebGLRenderingContext | WebGL2RenderingContext; -type MessageEventSource = MessagePort | ServiceWorker; -type ImageBitmapSource = CanvasImageSource | Blob | ImageData; -type OnErrorEventHandler = OnErrorEventHandlerNonNull | null; -type TimerHandler = string | Function; -type PerformanceEntryList = PerformanceEntry[]; -type PushMessageDataInit = BufferSource | string; -type ReadableStreamReader<T> = ReadableStreamDefaultReader<T>; -type ReadableStreamController<T> = ReadableStreamDefaultController<T>; -type VibratePattern = number | number[]; -type AlgorithmIdentifier = string | Algorithm; -type HashAlgorithmIdentifier = AlgorithmIdentifier; -type BigInteger = Uint8Array; -type NamedCurve = string; -type GLenum = number; -type GLboolean = boolean; +type DOMHighResTimeStamp = number; +type DOMTimeStamp = number; +type EventListenerOrEventListenerObject = EventListener | EventListenerObject; +type Float32List = Float32Array | GLfloat[]; +type FormDataEntryValue = File | string; type GLbitfield = number; +type GLboolean = boolean; +type GLclampf = number; +type GLenum = number; +type GLfloat = number; type GLint = number; -type GLsizei = number; +type GLint64 = number; type GLintptr = number; +type GLsizei = number; type GLsizeiptr = number; type GLuint = number; -type GLfloat = number; -type GLclampf = number; -type TexImageSource = ImageBitmap | ImageData | OffscreenCanvas; -type Float32List = Float32Array | GLfloat[]; -type Int32List = Int32Array | GLint[]; -type GLint64 = number; type GLuint64 = number; -type Uint32List = Uint32Array | GLuint[]; -type BufferSource = ArrayBufferView | ArrayBuffer; -type DOMTimeStamp = number; -type FormDataEntryValue = File | string; -type IDBValidKey = number | string | Date | BufferSource | IDBArrayKey; -type Transferable = ArrayBuffer | MessagePort | ImageBitmap | OffscreenCanvas; +type HashAlgorithmIdentifier = AlgorithmIdentifier; +type HeadersInit = string[][] | Record<string, string> | Headers; +type IDBValidKey = number | string | Date | BufferSource | IDBValidKey[]; +type ImageBitmapSource = CanvasImageSource | Blob | ImageData; +type Int32List = Int32Array | GLint[]; +type MessageEventSource = MessagePort | ServiceWorker; +type NamedCurve = string; +type OnErrorEventHandler = OnErrorEventHandlerNonNull | null; +type PerformanceEntryList = PerformanceEntry[]; +type PushMessageDataInit = BufferSource | string; +type ReadableStreamController<T> = ReadableStreamDefaultController<T>; type ReadableStreamDefaultReadResult<T> = ReadableStreamDefaultReadValueResult<T> | ReadableStreamDefaultReadDoneResult; +type ReadableStreamReader<T> = ReadableStreamDefaultReader<T>; +type RequestInfo = Request | string; +type TexImageSource = ImageBitmap | ImageData | OffscreenCanvas; +type TimerHandler = string | Function; +type Transferable = ArrayBuffer | MessagePort | ImageBitmap; +type Uint32List = Uint32Array | GLuint[]; +type VibratePattern = number | number[]; +type XMLHttpRequestBodyInit = Blob | BufferSource | FormData | URLSearchParams | string; type BinaryType = "arraybuffer" | "blob"; -type CanvasDirection = "inherit" | "ltr" | "rtl"; -type CanvasFillRule = "evenodd" | "nonzero"; -type CanvasLineCap = "butt" | "round" | "square"; -type CanvasLineJoin = "bevel" | "miter" | "round"; -type CanvasTextAlign = "center" | "end" | "left" | "right" | "start"; -type CanvasTextBaseline = "alphabetic" | "bottom" | "hanging" | "ideographic" | "middle" | "top"; type ClientTypes = "all" | "sharedworker" | "window" | "worker"; +type ColorGamut = "p3" | "rec2020" | "srgb"; type ColorSpaceConversion = "default" | "none"; +type ConnectionType = "bluetooth" | "cellular" | "ethernet" | "mixed" | "none" | "other" | "unknown" | "wifi"; type EndingType = "native" | "transparent"; +type FontFaceLoadStatus = "error" | "loaded" | "loading" | "unloaded"; +type FontFaceSetLoadStatus = "loaded" | "loading"; type FrameType = "auxiliary" | "nested" | "none" | "top-level"; +type HdrMetadataType = "smpteSt2086" | "smpteSt2094-10" | "smpteSt2094-40"; type IDBCursorDirection = "next" | "nextunique" | "prev" | "prevunique"; type IDBRequestReadyState = "done" | "pending"; type IDBTransactionMode = "readonly" | "readwrite" | "versionchange"; type ImageOrientation = "flipY" | "none"; -type ImageSmoothingQuality = "high" | "low" | "medium"; type KeyFormat = "jwk" | "pkcs8" | "raw" | "spki"; type KeyType = "private" | "public" | "secret"; type KeyUsage = "decrypt" | "deriveBits" | "deriveKey" | "encrypt" | "sign" | "unwrapKey" | "verify" | "wrapKey"; +type MediaDecodingType = "file" | "media-source" | "webrtc"; +type MediaEncodingType = "record" | "webrtc"; type NotificationDirection = "auto" | "ltr" | "rtl"; type NotificationPermission = "default" | "denied" | "granted"; -type OffscreenRenderingContextId = "2d" | "bitmaprenderer" | "webgl" | "webgl2"; -type PermissionName = "accelerometer" | "ambient-light-sensor" | "background-fetch" | "background-sync" | "bluetooth" | "camera" | "clipboard-read" | "clipboard-write" | "device-info" | "display-capture" | "geolocation" | "gyroscope" | "magnetometer" | "microphone" | "midi" | "nfc" | "notifications" | "persistent-storage" | "push" | "speaker"; +type PermissionName = "gamepad" | "geolocation" | "notifications" | "persistent-storage" | "push" | "screen-wake-lock"; type PermissionState = "denied" | "granted" | "prompt"; +type PredefinedColorSpace = "display-p3" | "srgb"; type PremultiplyAlpha = "default" | "none" | "premultiply"; type PushEncryptionKeyName = "auth" | "p256dh"; type PushPermissionState = "denied" | "granted" | "prompt"; type ReferrerPolicy = "" | "no-referrer" | "no-referrer-when-downgrade" | "origin" | "origin-when-cross-origin" | "same-origin" | "strict-origin" | "strict-origin-when-cross-origin" | "unsafe-url"; type RequestCache = "default" | "force-cache" | "no-cache" | "no-store" | "only-if-cached" | "reload"; type RequestCredentials = "include" | "omit" | "same-origin"; -type RequestDestination = "" | "audio" | "audioworklet" | "document" | "embed" | "font" | "image" | "manifest" | "object" | "paintworklet" | "report" | "script" | "sharedworker" | "style" | "track" | "video" | "worker" | "xslt"; +type RequestDestination = "" | "audio" | "audioworklet" | "document" | "embed" | "font" | "frame" | "iframe" | "image" | "manifest" | "object" | "paintworklet" | "report" | "script" | "sharedworker" | "style" | "track" | "video" | "worker" | "xslt"; type RequestMode = "cors" | "navigate" | "no-cors" | "same-origin"; type RequestRedirect = "error" | "follow" | "manual"; type ResizeQuality = "high" | "low" | "medium" | "pixelated"; type ResponseType = "basic" | "cors" | "default" | "error" | "opaque" | "opaqueredirect"; +type SecurityPolicyViolationEventDisposition = "enforce" | "report"; type ServiceWorkerState = "activated" | "activating" | "installed" | "installing" | "parsed" | "redundant"; type ServiceWorkerUpdateViaCache = "all" | "imports" | "none"; +type TransferFunction = "hlg" | "pq" | "srgb"; type VisibilityState = "hidden" | "visible"; type WebGLPowerPreference = "default" | "high-performance" | "low-power"; type WorkerType = "classic" | "module"; |