1 /*! *****************************************************************************
2 Copyright (c) Microsoft Corporation. All rights reserved.
3 Licensed under the Apache License, Version 2.0 (the "License"); you may not use
4 this file except in compliance with the License. You may obtain a copy of the
5 License at http://www.apache.org/licenses/LICENSE-2.0
7 THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
8 KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
9 WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
10 MERCHANTABLITY OR NON-INFRINGEMENT.
12 See the Apache Version 2.0 License for specific language governing permissions
13 and limitations under the License.
14 ***************************************************************************** */
18 /// <reference no-default-lib="true"/>
\r
21 /////////////////////////////
23 /////////////////////////////
25 interface AddEventListenerOptions extends EventListenerOptions {
30 interface AesCbcParams extends Algorithm {
31 iv: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer;
34 interface AesCtrParams extends Algorithm {
35 counter: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer;
39 interface AesDerivedKeyParams extends Algorithm {
43 interface AesGcmParams extends Algorithm {
44 additionalData?: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer;
45 iv: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer;
49 interface AesKeyAlgorithm extends KeyAlgorithm {
53 interface AesKeyGenParams extends Algorithm {
61 interface BlobPropertyBag {
66 interface CacheQueryOptions {
67 ignoreMethod?: boolean;
68 ignoreSearch?: boolean;
72 interface CanvasRenderingContext2DSettings {
74 desynchronized?: boolean;
77 interface ClientQueryOptions {
78 includeUncontrolled?: boolean;
82 interface CloseEventInit extends EventInit {
88 interface CryptoKeyPair {
89 privateKey?: CryptoKey;
90 publicKey?: CryptoKey;
93 interface CustomEventInit<T = any> extends EventInit {
97 interface DOMMatrix2DInit {
112 interface DOMMatrixInit extends DOMMatrix2DInit {
126 interface DOMPointInit {
133 interface DOMQuadInit {
140 interface DOMRectInit {
147 interface DevicePermissionDescriptor extends PermissionDescriptor {
149 name: "camera" | "microphone" | "speaker";
152 interface EcKeyGenParams extends Algorithm {
153 namedCurve: NamedCurve;
156 interface EcKeyImportParams extends Algorithm {
157 namedCurve: NamedCurve;
160 interface EcdhKeyDeriveParams extends Algorithm {
164 interface EcdsaParams extends Algorithm {
165 hash: HashAlgorithmIdentifier;
168 interface ErrorEventInit extends EventInit {
176 interface EventInit {
178 cancelable?: boolean;
182 interface EventListenerOptions {
186 interface EventSourceInit {
187 withCredentials?: boolean;
190 interface ExtendableEventInit extends EventInit {
193 interface ExtendableMessageEventInit extends ExtendableEventInit {
195 lastEventId?: string;
197 ports?: MessagePort[];
198 source?: Client | ServiceWorker | MessagePort | null;
201 interface FetchEventInit extends ExtendableEventInit {
203 preloadResponse?: Promise<any>;
204 replacesClientId?: string;
206 resultingClientId?: string;
209 interface FilePropertyBag extends BlobPropertyBag {
210 lastModified?: number;
213 interface GetNotificationOptions {
217 interface HkdfParams extends Algorithm {
218 hash: HashAlgorithmIdentifier;
219 info: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer;
220 salt: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer;
223 interface HmacImportParams extends Algorithm {
224 hash: HashAlgorithmIdentifier;
228 interface HmacKeyGenParams extends Algorithm {
229 hash: HashAlgorithmIdentifier;
233 interface IDBIndexParameters {
234 multiEntry?: boolean;
238 interface IDBObjectStoreParameters {
239 autoIncrement?: boolean;
240 keyPath?: string | string[] | null;
243 interface IDBVersionChangeEventInit extends EventInit {
244 newVersion?: number | null;
248 interface ImageBitmapOptions {
249 colorSpaceConversion?: ColorSpaceConversion;
250 imageOrientation?: ImageOrientation;
251 premultiplyAlpha?: PremultiplyAlpha;
252 resizeHeight?: number;
253 resizeQuality?: ResizeQuality;
254 resizeWidth?: number;
257 interface ImageBitmapRenderingContextSettings {
261 interface ImageEncodeOptions {
266 interface JsonWebKey {
278 oth?: RsaOtherPrimesInfo[];
287 interface KeyAlgorithm {
291 interface MessageEventInit<T = any> extends EventInit {
293 lastEventId?: string;
295 ports?: MessagePort[];
296 source?: MessageEventSource | null;
299 interface MidiPermissionDescriptor extends PermissionDescriptor {
304 interface MultiCacheQueryOptions extends CacheQueryOptions {
308 interface NavigationPreloadState {
310 headerValue?: string;
313 interface NotificationAction {
319 interface NotificationEventInit extends ExtendableEventInit {
321 notification: Notification;
324 interface NotificationOptions {
325 actions?: NotificationAction[];
329 dir?: NotificationDirection;
334 requireInteraction?: boolean;
338 vibrate?: VibratePattern;
341 interface Pbkdf2Params extends Algorithm {
342 hash: HashAlgorithmIdentifier;
344 salt: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer;
347 interface PerformanceObserverInit {
349 entryTypes?: string[];
353 interface PermissionDescriptor {
354 name: PermissionName;
357 interface PipeOptions {
358 preventAbort?: boolean;
359 preventCancel?: boolean;
360 preventClose?: boolean;
361 signal?: AbortSignal;
364 interface PostMessageOptions {
368 interface ProgressEventInit extends EventInit {
369 lengthComputable?: boolean;
374 interface PromiseRejectionEventInit extends EventInit {
375 promise: Promise<any>;
379 interface PushEventInit extends ExtendableEventInit {
380 data?: PushMessageDataInit;
383 interface PushPermissionDescriptor extends PermissionDescriptor {
385 userVisibleOnly?: boolean;
388 interface PushSubscriptionChangeEventInit extends ExtendableEventInit {
389 newSubscription?: PushSubscription;
390 oldSubscription?: PushSubscription;
393 interface PushSubscriptionJSON {
395 expirationTime?: number | null;
396 keys?: Record<string, string>;
399 interface PushSubscriptionOptionsInit {
400 applicationServerKey?: BufferSource | string | null;
401 userVisibleOnly?: boolean;
404 interface QueuingStrategy<T = any> {
405 highWaterMark?: number;
406 size?: QueuingStrategySizeCallback<T>;
409 interface ReadableStreamReadDoneResult<T> {
414 interface ReadableStreamReadValueResult<T> {
419 interface RegistrationOptions {
422 updateViaCache?: ServiceWorkerUpdateViaCache;
425 interface RequestInit {
427 * A BodyInit object or null to set request's body.
429 body?: BodyInit | null;
431 * A string indicating how the request will interact with the browser's cache to set request's cache.
433 cache?: RequestCache;
435 * A string indicating whether credentials will be sent with the request always, never, or only when sent to a same-origin URL. Sets request's credentials.
437 credentials?: RequestCredentials;
439 * A Headers object, an object literal, or an array of two-item arrays to set request's headers.
441 headers?: HeadersInit;
443 * A cryptographic hash of the resource to be fetched by request. Sets request's integrity.
447 * A boolean to set request's keepalive.
451 * A string to set request's method.
455 * A string to indicate whether the request will use CORS, or will be restricted to same-origin URLs. Sets request's mode.
459 * A string indicating whether request follows redirects, results in an error upon encountering a redirect, or returns the redirect (in an opaque fashion). Sets request's redirect.
461 redirect?: RequestRedirect;
463 * A string whose value is a same-origin URL, "about:client", or the empty string, to set request's referrer.
467 * A referrer policy to set request's referrerPolicy.
469 referrerPolicy?: ReferrerPolicy;
471 * An AbortSignal to set request's signal.
473 signal?: AbortSignal | null;
475 * Can only be null. Used to disassociate request from any Window.
480 interface ResponseInit {
481 headers?: HeadersInit;
486 interface RsaHashedImportParams extends Algorithm {
487 hash: HashAlgorithmIdentifier;
490 interface RsaHashedKeyGenParams extends RsaKeyGenParams {
491 hash: HashAlgorithmIdentifier;
494 interface RsaKeyGenParams extends Algorithm {
495 modulusLength: number;
496 publicExponent: BigInteger;
499 interface RsaOaepParams extends Algorithm {
500 label?: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer;
503 interface RsaOtherPrimesInfo {
509 interface RsaPssParams extends Algorithm {
513 interface StorageEstimate {
518 interface SyncEventInit extends ExtendableEventInit {
519 lastChance?: boolean;
523 interface TextDecodeOptions {
527 interface TextDecoderOptions {
532 interface TextEncoderEncodeIntoResult {
537 interface Transformer<I = any, O = any> {
538 flush?: TransformStreamDefaultControllerCallback<O>;
539 readableType?: undefined;
540 start?: TransformStreamDefaultControllerCallback<O>;
541 transform?: TransformStreamDefaultControllerTransformCallback<I, O>;
542 writableType?: undefined;
545 interface UnderlyingByteSource {
546 autoAllocateChunkSize?: number;
547 cancel?: ReadableStreamErrorCallback;
548 pull?: ReadableByteStreamControllerCallback;
549 start?: ReadableByteStreamControllerCallback;
553 interface UnderlyingSink<W = any> {
554 abort?: WritableStreamErrorCallback;
555 close?: WritableStreamDefaultControllerCloseCallback;
556 start?: WritableStreamDefaultControllerStartCallback;
558 write?: WritableStreamDefaultControllerWriteCallback<W>;
561 interface UnderlyingSource<R = any> {
562 cancel?: ReadableStreamErrorCallback;
563 pull?: ReadableStreamDefaultControllerCallback<R>;
564 start?: ReadableStreamDefaultControllerCallback<R>;
568 interface WebGLContextAttributes {
572 desynchronized?: boolean;
573 failIfMajorPerformanceCaveat?: boolean;
574 powerPreference?: WebGLPowerPreference;
575 premultipliedAlpha?: boolean;
576 preserveDrawingBuffer?: boolean;
580 interface WebGLContextEventInit extends EventInit {
581 statusMessage?: string;
584 interface WorkerOptions {
585 credentials?: RequestCredentials;
590 interface EventListener {
594 /** 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. */
595 interface ANGLE_instanced_arrays {
596 drawArraysInstancedANGLE(mode: GLenum, first: GLint, count: GLsizei, primcount: GLsizei): void;
597 drawElementsInstancedANGLE(mode: GLenum, count: GLsizei, type: GLenum, offset: GLintptr, primcount: GLsizei): void;
598 vertexAttribDivisorANGLE(index: GLuint, divisor: GLuint): void;
599 readonly VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE: GLenum;
602 /** A controller object that allows you to abort one or more DOM requests as and when desired. */
603 interface AbortController {
605 * Returns the AbortSignal object associated with this object.
607 readonly signal: AbortSignal;
609 * Invoking this method will set this object's AbortSignal's aborted flag and signal to any observers that the associated activity is to be aborted.
614 declare var AbortController: {
615 prototype: AbortController;
616 new(): AbortController;
619 interface AbortSignalEventMap {
623 /** A signal object that allows you to communicate with a DOM request (such as a Fetch) and abort it if required via an AbortController object. */
624 interface AbortSignal extends EventTarget {
626 * Returns true if this AbortSignal's AbortController has signaled to abort, and false otherwise.
628 readonly aborted: boolean;
629 onabort: ((this: AbortSignal, ev: Event) => any) | null;
630 addEventListener<K extends keyof AbortSignalEventMap>(type: K, listener: (this: AbortSignal, ev: AbortSignalEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
631 addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
632 removeEventListener<K extends keyof AbortSignalEventMap>(type: K, listener: (this: AbortSignal, ev: AbortSignalEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
633 removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
636 declare var AbortSignal: {
637 prototype: AbortSignal;
641 interface AbstractWorkerEventMap {
645 interface AbstractWorker {
646 onerror: ((this: AbstractWorker, ev: ErrorEvent) => any) | null;
647 addEventListener<K extends keyof AbstractWorkerEventMap>(type: K, listener: (this: AbstractWorker, ev: AbstractWorkerEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
648 addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
649 removeEventListener<K extends keyof AbstractWorkerEventMap>(type: K, listener: (this: AbstractWorker, ev: AbstractWorkerEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
650 removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
653 interface AesCfbParams extends Algorithm {
654 iv: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer;
657 interface AesCmacParams extends Algorithm {
661 interface AnimationFrameProvider {
662 cancelAnimationFrame(handle: number): void;
663 requestAnimationFrame(callback: FrameRequestCallback): number;
666 /** A file-like object of immutable, raw data. Blobs represent data that isn't necessarily in a JavaScript-native format. The File interface is based on Blob, inheriting blob functionality and expanding it to support files on the user's system. */
668 readonly size: number;
669 readonly type: string;
670 arrayBuffer(): Promise<ArrayBuffer>;
671 slice(start?: number, end?: number, contentType?: string): Blob;
672 stream(): ReadableStream;
673 text(): Promise<string>;
678 new(blobParts?: BlobPart[], options?: BlobPropertyBag): Blob;
682 readonly body: ReadableStream<Uint8Array> | null;
683 readonly bodyUsed: boolean;
684 arrayBuffer(): Promise<ArrayBuffer>;
685 blob(): Promise<Blob>;
686 formData(): Promise<FormData>;
687 json(): Promise<any>;
688 text(): Promise<string>;
691 interface BroadcastChannelEventMap {
692 "message": MessageEvent;
693 "messageerror": MessageEvent;
696 interface BroadcastChannel extends EventTarget {
698 * Returns the channel name (as passed to the constructor).
700 readonly name: string;
701 onmessage: ((this: BroadcastChannel, ev: MessageEvent) => any) | null;
702 onmessageerror: ((this: BroadcastChannel, ev: MessageEvent) => any) | null;
704 * Closes the BroadcastChannel object, opening it up to garbage collection.
708 * Sends the given message to other BroadcastChannel objects set up for this channel. Messages can be structured objects, e.g. nested objects and arrays.
710 postMessage(message: any): void;
711 addEventListener<K extends keyof BroadcastChannelEventMap>(type: K, listener: (this: BroadcastChannel, ev: BroadcastChannelEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
712 addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
713 removeEventListener<K extends keyof BroadcastChannelEventMap>(type: K, listener: (this: BroadcastChannel, ev: BroadcastChannelEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
714 removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
717 declare var BroadcastChannel: {
718 prototype: BroadcastChannel;
719 new(name: string): BroadcastChannel;
722 /** This Streams API interface provides a built-in byte length queuing strategy that can be used when constructing streams. */
723 interface ByteLengthQueuingStrategy extends QueuingStrategy<ArrayBufferView> {
724 highWaterMark: number;
725 size(chunk: ArrayBufferView): number;
728 declare var ByteLengthQueuingStrategy: {
729 prototype: ByteLengthQueuingStrategy;
730 new(options: { highWaterMark: number }): ByteLengthQueuingStrategy;
733 /** Provides a storage mechanism for Request / Response object pairs that are cached, for example as part of the ServiceWorker life cycle. Note that the Cache interface is exposed to windowed scopes as well as workers. You don't have to use it in conjunction with service workers, even though it is defined in the service worker spec. */
735 add(request: RequestInfo): Promise<void>;
736 addAll(requests: RequestInfo[]): Promise<void>;
737 delete(request: RequestInfo, options?: CacheQueryOptions): Promise<boolean>;
738 keys(request?: RequestInfo, options?: CacheQueryOptions): Promise<ReadonlyArray<Request>>;
739 match(request: RequestInfo, options?: CacheQueryOptions): Promise<Response | undefined>;
740 matchAll(request?: RequestInfo, options?: CacheQueryOptions): Promise<ReadonlyArray<Response>>;
741 put(request: RequestInfo, response: Response): Promise<void>;
749 /** The storage for Cache objects. */
750 interface CacheStorage {
751 delete(cacheName: string): Promise<boolean>;
752 has(cacheName: string): Promise<boolean>;
753 keys(): Promise<string[]>;
754 match(request: RequestInfo, options?: MultiCacheQueryOptions): Promise<Response | undefined>;
755 open(cacheName: string): Promise<Cache>;
758 declare var CacheStorage: {
759 prototype: CacheStorage;
763 interface CanvasCompositing {
765 globalCompositeOperation: string;
768 interface CanvasDrawImage {
769 drawImage(image: CanvasImageSource, dx: number, dy: number): void;
770 drawImage(image: CanvasImageSource, dx: number, dy: number, dw: number, dh: number): void;
771 drawImage(image: CanvasImageSource, sx: number, sy: number, sw: number, sh: number, dx: number, dy: number, dw: number, dh: number): void;
774 interface CanvasDrawPath {
776 clip(fillRule?: CanvasFillRule): void;
777 clip(path: Path2D, fillRule?: CanvasFillRule): void;
778 fill(fillRule?: CanvasFillRule): void;
779 fill(path: Path2D, fillRule?: CanvasFillRule): void;
780 isPointInPath(x: number, y: number, fillRule?: CanvasFillRule): boolean;
781 isPointInPath(path: Path2D, x: number, y: number, fillRule?: CanvasFillRule): boolean;
782 isPointInStroke(x: number, y: number): boolean;
783 isPointInStroke(path: Path2D, x: number, y: number): boolean;
785 stroke(path: Path2D): void;
788 interface CanvasFillStrokeStyles {
789 fillStyle: string | CanvasGradient | CanvasPattern;
790 strokeStyle: string | CanvasGradient | CanvasPattern;
791 createLinearGradient(x0: number, y0: number, x1: number, y1: number): CanvasGradient;
792 createPattern(image: CanvasImageSource, repetition: string | null): CanvasPattern | null;
793 createRadialGradient(x0: number, y0: number, r0: number, x1: number, y1: number, r1: number): CanvasGradient;
796 interface CanvasFilters {
800 /** An opaque object describing a gradient. It is returned by the methods CanvasRenderingContext2D.createLinearGradient() or CanvasRenderingContext2D.createRadialGradient(). */
801 interface CanvasGradient {
803 * Adds a color stop with the given color to the gradient at the given offset. 0.0 is the offset at one end of the gradient, 1.0 is the offset at the other end.
805 * Throws an "IndexSizeError" DOMException if the offset is out of range. Throws a "SyntaxError" DOMException if the color cannot be parsed.
807 addColorStop(offset: number, color: string): void;
810 declare var CanvasGradient: {
811 prototype: CanvasGradient;
812 new(): CanvasGradient;
815 interface CanvasImageData {
816 createImageData(sw: number, sh: number): ImageData;
817 createImageData(imagedata: ImageData): ImageData;
818 getImageData(sx: number, sy: number, sw: number, sh: number): ImageData;
819 putImageData(imagedata: ImageData, dx: number, dy: number): void;
820 putImageData(imagedata: ImageData, dx: number, dy: number, dirtyX: number, dirtyY: number, dirtyWidth: number, dirtyHeight: number): void;
823 interface CanvasImageSmoothing {
824 imageSmoothingEnabled: boolean;
825 imageSmoothingQuality: ImageSmoothingQuality;
828 interface CanvasPath {
829 arc(x: number, y: number, radius: number, startAngle: number, endAngle: number, anticlockwise?: boolean): void;
830 arcTo(x1: number, y1: number, x2: number, y2: number, radius: number): void;
831 bezierCurveTo(cp1x: number, cp1y: number, cp2x: number, cp2y: number, x: number, y: number): void;
833 ellipse(x: number, y: number, radiusX: number, radiusY: number, rotation: number, startAngle: number, endAngle: number, anticlockwise?: boolean): void;
834 lineTo(x: number, y: number): void;
835 moveTo(x: number, y: number): void;
836 quadraticCurveTo(cpx: number, cpy: number, x: number, y: number): void;
837 rect(x: number, y: number, w: number, h: number): void;
840 interface CanvasPathDrawingStyles {
841 lineCap: CanvasLineCap;
842 lineDashOffset: number;
843 lineJoin: CanvasLineJoin;
846 getLineDash(): number[];
847 setLineDash(segments: number[]): void;
850 /** An opaque object describing a pattern, based on an image, a canvas, or a video, created by the CanvasRenderingContext2D.createPattern() method. */
851 interface CanvasPattern {
853 * Sets the transformation matrix that will be used when rendering the pattern during a fill or stroke painting operation.
855 setTransform(transform?: DOMMatrix2DInit): void;
858 declare var CanvasPattern: {
859 prototype: CanvasPattern;
860 new(): CanvasPattern;
863 interface CanvasRect {
864 clearRect(x: number, y: number, w: number, h: number): void;
865 fillRect(x: number, y: number, w: number, h: number): void;
866 strokeRect(x: number, y: number, w: number, h: number): void;
869 interface CanvasShadowStyles {
872 shadowOffsetX: number;
873 shadowOffsetY: number;
876 interface CanvasState {
881 interface CanvasText {
882 fillText(text: string, x: number, y: number, maxWidth?: number): void;
883 measureText(text: string): TextMetrics;
884 strokeText(text: string, x: number, y: number, maxWidth?: number): void;
887 interface CanvasTextDrawingStyles {
888 direction: CanvasDirection;
890 textAlign: CanvasTextAlign;
891 textBaseline: CanvasTextBaseline;
894 interface CanvasTransform {
895 getTransform(): DOMMatrix;
896 resetTransform(): void;
897 rotate(angle: number): void;
898 scale(x: number, y: number): void;
899 setTransform(a: number, b: number, c: number, d: number, e: number, f: number): void;
900 setTransform(transform?: DOMMatrix2DInit): void;
901 transform(a: number, b: number, c: number, d: number, e: number, f: number): void;
902 translate(x: number, y: number): void;
905 /** 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(). */
907 readonly frameType: FrameType;
909 readonly type: ClientTypes;
910 readonly url: string;
911 postMessage(message: any, transfer?: Transferable[]): void;
914 declare var Client: {
919 /** Provides access to Client objects. Access it via self.clients within a service worker. */
921 claim(): Promise<void>;
922 get(id: string): Promise<Client | undefined>;
923 matchAll(options?: ClientQueryOptions): Promise<ReadonlyArray<Client>>;
924 openWindow(url: string): Promise<WindowClient | null>;
927 declare var Clients: {
932 /** A CloseEvent is sent to clients using WebSockets when the connection is closed. This is delivered to the listener indicated by the WebSocket object's onclose attribute. */
933 interface CloseEvent extends Event {
935 * Returns the WebSocket connection close code provided by the server.
937 readonly code: number;
939 * Returns the WebSocket connection close reason provided by the server.
941 readonly reason: string;
943 * Returns true if the connection closed cleanly; false otherwise.
945 readonly wasClean: boolean;
948 declare var CloseEvent: {
949 prototype: CloseEvent;
950 new(type: string, eventInitDict?: CloseEventInit): CloseEvent;
953 interface ConcatParams extends Algorithm {
954 algorithmId: Uint8Array;
955 hash?: string | Algorithm;
956 partyUInfo: Uint8Array;
957 partyVInfo: Uint8Array;
958 privateInfo?: Uint8Array;
959 publicInfo?: Uint8Array;
962 /** This Streams API interface provides a built-in byte length queuing strategy that can be used when constructing streams. */
963 interface CountQueuingStrategy extends QueuingStrategy {
964 highWaterMark: number;
968 declare var CountQueuingStrategy: {
969 prototype: CountQueuingStrategy;
970 new(options: { highWaterMark: number }): CountQueuingStrategy;
973 /** Basic cryptography features available in the current context. It allows access to a cryptographically strong random number generator and to cryptographic primitives. */
975 readonly subtle: SubtleCrypto;
976 getRandomValues<T extends Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | null>(array: T): T;
979 declare var Crypto: {
984 /** The CryptoKey dictionary of the Web Crypto API represents a cryptographic key. */
985 interface CryptoKey {
986 readonly algorithm: KeyAlgorithm;
987 readonly extractable: boolean;
988 readonly type: KeyType;
989 readonly usages: KeyUsage[];
992 declare var CryptoKey: {
993 prototype: CryptoKey;
997 interface CustomEvent<T = any> extends Event {
999 * Returns any custom data event was created with. Typically used for synthetic events.
1002 initCustomEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, detailArg: T): void;
1005 declare var CustomEvent: {
1006 prototype: CustomEvent;
1007 new<T>(typeArg: string, eventInitDict?: CustomEventInit<T>): CustomEvent<T>;
1010 /** An abnormal event (called an exception) which occurs as a result of calling a method or accessing a property of a web API. */
1011 interface DOMException {
1012 readonly code: number;
1013 readonly message: string;
1014 readonly name: string;
1015 readonly ABORT_ERR: number;
1016 readonly DATA_CLONE_ERR: number;
1017 readonly DOMSTRING_SIZE_ERR: number;
1018 readonly HIERARCHY_REQUEST_ERR: number;
1019 readonly INDEX_SIZE_ERR: number;
1020 readonly INUSE_ATTRIBUTE_ERR: number;
1021 readonly INVALID_ACCESS_ERR: number;
1022 readonly INVALID_CHARACTER_ERR: number;
1023 readonly INVALID_MODIFICATION_ERR: number;
1024 readonly INVALID_NODE_TYPE_ERR: number;
1025 readonly INVALID_STATE_ERR: number;
1026 readonly NAMESPACE_ERR: number;
1027 readonly NETWORK_ERR: number;
1028 readonly NOT_FOUND_ERR: number;
1029 readonly NOT_SUPPORTED_ERR: number;
1030 readonly NO_DATA_ALLOWED_ERR: number;
1031 readonly NO_MODIFICATION_ALLOWED_ERR: number;
1032 readonly QUOTA_EXCEEDED_ERR: number;
1033 readonly SECURITY_ERR: number;
1034 readonly SYNTAX_ERR: number;
1035 readonly TIMEOUT_ERR: number;
1036 readonly TYPE_MISMATCH_ERR: number;
1037 readonly URL_MISMATCH_ERR: number;
1038 readonly VALIDATION_ERR: number;
1039 readonly WRONG_DOCUMENT_ERR: number;
1042 declare var DOMException: {
1043 prototype: DOMException;
1044 new(message?: string, name?: string): DOMException;
1045 readonly ABORT_ERR: number;
1046 readonly DATA_CLONE_ERR: number;
1047 readonly DOMSTRING_SIZE_ERR: number;
1048 readonly HIERARCHY_REQUEST_ERR: number;
1049 readonly INDEX_SIZE_ERR: number;
1050 readonly INUSE_ATTRIBUTE_ERR: number;
1051 readonly INVALID_ACCESS_ERR: number;
1052 readonly INVALID_CHARACTER_ERR: number;
1053 readonly INVALID_MODIFICATION_ERR: number;
1054 readonly INVALID_NODE_TYPE_ERR: number;
1055 readonly INVALID_STATE_ERR: number;
1056 readonly NAMESPACE_ERR: number;
1057 readonly NETWORK_ERR: number;
1058 readonly NOT_FOUND_ERR: number;
1059 readonly NOT_SUPPORTED_ERR: number;
1060 readonly NO_DATA_ALLOWED_ERR: number;
1061 readonly NO_MODIFICATION_ALLOWED_ERR: number;
1062 readonly QUOTA_EXCEEDED_ERR: number;
1063 readonly SECURITY_ERR: number;
1064 readonly SYNTAX_ERR: number;
1065 readonly TIMEOUT_ERR: number;
1066 readonly TYPE_MISMATCH_ERR: number;
1067 readonly URL_MISMATCH_ERR: number;
1068 readonly VALIDATION_ERR: number;
1069 readonly WRONG_DOCUMENT_ERR: number;
1072 interface DOMMatrix extends DOMMatrixReadOnly {
1095 invertSelf(): DOMMatrix;
1096 multiplySelf(other?: DOMMatrixInit): DOMMatrix;
1097 preMultiplySelf(other?: DOMMatrixInit): DOMMatrix;
1098 rotateAxisAngleSelf(x?: number, y?: number, z?: number, angle?: number): DOMMatrix;
1099 rotateFromVectorSelf(x?: number, y?: number): DOMMatrix;
1100 rotateSelf(rotX?: number, rotY?: number, rotZ?: number): DOMMatrix;
1101 scale3dSelf(scale?: number, originX?: number, originY?: number, originZ?: number): DOMMatrix;
1102 scaleSelf(scaleX?: number, scaleY?: number, scaleZ?: number, originX?: number, originY?: number, originZ?: number): DOMMatrix;
1103 skewXSelf(sx?: number): DOMMatrix;
1104 skewYSelf(sy?: number): DOMMatrix;
1105 translateSelf(tx?: number, ty?: number, tz?: number): DOMMatrix;
1108 declare var DOMMatrix: {
1109 prototype: DOMMatrix;
1110 new(init?: string | number[]): DOMMatrix;
1111 fromFloat32Array(array32: Float32Array): DOMMatrix;
1112 fromFloat64Array(array64: Float64Array): DOMMatrix;
1113 fromMatrix(other?: DOMMatrixInit): DOMMatrix;
1116 interface DOMMatrixReadOnly {
1123 readonly is2D: boolean;
1124 readonly isIdentity: boolean;
1125 readonly m11: number;
1126 readonly m12: number;
1127 readonly m13: number;
1128 readonly m14: number;
1129 readonly m21: number;
1130 readonly m22: number;
1131 readonly m23: number;
1132 readonly m24: number;
1133 readonly m31: number;
1134 readonly m32: number;
1135 readonly m33: number;
1136 readonly m34: number;
1137 readonly m41: number;
1138 readonly m42: number;
1139 readonly m43: number;
1140 readonly m44: number;
1143 inverse(): DOMMatrix;
1144 multiply(other?: DOMMatrixInit): DOMMatrix;
1145 rotate(rotX?: number, rotY?: number, rotZ?: number): DOMMatrix;
1146 rotateAxisAngle(x?: number, y?: number, z?: number, angle?: number): DOMMatrix;
1147 rotateFromVector(x?: number, y?: number): DOMMatrix;
1148 scale(scaleX?: number, scaleY?: number, scaleZ?: number, originX?: number, originY?: number, originZ?: number): DOMMatrix;
1149 scale3d(scale?: number, originX?: number, originY?: number, originZ?: number): DOMMatrix;
1151 scaleNonUniform(scaleX?: number, scaleY?: number): DOMMatrix;
1152 skewX(sx?: number): DOMMatrix;
1153 skewY(sy?: number): DOMMatrix;
1154 toFloat32Array(): Float32Array;
1155 toFloat64Array(): Float64Array;
1157 transformPoint(point?: DOMPointInit): DOMPoint;
1158 translate(tx?: number, ty?: number, tz?: number): DOMMatrix;
1161 declare var DOMMatrixReadOnly: {
1162 prototype: DOMMatrixReadOnly;
1163 new(init?: string | number[]): DOMMatrixReadOnly;
1164 fromFloat32Array(array32: Float32Array): DOMMatrixReadOnly;
1165 fromFloat64Array(array64: Float64Array): DOMMatrixReadOnly;
1166 fromMatrix(other?: DOMMatrixInit): DOMMatrixReadOnly;
1169 interface DOMPoint extends DOMPointReadOnly {
1176 declare var DOMPoint: {
1177 prototype: DOMPoint;
1178 new(x?: number, y?: number, z?: number, w?: number): DOMPoint;
1179 fromPoint(other?: DOMPointInit): DOMPoint;
1182 interface DOMPointReadOnly {
1187 matrixTransform(matrix?: DOMMatrixInit): DOMPoint;
1191 declare var DOMPointReadOnly: {
1192 prototype: DOMPointReadOnly;
1193 new(x?: number, y?: number, z?: number, w?: number): DOMPointReadOnly;
1194 fromPoint(other?: DOMPointInit): DOMPointReadOnly;
1198 readonly p1: DOMPoint;
1199 readonly p2: DOMPoint;
1200 readonly p3: DOMPoint;
1201 readonly p4: DOMPoint;
1202 getBounds(): DOMRect;
1206 declare var DOMQuad: {
1208 new(p1?: DOMPointInit, p2?: DOMPointInit, p3?: DOMPointInit, p4?: DOMPointInit): DOMQuad;
1209 fromQuad(other?: DOMQuadInit): DOMQuad;
1210 fromRect(other?: DOMRectInit): DOMQuad;
1213 interface DOMRect extends DOMRectReadOnly {
1220 declare var DOMRect: {
1222 new(x?: number, y?: number, width?: number, height?: number): DOMRect;
1223 fromRect(other?: DOMRectInit): DOMRect;
1226 interface DOMRectReadOnly {
1227 readonly bottom: number;
1228 readonly height: number;
1229 readonly left: number;
1230 readonly right: number;
1231 readonly top: number;
1232 readonly width: number;
1238 declare var DOMRectReadOnly: {
1239 prototype: DOMRectReadOnly;
1240 new(x?: number, y?: number, width?: number, height?: number): DOMRectReadOnly;
1241 fromRect(other?: DOMRectInit): DOMRectReadOnly;
1244 /** A type returned by some APIs which contains a list of DOMString (strings). */
1245 interface DOMStringList {
1247 * Returns the number of strings in strings.
1249 readonly length: number;
1251 * Returns true if strings contains string, and false otherwise.
1253 contains(string: string): boolean;
1255 * Returns the string with index index from strings.
1257 item(index: number): string | null;
1258 [index: number]: string;
1261 declare var DOMStringList: {
1262 prototype: DOMStringList;
1263 new(): DOMStringList;
1266 interface DedicatedWorkerGlobalScopeEventMap extends WorkerGlobalScopeEventMap {
1267 "message": MessageEvent;
1268 "messageerror": MessageEvent;
1271 /** (the Worker global scope) is accessible through the self keyword. Some additional global functions, namespaces objects, and constructors, not typically associated with the worker global scope, but available on it, are listed in the JavaScript Reference. See also: Functions available to workers. */
1272 interface DedicatedWorkerGlobalScope extends WorkerGlobalScope, AnimationFrameProvider {
1274 * Returns dedicatedWorkerGlobal's name, i.e. the value given to the Worker constructor. Primarily useful for debugging.
1276 readonly name: string;
1277 onmessage: ((this: DedicatedWorkerGlobalScope, ev: MessageEvent) => any) | null;
1278 onmessageerror: ((this: DedicatedWorkerGlobalScope, ev: MessageEvent) => any) | null;
1280 * Aborts dedicatedWorkerGlobal.
1284 * Clones message and transmits it to the Worker object associated with dedicatedWorkerGlobal. transfer can be passed as a list of objects that are to be transferred rather than cloned.
1286 postMessage(message: any, transfer: Transferable[]): void;
1287 postMessage(message: any, options?: PostMessageOptions): void;
1288 addEventListener<K extends keyof DedicatedWorkerGlobalScopeEventMap>(type: K, listener: (this: DedicatedWorkerGlobalScope, ev: DedicatedWorkerGlobalScopeEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
1289 addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
1290 removeEventListener<K extends keyof DedicatedWorkerGlobalScopeEventMap>(type: K, listener: (this: DedicatedWorkerGlobalScope, ev: DedicatedWorkerGlobalScopeEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
1291 removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
1294 declare var DedicatedWorkerGlobalScope: {
1295 prototype: DedicatedWorkerGlobalScope;
1296 new(): DedicatedWorkerGlobalScope;
1299 interface DhImportKeyParams extends Algorithm {
1300 generator: Uint8Array;
1304 interface DhKeyAlgorithm extends KeyAlgorithm {
1305 generator: Uint8Array;
1309 interface DhKeyDeriveParams extends Algorithm {
1313 interface DhKeyGenParams extends Algorithm {
1314 generator: Uint8Array;
1318 interface EXT_blend_minmax {
1319 readonly MAX_EXT: GLenum;
1320 readonly MIN_EXT: GLenum;
1323 /** 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. */
1324 interface EXT_frag_depth {
1327 interface EXT_sRGB {
1328 readonly FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT: GLenum;
1329 readonly SRGB8_ALPHA8_EXT: GLenum;
1330 readonly SRGB_ALPHA_EXT: GLenum;
1331 readonly SRGB_EXT: GLenum;
1334 interface EXT_shader_texture_lod {
1337 /** The EXT_texture_filter_anisotropic extension is part of the WebGL API and exposes two constants for anisotropic filtering (AF). */
1338 interface EXT_texture_filter_anisotropic {
1339 readonly MAX_TEXTURE_MAX_ANISOTROPY_EXT: GLenum;
1340 readonly TEXTURE_MAX_ANISOTROPY_EXT: GLenum;
1343 /** Events providing information related to errors in scripts or in files. */
1344 interface ErrorEvent extends Event {
1345 readonly colno: number;
1346 readonly error: any;
1347 readonly filename: string;
1348 readonly lineno: number;
1349 readonly message: string;
1352 declare var ErrorEvent: {
1353 prototype: ErrorEvent;
1354 new(type: string, eventInitDict?: ErrorEventInit): ErrorEvent;
1357 /** An event which takes place in the DOM. */
1360 * Returns true or false depending on how event was initialized. True if event goes through its target's ancestors in reverse tree order, and false otherwise.
1362 readonly bubbles: boolean;
1363 cancelBubble: boolean;
1365 * Returns true or false depending on how event was initialized. Its return value does not always carry meaning, but true can indicate that part of the operation during which event was dispatched, can be canceled by invoking the preventDefault() method.
1367 readonly cancelable: boolean;
1369 * Returns true or false depending on how event was initialized. True if event invokes listeners past a ShadowRoot node that is the root of its target, and false otherwise.
1371 readonly composed: boolean;
1373 * Returns the object whose event listener's callback is currently being invoked.
1375 readonly currentTarget: EventTarget | null;
1377 * Returns true if preventDefault() was invoked successfully to indicate cancelation, and false otherwise.
1379 readonly defaultPrevented: boolean;
1381 * Returns the event's phase, which is one of NONE, CAPTURING_PHASE, AT_TARGET, and BUBBLING_PHASE.
1383 readonly eventPhase: number;
1385 * Returns true if event was dispatched by the user agent, and false otherwise.
1387 readonly isTrusted: boolean;
1388 returnValue: boolean;
1390 readonly srcElement: EventTarget | null;
1392 * Returns the object to which event is dispatched (its target).
1394 readonly target: EventTarget | null;
1396 * Returns the event's timestamp as the number of milliseconds measured relative to the time origin.
1398 readonly timeStamp: number;
1400 * Returns the type of event, e.g. "click", "hashchange", or "submit".
1402 readonly type: string;
1404 * 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.
1406 composedPath(): EventTarget[];
1407 initEvent(type: string, bubbles?: boolean, cancelable?: boolean): void;
1409 * 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.
1411 preventDefault(): void;
1413 * Invoking this method prevents event from reaching any registered event listeners after the current one finishes running and, when dispatched in a tree, also prevents event from reaching any other objects.
1415 stopImmediatePropagation(): void;
1417 * When dispatched in a tree, invoking this method prevents event from reaching any objects other than the current object.
1419 stopPropagation(): void;
1420 readonly AT_TARGET: number;
1421 readonly BUBBLING_PHASE: number;
1422 readonly CAPTURING_PHASE: number;
1423 readonly NONE: number;
1426 declare var Event: {
1428 new(type: string, eventInitDict?: EventInit): Event;
1429 readonly AT_TARGET: number;
1430 readonly BUBBLING_PHASE: number;
1431 readonly CAPTURING_PHASE: number;
1432 readonly NONE: number;
1435 interface EventListenerObject {
1436 handleEvent(evt: Event): void;
1439 interface EventSourceEventMap {
1441 "message": MessageEvent;
1445 interface EventSource extends EventTarget {
1446 onerror: ((this: EventSource, ev: Event) => any) | null;
1447 onmessage: ((this: EventSource, ev: MessageEvent) => any) | null;
1448 onopen: ((this: EventSource, ev: Event) => any) | null;
1450 * Returns the state of this EventSource object's connection. It can have the values described below.
1452 readonly readyState: number;
1454 * Returns the URL providing the event stream.
1456 readonly url: string;
1458 * Returns true if the credentials mode for connection requests to the URL providing the event stream is set to "include", and false otherwise.
1460 readonly withCredentials: boolean;
1462 * Aborts any instances of the fetch algorithm started for this EventSource object, and sets the readyState attribute to CLOSED.
1465 readonly CLOSED: number;
1466 readonly CONNECTING: number;
1467 readonly OPEN: number;
1468 addEventListener<K extends keyof EventSourceEventMap>(type: K, listener: (this: EventSource, ev: EventSourceEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
1469 addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
1470 removeEventListener<K extends keyof EventSourceEventMap>(type: K, listener: (this: EventSource, ev: EventSourceEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
1471 removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
1474 declare var EventSource: {
1475 prototype: EventSource;
1476 new(url: string, eventSourceInitDict?: EventSourceInit): EventSource;
1477 readonly CLOSED: number;
1478 readonly CONNECTING: number;
1479 readonly OPEN: number;
1482 /** EventTarget is a DOM interface implemented by objects that can receive events and may have listeners for them. */
1483 interface EventTarget {
1485 * Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched.
1487 * The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture.
1489 * When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET.
1491 * When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners.
1493 * When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed.
1495 * The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
1497 addEventListener(type: string, listener: EventListenerOrEventListenerObject | null, options?: boolean | AddEventListenerOptions): void;
1499 * 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.
1501 dispatchEvent(event: Event): boolean;
1503 * Removes the event listener in target's event listener list with the same type, callback, and options.
1505 removeEventListener(type: string, callback: EventListenerOrEventListenerObject | null, options?: EventListenerOptions | boolean): void;
1508 declare var EventTarget: {
1509 prototype: EventTarget;
1513 /** Extends the lifetime of the install and activate events dispatched on the global scope as part of the service worker lifecycle. This ensures that any functional events (like FetchEvent) are not dispatched until it upgrades database schemas and deletes the outdated cache entries. */
1514 interface ExtendableEvent extends Event {
1515 waitUntil(f: any): void;
1518 declare var ExtendableEvent: {
1519 prototype: ExtendableEvent;
1520 new(type: string, eventInitDict?: ExtendableEventInit): ExtendableEvent;
1523 /** This ServiceWorker API interface represents the event object of a message event fired on a service worker (when a channel message is received on the ServiceWorkerGlobalScope from another context) — extends the lifetime of such events. */
1524 interface ExtendableMessageEvent extends ExtendableEvent {
1526 readonly lastEventId: string;
1527 readonly origin: string;
1528 readonly ports: ReadonlyArray<MessagePort>;
1529 readonly source: Client | ServiceWorker | MessagePort | null;
1532 declare var ExtendableMessageEvent: {
1533 prototype: ExtendableMessageEvent;
1534 new(type: string, eventInitDict?: ExtendableMessageEventInit): ExtendableMessageEvent;
1537 /** 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. */
1538 interface FetchEvent extends ExtendableEvent {
1539 readonly clientId: string;
1540 readonly preloadResponse: Promise<any>;
1541 readonly replacesClientId: string;
1542 readonly request: Request;
1543 readonly resultingClientId: string;
1544 respondWith(r: Response | Promise<Response>): void;
1547 declare var FetchEvent: {
1548 prototype: FetchEvent;
1549 new(type: string, eventInitDict: FetchEventInit): FetchEvent;
1552 /** Provides information about files and allows JavaScript in a web page to access their content. */
1553 interface File extends Blob {
1554 readonly lastModified: number;
1555 readonly name: string;
1560 new(fileBits: BlobPart[], fileName: string, options?: FilePropertyBag): File;
1563 /** An object of this type is returned by the files property of the HTML <input> element; this lets you access the list of files selected with the <input type="file"> element. It's also used for a list of files dropped into web content when using the drag and drop API; see the DataTransfer object for details on this usage. */
1564 interface FileList {
1565 readonly length: number;
1566 item(index: number): File | null;
1567 [index: number]: File;
1570 declare var FileList: {
1571 prototype: FileList;
1575 interface FileReaderEventMap {
1576 "abort": ProgressEvent<FileReader>;
1577 "error": ProgressEvent<FileReader>;
1578 "load": ProgressEvent<FileReader>;
1579 "loadend": ProgressEvent<FileReader>;
1580 "loadstart": ProgressEvent<FileReader>;
1581 "progress": ProgressEvent<FileReader>;
1584 /** Lets web applications asynchronously read the contents of files (or raw data buffers) stored on the user's computer, using File or Blob objects to specify the file or data to read. */
1585 interface FileReader extends EventTarget {
1586 readonly error: DOMException | null;
1587 onabort: ((this: FileReader, ev: ProgressEvent<FileReader>) => any) | null;
1588 onerror: ((this: FileReader, ev: ProgressEvent<FileReader>) => any) | null;
1589 onload: ((this: FileReader, ev: ProgressEvent<FileReader>) => any) | null;
1590 onloadend: ((this: FileReader, ev: ProgressEvent<FileReader>) => any) | null;
1591 onloadstart: ((this: FileReader, ev: ProgressEvent<FileReader>) => any) | null;
1592 onprogress: ((this: FileReader, ev: ProgressEvent<FileReader>) => any) | null;
1593 readonly readyState: number;
1594 readonly result: string | ArrayBuffer | null;
1596 readAsArrayBuffer(blob: Blob): void;
1597 readAsBinaryString(blob: Blob): void;
1598 readAsDataURL(blob: Blob): void;
1599 readAsText(blob: Blob, encoding?: string): void;
1600 readonly DONE: number;
1601 readonly EMPTY: number;
1602 readonly LOADING: number;
1603 addEventListener<K extends keyof FileReaderEventMap>(type: K, listener: (this: FileReader, ev: FileReaderEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
1604 addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
1605 removeEventListener<K extends keyof FileReaderEventMap>(type: K, listener: (this: FileReader, ev: FileReaderEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
1606 removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
1609 declare var FileReader: {
1610 prototype: FileReader;
1612 readonly DONE: number;
1613 readonly EMPTY: number;
1614 readonly LOADING: number;
1617 /** Allows to read File or Blob objects in a synchronous way. */
1618 interface FileReaderSync {
1619 readAsArrayBuffer(blob: Blob): ArrayBuffer;
1620 readAsBinaryString(blob: Blob): string;
1621 readAsDataURL(blob: Blob): string;
1622 readAsText(blob: Blob, encoding?: string): string;
1625 declare var FileReaderSync: {
1626 prototype: FileReaderSync;
1627 new(): FileReaderSync;
1630 /** 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". */
1631 interface FormData {
1632 append(name: string, value: string | Blob, fileName?: string): void;
1633 delete(name: string): void;
1634 get(name: string): FormDataEntryValue | null;
1635 getAll(name: string): FormDataEntryValue[];
1636 has(name: string): boolean;
1637 set(name: string, value: string | Blob, fileName?: string): void;
1638 forEach(callbackfn: (value: FormDataEntryValue, key: string, parent: FormData) => void, thisArg?: any): void;
1641 declare var FormData: {
1642 prototype: FormData;
1646 interface GenericTransformStream {
1648 * Returns a readable stream whose chunks are strings resulting from running encoding's decoder on the chunks written to writable.
1650 readonly readable: ReadableStream;
1652 * Returns a writable stream which accepts [AllowShared] BufferSource chunks and runs them through encoding's decoder before making them available to readable.
1654 * Typically this will be used via the pipeThrough() method on a ReadableStream source.
1657 * var decoder = new TextDecoderStream(encoding);
1659 * .pipeThrough(decoder)
1660 * .pipeTo(textWritable);
1663 * If the error mode is "fatal" and encoding's decoder returns error, both readable and writable will be errored with a TypeError.
1665 readonly writable: WritableStream;
1668 /** This Fetch API interface allows you to perform various actions on HTTP request and response headers. These actions include retrieving, setting, adding to, and removing. A Headers object has an associated header list, which is initially empty and consists of zero or more name and value pairs.  You can add to this using methods like append() (see Examples.) In all methods of this interface, header names are matched by case-insensitive byte sequence. */
1670 append(name: string, value: string): void;
1671 delete(name: string): void;
1672 get(name: string): string | null;
1673 has(name: string): boolean;
1674 set(name: string, value: string): void;
1675 forEach(callbackfn: (value: string, key: string, parent: Headers) => void, thisArg?: any): void;
1678 declare var Headers: {
1680 new(init?: HeadersInit): Headers;
1683 interface IDBArrayKey extends Array<IDBValidKey> {
1686 /** This IndexedDB API interface represents a cursor for traversing or iterating over multiple records in a database. */
1687 interface IDBCursor {
1689 * Returns the direction ("next", "nextunique", "prev" or "prevunique") of the cursor.
1691 readonly direction: IDBCursorDirection;
1693 * Returns the key of the cursor. Throws a "InvalidStateError" DOMException if the cursor is advancing or is finished.
1695 readonly key: IDBValidKey;
1697 * Returns the effective key of the cursor. Throws a "InvalidStateError" DOMException if the cursor is advancing or is finished.
1699 readonly primaryKey: IDBValidKey;
1701 * Returns the IDBObjectStore or IDBIndex the cursor was opened from.
1703 readonly source: IDBObjectStore | IDBIndex;
1705 * Advances the cursor through the next count records in range.
1707 advance(count: number): void;
1709 * Advances the cursor to the next record in range.
1711 continue(key?: IDBValidKey): void;
1713 * Advances the cursor to the next record in range matching or after key and primaryKey. Throws an "InvalidAccessError" DOMException if the source is not an index.
1715 continuePrimaryKey(key: IDBValidKey, primaryKey: IDBValidKey): void;
1717 * Delete the record pointed at by the cursor with a new value.
1719 * If successful, request's result will be undefined.
1721 delete(): IDBRequest<undefined>;
1723 * Updated the record pointed at by the cursor with a new value.
1725 * Throws a "DataError" DOMException if the effective object store uses in-line keys and the key would have changed.
1727 * If successful, request's result will be the record's key.
1729 update(value: any): IDBRequest<IDBValidKey>;
1732 declare var IDBCursor: {
1733 prototype: IDBCursor;
1737 /** This IndexedDB API interface represents a cursor for traversing or iterating over multiple records in a database. It is the same as the IDBCursor, except that it includes the value property. */
1738 interface IDBCursorWithValue extends IDBCursor {
1740 * Returns the cursor's current value.
1742 readonly value: any;
1745 declare var IDBCursorWithValue: {
1746 prototype: IDBCursorWithValue;
1747 new(): IDBCursorWithValue;
1750 interface IDBDatabaseEventMap {
1754 "versionchange": IDBVersionChangeEvent;
1757 /** This IndexedDB API interface provides a connection to a database; you can use an IDBDatabase object to open a transaction on your database then create, manipulate, and delete objects (data) in that database. The interface provides the only way to get and manage versions of the database. */
1758 interface IDBDatabase extends EventTarget {
1760 * Returns the name of the database.
1762 readonly name: string;
1764 * Returns a list of the names of object stores in the database.
1766 readonly objectStoreNames: DOMStringList;
1767 onabort: ((this: IDBDatabase, ev: Event) => any) | null;
1768 onclose: ((this: IDBDatabase, ev: Event) => any) | null;
1769 onerror: ((this: IDBDatabase, ev: Event) => any) | null;
1770 onversionchange: ((this: IDBDatabase, ev: IDBVersionChangeEvent) => any) | null;
1772 * Returns the version of the database.
1774 readonly version: number;
1776 * Closes the connection once all running transactions have finished.
1780 * Creates a new object store with the given name and options and returns a new IDBObjectStore.
1782 * Throws a "InvalidStateError" DOMException if not called within an upgrade transaction.
1784 createObjectStore(name: string, options?: IDBObjectStoreParameters): IDBObjectStore;
1786 * Deletes the object store with the given name.
1788 * Throws a "InvalidStateError" DOMException if not called within an upgrade transaction.
1790 deleteObjectStore(name: string): void;
1792 * Returns a new transaction with the given mode ("readonly" or "readwrite") and scope which can be a single object store name or an array of names.
1794 transaction(storeNames: string | string[], mode?: IDBTransactionMode): IDBTransaction;
1795 addEventListener<K extends keyof IDBDatabaseEventMap>(type: K, listener: (this: IDBDatabase, ev: IDBDatabaseEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
1796 addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
1797 removeEventListener<K extends keyof IDBDatabaseEventMap>(type: K, listener: (this: IDBDatabase, ev: IDBDatabaseEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
1798 removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
1801 declare var IDBDatabase: {
1802 prototype: IDBDatabase;
1806 /** In the following code snippet, we make a request to open a database, and include handlers for the success and error cases. For a full working example, see our To-do Notifications app (view example live.) */
1807 interface IDBFactory {
1809 * Compares two values as keys. Returns -1 if key1 precedes key2, 1 if key2 precedes key1, and 0 if the keys are equal.
1811 * Throws a "DataError" DOMException if either input is not a valid key.
1813 cmp(first: any, second: any): number;
1815 * 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.
1817 deleteDatabase(name: string): IDBOpenDBRequest;
1819 * Attempts to open a connection to the named database with the current version, or 1 if it does not already exist. If the request is successful request's result will be the connection.
1821 open(name: string, version?: number): IDBOpenDBRequest;
1824 declare var IDBFactory: {
1825 prototype: IDBFactory;
1829 /** IDBIndex interface of the IndexedDB API provides asynchronous access to an index in a database. An index is a kind of object store for looking up records in another object store, called the referenced object store. You use this interface to retrieve data. */
1830 interface IDBIndex {
1831 readonly keyPath: string | string[];
1832 readonly multiEntry: boolean;
1834 * Returns the name of the index.
1838 * Returns the IDBObjectStore the index belongs to.
1840 readonly objectStore: IDBObjectStore;
1841 readonly unique: boolean;
1843 * Retrieves the number of records matching the given key or key range in query.
1845 * If successful, request's result will be the count.
1847 count(key?: IDBValidKey | IDBKeyRange): IDBRequest<number>;
1849 * Retrieves the value of the first record matching the given key or key range in query.
1851 * If successful, request's result will be the value, or undefined if there was no matching record.
1853 get(key: IDBValidKey | IDBKeyRange): IDBRequest<any | undefined>;
1855 * Retrieves the values of the records matching the given key or key range in query (up to count if given).
1857 * If successful, request's result will be an Array of the values.
1859 getAll(query?: IDBValidKey | IDBKeyRange | null, count?: number): IDBRequest<any[]>;
1861 * Retrieves the keys of records matching the given key or key range in query (up to count if given).
1863 * If successful, request's result will be an Array of the keys.
1865 getAllKeys(query?: IDBValidKey | IDBKeyRange | null, count?: number): IDBRequest<IDBValidKey[]>;
1867 * Retrieves the key of the first record matching the given key or key range in query.
1869 * If successful, request's result will be the key, or undefined if there was no matching record.
1871 getKey(key: IDBValidKey | IDBKeyRange): IDBRequest<IDBValidKey | undefined>;
1873 * Opens a cursor over the records matching query, ordered by direction. If query is null, all records in index are matched.
1875 * If successful, request's result will be an IDBCursorWithValue, or null if there were no matching records.
1877 openCursor(query?: IDBValidKey | IDBKeyRange | null, direction?: IDBCursorDirection): IDBRequest<IDBCursorWithValue | null>;
1879 * Opens a cursor with key only flag set over the records matching query, ordered by direction. If query is null, all records in index are matched.
1881 * If successful, request's result will be an IDBCursor, or null if there were no matching records.
1883 openKeyCursor(query?: IDBValidKey | IDBKeyRange | null, direction?: IDBCursorDirection): IDBRequest<IDBCursor | null>;
1886 declare var IDBIndex: {
1887 prototype: IDBIndex;
1891 /** A key range can be a single value or a range with upper and lower bounds or endpoints. If the key range has both upper and lower bounds, then it is bounded; if it has no bounds, it is unbounded. A bounded key range can either be open (the endpoints are excluded) or closed (the endpoints are included). To retrieve all keys within a certain range, you can use the following code constructs: */
1892 interface IDBKeyRange {
1894 * Returns lower bound, or undefined if none.
1896 readonly lower: any;
1898 * Returns true if the lower open flag is set, and false otherwise.
1900 readonly lowerOpen: boolean;
1902 * Returns upper bound, or undefined if none.
1904 readonly upper: any;
1906 * Returns true if the upper open flag is set, and false otherwise.
1908 readonly upperOpen: boolean;
1910 * Returns true if key is included in the range, and false otherwise.
1912 includes(key: any): boolean;
1915 declare var IDBKeyRange: {
1916 prototype: IDBKeyRange;
1919 * Returns a new IDBKeyRange spanning from lower to upper. If lowerOpen is true, lower is not included in the range. If upperOpen is true, upper is not included in the range.
1921 bound(lower: any, upper: any, lowerOpen?: boolean, upperOpen?: boolean): IDBKeyRange;
1923 * Returns a new IDBKeyRange starting at key with no upper bound. If open is true, key is not included in the range.
1925 lowerBound(lower: any, open?: boolean): IDBKeyRange;
1927 * Returns a new IDBKeyRange spanning only key.
1929 only(value: any): IDBKeyRange;
1931 * Returns a new IDBKeyRange with no lower bound and ending at key. If open is true, key is not included in the range.
1933 upperBound(upper: any, open?: boolean): IDBKeyRange;
1936 /** This example shows a variety of different uses of object stores, from updating the data structure with IDBObjectStore.createIndex inside an onupgradeneeded function, to adding a new item to our object store with IDBObjectStore.add. For a full working example, see our To-do Notifications app (view example live.) */
1937 interface IDBObjectStore {
1939 * Returns true if the store has a key generator, and false otherwise.
1941 readonly autoIncrement: boolean;
1943 * Returns a list of the names of indexes in the store.
1945 readonly indexNames: DOMStringList;
1947 * Returns the key path of the store, or null if none.
1949 readonly keyPath: string | string[];
1951 * Returns the name of the store.
1955 * Returns the associated transaction.
1957 readonly transaction: IDBTransaction;
1959 * Adds or updates a record in store with the given value and key.
1961 * If the store uses in-line keys and key is specified a "DataError" DOMException will be thrown.
1963 * If put() is used, any existing record with the key will be replaced. If add() is used, and if a record with the key already exists the request will fail, with request's error set to a "ConstraintError" DOMException.
1965 * If successful, request's result will be the record's key.
1967 add(value: any, key?: IDBValidKey): IDBRequest<IDBValidKey>;
1969 * Deletes all records in store.
1971 * If successful, request's result will be undefined.
1973 clear(): IDBRequest<undefined>;
1975 * Retrieves the number of records matching the given key or key range in query.
1977 * If successful, request's result will be the count.
1979 count(key?: IDBValidKey | IDBKeyRange): IDBRequest<number>;
1981 * 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.
1983 * Throws an "InvalidStateError" DOMException if not called within an upgrade transaction.
1985 createIndex(name: string, keyPath: string | string[], options?: IDBIndexParameters): IDBIndex;
1987 * Deletes records in store with the given key or in the given key range in query.
1989 * If successful, request's result will be undefined.
1991 delete(key: IDBValidKey | IDBKeyRange): IDBRequest<undefined>;
1993 * Deletes the index in store with the given name.
1995 * Throws an "InvalidStateError" DOMException if not called within an upgrade transaction.
1997 deleteIndex(name: string): void;
1999 * Retrieves the value of the first record matching the given key or key range in query.
2001 * If successful, request's result will be the value, or undefined if there was no matching record.
2003 get(query: IDBValidKey | IDBKeyRange): IDBRequest<any | undefined>;
2005 * Retrieves the values of the records matching the given key or key range in query (up to count if given).
2007 * If successful, request's result will be an Array of the values.
2009 getAll(query?: IDBValidKey | IDBKeyRange | null, count?: number): IDBRequest<any[]>;
2011 * Retrieves the keys of records matching the given key or key range in query (up to count if given).
2013 * If successful, request's result will be an Array of the keys.
2015 getAllKeys(query?: IDBValidKey | IDBKeyRange | null, count?: number): IDBRequest<IDBValidKey[]>;
2017 * Retrieves the key of the first record matching the given key or key range in query.
2019 * If successful, request's result will be the key, or undefined if there was no matching record.
2021 getKey(query: IDBValidKey | IDBKeyRange): IDBRequest<IDBValidKey | undefined>;
2022 index(name: string): IDBIndex;
2024 * Opens a cursor over the records matching query, ordered by direction. If query is null, all records in store are matched.
2026 * If successful, request's result will be an IDBCursorWithValue pointing at the first matching record, or null if there were no matching records.
2028 openCursor(query?: IDBValidKey | IDBKeyRange | null, direction?: IDBCursorDirection): IDBRequest<IDBCursorWithValue | null>;
2030 * Opens a cursor with key only flag set over the records matching query, ordered by direction. If query is null, all records in store are matched.
2032 * If successful, request's result will be an IDBCursor pointing at the first matching record, or null if there were no matching records.
2034 openKeyCursor(query?: IDBValidKey | IDBKeyRange | null, direction?: IDBCursorDirection): IDBRequest<IDBCursor | null>;
2036 * Adds or updates a record in store with the given value and key.
2038 * If the store uses in-line keys and key is specified a "DataError" DOMException will be thrown.
2040 * If put() is used, any existing record with the key will be replaced. If add() is used, and if a record with the key already exists the request will fail, with request's error set to a "ConstraintError" DOMException.
2042 * If successful, request's result will be the record's key.
2044 put(value: any, key?: IDBValidKey): IDBRequest<IDBValidKey>;
2047 declare var IDBObjectStore: {
2048 prototype: IDBObjectStore;
2049 new(): IDBObjectStore;
2052 interface IDBOpenDBRequestEventMap extends IDBRequestEventMap {
2054 "upgradeneeded": IDBVersionChangeEvent;
2057 /** Also inherits methods from its parents IDBRequest and EventTarget. */
2058 interface IDBOpenDBRequest extends IDBRequest<IDBDatabase> {
2059 onblocked: ((this: IDBOpenDBRequest, ev: Event) => any) | null;
2060 onupgradeneeded: ((this: IDBOpenDBRequest, ev: IDBVersionChangeEvent) => any) | null;
2061 addEventListener<K extends keyof IDBOpenDBRequestEventMap>(type: K, listener: (this: IDBOpenDBRequest, ev: IDBOpenDBRequestEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
2062 addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
2063 removeEventListener<K extends keyof IDBOpenDBRequestEventMap>(type: K, listener: (this: IDBOpenDBRequest, ev: IDBOpenDBRequestEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
2064 removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
2067 declare var IDBOpenDBRequest: {
2068 prototype: IDBOpenDBRequest;
2069 new(): IDBOpenDBRequest;
2072 interface IDBRequestEventMap {
2077 /** The request object does not initially contain any information about the result of the operation, but once information becomes available, an event is fired on the request, and the information becomes available through the properties of the IDBRequest instance. */
2078 interface IDBRequest<T = any> extends EventTarget {
2080 * When a request is completed, returns the error (a DOMException), or null if the request succeeded. Throws a "InvalidStateError" DOMException if the request is still pending.
2082 readonly error: DOMException | null;
2083 onerror: ((this: IDBRequest<T>, ev: Event) => any) | null;
2084 onsuccess: ((this: IDBRequest<T>, ev: Event) => any) | null;
2086 * Returns "pending" until a request is complete, then returns "done".
2088 readonly readyState: IDBRequestReadyState;
2090 * When a request is completed, returns the result, or undefined if the request failed. Throws a "InvalidStateError" DOMException if the request is still pending.
2094 * Returns the IDBObjectStore, IDBIndex, or IDBCursor the request was made against, or null if is was an open request.
2096 readonly source: IDBObjectStore | IDBIndex | IDBCursor;
2098 * Returns the IDBTransaction the request was made within. If this as an open request, then it returns an upgrade transaction while it is running, or null otherwise.
2100 readonly transaction: IDBTransaction | null;
2101 addEventListener<K extends keyof IDBRequestEventMap>(type: K, listener: (this: IDBRequest<T>, ev: IDBRequestEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
2102 addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
2103 removeEventListener<K extends keyof IDBRequestEventMap>(type: K, listener: (this: IDBRequest<T>, ev: IDBRequestEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
2104 removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
2107 declare var IDBRequest: {
2108 prototype: IDBRequest;
2112 interface IDBTransactionEventMap {
2118 interface IDBTransaction extends EventTarget {
2120 * Returns the transaction's connection.
2122 readonly db: IDBDatabase;
2124 * If the transaction was aborted, returns the error (a DOMException) providing the reason.
2126 readonly error: DOMException;
2128 * Returns the mode the transaction was created with ("readonly" or "readwrite"), or "versionchange" for an upgrade transaction.
2130 readonly mode: IDBTransactionMode;
2132 * Returns a list of the names of object stores in the transaction's scope. For an upgrade transaction this is all object stores in the database.
2134 readonly objectStoreNames: DOMStringList;
2135 onabort: ((this: IDBTransaction, ev: Event) => any) | null;
2136 oncomplete: ((this: IDBTransaction, ev: Event) => any) | null;
2137 onerror: ((this: IDBTransaction, ev: Event) => any) | null;
2139 * Aborts the transaction. All pending requests will fail with a "AbortError" DOMException and all changes made to the database will be reverted.
2143 * Returns an IDBObjectStore in the transaction's scope.
2145 objectStore(name: string): IDBObjectStore;
2146 addEventListener<K extends keyof IDBTransactionEventMap>(type: K, listener: (this: IDBTransaction, ev: IDBTransactionEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
2147 addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
2148 removeEventListener<K extends keyof IDBTransactionEventMap>(type: K, listener: (this: IDBTransaction, ev: IDBTransactionEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
2149 removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
2152 declare var IDBTransaction: {
2153 prototype: IDBTransaction;
2154 new(): IDBTransaction;
2157 /** This IndexedDB API interface indicates that the version of the database has changed, as the result of an IDBOpenDBRequest.onupgradeneeded event handler function. */
2158 interface IDBVersionChangeEvent extends Event {
2159 readonly newVersion: number | null;
2160 readonly oldVersion: number;
2163 declare var IDBVersionChangeEvent: {
2164 prototype: IDBVersionChangeEvent;
2165 new(type: string, eventInitDict?: IDBVersionChangeEventInit): IDBVersionChangeEvent;
2168 interface ImageBitmap {
2170 * Returns the intrinsic height of the image, in CSS pixels.
2172 readonly height: number;
2174 * Returns the intrinsic width of the image, in CSS pixels.
2176 readonly width: number;
2178 * Releases imageBitmap's underlying bitmap data.
2183 declare var ImageBitmap: {
2184 prototype: ImageBitmap;
2188 interface ImageBitmapRenderingContext {
2190 * Returns the canvas element that the context is bound to.
2192 readonly canvas: OffscreenCanvas;
2194 * Transfers the underlying bitmap data from imageBitmap to context, and the bitmap becomes the contents of the canvas element to which context is bound.
2196 transferFromImageBitmap(bitmap: ImageBitmap | null): void;
2199 declare var ImageBitmapRenderingContext: {
2200 prototype: ImageBitmapRenderingContext;
2201 new(): ImageBitmapRenderingContext;
2204 /** The underlying pixel data of an area of a <canvas> element. It is created using the ImageData() constructor or creator methods on the CanvasRenderingContext2D object associated with a canvas: createImageData() and getImageData(). It can also be used to set a part of the canvas by using putImageData(). */
2205 interface ImageData {
2207 * Returns the one-dimensional array containing the data in RGBA order, as integers in the range 0 to 255.
2209 readonly data: Uint8ClampedArray;
2211 * Returns the actual dimensions of the data in the ImageData object, in pixels.
2213 readonly height: number;
2215 * Returns the actual dimensions of the data in the ImageData object, in pixels.
2217 readonly width: number;
2220 declare var ImageData: {
2221 prototype: ImageData;
2222 new(sw: number, sh: number): ImageData;
2223 new(data: Uint8ClampedArray, sw: number, sh?: number): ImageData;
2226 /** This Channel Messaging API interface allows us to create a new message channel and send data through it via its two MessagePort properties. */
2227 interface MessageChannel {
2229 * Returns the first MessagePort object.
2231 readonly port1: MessagePort;
2233 * Returns the second MessagePort object.
2235 readonly port2: MessagePort;
2238 declare var MessageChannel: {
2239 prototype: MessageChannel;
2240 new(): MessageChannel;
2243 /** A message received by a target object. */
2244 interface MessageEvent<T = any> extends Event {
2246 * Returns the data of the message.
2250 * Returns the last event ID string, for server-sent events.
2252 readonly lastEventId: string;
2254 * Returns the origin of the message, for server-sent events and cross-document messaging.
2256 readonly origin: string;
2258 * Returns the MessagePort array sent with the message, for cross-document messaging and channel messaging.
2260 readonly ports: ReadonlyArray<MessagePort>;
2262 * Returns the WindowProxy of the source window, for cross-document messaging, and the MessagePort being attached, in the connect event fired at SharedWorkerGlobalScope objects.
2264 readonly source: MessageEventSource | null;
2267 declare var MessageEvent: {
2268 prototype: MessageEvent;
2269 new<T>(type: string, eventInitDict?: MessageEventInit<T>): MessageEvent<T>;
2272 interface MessagePortEventMap {
2273 "message": MessageEvent;
2274 "messageerror": MessageEvent;
2277 /** This Channel Messaging API interface represents one of the two ports of a MessageChannel, allowing messages to be sent from one port and listening out for them arriving at the other. */
2278 interface MessagePort extends EventTarget {
2279 onmessage: ((this: MessagePort, ev: MessageEvent) => any) | null;
2280 onmessageerror: ((this: MessagePort, ev: MessageEvent) => any) | null;
2282 * Disconnects the port, so that it is no longer active.
2286 * Posts a message through the channel. Objects listed in transfer are transferred, not just cloned, meaning that they are no longer usable on the sending side.
2288 * Throws a "DataCloneError" DOMException if transfer contains duplicate objects or port, or if message could not be cloned.
2290 postMessage(message: any, transfer: Transferable[]): void;
2291 postMessage(message: any, options?: PostMessageOptions): void;
2293 * Begins dispatching messages received on the port.
2296 addEventListener<K extends keyof MessagePortEventMap>(type: K, listener: (this: MessagePort, ev: MessagePortEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
2297 addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
2298 removeEventListener<K extends keyof MessagePortEventMap>(type: K, listener: (this: MessagePort, ev: MessagePortEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
2299 removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
2302 declare var MessagePort: {
2303 prototype: MessagePort;
2307 interface NavigationPreloadManager {
2308 disable(): Promise<void>;
2309 enable(): Promise<void>;
2310 getState(): Promise<NavigationPreloadState>;
2311 setHeaderValue(value: string): Promise<void>;
2314 declare var NavigationPreloadManager: {
2315 prototype: NavigationPreloadManager;
2316 new(): NavigationPreloadManager;
2319 interface NavigatorConcurrentHardware {
2320 readonly hardwareConcurrency: number;
2323 interface NavigatorID {
2324 readonly appCodeName: string;
2325 readonly appName: string;
2326 readonly appVersion: string;
2327 readonly platform: string;
2328 readonly product: string;
2329 readonly userAgent: string;
2332 interface NavigatorLanguage {
2333 readonly language: string;
2334 readonly languages: ReadonlyArray<string>;
2337 interface NavigatorOnLine {
2338 readonly onLine: boolean;
2341 interface NavigatorStorage {
2342 readonly storage: StorageManager;
2345 interface NotificationEventMap {
2352 /** This Notifications API interface is used to configure and display desktop notifications to the user. */
2353 interface Notification extends EventTarget {
2354 readonly actions: ReadonlyArray<NotificationAction>;
2355 readonly badge: string;
2356 readonly body: string;
2358 readonly dir: NotificationDirection;
2359 readonly icon: string;
2360 readonly image: string;
2361 readonly lang: string;
2362 onclick: ((this: Notification, ev: Event) => any) | null;
2363 onclose: ((this: Notification, ev: Event) => any) | null;
2364 onerror: ((this: Notification, ev: Event) => any) | null;
2365 onshow: ((this: Notification, ev: Event) => any) | null;
2366 readonly renotify: boolean;
2367 readonly requireInteraction: boolean;
2368 readonly silent: boolean;
2369 readonly tag: string;
2370 readonly timestamp: number;
2371 readonly title: string;
2372 readonly vibrate: ReadonlyArray<number>;
2374 addEventListener<K extends keyof NotificationEventMap>(type: K, listener: (this: Notification, ev: NotificationEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
2375 addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
2376 removeEventListener<K extends keyof NotificationEventMap>(type: K, listener: (this: Notification, ev: NotificationEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
2377 removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
2380 declare var Notification: {
2381 prototype: Notification;
2382 new(title: string, options?: NotificationOptions): Notification;
2383 readonly maxActions: number;
2384 readonly permission: NotificationPermission;
2387 /** The parameter passed into the onnotificationclick handler, the NotificationEvent interface represents a notification click event that is dispatched on the ServiceWorkerGlobalScope of a ServiceWorker. */
2388 interface NotificationEvent extends ExtendableEvent {
2389 readonly action: string;
2390 readonly notification: Notification;
2393 declare var NotificationEvent: {
2394 prototype: NotificationEvent;
2395 new(type: string, eventInitDict: NotificationEventInit): NotificationEvent;
2398 /** The OES_element_index_uint extension is part of the WebGL API and adds support for gl.UNSIGNED_INT types to WebGLRenderingContext.drawElements(). */
2399 interface OES_element_index_uint {
2402 /** The OES_standard_derivatives extension is part of the WebGL API and adds the GLSL derivative functions dFdx, dFdy, and fwidth. */
2403 interface OES_standard_derivatives {
2404 readonly FRAGMENT_SHADER_DERIVATIVE_HINT_OES: GLenum;
2407 /** The OES_texture_float extension is part of the WebGL API and exposes floating-point pixel types for textures. */
2408 interface OES_texture_float {
2411 /** The OES_texture_float_linear extension is part of the WebGL API and allows linear filtering with floating-point pixel types for textures. */
2412 interface OES_texture_float_linear {
2415 /** The OES_texture_half_float extension is part of the WebGL API and adds texture formats with 16- (aka half float) and 32-bit floating-point components. */
2416 interface OES_texture_half_float {
2417 readonly HALF_FLOAT_OES: GLenum;
2420 /** The OES_texture_half_float_linear extension is part of the WebGL API and allows linear filtering with half floating-point pixel types for textures. */
2421 interface OES_texture_half_float_linear {
2424 interface OES_vertex_array_object {
2425 bindVertexArrayOES(arrayObject: WebGLVertexArrayObjectOES | null): void;
2426 createVertexArrayOES(): WebGLVertexArrayObjectOES | null;
2427 deleteVertexArrayOES(arrayObject: WebGLVertexArrayObjectOES | null): void;
2428 isVertexArrayOES(arrayObject: WebGLVertexArrayObjectOES | null): GLboolean;
2429 readonly VERTEX_ARRAY_BINDING_OES: GLenum;
2432 interface OffscreenCanvas extends EventTarget {
2434 * These attributes return the dimensions of the OffscreenCanvas object's bitmap.
2436 * They can be set, to replace the bitmap with a new, transparent black bitmap of the specified dimensions (effectively resizing it).
2440 * These attributes return the dimensions of the OffscreenCanvas object's bitmap.
2442 * They can be set, to replace the bitmap with a new, transparent black bitmap of the specified dimensions (effectively resizing it).
2446 * Returns a promise that will fulfill with a new Blob object representing a file containing the image in the OffscreenCanvas object.
2448 * 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.
2450 convertToBlob(options?: ImageEncodeOptions): Promise<Blob>;
2452 * 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.
2454 * 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]
2456 * 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).
2458 getContext(contextId: "2d", options?: CanvasRenderingContext2DSettings): OffscreenCanvasRenderingContext2D | null;
2459 getContext(contextId: "bitmaprenderer", options?: ImageBitmapRenderingContextSettings): ImageBitmapRenderingContext | null;
2460 getContext(contextId: "webgl", options?: WebGLContextAttributes): WebGLRenderingContext | null;
2461 getContext(contextId: "webgl2", options?: WebGLContextAttributes): WebGL2RenderingContext | null;
2462 getContext(contextId: OffscreenRenderingContextId, options?: any): OffscreenRenderingContext | null;
2464 * 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.
2466 transferToImageBitmap(): ImageBitmap;
2469 declare var OffscreenCanvas: {
2470 prototype: OffscreenCanvas;
2471 new(width: number, height: number): OffscreenCanvas;
2474 interface OffscreenCanvasRenderingContext2D extends CanvasCompositing, CanvasDrawImage, CanvasDrawPath, CanvasFillStrokeStyles, CanvasFilters, CanvasImageData, CanvasImageSmoothing, CanvasPath, CanvasPathDrawingStyles, CanvasRect, CanvasShadowStyles, CanvasState, CanvasText, CanvasTextDrawingStyles, CanvasTransform {
2475 readonly canvas: OffscreenCanvas;
2479 declare var OffscreenCanvasRenderingContext2D: {
2480 prototype: OffscreenCanvasRenderingContext2D;
2481 new(): OffscreenCanvasRenderingContext2D;
2484 /** 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. */
2485 interface Path2D extends CanvasPath {
2487 * Adds to the path the path given by the argument.
2489 addPath(path: Path2D, transform?: DOMMatrix2DInit): void;
2492 declare var Path2D: {
2494 new(path?: Path2D | string): Path2D;
2497 interface PerformanceEventMap {
2498 "resourcetimingbufferfull": Event;
2501 /** 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. */
2502 interface Performance extends EventTarget {
2503 onresourcetimingbufferfull: ((this: Performance, ev: Event) => any) | null;
2504 readonly timeOrigin: number;
2505 clearMarks(markName?: string): void;
2506 clearMeasures(measureName?: string): void;
2507 clearResourceTimings(): void;
2508 getEntries(): PerformanceEntryList;
2509 getEntriesByName(name: string, type?: string): PerformanceEntryList;
2510 getEntriesByType(type: string): PerformanceEntryList;
2511 mark(markName: string): void;
2512 measure(measureName: string, startMark?: string, endMark?: string): void;
2514 setResourceTimingBufferSize(maxSize: number): void;
2516 addEventListener<K extends keyof PerformanceEventMap>(type: K, listener: (this: Performance, ev: PerformanceEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
2517 addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
2518 removeEventListener<K extends keyof PerformanceEventMap>(type: K, listener: (this: Performance, ev: PerformanceEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
2519 removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
2522 declare var Performance: {
2523 prototype: Performance;
2527 /** 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). */
2528 interface PerformanceEntry {
2529 readonly duration: number;
2530 readonly entryType: string;
2531 readonly name: string;
2532 readonly startTime: number;
2536 declare var PerformanceEntry: {
2537 prototype: PerformanceEntry;
2538 new(): PerformanceEntry;
2541 /** 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. */
2542 interface PerformanceMark extends PerformanceEntry {
2545 declare var PerformanceMark: {
2546 prototype: PerformanceMark;
2547 new(): PerformanceMark;
2550 /** 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. */
2551 interface PerformanceMeasure extends PerformanceEntry {
2554 declare var PerformanceMeasure: {
2555 prototype: PerformanceMeasure;
2556 new(): PerformanceMeasure;
2559 interface PerformanceObserver {
2561 observe(options?: PerformanceObserverInit): void;
2562 takeRecords(): PerformanceEntryList;
2565 declare var PerformanceObserver: {
2566 prototype: PerformanceObserver;
2567 new(callback: PerformanceObserverCallback): PerformanceObserver;
2568 readonly supportedEntryTypes: ReadonlyArray<string>;
2571 interface PerformanceObserverEntryList {
2572 getEntries(): PerformanceEntryList;
2573 getEntriesByName(name: string, type?: string): PerformanceEntryList;
2574 getEntriesByType(type: string): PerformanceEntryList;
2577 declare var PerformanceObserverEntryList: {
2578 prototype: PerformanceObserverEntryList;
2579 new(): PerformanceObserverEntryList;
2582 /** 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. */
2583 interface PerformanceResourceTiming extends PerformanceEntry {
2584 readonly connectEnd: number;
2585 readonly connectStart: number;
2586 readonly decodedBodySize: number;
2587 readonly domainLookupEnd: number;
2588 readonly domainLookupStart: number;
2589 readonly encodedBodySize: number;
2590 readonly fetchStart: number;
2591 readonly initiatorType: string;
2592 readonly nextHopProtocol: string;
2593 readonly redirectEnd: number;
2594 readonly redirectStart: number;
2595 readonly requestStart: number;
2596 readonly responseEnd: number;
2597 readonly responseStart: number;
2598 readonly secureConnectionStart: number;
2599 readonly transferSize: number;
2600 readonly workerStart: number;
2604 declare var PerformanceResourceTiming: {
2605 prototype: PerformanceResourceTiming;
2606 new(): PerformanceResourceTiming;
2609 interface PermissionStatusEventMap {
2613 interface PermissionStatus extends EventTarget {
2614 onchange: ((this: PermissionStatus, ev: Event) => any) | null;
2615 readonly state: PermissionState;
2616 addEventListener<K extends keyof PermissionStatusEventMap>(type: K, listener: (this: PermissionStatus, ev: PermissionStatusEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
2617 addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
2618 removeEventListener<K extends keyof PermissionStatusEventMap>(type: K, listener: (this: PermissionStatus, ev: PermissionStatusEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
2619 removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
2622 declare var PermissionStatus: {
2623 prototype: PermissionStatus;
2624 new(): PermissionStatus;
2627 interface Permissions {
2628 query(permissionDesc: PermissionDescriptor | DevicePermissionDescriptor | MidiPermissionDescriptor | PushPermissionDescriptor): Promise<PermissionStatus>;
2631 declare var Permissions: {
2632 prototype: Permissions;
2636 /** Events measuring progress of an underlying process, like an HTTP request (for an XMLHttpRequest, or the loading of the underlying resource of an <img>, <audio>, <video>, <style> or <link>). */
2637 interface ProgressEvent<T extends EventTarget = EventTarget> extends Event {
2638 readonly lengthComputable: boolean;
2639 readonly loaded: number;
2640 readonly target: T | null;
2641 readonly total: number;
2644 declare var ProgressEvent: {
2645 prototype: ProgressEvent;
2646 new(type: string, eventInitDict?: ProgressEventInit): ProgressEvent;
2649 interface PromiseRejectionEvent extends Event {
2650 readonly promise: Promise<any>;
2651 readonly reason: any;
2654 declare var PromiseRejectionEvent: {
2655 prototype: PromiseRejectionEvent;
2656 new(type: string, eventInitDict: PromiseRejectionEventInit): PromiseRejectionEvent;
2659 /** This Push API interface represents a push message that has been received. This event is sent to the global scope of a ServiceWorker. It contains the information sent from an application server to a PushSubscription. */
2660 interface PushEvent extends ExtendableEvent {
2661 readonly data: PushMessageData | null;
2664 declare var PushEvent: {
2665 prototype: PushEvent;
2666 new(type: string, eventInitDict?: PushEventInit): PushEvent;
2669 /** This Push API interface provides a way to receive notifications from third-party servers as well as request URLs for push notifications. */
2670 interface PushManager {
2671 getSubscription(): Promise<PushSubscription | null>;
2672 permissionState(options?: PushSubscriptionOptionsInit): Promise<PushPermissionState>;
2673 subscribe(options?: PushSubscriptionOptionsInit): Promise<PushSubscription>;
2676 declare var PushManager: {
2677 prototype: PushManager;
2679 readonly supportedContentEncodings: ReadonlyArray<string>;
2682 /** This Push API interface provides methods which let you retrieve the push data sent by a server in various formats. */
2683 interface PushMessageData {
2684 arrayBuffer(): ArrayBuffer;
2690 declare var PushMessageData: {
2691 prototype: PushMessageData;
2692 new(): PushMessageData;
2695 /** This Push API interface provides a subcription's URL endpoint and allows unsubscription from a push service. */
2696 interface PushSubscription {
2697 readonly endpoint: string;
2698 readonly expirationTime: number | null;
2699 readonly options: PushSubscriptionOptions;
2700 getKey(name: PushEncryptionKeyName): ArrayBuffer | null;
2701 toJSON(): PushSubscriptionJSON;
2702 unsubscribe(): Promise<boolean>;
2705 declare var PushSubscription: {
2706 prototype: PushSubscription;
2707 new(): PushSubscription;
2710 interface PushSubscriptionChangeEvent extends ExtendableEvent {
2711 readonly newSubscription: PushSubscription | null;
2712 readonly oldSubscription: PushSubscription | null;
2715 declare var PushSubscriptionChangeEvent: {
2716 prototype: PushSubscriptionChangeEvent;
2717 new(type: string, eventInitDict?: PushSubscriptionChangeEventInit): PushSubscriptionChangeEvent;
2720 interface PushSubscriptionOptions {
2721 readonly applicationServerKey: ArrayBuffer | null;
2722 readonly userVisibleOnly: boolean;
2725 declare var PushSubscriptionOptions: {
2726 prototype: PushSubscriptionOptions;
2727 new(): PushSubscriptionOptions;
2730 interface ReadableByteStreamController {
2731 readonly byobRequest: ReadableStreamBYOBRequest | undefined;
2732 readonly desiredSize: number | null;
2734 enqueue(chunk: ArrayBufferView): void;
2735 error(error?: any): void;
2738 declare var ReadableByteStreamController: {
2739 prototype: ReadableByteStreamController;
2740 new(): ReadableByteStreamController;
2743 /** This Streams API interface represents a readable stream of byte data. The Fetch API offers a concrete instance of a ReadableStream through the body property of a Response object. */
2744 interface ReadableStream<R = any> {
2745 readonly locked: boolean;
2746 cancel(reason?: any): Promise<void>;
2747 getReader(options: { mode: "byob" }): ReadableStreamBYOBReader;
2748 getReader(): ReadableStreamDefaultReader<R>;
2749 pipeThrough<T>({ writable, readable }: { writable: WritableStream<R>, readable: ReadableStream<T> }, options?: PipeOptions): ReadableStream<T>;
2750 pipeTo(dest: WritableStream<R>, options?: PipeOptions): Promise<void>;
2751 tee(): [ReadableStream<R>, ReadableStream<R>];
2754 declare var ReadableStream: {
2755 prototype: ReadableStream;
2756 new(underlyingSource: UnderlyingByteSource, strategy?: { highWaterMark?: number, size?: undefined }): ReadableStream<Uint8Array>;
2757 new<R = any>(underlyingSource?: UnderlyingSource<R>, strategy?: QueuingStrategy<R>): ReadableStream<R>;
2760 interface ReadableStreamBYOBReader {
2761 readonly closed: Promise<void>;
2762 cancel(reason?: any): Promise<void>;
2763 read<T extends ArrayBufferView>(view: T): Promise<ReadableStreamReadResult<T>>;
2764 releaseLock(): void;
2767 declare var ReadableStreamBYOBReader: {
2768 prototype: ReadableStreamBYOBReader;
2769 new(): ReadableStreamBYOBReader;
2772 interface ReadableStreamBYOBRequest {
2773 readonly view: ArrayBufferView;
2774 respond(bytesWritten: number): void;
2775 respondWithNewView(view: ArrayBufferView): void;
2778 declare var ReadableStreamBYOBRequest: {
2779 prototype: ReadableStreamBYOBRequest;
2780 new(): ReadableStreamBYOBRequest;
2783 interface ReadableStreamDefaultController<R = any> {
2784 readonly desiredSize: number | null;
2786 enqueue(chunk: R): void;
2787 error(error?: any): void;
2790 declare var ReadableStreamDefaultController: {
2791 prototype: ReadableStreamDefaultController;
2792 new(): ReadableStreamDefaultController;
2795 interface ReadableStreamDefaultReader<R = any> {
2796 readonly closed: Promise<void>;
2797 cancel(reason?: any): Promise<void>;
2798 read(): Promise<ReadableStreamReadResult<R>>;
2799 releaseLock(): void;
2802 declare var ReadableStreamDefaultReader: {
2803 prototype: ReadableStreamDefaultReader;
2804 new(): ReadableStreamDefaultReader;
2807 interface ReadableStreamReader<R = any> {
2808 cancel(): Promise<void>;
2809 read(): Promise<ReadableStreamReadResult<R>>;
2810 releaseLock(): void;
2813 declare var ReadableStreamReader: {
2814 prototype: ReadableStreamReader;
2815 new(): ReadableStreamReader;
2818 /** This Fetch API interface represents a resource request. */
2819 interface Request extends Body {
2821 * Returns the cache mode associated with request, which is a string indicating how the request will interact with the browser's cache when fetching.
2823 readonly cache: RequestCache;
2825 * Returns the credentials mode associated with request, which is a string indicating whether credentials will be sent with the request always, never, or only when sent to a same-origin URL.
2827 readonly credentials: RequestCredentials;
2829 * Returns the kind of resource requested by request, e.g., "document" or "script".
2831 readonly destination: RequestDestination;
2833 * Returns a Headers object consisting of the headers associated with request. Note that headers added in the network layer by the user agent will not be accounted for in this object, e.g., the "Host" header.
2835 readonly headers: Headers;
2837 * Returns request's subresource integrity metadata, which is a cryptographic hash of the resource being fetched. Its value consists of multiple hashes separated by whitespace. [SRI]
2839 readonly integrity: string;
2841 * Returns a boolean indicating whether or not request is for a history navigation (a.k.a. back-foward navigation).
2843 readonly isHistoryNavigation: boolean;
2845 * Returns a boolean indicating whether or not request is for a reload navigation.
2847 readonly isReloadNavigation: boolean;
2849 * Returns a boolean indicating whether or not request can outlive the global in which it was created.
2851 readonly keepalive: boolean;
2853 * Returns request's HTTP method, which is "GET" by default.
2855 readonly method: string;
2857 * Returns the mode associated with request, which is a string indicating whether the request will use CORS, or will be restricted to same-origin URLs.
2859 readonly mode: RequestMode;
2861 * Returns the redirect mode associated with request, which is a string indicating how redirects for the request will be handled during fetching. A request will follow redirects by default.
2863 readonly redirect: RequestRedirect;
2865 * Returns the referrer of request. Its value can be a same-origin URL if explicitly set in init, the empty string to indicate no referrer, and "about:client" when defaulting to the global's default. This is used during fetching to determine the value of the `Referer` header of the request being made.
2867 readonly referrer: string;
2869 * Returns the referrer policy associated with request. This is used during fetching to compute the value of the request's referrer.
2871 readonly referrerPolicy: ReferrerPolicy;
2873 * Returns the signal associated with request, which is an AbortSignal object indicating whether or not request has been aborted, and its abort event handler.
2875 readonly signal: AbortSignal;
2877 * Returns the URL of request as a string.
2879 readonly url: string;
2883 declare var Request: {
2885 new(input: RequestInfo, init?: RequestInit): Request;
2888 /** This Fetch API interface represents the response to a request. */
2889 interface Response extends Body {
2890 readonly headers: Headers;
2891 readonly ok: boolean;
2892 readonly redirected: boolean;
2893 readonly status: number;
2894 readonly statusText: string;
2895 readonly trailer: Promise<Headers>;
2896 readonly type: ResponseType;
2897 readonly url: string;
2901 declare var Response: {
2902 prototype: Response;
2903 new(body?: BodyInit | null, init?: ResponseInit): Response;
2905 redirect(url: string, status?: number): Response;
2908 interface ServiceWorkerEventMap extends AbstractWorkerEventMap {
2909 "statechange": Event;
2912 /** This ServiceWorker API interface provides a reference to a service worker. Multiple browsing contexts (e.g. pages, workers, etc.) can be associated with the same service worker, each through a unique ServiceWorker object. */
2913 interface ServiceWorker extends EventTarget, AbstractWorker {
2914 onstatechange: ((this: ServiceWorker, ev: Event) => any) | null;
2915 readonly scriptURL: string;
2916 readonly state: ServiceWorkerState;
2917 postMessage(message: any, transfer: Transferable[]): void;
2918 postMessage(message: any, options?: PostMessageOptions): void;
2919 addEventListener<K extends keyof ServiceWorkerEventMap>(type: K, listener: (this: ServiceWorker, ev: ServiceWorkerEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
2920 addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
2921 removeEventListener<K extends keyof ServiceWorkerEventMap>(type: K, listener: (this: ServiceWorker, ev: ServiceWorkerEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
2922 removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
2925 declare var ServiceWorker: {
2926 prototype: ServiceWorker;
2927 new(): ServiceWorker;
2930 interface ServiceWorkerContainerEventMap {
2931 "controllerchange": Event;
2932 "message": MessageEvent;
2933 "messageerror": MessageEvent;
2936 /** The ServiceWorkerContainer interface of the ServiceWorker API provides an object representing the service worker as an overall unit in the network ecosystem, including facilities to register, unregister and update service workers, and access the state of service workers and their registrations. */
2937 interface ServiceWorkerContainer extends EventTarget {
2938 readonly controller: ServiceWorker | null;
2939 oncontrollerchange: ((this: ServiceWorkerContainer, ev: Event) => any) | null;
2940 onmessage: ((this: ServiceWorkerContainer, ev: MessageEvent) => any) | null;
2941 onmessageerror: ((this: ServiceWorkerContainer, ev: MessageEvent) => any) | null;
2942 readonly ready: Promise<ServiceWorkerRegistration>;
2943 getRegistration(clientURL?: string): Promise<ServiceWorkerRegistration | undefined>;
2944 getRegistrations(): Promise<ReadonlyArray<ServiceWorkerRegistration>>;
2945 register(scriptURL: string, options?: RegistrationOptions): Promise<ServiceWorkerRegistration>;
2946 startMessages(): void;
2947 addEventListener<K extends keyof ServiceWorkerContainerEventMap>(type: K, listener: (this: ServiceWorkerContainer, ev: ServiceWorkerContainerEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
2948 addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
2949 removeEventListener<K extends keyof ServiceWorkerContainerEventMap>(type: K, listener: (this: ServiceWorkerContainer, ev: ServiceWorkerContainerEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
2950 removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
2953 declare var ServiceWorkerContainer: {
2954 prototype: ServiceWorkerContainer;
2955 new(): ServiceWorkerContainer;
2958 interface ServiceWorkerGlobalScopeEventMap extends WorkerGlobalScopeEventMap {
2959 "activate": ExtendableEvent;
2960 "fetch": FetchEvent;
2961 "install": ExtendableEvent;
2962 "message": ExtendableMessageEvent;
2963 "messageerror": MessageEvent;
2964 "notificationclick": NotificationEvent;
2965 "notificationclose": NotificationEvent;
2967 "pushsubscriptionchange": PushSubscriptionChangeEvent;
2971 /** This ServiceWorker API interface represents the global execution context of a service worker. */
2972 interface ServiceWorkerGlobalScope extends WorkerGlobalScope {
2973 readonly clients: Clients;
2974 onactivate: ((this: ServiceWorkerGlobalScope, ev: ExtendableEvent) => any) | null;
2975 onfetch: ((this: ServiceWorkerGlobalScope, ev: FetchEvent) => any) | null;
2976 oninstall: ((this: ServiceWorkerGlobalScope, ev: ExtendableEvent) => any) | null;
2977 onmessage: ((this: ServiceWorkerGlobalScope, ev: ExtendableMessageEvent) => any) | null;
2978 onmessageerror: ((this: ServiceWorkerGlobalScope, ev: MessageEvent) => any) | null;
2979 onnotificationclick: ((this: ServiceWorkerGlobalScope, ev: NotificationEvent) => any) | null;
2980 onnotificationclose: ((this: ServiceWorkerGlobalScope, ev: NotificationEvent) => any) | null;
2981 onpush: ((this: ServiceWorkerGlobalScope, ev: PushEvent) => any) | null;
2982 onpushsubscriptionchange: ((this: ServiceWorkerGlobalScope, ev: PushSubscriptionChangeEvent) => any) | null;
2983 onsync: ((this: ServiceWorkerGlobalScope, ev: SyncEvent) => any) | null;
2984 readonly registration: ServiceWorkerRegistration;
2985 readonly serviceWorker: ServiceWorker;
2986 skipWaiting(): Promise<void>;
2987 addEventListener<K extends keyof ServiceWorkerGlobalScopeEventMap>(type: K, listener: (this: ServiceWorkerGlobalScope, ev: ServiceWorkerGlobalScopeEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
2988 addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
2989 removeEventListener<K extends keyof ServiceWorkerGlobalScopeEventMap>(type: K, listener: (this: ServiceWorkerGlobalScope, ev: ServiceWorkerGlobalScopeEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
2990 removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
2993 declare var ServiceWorkerGlobalScope: {
2994 prototype: ServiceWorkerGlobalScope;
2995 new(): ServiceWorkerGlobalScope;
2998 interface ServiceWorkerRegistrationEventMap {
2999 "updatefound": Event;
3002 /** This ServiceWorker API interface represents the service worker registration. You register a service worker to control one or more pages that share the same origin. */
3003 interface ServiceWorkerRegistration extends EventTarget {
3004 readonly active: ServiceWorker | null;
3005 readonly installing: ServiceWorker | null;
3006 readonly navigationPreload: NavigationPreloadManager;
3007 onupdatefound: ((this: ServiceWorkerRegistration, ev: Event) => any) | null;
3008 readonly pushManager: PushManager;
3009 readonly scope: string;
3010 readonly sync: SyncManager;
3011 readonly updateViaCache: ServiceWorkerUpdateViaCache;
3012 readonly waiting: ServiceWorker | null;
3013 getNotifications(filter?: GetNotificationOptions): Promise<Notification[]>;
3014 showNotification(title: string, options?: NotificationOptions): Promise<void>;
3015 unregister(): Promise<boolean>;
3016 update(): Promise<void>;
3017 addEventListener<K extends keyof ServiceWorkerRegistrationEventMap>(type: K, listener: (this: ServiceWorkerRegistration, ev: ServiceWorkerRegistrationEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
3018 addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
3019 removeEventListener<K extends keyof ServiceWorkerRegistrationEventMap>(type: K, listener: (this: ServiceWorkerRegistration, ev: ServiceWorkerRegistrationEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
3020 removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
3023 declare var ServiceWorkerRegistration: {
3024 prototype: ServiceWorkerRegistration;
3025 new(): ServiceWorkerRegistration;
3028 interface SharedWorker extends EventTarget, AbstractWorker {
3030 * Returns sharedWorker's MessagePort object which can be used to communicate with the global environment.
3032 readonly port: MessagePort;
3033 addEventListener<K extends keyof AbstractWorkerEventMap>(type: K, listener: (this: SharedWorker, ev: AbstractWorkerEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
3034 addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
3035 removeEventListener<K extends keyof AbstractWorkerEventMap>(type: K, listener: (this: SharedWorker, ev: AbstractWorkerEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
3036 removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
3039 declare var SharedWorker: {
3040 prototype: SharedWorker;
3041 new(scriptURL: string, options?: string | WorkerOptions): SharedWorker;
3044 interface SharedWorkerGlobalScopeEventMap extends WorkerGlobalScopeEventMap {
3045 "connect": MessageEvent;
3048 interface SharedWorkerGlobalScope extends WorkerGlobalScope {
3050 * Returns sharedWorkerGlobal's name, i.e. the value given to the SharedWorker constructor. Multiple SharedWorker objects can correspond to the same shared worker (and SharedWorkerGlobalScope), by reusing the same name.
3052 readonly name: string;
3053 onconnect: ((this: SharedWorkerGlobalScope, ev: MessageEvent) => any) | null;
3055 * Aborts sharedWorkerGlobal.
3058 addEventListener<K extends keyof SharedWorkerGlobalScopeEventMap>(type: K, listener: (this: SharedWorkerGlobalScope, ev: SharedWorkerGlobalScopeEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
3059 addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
3060 removeEventListener<K extends keyof SharedWorkerGlobalScopeEventMap>(type: K, listener: (this: SharedWorkerGlobalScope, ev: SharedWorkerGlobalScopeEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
3061 removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
3064 declare var SharedWorkerGlobalScope: {
3065 prototype: SharedWorkerGlobalScope;
3066 new(): SharedWorkerGlobalScope;
3069 interface StorageManager {
3070 estimate(): Promise<StorageEstimate>;
3071 persisted(): Promise<boolean>;
3074 declare var StorageManager: {
3075 prototype: StorageManager;
3076 new(): StorageManager;
3079 /** 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). */
3080 interface SubtleCrypto {
3081 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>;
3082 deriveBits(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | DhKeyDeriveParams | ConcatParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, length: number): Promise<ArrayBuffer>;
3083 deriveKey(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | DhKeyDeriveParams | ConcatParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, derivedKeyType: string | AesDerivedKeyParams | HmacImportParams | ConcatParams | HkdfParams | Pbkdf2Params, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey>;
3084 digest(algorithm: AlgorithmIdentifier, data: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer): Promise<ArrayBuffer>;
3085 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>;
3086 exportKey(format: "jwk", key: CryptoKey): Promise<JsonWebKey>;
3087 exportKey(format: "raw" | "pkcs8" | "spki", key: CryptoKey): Promise<ArrayBuffer>;
3088 exportKey(format: string, key: CryptoKey): Promise<JsonWebKey | ArrayBuffer>;
3089 generateKey(algorithm: RsaHashedKeyGenParams | EcKeyGenParams | DhKeyGenParams, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKeyPair>;
3090 generateKey(algorithm: AesKeyGenParams | HmacKeyGenParams | Pbkdf2Params, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey>;
3091 generateKey(algorithm: AlgorithmIdentifier, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKeyPair | CryptoKey>;
3092 importKey(format: "jwk", keyData: JsonWebKey, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | DhImportKeyParams | AesKeyAlgorithm, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey>;
3093 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>;
3094 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>;
3095 sign(algorithm: AlgorithmIdentifier | RsaPssParams | EcdsaParams | AesCmacParams, key: CryptoKey, data: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer): Promise<ArrayBuffer>;
3096 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>;
3097 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>;
3098 wrapKey(format: "raw" | "pkcs8" | "spki" | "jwk" | string, key: CryptoKey, wrappingKey: CryptoKey, wrapAlgorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesCmacParams | AesGcmParams | AesCfbParams): Promise<ArrayBuffer>;
3101 declare var SubtleCrypto: {
3102 prototype: SubtleCrypto;
3103 new(): SubtleCrypto;
3106 /** A sync action that is dispatched on the ServiceWorkerGlobalScope of a ServiceWorker. */
3107 interface SyncEvent extends ExtendableEvent {
3108 readonly lastChance: boolean;
3109 readonly tag: string;
3112 declare var SyncEvent: {
3113 prototype: SyncEvent;
3114 new(type: string, init: SyncEventInit): SyncEvent;
3117 /** This ServiceWorker API interface provides an interface for registering and listing sync registrations. */
3118 interface SyncManager {
3119 getTags(): Promise<string[]>;
3120 register(tag: string): Promise<void>;
3123 declare var SyncManager: {
3124 prototype: SyncManager;
3128 /** 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. */
3129 interface TextDecoder extends TextDecoderCommon {
3131 * Returns the result of running encoding's decoder. The method can be invoked zero or more times with options's stream set to true, and then once without options's stream (or set to false), to process a fragmented stream. If the invocation without options's stream (or set to false) has no input, it's clearest to omit both arguments.
3134 * var string = "", decoder = new TextDecoder(encoding), buffer;
3135 * while(buffer = next_chunk()) {
3136 * string += decoder.decode(buffer, {stream:true});
3138 * string += decoder.decode(); // end-of-stream
3141 * If the error mode is "fatal" and encoding's decoder returns error, throws a TypeError.
3143 decode(input?: BufferSource, options?: TextDecodeOptions): string;
3146 declare var TextDecoder: {
3147 prototype: TextDecoder;
3148 new(label?: string, options?: TextDecoderOptions): TextDecoder;
3151 interface TextDecoderCommon {
3153 * Returns encoding's name, lowercased.
3155 readonly encoding: string;
3157 * Returns true if error mode is "fatal", and false otherwise.
3159 readonly fatal: boolean;
3161 * Returns true if ignore BOM flag is set, and false otherwise.
3163 readonly ignoreBOM: boolean;
3166 interface TextDecoderStream extends GenericTransformStream, TextDecoderCommon {
3167 readonly readable: ReadableStream<string>;
3168 readonly writable: WritableStream<BufferSource>;
3171 declare var TextDecoderStream: {
3172 prototype: TextDecoderStream;
3173 new(label?: string, options?: TextDecoderOptions): TextDecoderStream;
3176 /** TextEncoder takes a stream of code points as input and emits a stream of bytes. For a more scalable, non-native library, see StringView – a C-like representation of strings based on typed arrays. */
3177 interface TextEncoder extends TextEncoderCommon {
3179 * Returns the result of running UTF-8's encoder.
3181 encode(input?: string): Uint8Array;
3183 * Runs the UTF-8 encoder on source, stores the result of that operation into destination, and returns the progress made as a dictionary whereby read is the number of converted code units of source and written is the number of bytes modified in destination.
3185 encodeInto(source: string, destination: Uint8Array): TextEncoderEncodeIntoResult;
3188 declare var TextEncoder: {
3189 prototype: TextEncoder;
3193 interface TextEncoderCommon {
3197 readonly encoding: string;
3200 interface TextEncoderStream extends GenericTransformStream, TextEncoderCommon {
3201 readonly readable: ReadableStream<Uint8Array>;
3202 readonly writable: WritableStream<string>;
3205 declare var TextEncoderStream: {
3206 prototype: TextEncoderStream;
3207 new(): TextEncoderStream;
3210 /** The dimensions of a piece of text in the canvas, as created by the CanvasRenderingContext2D.measureText() method. */
3211 interface TextMetrics {
3213 * Returns the measurement described below.
3215 readonly actualBoundingBoxAscent: number;
3217 * Returns the measurement described below.
3219 readonly actualBoundingBoxDescent: number;
3221 * Returns the measurement described below.
3223 readonly actualBoundingBoxLeft: number;
3225 * Returns the measurement described below.
3227 readonly actualBoundingBoxRight: number;
3229 * Returns the measurement described below.
3231 readonly alphabeticBaseline: number;
3233 * Returns the measurement described below.
3235 readonly emHeightAscent: number;
3237 * Returns the measurement described below.
3239 readonly emHeightDescent: number;
3241 * Returns the measurement described below.
3243 readonly fontBoundingBoxAscent: number;
3245 * Returns the measurement described below.
3247 readonly fontBoundingBoxDescent: number;
3249 * Returns the measurement described below.
3251 readonly hangingBaseline: number;
3253 * Returns the measurement described below.
3255 readonly ideographicBaseline: number;
3257 * Returns the measurement described below.
3259 readonly width: number;
3262 declare var TextMetrics: {
3263 prototype: TextMetrics;
3267 interface TransformStream<I = any, O = any> {
3268 readonly readable: ReadableStream<O>;
3269 readonly writable: WritableStream<I>;
3272 declare var TransformStream: {
3273 prototype: TransformStream;
3274 new<I = any, O = any>(transformer?: Transformer<I, O>, writableStrategy?: QueuingStrategy<I>, readableStrategy?: QueuingStrategy<O>): TransformStream<I, O>;
3277 interface TransformStreamDefaultController<O = any> {
3278 readonly desiredSize: number | null;
3279 enqueue(chunk: O): void;
3280 error(reason?: any): void;
3284 declare var TransformStreamDefaultController: {
3285 prototype: TransformStreamDefaultController;
3286 new(): TransformStreamDefaultController;
3289 /** The URLÂ interface represents an object providing static methods used for creating object URLs. */
3296 readonly origin: string;
3302 readonly searchParams: URLSearchParams;
3309 new(url: string, base?: string | URL): URL;
3310 createObjectURL(object: any): string;
3311 revokeObjectURL(url: string): void;
3314 interface URLSearchParams {
3316 * Appends a specified key/value pair as a new search parameter.
3318 append(name: string, value: string): void;
3320 * Deletes the given search parameter, and its associated value, from the list of all search parameters.
3322 delete(name: string): void;
3324 * Returns the first value associated to the given search parameter.
3326 get(name: string): string | null;
3328 * Returns all the values association with a given search parameter.
3330 getAll(name: string): string[];
3332 * Returns a Boolean indicating if such a search parameter exists.
3334 has(name: string): boolean;
3336 * Sets the value associated to a given search parameter to the given value. If there were several values, delete the others.
3338 set(name: string, value: string): void;
3341 * Returns a string containing a query string suitable for use in a URL. Does not include the question mark.
3344 forEach(callbackfn: (value: string, key: string, parent: URLSearchParams) => void, thisArg?: any): void;
3347 declare var URLSearchParams: {
3348 prototype: URLSearchParams;
3349 new(init?: string[][] | Record<string, string> | string | URLSearchParams): URLSearchParams;
3353 interface WEBGL_color_buffer_float {
3354 readonly FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT: GLenum;
3355 readonly RGBA32F_EXT: GLenum;
3356 readonly UNSIGNED_NORMALIZED_EXT: GLenum;
3359 interface WEBGL_compressed_texture_astc {
3360 getSupportedProfiles(): string[];
3361 readonly COMPRESSED_RGBA_ASTC_10x10_KHR: GLenum;
3362 readonly COMPRESSED_RGBA_ASTC_10x5_KHR: GLenum;
3363 readonly COMPRESSED_RGBA_ASTC_10x6_KHR: GLenum;
3364 readonly COMPRESSED_RGBA_ASTC_10x8_KHR: GLenum;
3365 readonly COMPRESSED_RGBA_ASTC_12x10_KHR: GLenum;
3366 readonly COMPRESSED_RGBA_ASTC_12x12_KHR: GLenum;
3367 readonly COMPRESSED_RGBA_ASTC_4x4_KHR: GLenum;
3368 readonly COMPRESSED_RGBA_ASTC_5x4_KHR: GLenum;
3369 readonly COMPRESSED_RGBA_ASTC_5x5_KHR: GLenum;
3370 readonly COMPRESSED_RGBA_ASTC_6x5_KHR: GLenum;
3371 readonly COMPRESSED_RGBA_ASTC_6x6_KHR: GLenum;
3372 readonly COMPRESSED_RGBA_ASTC_8x5_KHR: GLenum;
3373 readonly COMPRESSED_RGBA_ASTC_8x6_KHR: GLenum;
3374 readonly COMPRESSED_RGBA_ASTC_8x8_KHR: GLenum;
3375 readonly COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR: GLenum;
3376 readonly COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR: GLenum;
3377 readonly COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR: GLenum;
3378 readonly COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR: GLenum;
3379 readonly COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR: GLenum;
3380 readonly COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR: GLenum;
3381 readonly COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR: GLenum;
3382 readonly COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR: GLenum;
3383 readonly COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR: GLenum;
3384 readonly COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR: GLenum;
3385 readonly COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR: GLenum;
3386 readonly COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR: GLenum;
3387 readonly COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR: GLenum;
3388 readonly COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR: GLenum;
3391 /** The WEBGL_compressed_texture_s3tc extension is part of the WebGL API and exposes four S3TC compressed texture formats. */
3392 interface WEBGL_compressed_texture_s3tc {
3393 readonly COMPRESSED_RGBA_S3TC_DXT1_EXT: GLenum;
3394 readonly COMPRESSED_RGBA_S3TC_DXT3_EXT: GLenum;
3395 readonly COMPRESSED_RGBA_S3TC_DXT5_EXT: GLenum;
3396 readonly COMPRESSED_RGB_S3TC_DXT1_EXT: GLenum;
3399 interface WEBGL_compressed_texture_s3tc_srgb {
3400 readonly COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT: GLenum;
3401 readonly COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT: GLenum;
3402 readonly COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT: GLenum;
3403 readonly COMPRESSED_SRGB_S3TC_DXT1_EXT: GLenum;
3406 /** The WEBGL_debug_renderer_info extension is part of the WebGL API and exposes two constants with information about the graphics driver for debugging purposes. */
3407 interface WEBGL_debug_renderer_info {
3408 readonly UNMASKED_RENDERER_WEBGL: GLenum;
3409 readonly UNMASKED_VENDOR_WEBGL: GLenum;
3412 interface WEBGL_debug_shaders {
3413 getTranslatedShaderSource(shader: WebGLShader): string;
3416 /** The WEBGL_depth_texture extension is part of the WebGL API and defines 2D depth and depth-stencil textures. */
3417 interface WEBGL_depth_texture {
3418 readonly UNSIGNED_INT_24_8_WEBGL: GLenum;
3421 interface WEBGL_draw_buffers {
3422 drawBuffersWEBGL(buffers: GLenum[]): void;
3423 readonly COLOR_ATTACHMENT0_WEBGL: GLenum;
3424 readonly COLOR_ATTACHMENT10_WEBGL: GLenum;
3425 readonly COLOR_ATTACHMENT11_WEBGL: GLenum;
3426 readonly COLOR_ATTACHMENT12_WEBGL: GLenum;
3427 readonly COLOR_ATTACHMENT13_WEBGL: GLenum;
3428 readonly COLOR_ATTACHMENT14_WEBGL: GLenum;
3429 readonly COLOR_ATTACHMENT15_WEBGL: GLenum;
3430 readonly COLOR_ATTACHMENT1_WEBGL: GLenum;
3431 readonly COLOR_ATTACHMENT2_WEBGL: GLenum;
3432 readonly COLOR_ATTACHMENT3_WEBGL: GLenum;
3433 readonly COLOR_ATTACHMENT4_WEBGL: GLenum;
3434 readonly COLOR_ATTACHMENT5_WEBGL: GLenum;
3435 readonly COLOR_ATTACHMENT6_WEBGL: GLenum;
3436 readonly COLOR_ATTACHMENT7_WEBGL: GLenum;
3437 readonly COLOR_ATTACHMENT8_WEBGL: GLenum;
3438 readonly COLOR_ATTACHMENT9_WEBGL: GLenum;
3439 readonly DRAW_BUFFER0_WEBGL: GLenum;
3440 readonly DRAW_BUFFER10_WEBGL: GLenum;
3441 readonly DRAW_BUFFER11_WEBGL: GLenum;
3442 readonly DRAW_BUFFER12_WEBGL: GLenum;
3443 readonly DRAW_BUFFER13_WEBGL: GLenum;
3444 readonly DRAW_BUFFER14_WEBGL: GLenum;
3445 readonly DRAW_BUFFER15_WEBGL: GLenum;
3446 readonly DRAW_BUFFER1_WEBGL: GLenum;
3447 readonly DRAW_BUFFER2_WEBGL: GLenum;
3448 readonly DRAW_BUFFER3_WEBGL: GLenum;
3449 readonly DRAW_BUFFER4_WEBGL: GLenum;
3450 readonly DRAW_BUFFER5_WEBGL: GLenum;
3451 readonly DRAW_BUFFER6_WEBGL: GLenum;
3452 readonly DRAW_BUFFER7_WEBGL: GLenum;
3453 readonly DRAW_BUFFER8_WEBGL: GLenum;
3454 readonly DRAW_BUFFER9_WEBGL: GLenum;
3455 readonly MAX_COLOR_ATTACHMENTS_WEBGL: GLenum;
3456 readonly MAX_DRAW_BUFFERS_WEBGL: GLenum;
3459 interface WEBGL_lose_context {
3460 loseContext(): void;
3461 restoreContext(): void;
3464 interface WebGL2RenderingContext extends WebGL2RenderingContextBase, WebGL2RenderingContextOverloads, WebGLRenderingContextBase {
3467 declare var WebGL2RenderingContext: {
3468 prototype: WebGL2RenderingContext;
3469 new(): WebGL2RenderingContext;
3470 readonly ACTIVE_ATTRIBUTES: GLenum;
3471 readonly ACTIVE_TEXTURE: GLenum;
3472 readonly ACTIVE_UNIFORMS: GLenum;
3473 readonly ALIASED_LINE_WIDTH_RANGE: GLenum;
3474 readonly ALIASED_POINT_SIZE_RANGE: GLenum;
3475 readonly ALPHA: GLenum;
3476 readonly ALPHA_BITS: GLenum;
3477 readonly ALWAYS: GLenum;
3478 readonly ARRAY_BUFFER: GLenum;
3479 readonly ARRAY_BUFFER_BINDING: GLenum;
3480 readonly ATTACHED_SHADERS: GLenum;
3481 readonly BACK: GLenum;
3482 readonly BLEND: GLenum;
3483 readonly BLEND_COLOR: GLenum;
3484 readonly BLEND_DST_ALPHA: GLenum;
3485 readonly BLEND_DST_RGB: GLenum;
3486 readonly BLEND_EQUATION: GLenum;
3487 readonly BLEND_EQUATION_ALPHA: GLenum;
3488 readonly BLEND_EQUATION_RGB: GLenum;
3489 readonly BLEND_SRC_ALPHA: GLenum;
3490 readonly BLEND_SRC_RGB: GLenum;
3491 readonly BLUE_BITS: GLenum;
3492 readonly BOOL: GLenum;
3493 readonly BOOL_VEC2: GLenum;
3494 readonly BOOL_VEC3: GLenum;
3495 readonly BOOL_VEC4: GLenum;
3496 readonly BROWSER_DEFAULT_WEBGL: GLenum;
3497 readonly BUFFER_SIZE: GLenum;
3498 readonly BUFFER_USAGE: GLenum;
3499 readonly BYTE: GLenum;
3500 readonly CCW: GLenum;
3501 readonly CLAMP_TO_EDGE: GLenum;
3502 readonly COLOR_ATTACHMENT0: GLenum;
3503 readonly COLOR_BUFFER_BIT: GLenum;
3504 readonly COLOR_CLEAR_VALUE: GLenum;
3505 readonly COLOR_WRITEMASK: GLenum;
3506 readonly COMPILE_STATUS: GLenum;
3507 readonly COMPRESSED_TEXTURE_FORMATS: GLenum;
3508 readonly CONSTANT_ALPHA: GLenum;
3509 readonly CONSTANT_COLOR: GLenum;
3510 readonly CONTEXT_LOST_WEBGL: GLenum;
3511 readonly CULL_FACE: GLenum;
3512 readonly CULL_FACE_MODE: GLenum;
3513 readonly CURRENT_PROGRAM: GLenum;
3514 readonly CURRENT_VERTEX_ATTRIB: GLenum;
3515 readonly CW: GLenum;
3516 readonly DECR: GLenum;
3517 readonly DECR_WRAP: GLenum;
3518 readonly DELETE_STATUS: GLenum;
3519 readonly DEPTH_ATTACHMENT: GLenum;
3520 readonly DEPTH_BITS: GLenum;
3521 readonly DEPTH_BUFFER_BIT: GLenum;
3522 readonly DEPTH_CLEAR_VALUE: GLenum;
3523 readonly DEPTH_COMPONENT: GLenum;
3524 readonly DEPTH_COMPONENT16: GLenum;
3525 readonly DEPTH_FUNC: GLenum;
3526 readonly DEPTH_RANGE: GLenum;
3527 readonly DEPTH_STENCIL: GLenum;
3528 readonly DEPTH_STENCIL_ATTACHMENT: GLenum;
3529 readonly DEPTH_TEST: GLenum;
3530 readonly DEPTH_WRITEMASK: GLenum;
3531 readonly DITHER: GLenum;
3532 readonly DONT_CARE: GLenum;
3533 readonly DST_ALPHA: GLenum;
3534 readonly DST_COLOR: GLenum;
3535 readonly DYNAMIC_DRAW: GLenum;
3536 readonly ELEMENT_ARRAY_BUFFER: GLenum;
3537 readonly ELEMENT_ARRAY_BUFFER_BINDING: GLenum;
3538 readonly EQUAL: GLenum;
3539 readonly FASTEST: GLenum;
3540 readonly FLOAT: GLenum;
3541 readonly FLOAT_MAT2: GLenum;
3542 readonly FLOAT_MAT3: GLenum;
3543 readonly FLOAT_MAT4: GLenum;
3544 readonly FLOAT_VEC2: GLenum;
3545 readonly FLOAT_VEC3: GLenum;
3546 readonly FLOAT_VEC4: GLenum;
3547 readonly FRAGMENT_SHADER: GLenum;
3548 readonly FRAMEBUFFER: GLenum;
3549 readonly FRAMEBUFFER_ATTACHMENT_OBJECT_NAME: GLenum;
3550 readonly FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE: GLenum;
3551 readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE: GLenum;
3552 readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL: GLenum;
3553 readonly FRAMEBUFFER_BINDING: GLenum;
3554 readonly FRAMEBUFFER_COMPLETE: GLenum;
3555 readonly FRAMEBUFFER_INCOMPLETE_ATTACHMENT: GLenum;
3556 readonly FRAMEBUFFER_INCOMPLETE_DIMENSIONS: GLenum;
3557 readonly FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT: GLenum;
3558 readonly FRAMEBUFFER_UNSUPPORTED: GLenum;
3559 readonly FRONT: GLenum;
3560 readonly FRONT_AND_BACK: GLenum;
3561 readonly FRONT_FACE: GLenum;
3562 readonly FUNC_ADD: GLenum;
3563 readonly FUNC_REVERSE_SUBTRACT: GLenum;
3564 readonly FUNC_SUBTRACT: GLenum;
3565 readonly GENERATE_MIPMAP_HINT: GLenum;
3566 readonly GEQUAL: GLenum;
3567 readonly GREATER: GLenum;
3568 readonly GREEN_BITS: GLenum;
3569 readonly HIGH_FLOAT: GLenum;
3570 readonly HIGH_INT: GLenum;
3571 readonly IMPLEMENTATION_COLOR_READ_FORMAT: GLenum;
3572 readonly IMPLEMENTATION_COLOR_READ_TYPE: GLenum;
3573 readonly INCR: GLenum;
3574 readonly INCR_WRAP: GLenum;
3575 readonly INT: GLenum;
3576 readonly INT_VEC2: GLenum;
3577 readonly INT_VEC3: GLenum;
3578 readonly INT_VEC4: GLenum;
3579 readonly INVALID_ENUM: GLenum;
3580 readonly INVALID_FRAMEBUFFER_OPERATION: GLenum;
3581 readonly INVALID_OPERATION: GLenum;
3582 readonly INVALID_VALUE: GLenum;
3583 readonly INVERT: GLenum;
3584 readonly KEEP: GLenum;
3585 readonly LEQUAL: GLenum;
3586 readonly LESS: GLenum;
3587 readonly LINEAR: GLenum;
3588 readonly LINEAR_MIPMAP_LINEAR: GLenum;
3589 readonly LINEAR_MIPMAP_NEAREST: GLenum;
3590 readonly LINES: GLenum;
3591 readonly LINE_LOOP: GLenum;
3592 readonly LINE_STRIP: GLenum;
3593 readonly LINE_WIDTH: GLenum;
3594 readonly LINK_STATUS: GLenum;
3595 readonly LOW_FLOAT: GLenum;
3596 readonly LOW_INT: GLenum;
3597 readonly LUMINANCE: GLenum;
3598 readonly LUMINANCE_ALPHA: GLenum;
3599 readonly MAX_COMBINED_TEXTURE_IMAGE_UNITS: GLenum;
3600 readonly MAX_CUBE_MAP_TEXTURE_SIZE: GLenum;
3601 readonly MAX_FRAGMENT_UNIFORM_VECTORS: GLenum;
3602 readonly MAX_RENDERBUFFER_SIZE: GLenum;
3603 readonly MAX_TEXTURE_IMAGE_UNITS: GLenum;
3604 readonly MAX_TEXTURE_SIZE: GLenum;
3605 readonly MAX_VARYING_VECTORS: GLenum;
3606 readonly MAX_VERTEX_ATTRIBS: GLenum;
3607 readonly MAX_VERTEX_TEXTURE_IMAGE_UNITS: GLenum;
3608 readonly MAX_VERTEX_UNIFORM_VECTORS: GLenum;
3609 readonly MAX_VIEWPORT_DIMS: GLenum;
3610 readonly MEDIUM_FLOAT: GLenum;
3611 readonly MEDIUM_INT: GLenum;
3612 readonly MIRRORED_REPEAT: GLenum;
3613 readonly NEAREST: GLenum;
3614 readonly NEAREST_MIPMAP_LINEAR: GLenum;
3615 readonly NEAREST_MIPMAP_NEAREST: GLenum;
3616 readonly NEVER: GLenum;
3617 readonly NICEST: GLenum;
3618 readonly NONE: GLenum;
3619 readonly NOTEQUAL: GLenum;
3620 readonly NO_ERROR: GLenum;
3621 readonly ONE: GLenum;
3622 readonly ONE_MINUS_CONSTANT_ALPHA: GLenum;
3623 readonly ONE_MINUS_CONSTANT_COLOR: GLenum;
3624 readonly ONE_MINUS_DST_ALPHA: GLenum;
3625 readonly ONE_MINUS_DST_COLOR: GLenum;
3626 readonly ONE_MINUS_SRC_ALPHA: GLenum;
3627 readonly ONE_MINUS_SRC_COLOR: GLenum;
3628 readonly OUT_OF_MEMORY: GLenum;
3629 readonly PACK_ALIGNMENT: GLenum;
3630 readonly POINTS: GLenum;
3631 readonly POLYGON_OFFSET_FACTOR: GLenum;
3632 readonly POLYGON_OFFSET_FILL: GLenum;
3633 readonly POLYGON_OFFSET_UNITS: GLenum;
3634 readonly RED_BITS: GLenum;
3635 readonly RENDERBUFFER: GLenum;
3636 readonly RENDERBUFFER_ALPHA_SIZE: GLenum;
3637 readonly RENDERBUFFER_BINDING: GLenum;
3638 readonly RENDERBUFFER_BLUE_SIZE: GLenum;
3639 readonly RENDERBUFFER_DEPTH_SIZE: GLenum;
3640 readonly RENDERBUFFER_GREEN_SIZE: GLenum;
3641 readonly RENDERBUFFER_HEIGHT: GLenum;
3642 readonly RENDERBUFFER_INTERNAL_FORMAT: GLenum;
3643 readonly RENDERBUFFER_RED_SIZE: GLenum;
3644 readonly RENDERBUFFER_STENCIL_SIZE: GLenum;
3645 readonly RENDERBUFFER_WIDTH: GLenum;
3646 readonly RENDERER: GLenum;
3647 readonly REPEAT: GLenum;
3648 readonly REPLACE: GLenum;
3649 readonly RGB: GLenum;
3650 readonly RGB565: GLenum;
3651 readonly RGB5_A1: GLenum;
3652 readonly RGBA: GLenum;
3653 readonly RGBA4: GLenum;
3654 readonly SAMPLER_2D: GLenum;
3655 readonly SAMPLER_CUBE: GLenum;
3656 readonly SAMPLES: GLenum;
3657 readonly SAMPLE_ALPHA_TO_COVERAGE: GLenum;
3658 readonly SAMPLE_BUFFERS: GLenum;
3659 readonly SAMPLE_COVERAGE: GLenum;
3660 readonly SAMPLE_COVERAGE_INVERT: GLenum;
3661 readonly SAMPLE_COVERAGE_VALUE: GLenum;
3662 readonly SCISSOR_BOX: GLenum;
3663 readonly SCISSOR_TEST: GLenum;
3664 readonly SHADER_TYPE: GLenum;
3665 readonly SHADING_LANGUAGE_VERSION: GLenum;
3666 readonly SHORT: GLenum;
3667 readonly SRC_ALPHA: GLenum;
3668 readonly SRC_ALPHA_SATURATE: GLenum;
3669 readonly SRC_COLOR: GLenum;
3670 readonly STATIC_DRAW: GLenum;
3671 readonly STENCIL_ATTACHMENT: GLenum;
3672 readonly STENCIL_BACK_FAIL: GLenum;
3673 readonly STENCIL_BACK_FUNC: GLenum;
3674 readonly STENCIL_BACK_PASS_DEPTH_FAIL: GLenum;
3675 readonly STENCIL_BACK_PASS_DEPTH_PASS: GLenum;
3676 readonly STENCIL_BACK_REF: GLenum;
3677 readonly STENCIL_BACK_VALUE_MASK: GLenum;
3678 readonly STENCIL_BACK_WRITEMASK: GLenum;
3679 readonly STENCIL_BITS: GLenum;
3680 readonly STENCIL_BUFFER_BIT: GLenum;
3681 readonly STENCIL_CLEAR_VALUE: GLenum;
3682 readonly STENCIL_FAIL: GLenum;
3683 readonly STENCIL_FUNC: GLenum;
3684 readonly STENCIL_INDEX8: GLenum;
3685 readonly STENCIL_PASS_DEPTH_FAIL: GLenum;
3686 readonly STENCIL_PASS_DEPTH_PASS: GLenum;
3687 readonly STENCIL_REF: GLenum;
3688 readonly STENCIL_TEST: GLenum;
3689 readonly STENCIL_VALUE_MASK: GLenum;
3690 readonly STENCIL_WRITEMASK: GLenum;
3691 readonly STREAM_DRAW: GLenum;
3692 readonly SUBPIXEL_BITS: GLenum;
3693 readonly TEXTURE: GLenum;
3694 readonly TEXTURE0: GLenum;
3695 readonly TEXTURE1: GLenum;
3696 readonly TEXTURE10: GLenum;
3697 readonly TEXTURE11: GLenum;
3698 readonly TEXTURE12: GLenum;
3699 readonly TEXTURE13: GLenum;
3700 readonly TEXTURE14: GLenum;
3701 readonly TEXTURE15: GLenum;
3702 readonly TEXTURE16: GLenum;
3703 readonly TEXTURE17: GLenum;
3704 readonly TEXTURE18: GLenum;
3705 readonly TEXTURE19: GLenum;
3706 readonly TEXTURE2: GLenum;
3707 readonly TEXTURE20: GLenum;
3708 readonly TEXTURE21: GLenum;
3709 readonly TEXTURE22: GLenum;
3710 readonly TEXTURE23: GLenum;
3711 readonly TEXTURE24: GLenum;
3712 readonly TEXTURE25: GLenum;
3713 readonly TEXTURE26: GLenum;
3714 readonly TEXTURE27: GLenum;
3715 readonly TEXTURE28: GLenum;
3716 readonly TEXTURE29: GLenum;
3717 readonly TEXTURE3: GLenum;
3718 readonly TEXTURE30: GLenum;
3719 readonly TEXTURE31: GLenum;
3720 readonly TEXTURE4: GLenum;
3721 readonly TEXTURE5: GLenum;
3722 readonly TEXTURE6: GLenum;
3723 readonly TEXTURE7: GLenum;
3724 readonly TEXTURE8: GLenum;
3725 readonly TEXTURE9: GLenum;
3726 readonly TEXTURE_2D: GLenum;
3727 readonly TEXTURE_BINDING_2D: GLenum;
3728 readonly TEXTURE_BINDING_CUBE_MAP: GLenum;
3729 readonly TEXTURE_CUBE_MAP: GLenum;
3730 readonly TEXTURE_CUBE_MAP_NEGATIVE_X: GLenum;
3731 readonly TEXTURE_CUBE_MAP_NEGATIVE_Y: GLenum;
3732 readonly TEXTURE_CUBE_MAP_NEGATIVE_Z: GLenum;
3733 readonly TEXTURE_CUBE_MAP_POSITIVE_X: GLenum;
3734 readonly TEXTURE_CUBE_MAP_POSITIVE_Y: GLenum;
3735 readonly TEXTURE_CUBE_MAP_POSITIVE_Z: GLenum;
3736 readonly TEXTURE_MAG_FILTER: GLenum;
3737 readonly TEXTURE_MIN_FILTER: GLenum;
3738 readonly TEXTURE_WRAP_S: GLenum;
3739 readonly TEXTURE_WRAP_T: GLenum;
3740 readonly TRIANGLES: GLenum;
3741 readonly TRIANGLE_FAN: GLenum;
3742 readonly TRIANGLE_STRIP: GLenum;
3743 readonly UNPACK_ALIGNMENT: GLenum;
3744 readonly UNPACK_COLORSPACE_CONVERSION_WEBGL: GLenum;
3745 readonly UNPACK_FLIP_Y_WEBGL: GLenum;
3746 readonly UNPACK_PREMULTIPLY_ALPHA_WEBGL: GLenum;
3747 readonly UNSIGNED_BYTE: GLenum;
3748 readonly UNSIGNED_INT: GLenum;
3749 readonly UNSIGNED_SHORT: GLenum;
3750 readonly UNSIGNED_SHORT_4_4_4_4: GLenum;
3751 readonly UNSIGNED_SHORT_5_5_5_1: GLenum;
3752 readonly UNSIGNED_SHORT_5_6_5: GLenum;
3753 readonly VALIDATE_STATUS: GLenum;
3754 readonly VENDOR: GLenum;
3755 readonly VERSION: GLenum;
3756 readonly VERTEX_ATTRIB_ARRAY_BUFFER_BINDING: GLenum;
3757 readonly VERTEX_ATTRIB_ARRAY_ENABLED: GLenum;
3758 readonly VERTEX_ATTRIB_ARRAY_NORMALIZED: GLenum;
3759 readonly VERTEX_ATTRIB_ARRAY_POINTER: GLenum;
3760 readonly VERTEX_ATTRIB_ARRAY_SIZE: GLenum;
3761 readonly VERTEX_ATTRIB_ARRAY_STRIDE: GLenum;
3762 readonly VERTEX_ATTRIB_ARRAY_TYPE: GLenum;
3763 readonly VERTEX_SHADER: GLenum;
3764 readonly VIEWPORT: GLenum;
3765 readonly ZERO: GLenum;
3766 readonly ACTIVE_UNIFORM_BLOCKS: GLenum;
3767 readonly ALREADY_SIGNALED: GLenum;
3768 readonly ANY_SAMPLES_PASSED: GLenum;
3769 readonly ANY_SAMPLES_PASSED_CONSERVATIVE: GLenum;
3770 readonly COLOR: GLenum;
3771 readonly COLOR_ATTACHMENT1: GLenum;
3772 readonly COLOR_ATTACHMENT10: GLenum;
3773 readonly COLOR_ATTACHMENT11: GLenum;
3774 readonly COLOR_ATTACHMENT12: GLenum;
3775 readonly COLOR_ATTACHMENT13: GLenum;
3776 readonly COLOR_ATTACHMENT14: GLenum;
3777 readonly COLOR_ATTACHMENT15: GLenum;
3778 readonly COLOR_ATTACHMENT2: GLenum;
3779 readonly COLOR_ATTACHMENT3: GLenum;
3780 readonly COLOR_ATTACHMENT4: GLenum;
3781 readonly COLOR_ATTACHMENT5: GLenum;
3782 readonly COLOR_ATTACHMENT6: GLenum;
3783 readonly COLOR_ATTACHMENT7: GLenum;
3784 readonly COLOR_ATTACHMENT8: GLenum;
3785 readonly COLOR_ATTACHMENT9: GLenum;
3786 readonly COMPARE_REF_TO_TEXTURE: GLenum;
3787 readonly CONDITION_SATISFIED: GLenum;
3788 readonly COPY_READ_BUFFER: GLenum;
3789 readonly COPY_READ_BUFFER_BINDING: GLenum;
3790 readonly COPY_WRITE_BUFFER: GLenum;
3791 readonly COPY_WRITE_BUFFER_BINDING: GLenum;
3792 readonly CURRENT_QUERY: GLenum;
3793 readonly DEPTH: GLenum;
3794 readonly DEPTH24_STENCIL8: GLenum;
3795 readonly DEPTH32F_STENCIL8: GLenum;
3796 readonly DEPTH_COMPONENT24: GLenum;
3797 readonly DEPTH_COMPONENT32F: GLenum;
3798 readonly DRAW_BUFFER0: GLenum;
3799 readonly DRAW_BUFFER1: GLenum;
3800 readonly DRAW_BUFFER10: GLenum;
3801 readonly DRAW_BUFFER11: GLenum;
3802 readonly DRAW_BUFFER12: GLenum;
3803 readonly DRAW_BUFFER13: GLenum;
3804 readonly DRAW_BUFFER14: GLenum;
3805 readonly DRAW_BUFFER15: GLenum;
3806 readonly DRAW_BUFFER2: GLenum;
3807 readonly DRAW_BUFFER3: GLenum;
3808 readonly DRAW_BUFFER4: GLenum;
3809 readonly DRAW_BUFFER5: GLenum;
3810 readonly DRAW_BUFFER6: GLenum;
3811 readonly DRAW_BUFFER7: GLenum;
3812 readonly DRAW_BUFFER8: GLenum;
3813 readonly DRAW_BUFFER9: GLenum;
3814 readonly DRAW_FRAMEBUFFER: GLenum;
3815 readonly DRAW_FRAMEBUFFER_BINDING: GLenum;
3816 readonly DYNAMIC_COPY: GLenum;
3817 readonly DYNAMIC_READ: GLenum;
3818 readonly FLOAT_32_UNSIGNED_INT_24_8_REV: GLenum;
3819 readonly FLOAT_MAT2x3: GLenum;
3820 readonly FLOAT_MAT2x4: GLenum;
3821 readonly FLOAT_MAT3x2: GLenum;
3822 readonly FLOAT_MAT3x4: GLenum;
3823 readonly FLOAT_MAT4x2: GLenum;
3824 readonly FLOAT_MAT4x3: GLenum;
3825 readonly FRAGMENT_SHADER_DERIVATIVE_HINT: GLenum;
3826 readonly FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE: GLenum;
3827 readonly FRAMEBUFFER_ATTACHMENT_BLUE_SIZE: GLenum;
3828 readonly FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING: GLenum;
3829 readonly FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE: GLenum;
3830 readonly FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE: GLenum;
3831 readonly FRAMEBUFFER_ATTACHMENT_GREEN_SIZE: GLenum;
3832 readonly FRAMEBUFFER_ATTACHMENT_RED_SIZE: GLenum;
3833 readonly FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE: GLenum;
3834 readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER: GLenum;
3835 readonly FRAMEBUFFER_DEFAULT: GLenum;
3836 readonly FRAMEBUFFER_INCOMPLETE_MULTISAMPLE: GLenum;
3837 readonly HALF_FLOAT: GLenum;
3838 readonly INTERLEAVED_ATTRIBS: GLenum;
3839 readonly INT_2_10_10_10_REV: GLenum;
3840 readonly INT_SAMPLER_2D: GLenum;
3841 readonly INT_SAMPLER_2D_ARRAY: GLenum;
3842 readonly INT_SAMPLER_3D: GLenum;
3843 readonly INT_SAMPLER_CUBE: GLenum;
3844 readonly INVALID_INDEX: GLenum;
3845 readonly MAX: GLenum;
3846 readonly MAX_3D_TEXTURE_SIZE: GLenum;
3847 readonly MAX_ARRAY_TEXTURE_LAYERS: GLenum;
3848 readonly MAX_CLIENT_WAIT_TIMEOUT_WEBGL: GLenum;
3849 readonly MAX_COLOR_ATTACHMENTS: GLenum;
3850 readonly MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS: GLenum;
3851 readonly MAX_COMBINED_UNIFORM_BLOCKS: GLenum;
3852 readonly MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS: GLenum;
3853 readonly MAX_DRAW_BUFFERS: GLenum;
3854 readonly MAX_ELEMENTS_INDICES: GLenum;
3855 readonly MAX_ELEMENTS_VERTICES: GLenum;
3856 readonly MAX_ELEMENT_INDEX: GLenum;
3857 readonly MAX_FRAGMENT_INPUT_COMPONENTS: GLenum;
3858 readonly MAX_FRAGMENT_UNIFORM_BLOCKS: GLenum;
3859 readonly MAX_FRAGMENT_UNIFORM_COMPONENTS: GLenum;
3860 readonly MAX_PROGRAM_TEXEL_OFFSET: GLenum;
3861 readonly MAX_SAMPLES: GLenum;
3862 readonly MAX_SERVER_WAIT_TIMEOUT: GLenum;
3863 readonly MAX_TEXTURE_LOD_BIAS: GLenum;
3864 readonly MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS: GLenum;
3865 readonly MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS: GLenum;
3866 readonly MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS: GLenum;
3867 readonly MAX_UNIFORM_BLOCK_SIZE: GLenum;
3868 readonly MAX_UNIFORM_BUFFER_BINDINGS: GLenum;
3869 readonly MAX_VARYING_COMPONENTS: GLenum;
3870 readonly MAX_VERTEX_OUTPUT_COMPONENTS: GLenum;
3871 readonly MAX_VERTEX_UNIFORM_BLOCKS: GLenum;
3872 readonly MAX_VERTEX_UNIFORM_COMPONENTS: GLenum;
3873 readonly MIN: GLenum;
3874 readonly MIN_PROGRAM_TEXEL_OFFSET: GLenum;
3875 readonly OBJECT_TYPE: GLenum;
3876 readonly PACK_ROW_LENGTH: GLenum;
3877 readonly PACK_SKIP_PIXELS: GLenum;
3878 readonly PACK_SKIP_ROWS: GLenum;
3879 readonly PIXEL_PACK_BUFFER: GLenum;
3880 readonly PIXEL_PACK_BUFFER_BINDING: GLenum;
3881 readonly PIXEL_UNPACK_BUFFER: GLenum;
3882 readonly PIXEL_UNPACK_BUFFER_BINDING: GLenum;
3883 readonly QUERY_RESULT: GLenum;
3884 readonly QUERY_RESULT_AVAILABLE: GLenum;
3885 readonly R11F_G11F_B10F: GLenum;
3886 readonly R16F: GLenum;
3887 readonly R16I: GLenum;
3888 readonly R16UI: GLenum;
3889 readonly R32F: GLenum;
3890 readonly R32I: GLenum;
3891 readonly R32UI: GLenum;
3892 readonly R8: GLenum;
3893 readonly R8I: GLenum;
3894 readonly R8UI: GLenum;
3895 readonly R8_SNORM: GLenum;
3896 readonly RASTERIZER_DISCARD: GLenum;
3897 readonly READ_BUFFER: GLenum;
3898 readonly READ_FRAMEBUFFER: GLenum;
3899 readonly READ_FRAMEBUFFER_BINDING: GLenum;
3900 readonly RED: GLenum;
3901 readonly RED_INTEGER: GLenum;
3902 readonly RENDERBUFFER_SAMPLES: GLenum;
3903 readonly RG: GLenum;
3904 readonly RG16F: GLenum;
3905 readonly RG16I: GLenum;
3906 readonly RG16UI: GLenum;
3907 readonly RG32F: GLenum;
3908 readonly RG32I: GLenum;
3909 readonly RG32UI: GLenum;
3910 readonly RG8: GLenum;
3911 readonly RG8I: GLenum;
3912 readonly RG8UI: GLenum;
3913 readonly RG8_SNORM: GLenum;
3914 readonly RGB10_A2: GLenum;
3915 readonly RGB10_A2UI: GLenum;
3916 readonly RGB16F: GLenum;
3917 readonly RGB16I: GLenum;
3918 readonly RGB16UI: GLenum;
3919 readonly RGB32F: GLenum;
3920 readonly RGB32I: GLenum;
3921 readonly RGB32UI: GLenum;
3922 readonly RGB8: GLenum;
3923 readonly RGB8I: GLenum;
3924 readonly RGB8UI: GLenum;
3925 readonly RGB8_SNORM: GLenum;
3926 readonly RGB9_E5: GLenum;
3927 readonly RGBA16F: GLenum;
3928 readonly RGBA16I: GLenum;
3929 readonly RGBA16UI: GLenum;
3930 readonly RGBA32F: GLenum;
3931 readonly RGBA32I: GLenum;
3932 readonly RGBA32UI: GLenum;
3933 readonly RGBA8: GLenum;
3934 readonly RGBA8I: GLenum;
3935 readonly RGBA8UI: GLenum;
3936 readonly RGBA8_SNORM: GLenum;
3937 readonly RGBA_INTEGER: GLenum;
3938 readonly RGB_INTEGER: GLenum;
3939 readonly RG_INTEGER: GLenum;
3940 readonly SAMPLER_2D_ARRAY: GLenum;
3941 readonly SAMPLER_2D_ARRAY_SHADOW: GLenum;
3942 readonly SAMPLER_2D_SHADOW: GLenum;
3943 readonly SAMPLER_3D: GLenum;
3944 readonly SAMPLER_BINDING: GLenum;
3945 readonly SAMPLER_CUBE_SHADOW: GLenum;
3946 readonly SEPARATE_ATTRIBS: GLenum;
3947 readonly SIGNALED: GLenum;
3948 readonly SIGNED_NORMALIZED: GLenum;
3949 readonly SRGB: GLenum;
3950 readonly SRGB8: GLenum;
3951 readonly SRGB8_ALPHA8: GLenum;
3952 readonly STATIC_COPY: GLenum;
3953 readonly STATIC_READ: GLenum;
3954 readonly STENCIL: GLenum;
3955 readonly STREAM_COPY: GLenum;
3956 readonly STREAM_READ: GLenum;
3957 readonly SYNC_CONDITION: GLenum;
3958 readonly SYNC_FENCE: GLenum;
3959 readonly SYNC_FLAGS: GLenum;
3960 readonly SYNC_FLUSH_COMMANDS_BIT: GLenum;
3961 readonly SYNC_GPU_COMMANDS_COMPLETE: GLenum;
3962 readonly SYNC_STATUS: GLenum;
3963 readonly TEXTURE_2D_ARRAY: GLenum;
3964 readonly TEXTURE_3D: GLenum;
3965 readonly TEXTURE_BASE_LEVEL: GLenum;
3966 readonly TEXTURE_BINDING_2D_ARRAY: GLenum;
3967 readonly TEXTURE_BINDING_3D: GLenum;
3968 readonly TEXTURE_COMPARE_FUNC: GLenum;
3969 readonly TEXTURE_COMPARE_MODE: GLenum;
3970 readonly TEXTURE_IMMUTABLE_FORMAT: GLenum;
3971 readonly TEXTURE_IMMUTABLE_LEVELS: GLenum;
3972 readonly TEXTURE_MAX_LEVEL: GLenum;
3973 readonly TEXTURE_MAX_LOD: GLenum;
3974 readonly TEXTURE_MIN_LOD: GLenum;
3975 readonly TEXTURE_WRAP_R: GLenum;
3976 readonly TIMEOUT_EXPIRED: GLenum;
3977 readonly TIMEOUT_IGNORED: GLint64;
3978 readonly TRANSFORM_FEEDBACK: GLenum;
3979 readonly TRANSFORM_FEEDBACK_ACTIVE: GLenum;
3980 readonly TRANSFORM_FEEDBACK_BINDING: GLenum;
3981 readonly TRANSFORM_FEEDBACK_BUFFER: GLenum;
3982 readonly TRANSFORM_FEEDBACK_BUFFER_BINDING: GLenum;
3983 readonly TRANSFORM_FEEDBACK_BUFFER_MODE: GLenum;
3984 readonly TRANSFORM_FEEDBACK_BUFFER_SIZE: GLenum;
3985 readonly TRANSFORM_FEEDBACK_BUFFER_START: GLenum;
3986 readonly TRANSFORM_FEEDBACK_PAUSED: GLenum;
3987 readonly TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN: GLenum;
3988 readonly TRANSFORM_FEEDBACK_VARYINGS: GLenum;
3989 readonly UNIFORM_ARRAY_STRIDE: GLenum;
3990 readonly UNIFORM_BLOCK_ACTIVE_UNIFORMS: GLenum;
3991 readonly UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES: GLenum;
3992 readonly UNIFORM_BLOCK_BINDING: GLenum;
3993 readonly UNIFORM_BLOCK_DATA_SIZE: GLenum;
3994 readonly UNIFORM_BLOCK_INDEX: GLenum;
3995 readonly UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER: GLenum;
3996 readonly UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER: GLenum;
3997 readonly UNIFORM_BUFFER: GLenum;
3998 readonly UNIFORM_BUFFER_BINDING: GLenum;
3999 readonly UNIFORM_BUFFER_OFFSET_ALIGNMENT: GLenum;
4000 readonly UNIFORM_BUFFER_SIZE: GLenum;
4001 readonly UNIFORM_BUFFER_START: GLenum;
4002 readonly UNIFORM_IS_ROW_MAJOR: GLenum;
4003 readonly UNIFORM_MATRIX_STRIDE: GLenum;
4004 readonly UNIFORM_OFFSET: GLenum;
4005 readonly UNIFORM_SIZE: GLenum;
4006 readonly UNIFORM_TYPE: GLenum;
4007 readonly UNPACK_IMAGE_HEIGHT: GLenum;
4008 readonly UNPACK_ROW_LENGTH: GLenum;
4009 readonly UNPACK_SKIP_IMAGES: GLenum;
4010 readonly UNPACK_SKIP_PIXELS: GLenum;
4011 readonly UNPACK_SKIP_ROWS: GLenum;
4012 readonly UNSIGNALED: GLenum;
4013 readonly UNSIGNED_INT_10F_11F_11F_REV: GLenum;
4014 readonly UNSIGNED_INT_24_8: GLenum;
4015 readonly UNSIGNED_INT_2_10_10_10_REV: GLenum;
4016 readonly UNSIGNED_INT_5_9_9_9_REV: GLenum;
4017 readonly UNSIGNED_INT_SAMPLER_2D: GLenum;
4018 readonly UNSIGNED_INT_SAMPLER_2D_ARRAY: GLenum;
4019 readonly UNSIGNED_INT_SAMPLER_3D: GLenum;
4020 readonly UNSIGNED_INT_SAMPLER_CUBE: GLenum;
4021 readonly UNSIGNED_INT_VEC2: GLenum;
4022 readonly UNSIGNED_INT_VEC3: GLenum;
4023 readonly UNSIGNED_INT_VEC4: GLenum;
4024 readonly UNSIGNED_NORMALIZED: GLenum;
4025 readonly VERTEX_ARRAY_BINDING: GLenum;
4026 readonly VERTEX_ATTRIB_ARRAY_DIVISOR: GLenum;
4027 readonly VERTEX_ATTRIB_ARRAY_INTEGER: GLenum;
4028 readonly WAIT_FAILED: GLenum;
4031 interface WebGL2RenderingContextBase {
4032 beginQuery(target: GLenum, query: WebGLQuery): void;
4033 beginTransformFeedback(primitiveMode: GLenum): void;
4034 bindBufferBase(target: GLenum, index: GLuint, buffer: WebGLBuffer | null): void;
4035 bindBufferRange(target: GLenum, index: GLuint, buffer: WebGLBuffer | null, offset: GLintptr, size: GLsizeiptr): void;
4036 bindSampler(unit: GLuint, sampler: WebGLSampler | null): void;
4037 bindTransformFeedback(target: GLenum, tf: WebGLTransformFeedback | null): void;
4038 bindVertexArray(array: WebGLVertexArrayObject | null): void;
4039 blitFramebuffer(srcX0: GLint, srcY0: GLint, srcX1: GLint, srcY1: GLint, dstX0: GLint, dstY0: GLint, dstX1: GLint, dstY1: GLint, mask: GLbitfield, filter: GLenum): void;
4040 clearBufferfi(buffer: GLenum, drawbuffer: GLint, depth: GLfloat, stencil: GLint): void;
4041 clearBufferfv(buffer: GLenum, drawbuffer: GLint, values: Float32List, srcOffset?: GLuint): void;
4042 clearBufferiv(buffer: GLenum, drawbuffer: GLint, values: Int32List, srcOffset?: GLuint): void;
4043 clearBufferuiv(buffer: GLenum, drawbuffer: GLint, values: Uint32List, srcOffset?: GLuint): void;
4044 clientWaitSync(sync: WebGLSync, flags: GLbitfield, timeout: GLuint64): GLenum;
4045 compressedTexImage3D(target: GLenum, level: GLint, internalformat: GLenum, width: GLsizei, height: GLsizei, depth: GLsizei, border: GLint, imageSize: GLsizei, offset: GLintptr): void;
4046 compressedTexImage3D(target: GLenum, level: GLint, internalformat: GLenum, width: GLsizei, height: GLsizei, depth: GLsizei, border: GLint, srcData: ArrayBufferView, srcOffset?: GLuint, srcLengthOverride?: GLuint): void;
4047 compressedTexSubImage3D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, format: GLenum, imageSize: GLsizei, offset: GLintptr): void;
4048 compressedTexSubImage3D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, format: GLenum, srcData: ArrayBufferView, srcOffset?: GLuint, srcLengthOverride?: GLuint): void;
4049 copyBufferSubData(readTarget: GLenum, writeTarget: GLenum, readOffset: GLintptr, writeOffset: GLintptr, size: GLsizeiptr): void;
4050 copyTexSubImage3D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, x: GLint, y: GLint, width: GLsizei, height: GLsizei): void;
4051 createQuery(): WebGLQuery | null;
4052 createSampler(): WebGLSampler | null;
4053 createTransformFeedback(): WebGLTransformFeedback | null;
4054 createVertexArray(): WebGLVertexArrayObject | null;
4055 deleteQuery(query: WebGLQuery | null): void;
4056 deleteSampler(sampler: WebGLSampler | null): void;
4057 deleteSync(sync: WebGLSync | null): void;
4058 deleteTransformFeedback(tf: WebGLTransformFeedback | null): void;
4059 deleteVertexArray(vertexArray: WebGLVertexArrayObject | null): void;
4060 drawArraysInstanced(mode: GLenum, first: GLint, count: GLsizei, instanceCount: GLsizei): void;
4061 drawBuffers(buffers: GLenum[]): void;
4062 drawElementsInstanced(mode: GLenum, count: GLsizei, type: GLenum, offset: GLintptr, instanceCount: GLsizei): void;
4063 drawRangeElements(mode: GLenum, start: GLuint, end: GLuint, count: GLsizei, type: GLenum, offset: GLintptr): void;
4064 endQuery(target: GLenum): void;
4065 endTransformFeedback(): void;
4066 fenceSync(condition: GLenum, flags: GLbitfield): WebGLSync | null;
4067 framebufferTextureLayer(target: GLenum, attachment: GLenum, texture: WebGLTexture | null, level: GLint, layer: GLint): void;
4068 getActiveUniformBlockName(program: WebGLProgram, uniformBlockIndex: GLuint): string | null;
4069 getActiveUniformBlockParameter(program: WebGLProgram, uniformBlockIndex: GLuint, pname: GLenum): any;
4070 getActiveUniforms(program: WebGLProgram, uniformIndices: GLuint[], pname: GLenum): any;
4071 getBufferSubData(target: GLenum, srcByteOffset: GLintptr, dstBuffer: ArrayBufferView, dstOffset?: GLuint, length?: GLuint): void;
4072 getFragDataLocation(program: WebGLProgram, name: string): GLint;
4073 getIndexedParameter(target: GLenum, index: GLuint): any;
4074 getInternalformatParameter(target: GLenum, internalformat: GLenum, pname: GLenum): any;
4075 getQuery(target: GLenum, pname: GLenum): WebGLQuery | null;
4076 getQueryParameter(query: WebGLQuery, pname: GLenum): any;
4077 getSamplerParameter(sampler: WebGLSampler, pname: GLenum): any;
4078 getSyncParameter(sync: WebGLSync, pname: GLenum): any;
4079 getTransformFeedbackVarying(program: WebGLProgram, index: GLuint): WebGLActiveInfo | null;
4080 getUniformBlockIndex(program: WebGLProgram, uniformBlockName: string): GLuint;
4081 getUniformIndices(program: WebGLProgram, uniformNames: string[]): GLuint[] | null;
4082 invalidateFramebuffer(target: GLenum, attachments: GLenum[]): void;
4083 invalidateSubFramebuffer(target: GLenum, attachments: GLenum[], x: GLint, y: GLint, width: GLsizei, height: GLsizei): void;
4084 isQuery(query: WebGLQuery | null): GLboolean;
4085 isSampler(sampler: WebGLSampler | null): GLboolean;
4086 isSync(sync: WebGLSync | null): GLboolean;
4087 isTransformFeedback(tf: WebGLTransformFeedback | null): GLboolean;
4088 isVertexArray(vertexArray: WebGLVertexArrayObject | null): GLboolean;
4089 pauseTransformFeedback(): void;
4090 readBuffer(src: GLenum): void;
4091 renderbufferStorageMultisample(target: GLenum, samples: GLsizei, internalformat: GLenum, width: GLsizei, height: GLsizei): void;
4092 resumeTransformFeedback(): void;
4093 samplerParameterf(sampler: WebGLSampler, pname: GLenum, param: GLfloat): void;
4094 samplerParameteri(sampler: WebGLSampler, pname: GLenum, param: GLint): void;
4095 texImage3D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, border: GLint, format: GLenum, type: GLenum, pboOffset: GLintptr): void;
4096 texImage3D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, border: GLint, format: GLenum, type: GLenum, source: TexImageSource): void;
4097 texImage3D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, border: GLint, format: GLenum, type: GLenum, srcData: ArrayBufferView | null): void;
4098 texImage3D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, border: GLint, format: GLenum, type: GLenum, srcData: ArrayBufferView, srcOffset: GLuint): void;
4099 texStorage2D(target: GLenum, levels: GLsizei, internalformat: GLenum, width: GLsizei, height: GLsizei): void;
4100 texStorage3D(target: GLenum, levels: GLsizei, internalformat: GLenum, width: GLsizei, height: GLsizei, depth: GLsizei): void;
4101 texSubImage3D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, format: GLenum, type: GLenum, pboOffset: GLintptr): void;
4102 texSubImage3D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, format: GLenum, type: GLenum, source: TexImageSource): void;
4103 texSubImage3D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, format: GLenum, type: GLenum, srcData: ArrayBufferView | null, srcOffset?: GLuint): void;
4104 transformFeedbackVaryings(program: WebGLProgram, varyings: string[], bufferMode: GLenum): void;
4105 uniform1ui(location: WebGLUniformLocation | null, v0: GLuint): void;
4106 uniform1uiv(location: WebGLUniformLocation | null, data: Uint32List, srcOffset?: GLuint, srcLength?: GLuint): void;
4107 uniform2ui(location: WebGLUniformLocation | null, v0: GLuint, v1: GLuint): void;
4108 uniform2uiv(location: WebGLUniformLocation | null, data: Uint32List, srcOffset?: GLuint, srcLength?: GLuint): void;
4109 uniform3ui(location: WebGLUniformLocation | null, v0: GLuint, v1: GLuint, v2: GLuint): void;
4110 uniform3uiv(location: WebGLUniformLocation | null, data: Uint32List, srcOffset?: GLuint, srcLength?: GLuint): void;
4111 uniform4ui(location: WebGLUniformLocation | null, v0: GLuint, v1: GLuint, v2: GLuint, v3: GLuint): void;
4112 uniform4uiv(location: WebGLUniformLocation | null, data: Uint32List, srcOffset?: GLuint, srcLength?: GLuint): void;
4113 uniformBlockBinding(program: WebGLProgram, uniformBlockIndex: GLuint, uniformBlockBinding: GLuint): void;
4114 uniformMatrix2x3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void;
4115 uniformMatrix2x4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void;
4116 uniformMatrix3x2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void;
4117 uniformMatrix3x4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void;
4118 uniformMatrix4x2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void;
4119 uniformMatrix4x3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void;
4120 vertexAttribDivisor(index: GLuint, divisor: GLuint): void;
4121 vertexAttribI4i(index: GLuint, x: GLint, y: GLint, z: GLint, w: GLint): void;
4122 vertexAttribI4iv(index: GLuint, values: Int32List): void;
4123 vertexAttribI4ui(index: GLuint, x: GLuint, y: GLuint, z: GLuint, w: GLuint): void;
4124 vertexAttribI4uiv(index: GLuint, values: Uint32List): void;
4125 vertexAttribIPointer(index: GLuint, size: GLint, type: GLenum, stride: GLsizei, offset: GLintptr): void;
4126 waitSync(sync: WebGLSync, flags: GLbitfield, timeout: GLint64): void;
4127 readonly ACTIVE_UNIFORM_BLOCKS: GLenum;
4128 readonly ALREADY_SIGNALED: GLenum;
4129 readonly ANY_SAMPLES_PASSED: GLenum;
4130 readonly ANY_SAMPLES_PASSED_CONSERVATIVE: GLenum;
4131 readonly COLOR: GLenum;
4132 readonly COLOR_ATTACHMENT1: GLenum;
4133 readonly COLOR_ATTACHMENT10: GLenum;
4134 readonly COLOR_ATTACHMENT11: GLenum;
4135 readonly COLOR_ATTACHMENT12: GLenum;
4136 readonly COLOR_ATTACHMENT13: GLenum;
4137 readonly COLOR_ATTACHMENT14: GLenum;
4138 readonly COLOR_ATTACHMENT15: GLenum;
4139 readonly COLOR_ATTACHMENT2: GLenum;
4140 readonly COLOR_ATTACHMENT3: GLenum;
4141 readonly COLOR_ATTACHMENT4: GLenum;
4142 readonly COLOR_ATTACHMENT5: GLenum;
4143 readonly COLOR_ATTACHMENT6: GLenum;
4144 readonly COLOR_ATTACHMENT7: GLenum;
4145 readonly COLOR_ATTACHMENT8: GLenum;
4146 readonly COLOR_ATTACHMENT9: GLenum;
4147 readonly COMPARE_REF_TO_TEXTURE: GLenum;
4148 readonly CONDITION_SATISFIED: GLenum;
4149 readonly COPY_READ_BUFFER: GLenum;
4150 readonly COPY_READ_BUFFER_BINDING: GLenum;
4151 readonly COPY_WRITE_BUFFER: GLenum;
4152 readonly COPY_WRITE_BUFFER_BINDING: GLenum;
4153 readonly CURRENT_QUERY: GLenum;
4154 readonly DEPTH: GLenum;
4155 readonly DEPTH24_STENCIL8: GLenum;
4156 readonly DEPTH32F_STENCIL8: GLenum;
4157 readonly DEPTH_COMPONENT24: GLenum;
4158 readonly DEPTH_COMPONENT32F: GLenum;
4159 readonly DRAW_BUFFER0: GLenum;
4160 readonly DRAW_BUFFER1: GLenum;
4161 readonly DRAW_BUFFER10: GLenum;
4162 readonly DRAW_BUFFER11: GLenum;
4163 readonly DRAW_BUFFER12: GLenum;
4164 readonly DRAW_BUFFER13: GLenum;
4165 readonly DRAW_BUFFER14: GLenum;
4166 readonly DRAW_BUFFER15: GLenum;
4167 readonly DRAW_BUFFER2: GLenum;
4168 readonly DRAW_BUFFER3: GLenum;
4169 readonly DRAW_BUFFER4: GLenum;
4170 readonly DRAW_BUFFER5: GLenum;
4171 readonly DRAW_BUFFER6: GLenum;
4172 readonly DRAW_BUFFER7: GLenum;
4173 readonly DRAW_BUFFER8: GLenum;
4174 readonly DRAW_BUFFER9: GLenum;
4175 readonly DRAW_FRAMEBUFFER: GLenum;
4176 readonly DRAW_FRAMEBUFFER_BINDING: GLenum;
4177 readonly DYNAMIC_COPY: GLenum;
4178 readonly DYNAMIC_READ: GLenum;
4179 readonly FLOAT_32_UNSIGNED_INT_24_8_REV: GLenum;
4180 readonly FLOAT_MAT2x3: GLenum;
4181 readonly FLOAT_MAT2x4: GLenum;
4182 readonly FLOAT_MAT3x2: GLenum;
4183 readonly FLOAT_MAT3x4: GLenum;
4184 readonly FLOAT_MAT4x2: GLenum;
4185 readonly FLOAT_MAT4x3: GLenum;
4186 readonly FRAGMENT_SHADER_DERIVATIVE_HINT: GLenum;
4187 readonly FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE: GLenum;
4188 readonly FRAMEBUFFER_ATTACHMENT_BLUE_SIZE: GLenum;
4189 readonly FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING: GLenum;
4190 readonly FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE: GLenum;
4191 readonly FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE: GLenum;
4192 readonly FRAMEBUFFER_ATTACHMENT_GREEN_SIZE: GLenum;
4193 readonly FRAMEBUFFER_ATTACHMENT_RED_SIZE: GLenum;
4194 readonly FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE: GLenum;
4195 readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER: GLenum;
4196 readonly FRAMEBUFFER_DEFAULT: GLenum;
4197 readonly FRAMEBUFFER_INCOMPLETE_MULTISAMPLE: GLenum;
4198 readonly HALF_FLOAT: GLenum;
4199 readonly INTERLEAVED_ATTRIBS: GLenum;
4200 readonly INT_2_10_10_10_REV: GLenum;
4201 readonly INT_SAMPLER_2D: GLenum;
4202 readonly INT_SAMPLER_2D_ARRAY: GLenum;
4203 readonly INT_SAMPLER_3D: GLenum;
4204 readonly INT_SAMPLER_CUBE: GLenum;
4205 readonly INVALID_INDEX: GLenum;
4206 readonly MAX: GLenum;
4207 readonly MAX_3D_TEXTURE_SIZE: GLenum;
4208 readonly MAX_ARRAY_TEXTURE_LAYERS: GLenum;
4209 readonly MAX_CLIENT_WAIT_TIMEOUT_WEBGL: GLenum;
4210 readonly MAX_COLOR_ATTACHMENTS: GLenum;
4211 readonly MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS: GLenum;
4212 readonly MAX_COMBINED_UNIFORM_BLOCKS: GLenum;
4213 readonly MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS: GLenum;
4214 readonly MAX_DRAW_BUFFERS: GLenum;
4215 readonly MAX_ELEMENTS_INDICES: GLenum;
4216 readonly MAX_ELEMENTS_VERTICES: GLenum;
4217 readonly MAX_ELEMENT_INDEX: GLenum;
4218 readonly MAX_FRAGMENT_INPUT_COMPONENTS: GLenum;
4219 readonly MAX_FRAGMENT_UNIFORM_BLOCKS: GLenum;
4220 readonly MAX_FRAGMENT_UNIFORM_COMPONENTS: GLenum;
4221 readonly MAX_PROGRAM_TEXEL_OFFSET: GLenum;
4222 readonly MAX_SAMPLES: GLenum;
4223 readonly MAX_SERVER_WAIT_TIMEOUT: GLenum;
4224 readonly MAX_TEXTURE_LOD_BIAS: GLenum;
4225 readonly MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS: GLenum;
4226 readonly MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS: GLenum;
4227 readonly MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS: GLenum;
4228 readonly MAX_UNIFORM_BLOCK_SIZE: GLenum;
4229 readonly MAX_UNIFORM_BUFFER_BINDINGS: GLenum;
4230 readonly MAX_VARYING_COMPONENTS: GLenum;
4231 readonly MAX_VERTEX_OUTPUT_COMPONENTS: GLenum;
4232 readonly MAX_VERTEX_UNIFORM_BLOCKS: GLenum;
4233 readonly MAX_VERTEX_UNIFORM_COMPONENTS: GLenum;
4234 readonly MIN: GLenum;
4235 readonly MIN_PROGRAM_TEXEL_OFFSET: GLenum;
4236 readonly OBJECT_TYPE: GLenum;
4237 readonly PACK_ROW_LENGTH: GLenum;
4238 readonly PACK_SKIP_PIXELS: GLenum;
4239 readonly PACK_SKIP_ROWS: GLenum;
4240 readonly PIXEL_PACK_BUFFER: GLenum;
4241 readonly PIXEL_PACK_BUFFER_BINDING: GLenum;
4242 readonly PIXEL_UNPACK_BUFFER: GLenum;
4243 readonly PIXEL_UNPACK_BUFFER_BINDING: GLenum;
4244 readonly QUERY_RESULT: GLenum;
4245 readonly QUERY_RESULT_AVAILABLE: GLenum;
4246 readonly R11F_G11F_B10F: GLenum;
4247 readonly R16F: GLenum;
4248 readonly R16I: GLenum;
4249 readonly R16UI: GLenum;
4250 readonly R32F: GLenum;
4251 readonly R32I: GLenum;
4252 readonly R32UI: GLenum;
4253 readonly R8: GLenum;
4254 readonly R8I: GLenum;
4255 readonly R8UI: GLenum;
4256 readonly R8_SNORM: GLenum;
4257 readonly RASTERIZER_DISCARD: GLenum;
4258 readonly READ_BUFFER: GLenum;
4259 readonly READ_FRAMEBUFFER: GLenum;
4260 readonly READ_FRAMEBUFFER_BINDING: GLenum;
4261 readonly RED: GLenum;
4262 readonly RED_INTEGER: GLenum;
4263 readonly RENDERBUFFER_SAMPLES: GLenum;
4264 readonly RG: GLenum;
4265 readonly RG16F: GLenum;
4266 readonly RG16I: GLenum;
4267 readonly RG16UI: GLenum;
4268 readonly RG32F: GLenum;
4269 readonly RG32I: GLenum;
4270 readonly RG32UI: GLenum;
4271 readonly RG8: GLenum;
4272 readonly RG8I: GLenum;
4273 readonly RG8UI: GLenum;
4274 readonly RG8_SNORM: GLenum;
4275 readonly RGB10_A2: GLenum;
4276 readonly RGB10_A2UI: GLenum;
4277 readonly RGB16F: GLenum;
4278 readonly RGB16I: GLenum;
4279 readonly RGB16UI: GLenum;
4280 readonly RGB32F: GLenum;
4281 readonly RGB32I: GLenum;
4282 readonly RGB32UI: GLenum;
4283 readonly RGB8: GLenum;
4284 readonly RGB8I: GLenum;
4285 readonly RGB8UI: GLenum;
4286 readonly RGB8_SNORM: GLenum;
4287 readonly RGB9_E5: GLenum;
4288 readonly RGBA16F: GLenum;
4289 readonly RGBA16I: GLenum;
4290 readonly RGBA16UI: GLenum;
4291 readonly RGBA32F: GLenum;
4292 readonly RGBA32I: GLenum;
4293 readonly RGBA32UI: GLenum;
4294 readonly RGBA8: GLenum;
4295 readonly RGBA8I: GLenum;
4296 readonly RGBA8UI: GLenum;
4297 readonly RGBA8_SNORM: GLenum;
4298 readonly RGBA_INTEGER: GLenum;
4299 readonly RGB_INTEGER: GLenum;
4300 readonly RG_INTEGER: GLenum;
4301 readonly SAMPLER_2D_ARRAY: GLenum;
4302 readonly SAMPLER_2D_ARRAY_SHADOW: GLenum;
4303 readonly SAMPLER_2D_SHADOW: GLenum;
4304 readonly SAMPLER_3D: GLenum;
4305 readonly SAMPLER_BINDING: GLenum;
4306 readonly SAMPLER_CUBE_SHADOW: GLenum;
4307 readonly SEPARATE_ATTRIBS: GLenum;
4308 readonly SIGNALED: GLenum;
4309 readonly SIGNED_NORMALIZED: GLenum;
4310 readonly SRGB: GLenum;
4311 readonly SRGB8: GLenum;
4312 readonly SRGB8_ALPHA8: GLenum;
4313 readonly STATIC_COPY: GLenum;
4314 readonly STATIC_READ: GLenum;
4315 readonly STENCIL: GLenum;
4316 readonly STREAM_COPY: GLenum;
4317 readonly STREAM_READ: GLenum;
4318 readonly SYNC_CONDITION: GLenum;
4319 readonly SYNC_FENCE: GLenum;
4320 readonly SYNC_FLAGS: GLenum;
4321 readonly SYNC_FLUSH_COMMANDS_BIT: GLenum;
4322 readonly SYNC_GPU_COMMANDS_COMPLETE: GLenum;
4323 readonly SYNC_STATUS: GLenum;
4324 readonly TEXTURE_2D_ARRAY: GLenum;
4325 readonly TEXTURE_3D: GLenum;
4326 readonly TEXTURE_BASE_LEVEL: GLenum;
4327 readonly TEXTURE_BINDING_2D_ARRAY: GLenum;
4328 readonly TEXTURE_BINDING_3D: GLenum;
4329 readonly TEXTURE_COMPARE_FUNC: GLenum;
4330 readonly TEXTURE_COMPARE_MODE: GLenum;
4331 readonly TEXTURE_IMMUTABLE_FORMAT: GLenum;
4332 readonly TEXTURE_IMMUTABLE_LEVELS: GLenum;
4333 readonly TEXTURE_MAX_LEVEL: GLenum;
4334 readonly TEXTURE_MAX_LOD: GLenum;
4335 readonly TEXTURE_MIN_LOD: GLenum;
4336 readonly TEXTURE_WRAP_R: GLenum;
4337 readonly TIMEOUT_EXPIRED: GLenum;
4338 readonly TIMEOUT_IGNORED: GLint64;
4339 readonly TRANSFORM_FEEDBACK: GLenum;
4340 readonly TRANSFORM_FEEDBACK_ACTIVE: GLenum;
4341 readonly TRANSFORM_FEEDBACK_BINDING: GLenum;
4342 readonly TRANSFORM_FEEDBACK_BUFFER: GLenum;
4343 readonly TRANSFORM_FEEDBACK_BUFFER_BINDING: GLenum;
4344 readonly TRANSFORM_FEEDBACK_BUFFER_MODE: GLenum;
4345 readonly TRANSFORM_FEEDBACK_BUFFER_SIZE: GLenum;
4346 readonly TRANSFORM_FEEDBACK_BUFFER_START: GLenum;
4347 readonly TRANSFORM_FEEDBACK_PAUSED: GLenum;
4348 readonly TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN: GLenum;
4349 readonly TRANSFORM_FEEDBACK_VARYINGS: GLenum;
4350 readonly UNIFORM_ARRAY_STRIDE: GLenum;
4351 readonly UNIFORM_BLOCK_ACTIVE_UNIFORMS: GLenum;
4352 readonly UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES: GLenum;
4353 readonly UNIFORM_BLOCK_BINDING: GLenum;
4354 readonly UNIFORM_BLOCK_DATA_SIZE: GLenum;
4355 readonly UNIFORM_BLOCK_INDEX: GLenum;
4356 readonly UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER: GLenum;
4357 readonly UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER: GLenum;
4358 readonly UNIFORM_BUFFER: GLenum;
4359 readonly UNIFORM_BUFFER_BINDING: GLenum;
4360 readonly UNIFORM_BUFFER_OFFSET_ALIGNMENT: GLenum;
4361 readonly UNIFORM_BUFFER_SIZE: GLenum;
4362 readonly UNIFORM_BUFFER_START: GLenum;
4363 readonly UNIFORM_IS_ROW_MAJOR: GLenum;
4364 readonly UNIFORM_MATRIX_STRIDE: GLenum;
4365 readonly UNIFORM_OFFSET: GLenum;
4366 readonly UNIFORM_SIZE: GLenum;
4367 readonly UNIFORM_TYPE: GLenum;
4368 readonly UNPACK_IMAGE_HEIGHT: GLenum;
4369 readonly UNPACK_ROW_LENGTH: GLenum;
4370 readonly UNPACK_SKIP_IMAGES: GLenum;
4371 readonly UNPACK_SKIP_PIXELS: GLenum;
4372 readonly UNPACK_SKIP_ROWS: GLenum;
4373 readonly UNSIGNALED: GLenum;
4374 readonly UNSIGNED_INT_10F_11F_11F_REV: GLenum;
4375 readonly UNSIGNED_INT_24_8: GLenum;
4376 readonly UNSIGNED_INT_2_10_10_10_REV: GLenum;
4377 readonly UNSIGNED_INT_5_9_9_9_REV: GLenum;
4378 readonly UNSIGNED_INT_SAMPLER_2D: GLenum;
4379 readonly UNSIGNED_INT_SAMPLER_2D_ARRAY: GLenum;
4380 readonly UNSIGNED_INT_SAMPLER_3D: GLenum;
4381 readonly UNSIGNED_INT_SAMPLER_CUBE: GLenum;
4382 readonly UNSIGNED_INT_VEC2: GLenum;
4383 readonly UNSIGNED_INT_VEC3: GLenum;
4384 readonly UNSIGNED_INT_VEC4: GLenum;
4385 readonly UNSIGNED_NORMALIZED: GLenum;
4386 readonly VERTEX_ARRAY_BINDING: GLenum;
4387 readonly VERTEX_ATTRIB_ARRAY_DIVISOR: GLenum;
4388 readonly VERTEX_ATTRIB_ARRAY_INTEGER: GLenum;
4389 readonly WAIT_FAILED: GLenum;
4392 interface WebGL2RenderingContextOverloads {
4393 bufferData(target: GLenum, size: GLsizeiptr, usage: GLenum): void;
4394 bufferData(target: GLenum, srcData: BufferSource | null, usage: GLenum): void;
4395 bufferData(target: GLenum, srcData: ArrayBufferView, usage: GLenum, srcOffset: GLuint, length?: GLuint): void;
4396 bufferSubData(target: GLenum, dstByteOffset: GLintptr, srcData: BufferSource): void;
4397 bufferSubData(target: GLenum, dstByteOffset: GLintptr, srcData: ArrayBufferView, srcOffset: GLuint, length?: GLuint): void;
4398 compressedTexImage2D(target: GLenum, level: GLint, internalformat: GLenum, width: GLsizei, height: GLsizei, border: GLint, imageSize: GLsizei, offset: GLintptr): void;
4399 compressedTexImage2D(target: GLenum, level: GLint, internalformat: GLenum, width: GLsizei, height: GLsizei, border: GLint, srcData: ArrayBufferView, srcOffset?: GLuint, srcLengthOverride?: GLuint): void;
4400 compressedTexSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, imageSize: GLsizei, offset: GLintptr): void;
4401 compressedTexSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, srcData: ArrayBufferView, srcOffset?: GLuint, srcLengthOverride?: GLuint): void;
4402 readPixels(x: GLint, y: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, dstData: ArrayBufferView | null): void;
4403 readPixels(x: GLint, y: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, offset: GLintptr): void;
4404 readPixels(x: GLint, y: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, dstData: ArrayBufferView, dstOffset: GLuint): void;
4405 texImage2D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, border: GLint, format: GLenum, type: GLenum, pixels: ArrayBufferView | null): void;
4406 texImage2D(target: GLenum, level: GLint, internalformat: GLint, format: GLenum, type: GLenum, source: TexImageSource): void;
4407 texImage2D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, border: GLint, format: GLenum, type: GLenum, pboOffset: GLintptr): void;
4408 texImage2D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, border: GLint, format: GLenum, type: GLenum, source: TexImageSource): void;
4409 texImage2D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, border: GLint, format: GLenum, type: GLenum, srcData: ArrayBufferView, srcOffset: GLuint): void;
4410 texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, pixels: ArrayBufferView | null): void;
4411 texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, format: GLenum, type: GLenum, source: TexImageSource): void;
4412 texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, pboOffset: GLintptr): void;
4413 texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, source: TexImageSource): void;
4414 texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, srcData: ArrayBufferView, srcOffset: GLuint): void;
4415 uniform1fv(location: WebGLUniformLocation | null, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void;
4416 uniform1iv(location: WebGLUniformLocation | null, data: Int32List, srcOffset?: GLuint, srcLength?: GLuint): void;
4417 uniform2fv(location: WebGLUniformLocation | null, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void;
4418 uniform2iv(location: WebGLUniformLocation | null, data: Int32List, srcOffset?: GLuint, srcLength?: GLuint): void;
4419 uniform3fv(location: WebGLUniformLocation | null, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void;
4420 uniform3iv(location: WebGLUniformLocation | null, data: Int32List, srcOffset?: GLuint, srcLength?: GLuint): void;
4421 uniform4fv(location: WebGLUniformLocation | null, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void;
4422 uniform4iv(location: WebGLUniformLocation | null, data: Int32List, srcOffset?: GLuint, srcLength?: GLuint): void;
4423 uniformMatrix2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void;
4424 uniformMatrix3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void;
4425 uniformMatrix4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void;
4428 /** Part of the WebGL API and represents the information returned by calling the WebGLRenderingContext.getActiveAttrib() and WebGLRenderingContext.getActiveUniform() methods. */
4429 interface WebGLActiveInfo {
4430 readonly name: string;
4431 readonly size: GLint;
4432 readonly type: GLenum;
4435 declare var WebGLActiveInfo: {
4436 prototype: WebGLActiveInfo;
4437 new(): WebGLActiveInfo;
4440 /** Part of the WebGL API and represents an opaque buffer object storing data such as vertices or colors. */
4441 interface WebGLBuffer extends WebGLObject {
4444 declare var WebGLBuffer: {
4445 prototype: WebGLBuffer;
4449 /** The WebContextEvent interface is part of the WebGL API and is an interface for an event that is generated in response to a status change to the WebGL rendering context. */
4450 interface WebGLContextEvent extends Event {
4451 readonly statusMessage: string;
4454 declare var WebGLContextEvent: {
4455 prototype: WebGLContextEvent;
4456 new(type: string, eventInit?: WebGLContextEventInit): WebGLContextEvent;
4459 /** Part of the WebGL API and represents a collection of buffers that serve as a rendering destination. */
4460 interface WebGLFramebuffer extends WebGLObject {
4463 declare var WebGLFramebuffer: {
4464 prototype: WebGLFramebuffer;
4465 new(): WebGLFramebuffer;
4468 interface WebGLObject {
4471 declare var WebGLObject: {
4472 prototype: WebGLObject;
4476 /** The WebGLProgram is part of the WebGL API and is a combination of two compiled WebGLShaders consisting of a vertex shader and a fragment shader (both written in GLSL). */
4477 interface WebGLProgram extends WebGLObject {
4480 declare var WebGLProgram: {
4481 prototype: WebGLProgram;
4482 new(): WebGLProgram;
4485 interface WebGLQuery extends WebGLObject {
4488 declare var WebGLQuery: {
4489 prototype: WebGLQuery;
4493 /** Part of the WebGL API and represents a buffer that can contain an image, or can be source or target of an rendering operation. */
4494 interface WebGLRenderbuffer extends WebGLObject {
4497 declare var WebGLRenderbuffer: {
4498 prototype: WebGLRenderbuffer;
4499 new(): WebGLRenderbuffer;
4502 /** Provides an interface to the OpenGL ES 2.0 graphics rendering context for the drawing surface of an HTML <canvas> element. */
4503 interface WebGLRenderingContext extends WebGLRenderingContextBase, WebGLRenderingContextOverloads {
4506 declare var WebGLRenderingContext: {
4507 prototype: WebGLRenderingContext;
4508 new(): WebGLRenderingContext;
4509 readonly ACTIVE_ATTRIBUTES: GLenum;
4510 readonly ACTIVE_TEXTURE: GLenum;
4511 readonly ACTIVE_UNIFORMS: GLenum;
4512 readonly ALIASED_LINE_WIDTH_RANGE: GLenum;
4513 readonly ALIASED_POINT_SIZE_RANGE: GLenum;
4514 readonly ALPHA: GLenum;
4515 readonly ALPHA_BITS: GLenum;
4516 readonly ALWAYS: GLenum;
4517 readonly ARRAY_BUFFER: GLenum;
4518 readonly ARRAY_BUFFER_BINDING: GLenum;
4519 readonly ATTACHED_SHADERS: GLenum;
4520 readonly BACK: GLenum;
4521 readonly BLEND: GLenum;
4522 readonly BLEND_COLOR: GLenum;
4523 readonly BLEND_DST_ALPHA: GLenum;
4524 readonly BLEND_DST_RGB: GLenum;
4525 readonly BLEND_EQUATION: GLenum;
4526 readonly BLEND_EQUATION_ALPHA: GLenum;
4527 readonly BLEND_EQUATION_RGB: GLenum;
4528 readonly BLEND_SRC_ALPHA: GLenum;
4529 readonly BLEND_SRC_RGB: GLenum;
4530 readonly BLUE_BITS: GLenum;
4531 readonly BOOL: GLenum;
4532 readonly BOOL_VEC2: GLenum;
4533 readonly BOOL_VEC3: GLenum;
4534 readonly BOOL_VEC4: GLenum;
4535 readonly BROWSER_DEFAULT_WEBGL: GLenum;
4536 readonly BUFFER_SIZE: GLenum;
4537 readonly BUFFER_USAGE: GLenum;
4538 readonly BYTE: GLenum;
4539 readonly CCW: GLenum;
4540 readonly CLAMP_TO_EDGE: GLenum;
4541 readonly COLOR_ATTACHMENT0: GLenum;
4542 readonly COLOR_BUFFER_BIT: GLenum;
4543 readonly COLOR_CLEAR_VALUE: GLenum;
4544 readonly COLOR_WRITEMASK: GLenum;
4545 readonly COMPILE_STATUS: GLenum;
4546 readonly COMPRESSED_TEXTURE_FORMATS: GLenum;
4547 readonly CONSTANT_ALPHA: GLenum;
4548 readonly CONSTANT_COLOR: GLenum;
4549 readonly CONTEXT_LOST_WEBGL: GLenum;
4550 readonly CULL_FACE: GLenum;
4551 readonly CULL_FACE_MODE: GLenum;
4552 readonly CURRENT_PROGRAM: GLenum;
4553 readonly CURRENT_VERTEX_ATTRIB: GLenum;
4554 readonly CW: GLenum;
4555 readonly DECR: GLenum;
4556 readonly DECR_WRAP: GLenum;
4557 readonly DELETE_STATUS: GLenum;
4558 readonly DEPTH_ATTACHMENT: GLenum;
4559 readonly DEPTH_BITS: GLenum;
4560 readonly DEPTH_BUFFER_BIT: GLenum;
4561 readonly DEPTH_CLEAR_VALUE: GLenum;
4562 readonly DEPTH_COMPONENT: GLenum;
4563 readonly DEPTH_COMPONENT16: GLenum;
4564 readonly DEPTH_FUNC: GLenum;
4565 readonly DEPTH_RANGE: GLenum;
4566 readonly DEPTH_STENCIL: GLenum;
4567 readonly DEPTH_STENCIL_ATTACHMENT: GLenum;
4568 readonly DEPTH_TEST: GLenum;
4569 readonly DEPTH_WRITEMASK: GLenum;
4570 readonly DITHER: GLenum;
4571 readonly DONT_CARE: GLenum;
4572 readonly DST_ALPHA: GLenum;
4573 readonly DST_COLOR: GLenum;
4574 readonly DYNAMIC_DRAW: GLenum;
4575 readonly ELEMENT_ARRAY_BUFFER: GLenum;
4576 readonly ELEMENT_ARRAY_BUFFER_BINDING: GLenum;
4577 readonly EQUAL: GLenum;
4578 readonly FASTEST: GLenum;
4579 readonly FLOAT: GLenum;
4580 readonly FLOAT_MAT2: GLenum;
4581 readonly FLOAT_MAT3: GLenum;
4582 readonly FLOAT_MAT4: GLenum;
4583 readonly FLOAT_VEC2: GLenum;
4584 readonly FLOAT_VEC3: GLenum;
4585 readonly FLOAT_VEC4: GLenum;
4586 readonly FRAGMENT_SHADER: GLenum;
4587 readonly FRAMEBUFFER: GLenum;
4588 readonly FRAMEBUFFER_ATTACHMENT_OBJECT_NAME: GLenum;
4589 readonly FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE: GLenum;
4590 readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE: GLenum;
4591 readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL: GLenum;
4592 readonly FRAMEBUFFER_BINDING: GLenum;
4593 readonly FRAMEBUFFER_COMPLETE: GLenum;
4594 readonly FRAMEBUFFER_INCOMPLETE_ATTACHMENT: GLenum;
4595 readonly FRAMEBUFFER_INCOMPLETE_DIMENSIONS: GLenum;
4596 readonly FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT: GLenum;
4597 readonly FRAMEBUFFER_UNSUPPORTED: GLenum;
4598 readonly FRONT: GLenum;
4599 readonly FRONT_AND_BACK: GLenum;
4600 readonly FRONT_FACE: GLenum;
4601 readonly FUNC_ADD: GLenum;
4602 readonly FUNC_REVERSE_SUBTRACT: GLenum;
4603 readonly FUNC_SUBTRACT: GLenum;
4604 readonly GENERATE_MIPMAP_HINT: GLenum;
4605 readonly GEQUAL: GLenum;
4606 readonly GREATER: GLenum;
4607 readonly GREEN_BITS: GLenum;
4608 readonly HIGH_FLOAT: GLenum;
4609 readonly HIGH_INT: GLenum;
4610 readonly IMPLEMENTATION_COLOR_READ_FORMAT: GLenum;
4611 readonly IMPLEMENTATION_COLOR_READ_TYPE: GLenum;
4612 readonly INCR: GLenum;
4613 readonly INCR_WRAP: GLenum;
4614 readonly INT: GLenum;
4615 readonly INT_VEC2: GLenum;
4616 readonly INT_VEC3: GLenum;
4617 readonly INT_VEC4: GLenum;
4618 readonly INVALID_ENUM: GLenum;
4619 readonly INVALID_FRAMEBUFFER_OPERATION: GLenum;
4620 readonly INVALID_OPERATION: GLenum;
4621 readonly INVALID_VALUE: GLenum;
4622 readonly INVERT: GLenum;
4623 readonly KEEP: GLenum;
4624 readonly LEQUAL: GLenum;
4625 readonly LESS: GLenum;
4626 readonly LINEAR: GLenum;
4627 readonly LINEAR_MIPMAP_LINEAR: GLenum;
4628 readonly LINEAR_MIPMAP_NEAREST: GLenum;
4629 readonly LINES: GLenum;
4630 readonly LINE_LOOP: GLenum;
4631 readonly LINE_STRIP: GLenum;
4632 readonly LINE_WIDTH: GLenum;
4633 readonly LINK_STATUS: GLenum;
4634 readonly LOW_FLOAT: GLenum;
4635 readonly LOW_INT: GLenum;
4636 readonly LUMINANCE: GLenum;
4637 readonly LUMINANCE_ALPHA: GLenum;
4638 readonly MAX_COMBINED_TEXTURE_IMAGE_UNITS: GLenum;
4639 readonly MAX_CUBE_MAP_TEXTURE_SIZE: GLenum;
4640 readonly MAX_FRAGMENT_UNIFORM_VECTORS: GLenum;
4641 readonly MAX_RENDERBUFFER_SIZE: GLenum;
4642 readonly MAX_TEXTURE_IMAGE_UNITS: GLenum;
4643 readonly MAX_TEXTURE_SIZE: GLenum;
4644 readonly MAX_VARYING_VECTORS: GLenum;
4645 readonly MAX_VERTEX_ATTRIBS: GLenum;
4646 readonly MAX_VERTEX_TEXTURE_IMAGE_UNITS: GLenum;
4647 readonly MAX_VERTEX_UNIFORM_VECTORS: GLenum;
4648 readonly MAX_VIEWPORT_DIMS: GLenum;
4649 readonly MEDIUM_FLOAT: GLenum;
4650 readonly MEDIUM_INT: GLenum;
4651 readonly MIRRORED_REPEAT: GLenum;
4652 readonly NEAREST: GLenum;
4653 readonly NEAREST_MIPMAP_LINEAR: GLenum;
4654 readonly NEAREST_MIPMAP_NEAREST: GLenum;
4655 readonly NEVER: GLenum;
4656 readonly NICEST: GLenum;
4657 readonly NONE: GLenum;
4658 readonly NOTEQUAL: GLenum;
4659 readonly NO_ERROR: GLenum;
4660 readonly ONE: GLenum;
4661 readonly ONE_MINUS_CONSTANT_ALPHA: GLenum;
4662 readonly ONE_MINUS_CONSTANT_COLOR: GLenum;
4663 readonly ONE_MINUS_DST_ALPHA: GLenum;
4664 readonly ONE_MINUS_DST_COLOR: GLenum;
4665 readonly ONE_MINUS_SRC_ALPHA: GLenum;
4666 readonly ONE_MINUS_SRC_COLOR: GLenum;
4667 readonly OUT_OF_MEMORY: GLenum;
4668 readonly PACK_ALIGNMENT: GLenum;
4669 readonly POINTS: GLenum;
4670 readonly POLYGON_OFFSET_FACTOR: GLenum;
4671 readonly POLYGON_OFFSET_FILL: GLenum;
4672 readonly POLYGON_OFFSET_UNITS: GLenum;
4673 readonly RED_BITS: GLenum;
4674 readonly RENDERBUFFER: GLenum;
4675 readonly RENDERBUFFER_ALPHA_SIZE: GLenum;
4676 readonly RENDERBUFFER_BINDING: GLenum;
4677 readonly RENDERBUFFER_BLUE_SIZE: GLenum;
4678 readonly RENDERBUFFER_DEPTH_SIZE: GLenum;
4679 readonly RENDERBUFFER_GREEN_SIZE: GLenum;
4680 readonly RENDERBUFFER_HEIGHT: GLenum;
4681 readonly RENDERBUFFER_INTERNAL_FORMAT: GLenum;
4682 readonly RENDERBUFFER_RED_SIZE: GLenum;
4683 readonly RENDERBUFFER_STENCIL_SIZE: GLenum;
4684 readonly RENDERBUFFER_WIDTH: GLenum;
4685 readonly RENDERER: GLenum;
4686 readonly REPEAT: GLenum;
4687 readonly REPLACE: GLenum;
4688 readonly RGB: GLenum;
4689 readonly RGB565: GLenum;
4690 readonly RGB5_A1: GLenum;
4691 readonly RGBA: GLenum;
4692 readonly RGBA4: GLenum;
4693 readonly SAMPLER_2D: GLenum;
4694 readonly SAMPLER_CUBE: GLenum;
4695 readonly SAMPLES: GLenum;
4696 readonly SAMPLE_ALPHA_TO_COVERAGE: GLenum;
4697 readonly SAMPLE_BUFFERS: GLenum;
4698 readonly SAMPLE_COVERAGE: GLenum;
4699 readonly SAMPLE_COVERAGE_INVERT: GLenum;
4700 readonly SAMPLE_COVERAGE_VALUE: GLenum;
4701 readonly SCISSOR_BOX: GLenum;
4702 readonly SCISSOR_TEST: GLenum;
4703 readonly SHADER_TYPE: GLenum;
4704 readonly SHADING_LANGUAGE_VERSION: GLenum;
4705 readonly SHORT: GLenum;
4706 readonly SRC_ALPHA: GLenum;
4707 readonly SRC_ALPHA_SATURATE: GLenum;
4708 readonly SRC_COLOR: GLenum;
4709 readonly STATIC_DRAW: GLenum;
4710 readonly STENCIL_ATTACHMENT: GLenum;
4711 readonly STENCIL_BACK_FAIL: GLenum;
4712 readonly STENCIL_BACK_FUNC: GLenum;
4713 readonly STENCIL_BACK_PASS_DEPTH_FAIL: GLenum;
4714 readonly STENCIL_BACK_PASS_DEPTH_PASS: GLenum;
4715 readonly STENCIL_BACK_REF: GLenum;
4716 readonly STENCIL_BACK_VALUE_MASK: GLenum;
4717 readonly STENCIL_BACK_WRITEMASK: GLenum;
4718 readonly STENCIL_BITS: GLenum;
4719 readonly STENCIL_BUFFER_BIT: GLenum;
4720 readonly STENCIL_CLEAR_VALUE: GLenum;
4721 readonly STENCIL_FAIL: GLenum;
4722 readonly STENCIL_FUNC: GLenum;
4723 readonly STENCIL_INDEX8: GLenum;
4724 readonly STENCIL_PASS_DEPTH_FAIL: GLenum;
4725 readonly STENCIL_PASS_DEPTH_PASS: GLenum;
4726 readonly STENCIL_REF: GLenum;
4727 readonly STENCIL_TEST: GLenum;
4728 readonly STENCIL_VALUE_MASK: GLenum;
4729 readonly STENCIL_WRITEMASK: GLenum;
4730 readonly STREAM_DRAW: GLenum;
4731 readonly SUBPIXEL_BITS: GLenum;
4732 readonly TEXTURE: GLenum;
4733 readonly TEXTURE0: GLenum;
4734 readonly TEXTURE1: GLenum;
4735 readonly TEXTURE10: GLenum;
4736 readonly TEXTURE11: GLenum;
4737 readonly TEXTURE12: GLenum;
4738 readonly TEXTURE13: GLenum;
4739 readonly TEXTURE14: GLenum;
4740 readonly TEXTURE15: GLenum;
4741 readonly TEXTURE16: GLenum;
4742 readonly TEXTURE17: GLenum;
4743 readonly TEXTURE18: GLenum;
4744 readonly TEXTURE19: GLenum;
4745 readonly TEXTURE2: GLenum;
4746 readonly TEXTURE20: GLenum;
4747 readonly TEXTURE21: GLenum;
4748 readonly TEXTURE22: GLenum;
4749 readonly TEXTURE23: GLenum;
4750 readonly TEXTURE24: GLenum;
4751 readonly TEXTURE25: GLenum;
4752 readonly TEXTURE26: GLenum;
4753 readonly TEXTURE27: GLenum;
4754 readonly TEXTURE28: GLenum;
4755 readonly TEXTURE29: GLenum;
4756 readonly TEXTURE3: GLenum;
4757 readonly TEXTURE30: GLenum;
4758 readonly TEXTURE31: GLenum;
4759 readonly TEXTURE4: GLenum;
4760 readonly TEXTURE5: GLenum;
4761 readonly TEXTURE6: GLenum;
4762 readonly TEXTURE7: GLenum;
4763 readonly TEXTURE8: GLenum;
4764 readonly TEXTURE9: GLenum;
4765 readonly TEXTURE_2D: GLenum;
4766 readonly TEXTURE_BINDING_2D: GLenum;
4767 readonly TEXTURE_BINDING_CUBE_MAP: GLenum;
4768 readonly TEXTURE_CUBE_MAP: GLenum;
4769 readonly TEXTURE_CUBE_MAP_NEGATIVE_X: GLenum;
4770 readonly TEXTURE_CUBE_MAP_NEGATIVE_Y: GLenum;
4771 readonly TEXTURE_CUBE_MAP_NEGATIVE_Z: GLenum;
4772 readonly TEXTURE_CUBE_MAP_POSITIVE_X: GLenum;
4773 readonly TEXTURE_CUBE_MAP_POSITIVE_Y: GLenum;
4774 readonly TEXTURE_CUBE_MAP_POSITIVE_Z: GLenum;
4775 readonly TEXTURE_MAG_FILTER: GLenum;
4776 readonly TEXTURE_MIN_FILTER: GLenum;
4777 readonly TEXTURE_WRAP_S: GLenum;
4778 readonly TEXTURE_WRAP_T: GLenum;
4779 readonly TRIANGLES: GLenum;
4780 readonly TRIANGLE_FAN: GLenum;
4781 readonly TRIANGLE_STRIP: GLenum;
4782 readonly UNPACK_ALIGNMENT: GLenum;
4783 readonly UNPACK_COLORSPACE_CONVERSION_WEBGL: GLenum;
4784 readonly UNPACK_FLIP_Y_WEBGL: GLenum;
4785 readonly UNPACK_PREMULTIPLY_ALPHA_WEBGL: GLenum;
4786 readonly UNSIGNED_BYTE: GLenum;
4787 readonly UNSIGNED_INT: GLenum;
4788 readonly UNSIGNED_SHORT: GLenum;
4789 readonly UNSIGNED_SHORT_4_4_4_4: GLenum;
4790 readonly UNSIGNED_SHORT_5_5_5_1: GLenum;
4791 readonly UNSIGNED_SHORT_5_6_5: GLenum;
4792 readonly VALIDATE_STATUS: GLenum;
4793 readonly VENDOR: GLenum;
4794 readonly VERSION: GLenum;
4795 readonly VERTEX_ATTRIB_ARRAY_BUFFER_BINDING: GLenum;
4796 readonly VERTEX_ATTRIB_ARRAY_ENABLED: GLenum;
4797 readonly VERTEX_ATTRIB_ARRAY_NORMALIZED: GLenum;
4798 readonly VERTEX_ATTRIB_ARRAY_POINTER: GLenum;
4799 readonly VERTEX_ATTRIB_ARRAY_SIZE: GLenum;
4800 readonly VERTEX_ATTRIB_ARRAY_STRIDE: GLenum;
4801 readonly VERTEX_ATTRIB_ARRAY_TYPE: GLenum;
4802 readonly VERTEX_SHADER: GLenum;
4803 readonly VIEWPORT: GLenum;
4804 readonly ZERO: GLenum;
4807 interface WebGLRenderingContextBase {
4808 readonly canvas: OffscreenCanvas;
4809 readonly drawingBufferHeight: GLsizei;
4810 readonly drawingBufferWidth: GLsizei;
4811 activeTexture(texture: GLenum): void;
4812 attachShader(program: WebGLProgram, shader: WebGLShader): void;
4813 bindAttribLocation(program: WebGLProgram, index: GLuint, name: string): void;
4814 bindBuffer(target: GLenum, buffer: WebGLBuffer | null): void;
4815 bindFramebuffer(target: GLenum, framebuffer: WebGLFramebuffer | null): void;
4816 bindRenderbuffer(target: GLenum, renderbuffer: WebGLRenderbuffer | null): void;
4817 bindTexture(target: GLenum, texture: WebGLTexture | null): void;
4818 blendColor(red: GLclampf, green: GLclampf, blue: GLclampf, alpha: GLclampf): void;
4819 blendEquation(mode: GLenum): void;
4820 blendEquationSeparate(modeRGB: GLenum, modeAlpha: GLenum): void;
4821 blendFunc(sfactor: GLenum, dfactor: GLenum): void;
4822 blendFuncSeparate(srcRGB: GLenum, dstRGB: GLenum, srcAlpha: GLenum, dstAlpha: GLenum): void;
4823 checkFramebufferStatus(target: GLenum): GLenum;
4824 clear(mask: GLbitfield): void;
4825 clearColor(red: GLclampf, green: GLclampf, blue: GLclampf, alpha: GLclampf): void;
4826 clearDepth(depth: GLclampf): void;
4827 clearStencil(s: GLint): void;
4828 colorMask(red: GLboolean, green: GLboolean, blue: GLboolean, alpha: GLboolean): void;
4829 compileShader(shader: WebGLShader): void;
4830 copyTexImage2D(target: GLenum, level: GLint, internalformat: GLenum, x: GLint, y: GLint, width: GLsizei, height: GLsizei, border: GLint): void;
4831 copyTexSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, x: GLint, y: GLint, width: GLsizei, height: GLsizei): void;
4832 createBuffer(): WebGLBuffer | null;
4833 createFramebuffer(): WebGLFramebuffer | null;
4834 createProgram(): WebGLProgram | null;
4835 createRenderbuffer(): WebGLRenderbuffer | null;
4836 createShader(type: GLenum): WebGLShader | null;
4837 createTexture(): WebGLTexture | null;
4838 cullFace(mode: GLenum): void;
4839 deleteBuffer(buffer: WebGLBuffer | null): void;
4840 deleteFramebuffer(framebuffer: WebGLFramebuffer | null): void;
4841 deleteProgram(program: WebGLProgram | null): void;
4842 deleteRenderbuffer(renderbuffer: WebGLRenderbuffer | null): void;
4843 deleteShader(shader: WebGLShader | null): void;
4844 deleteTexture(texture: WebGLTexture | null): void;
4845 depthFunc(func: GLenum): void;
4846 depthMask(flag: GLboolean): void;
4847 depthRange(zNear: GLclampf, zFar: GLclampf): void;
4848 detachShader(program: WebGLProgram, shader: WebGLShader): void;
4849 disable(cap: GLenum): void;
4850 disableVertexAttribArray(index: GLuint): void;
4851 drawArrays(mode: GLenum, first: GLint, count: GLsizei): void;
4852 drawElements(mode: GLenum, count: GLsizei, type: GLenum, offset: GLintptr): void;
4853 enable(cap: GLenum): void;
4854 enableVertexAttribArray(index: GLuint): void;
4857 framebufferRenderbuffer(target: GLenum, attachment: GLenum, renderbuffertarget: GLenum, renderbuffer: WebGLRenderbuffer | null): void;
4858 framebufferTexture2D(target: GLenum, attachment: GLenum, textarget: GLenum, texture: WebGLTexture | null, level: GLint): void;
4859 frontFace(mode: GLenum): void;
4860 generateMipmap(target: GLenum): void;
4861 getActiveAttrib(program: WebGLProgram, index: GLuint): WebGLActiveInfo | null;
4862 getActiveUniform(program: WebGLProgram, index: GLuint): WebGLActiveInfo | null;
4863 getAttachedShaders(program: WebGLProgram): WebGLShader[] | null;
4864 getAttribLocation(program: WebGLProgram, name: string): GLint;
4865 getBufferParameter(target: GLenum, pname: GLenum): any;
4866 getContextAttributes(): WebGLContextAttributes | null;
4868 getExtension(extensionName: "EXT_blend_minmax"): EXT_blend_minmax | null;
4869 getExtension(extensionName: "EXT_texture_filter_anisotropic"): EXT_texture_filter_anisotropic | null;
4870 getExtension(extensionName: "EXT_frag_depth"): EXT_frag_depth | null;
4871 getExtension(extensionName: "EXT_shader_texture_lod"): EXT_shader_texture_lod | null;
4872 getExtension(extensionName: "EXT_sRGB"): EXT_sRGB | null;
4873 getExtension(extensionName: "OES_vertex_array_object"): OES_vertex_array_object | null;
4874 getExtension(extensionName: "WEBGL_color_buffer_float"): WEBGL_color_buffer_float | null;
4875 getExtension(extensionName: "WEBGL_compressed_texture_astc"): WEBGL_compressed_texture_astc | null;
4876 getExtension(extensionName: "WEBGL_compressed_texture_s3tc_srgb"): WEBGL_compressed_texture_s3tc_srgb | null;
4877 getExtension(extensionName: "WEBGL_debug_shaders"): WEBGL_debug_shaders | null;
4878 getExtension(extensionName: "WEBGL_draw_buffers"): WEBGL_draw_buffers | null;
4879 getExtension(extensionName: "WEBGL_lose_context"): WEBGL_lose_context | null;
4880 getExtension(extensionName: "WEBGL_depth_texture"): WEBGL_depth_texture | null;
4881 getExtension(extensionName: "WEBGL_debug_renderer_info"): WEBGL_debug_renderer_info | null;
4882 getExtension(extensionName: "WEBGL_compressed_texture_s3tc"): WEBGL_compressed_texture_s3tc | null;
4883 getExtension(extensionName: "OES_texture_half_float_linear"): OES_texture_half_float_linear | null;
4884 getExtension(extensionName: "OES_texture_half_float"): OES_texture_half_float | null;
4885 getExtension(extensionName: "OES_texture_float_linear"): OES_texture_float_linear | null;
4886 getExtension(extensionName: "OES_texture_float"): OES_texture_float | null;
4887 getExtension(extensionName: "OES_standard_derivatives"): OES_standard_derivatives | null;
4888 getExtension(extensionName: "OES_element_index_uint"): OES_element_index_uint | null;
4889 getExtension(extensionName: "ANGLE_instanced_arrays"): ANGLE_instanced_arrays | null;
4890 getExtension(extensionName: string): any;
4891 getFramebufferAttachmentParameter(target: GLenum, attachment: GLenum, pname: GLenum): any;
4892 getParameter(pname: GLenum): any;
4893 getProgramInfoLog(program: WebGLProgram): string | null;
4894 getProgramParameter(program: WebGLProgram, pname: GLenum): any;
4895 getRenderbufferParameter(target: GLenum, pname: GLenum): any;
4896 getShaderInfoLog(shader: WebGLShader): string | null;
4897 getShaderParameter(shader: WebGLShader, pname: GLenum): any;
4898 getShaderPrecisionFormat(shadertype: GLenum, precisiontype: GLenum): WebGLShaderPrecisionFormat | null;
4899 getShaderSource(shader: WebGLShader): string | null;
4900 getSupportedExtensions(): string[] | null;
4901 getTexParameter(target: GLenum, pname: GLenum): any;
4902 getUniform(program: WebGLProgram, location: WebGLUniformLocation): any;
4903 getUniformLocation(program: WebGLProgram, name: string): WebGLUniformLocation | null;
4904 getVertexAttrib(index: GLuint, pname: GLenum): any;
4905 getVertexAttribOffset(index: GLuint, pname: GLenum): GLintptr;
4906 hint(target: GLenum, mode: GLenum): void;
4907 isBuffer(buffer: WebGLBuffer | null): GLboolean;
4908 isContextLost(): boolean;
4909 isEnabled(cap: GLenum): GLboolean;
4910 isFramebuffer(framebuffer: WebGLFramebuffer | null): GLboolean;
4911 isProgram(program: WebGLProgram | null): GLboolean;
4912 isRenderbuffer(renderbuffer: WebGLRenderbuffer | null): GLboolean;
4913 isShader(shader: WebGLShader | null): GLboolean;
4914 isTexture(texture: WebGLTexture | null): GLboolean;
4915 lineWidth(width: GLfloat): void;
4916 linkProgram(program: WebGLProgram): void;
4917 pixelStorei(pname: GLenum, param: GLint | GLboolean): void;
4918 polygonOffset(factor: GLfloat, units: GLfloat): void;
4919 renderbufferStorage(target: GLenum, internalformat: GLenum, width: GLsizei, height: GLsizei): void;
4920 sampleCoverage(value: GLclampf, invert: GLboolean): void;
4921 scissor(x: GLint, y: GLint, width: GLsizei, height: GLsizei): void;
4922 shaderSource(shader: WebGLShader, source: string): void;
4923 stencilFunc(func: GLenum, ref: GLint, mask: GLuint): void;
4924 stencilFuncSeparate(face: GLenum, func: GLenum, ref: GLint, mask: GLuint): void;
4925 stencilMask(mask: GLuint): void;
4926 stencilMaskSeparate(face: GLenum, mask: GLuint): void;
4927 stencilOp(fail: GLenum, zfail: GLenum, zpass: GLenum): void;
4928 stencilOpSeparate(face: GLenum, fail: GLenum, zfail: GLenum, zpass: GLenum): void;
4929 texParameterf(target: GLenum, pname: GLenum, param: GLfloat): void;
4930 texParameteri(target: GLenum, pname: GLenum, param: GLint): void;
4931 uniform1f(location: WebGLUniformLocation | null, x: GLfloat): void;
4932 uniform1i(location: WebGLUniformLocation | null, x: GLint): void;
4933 uniform2f(location: WebGLUniformLocation | null, x: GLfloat, y: GLfloat): void;
4934 uniform2i(location: WebGLUniformLocation | null, x: GLint, y: GLint): void;
4935 uniform3f(location: WebGLUniformLocation | null, x: GLfloat, y: GLfloat, z: GLfloat): void;
4936 uniform3i(location: WebGLUniformLocation | null, x: GLint, y: GLint, z: GLint): void;
4937 uniform4f(location: WebGLUniformLocation | null, x: GLfloat, y: GLfloat, z: GLfloat, w: GLfloat): void;
4938 uniform4i(location: WebGLUniformLocation | null, x: GLint, y: GLint, z: GLint, w: GLint): void;
4939 useProgram(program: WebGLProgram | null): void;
4940 validateProgram(program: WebGLProgram): void;
4941 vertexAttrib1f(index: GLuint, x: GLfloat): void;
4942 vertexAttrib1fv(index: GLuint, values: Float32List): void;
4943 vertexAttrib2f(index: GLuint, x: GLfloat, y: GLfloat): void;
4944 vertexAttrib2fv(index: GLuint, values: Float32List): void;
4945 vertexAttrib3f(index: GLuint, x: GLfloat, y: GLfloat, z: GLfloat): void;
4946 vertexAttrib3fv(index: GLuint, values: Float32List): void;
4947 vertexAttrib4f(index: GLuint, x: GLfloat, y: GLfloat, z: GLfloat, w: GLfloat): void;
4948 vertexAttrib4fv(index: GLuint, values: Float32List): void;
4949 vertexAttribPointer(index: GLuint, size: GLint, type: GLenum, normalized: GLboolean, stride: GLsizei, offset: GLintptr): void;
4950 viewport(x: GLint, y: GLint, width: GLsizei, height: GLsizei): void;
4951 readonly ACTIVE_ATTRIBUTES: GLenum;
4952 readonly ACTIVE_TEXTURE: GLenum;
4953 readonly ACTIVE_UNIFORMS: GLenum;
4954 readonly ALIASED_LINE_WIDTH_RANGE: GLenum;
4955 readonly ALIASED_POINT_SIZE_RANGE: GLenum;
4956 readonly ALPHA: GLenum;
4957 readonly ALPHA_BITS: GLenum;
4958 readonly ALWAYS: GLenum;
4959 readonly ARRAY_BUFFER: GLenum;
4960 readonly ARRAY_BUFFER_BINDING: GLenum;
4961 readonly ATTACHED_SHADERS: GLenum;
4962 readonly BACK: GLenum;
4963 readonly BLEND: GLenum;
4964 readonly BLEND_COLOR: GLenum;
4965 readonly BLEND_DST_ALPHA: GLenum;
4966 readonly BLEND_DST_RGB: GLenum;
4967 readonly BLEND_EQUATION: GLenum;
4968 readonly BLEND_EQUATION_ALPHA: GLenum;
4969 readonly BLEND_EQUATION_RGB: GLenum;
4970 readonly BLEND_SRC_ALPHA: GLenum;
4971 readonly BLEND_SRC_RGB: GLenum;
4972 readonly BLUE_BITS: GLenum;
4973 readonly BOOL: GLenum;
4974 readonly BOOL_VEC2: GLenum;
4975 readonly BOOL_VEC3: GLenum;
4976 readonly BOOL_VEC4: GLenum;
4977 readonly BROWSER_DEFAULT_WEBGL: GLenum;
4978 readonly BUFFER_SIZE: GLenum;
4979 readonly BUFFER_USAGE: GLenum;
4980 readonly BYTE: GLenum;
4981 readonly CCW: GLenum;
4982 readonly CLAMP_TO_EDGE: GLenum;
4983 readonly COLOR_ATTACHMENT0: GLenum;
4984 readonly COLOR_BUFFER_BIT: GLenum;
4985 readonly COLOR_CLEAR_VALUE: GLenum;
4986 readonly COLOR_WRITEMASK: GLenum;
4987 readonly COMPILE_STATUS: GLenum;
4988 readonly COMPRESSED_TEXTURE_FORMATS: GLenum;
4989 readonly CONSTANT_ALPHA: GLenum;
4990 readonly CONSTANT_COLOR: GLenum;
4991 readonly CONTEXT_LOST_WEBGL: GLenum;
4992 readonly CULL_FACE: GLenum;
4993 readonly CULL_FACE_MODE: GLenum;
4994 readonly CURRENT_PROGRAM: GLenum;
4995 readonly CURRENT_VERTEX_ATTRIB: GLenum;
4996 readonly CW: GLenum;
4997 readonly DECR: GLenum;
4998 readonly DECR_WRAP: GLenum;
4999 readonly DELETE_STATUS: GLenum;
5000 readonly DEPTH_ATTACHMENT: GLenum;
5001 readonly DEPTH_BITS: GLenum;
5002 readonly DEPTH_BUFFER_BIT: GLenum;
5003 readonly DEPTH_CLEAR_VALUE: GLenum;
5004 readonly DEPTH_COMPONENT: GLenum;
5005 readonly DEPTH_COMPONENT16: GLenum;
5006 readonly DEPTH_FUNC: GLenum;
5007 readonly DEPTH_RANGE: GLenum;
5008 readonly DEPTH_STENCIL: GLenum;
5009 readonly DEPTH_STENCIL_ATTACHMENT: GLenum;
5010 readonly DEPTH_TEST: GLenum;
5011 readonly DEPTH_WRITEMASK: GLenum;
5012 readonly DITHER: GLenum;
5013 readonly DONT_CARE: GLenum;
5014 readonly DST_ALPHA: GLenum;
5015 readonly DST_COLOR: GLenum;
5016 readonly DYNAMIC_DRAW: GLenum;
5017 readonly ELEMENT_ARRAY_BUFFER: GLenum;
5018 readonly ELEMENT_ARRAY_BUFFER_BINDING: GLenum;
5019 readonly EQUAL: GLenum;
5020 readonly FASTEST: GLenum;
5021 readonly FLOAT: GLenum;
5022 readonly FLOAT_MAT2: GLenum;
5023 readonly FLOAT_MAT3: GLenum;
5024 readonly FLOAT_MAT4: GLenum;
5025 readonly FLOAT_VEC2: GLenum;
5026 readonly FLOAT_VEC3: GLenum;
5027 readonly FLOAT_VEC4: GLenum;
5028 readonly FRAGMENT_SHADER: GLenum;
5029 readonly FRAMEBUFFER: GLenum;
5030 readonly FRAMEBUFFER_ATTACHMENT_OBJECT_NAME: GLenum;
5031 readonly FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE: GLenum;
5032 readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE: GLenum;
5033 readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL: GLenum;
5034 readonly FRAMEBUFFER_BINDING: GLenum;
5035 readonly FRAMEBUFFER_COMPLETE: GLenum;
5036 readonly FRAMEBUFFER_INCOMPLETE_ATTACHMENT: GLenum;
5037 readonly FRAMEBUFFER_INCOMPLETE_DIMENSIONS: GLenum;
5038 readonly FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT: GLenum;
5039 readonly FRAMEBUFFER_UNSUPPORTED: GLenum;
5040 readonly FRONT: GLenum;
5041 readonly FRONT_AND_BACK: GLenum;
5042 readonly FRONT_FACE: GLenum;
5043 readonly FUNC_ADD: GLenum;
5044 readonly FUNC_REVERSE_SUBTRACT: GLenum;
5045 readonly FUNC_SUBTRACT: GLenum;
5046 readonly GENERATE_MIPMAP_HINT: GLenum;
5047 readonly GEQUAL: GLenum;
5048 readonly GREATER: GLenum;
5049 readonly GREEN_BITS: GLenum;
5050 readonly HIGH_FLOAT: GLenum;
5051 readonly HIGH_INT: GLenum;
5052 readonly IMPLEMENTATION_COLOR_READ_FORMAT: GLenum;
5053 readonly IMPLEMENTATION_COLOR_READ_TYPE: GLenum;
5054 readonly INCR: GLenum;
5055 readonly INCR_WRAP: GLenum;
5056 readonly INT: GLenum;
5057 readonly INT_VEC2: GLenum;
5058 readonly INT_VEC3: GLenum;
5059 readonly INT_VEC4: GLenum;
5060 readonly INVALID_ENUM: GLenum;
5061 readonly INVALID_FRAMEBUFFER_OPERATION: GLenum;
5062 readonly INVALID_OPERATION: GLenum;
5063 readonly INVALID_VALUE: GLenum;
5064 readonly INVERT: GLenum;
5065 readonly KEEP: GLenum;
5066 readonly LEQUAL: GLenum;
5067 readonly LESS: GLenum;
5068 readonly LINEAR: GLenum;
5069 readonly LINEAR_MIPMAP_LINEAR: GLenum;
5070 readonly LINEAR_MIPMAP_NEAREST: GLenum;
5071 readonly LINES: GLenum;
5072 readonly LINE_LOOP: GLenum;
5073 readonly LINE_STRIP: GLenum;
5074 readonly LINE_WIDTH: GLenum;
5075 readonly LINK_STATUS: GLenum;
5076 readonly LOW_FLOAT: GLenum;
5077 readonly LOW_INT: GLenum;
5078 readonly LUMINANCE: GLenum;
5079 readonly LUMINANCE_ALPHA: GLenum;
5080 readonly MAX_COMBINED_TEXTURE_IMAGE_UNITS: GLenum;
5081 readonly MAX_CUBE_MAP_TEXTURE_SIZE: GLenum;
5082 readonly MAX_FRAGMENT_UNIFORM_VECTORS: GLenum;
5083 readonly MAX_RENDERBUFFER_SIZE: GLenum;
5084 readonly MAX_TEXTURE_IMAGE_UNITS: GLenum;
5085 readonly MAX_TEXTURE_SIZE: GLenum;
5086 readonly MAX_VARYING_VECTORS: GLenum;
5087 readonly MAX_VERTEX_ATTRIBS: GLenum;
5088 readonly MAX_VERTEX_TEXTURE_IMAGE_UNITS: GLenum;
5089 readonly MAX_VERTEX_UNIFORM_VECTORS: GLenum;
5090 readonly MAX_VIEWPORT_DIMS: GLenum;
5091 readonly MEDIUM_FLOAT: GLenum;
5092 readonly MEDIUM_INT: GLenum;
5093 readonly MIRRORED_REPEAT: GLenum;
5094 readonly NEAREST: GLenum;
5095 readonly NEAREST_MIPMAP_LINEAR: GLenum;
5096 readonly NEAREST_MIPMAP_NEAREST: GLenum;
5097 readonly NEVER: GLenum;
5098 readonly NICEST: GLenum;
5099 readonly NONE: GLenum;
5100 readonly NOTEQUAL: GLenum;
5101 readonly NO_ERROR: GLenum;
5102 readonly ONE: GLenum;
5103 readonly ONE_MINUS_CONSTANT_ALPHA: GLenum;
5104 readonly ONE_MINUS_CONSTANT_COLOR: GLenum;
5105 readonly ONE_MINUS_DST_ALPHA: GLenum;
5106 readonly ONE_MINUS_DST_COLOR: GLenum;
5107 readonly ONE_MINUS_SRC_ALPHA: GLenum;
5108 readonly ONE_MINUS_SRC_COLOR: GLenum;
5109 readonly OUT_OF_MEMORY: GLenum;
5110 readonly PACK_ALIGNMENT: GLenum;
5111 readonly POINTS: GLenum;
5112 readonly POLYGON_OFFSET_FACTOR: GLenum;
5113 readonly POLYGON_OFFSET_FILL: GLenum;
5114 readonly POLYGON_OFFSET_UNITS: GLenum;
5115 readonly RED_BITS: GLenum;
5116 readonly RENDERBUFFER: GLenum;
5117 readonly RENDERBUFFER_ALPHA_SIZE: GLenum;
5118 readonly RENDERBUFFER_BINDING: GLenum;
5119 readonly RENDERBUFFER_BLUE_SIZE: GLenum;
5120 readonly RENDERBUFFER_DEPTH_SIZE: GLenum;
5121 readonly RENDERBUFFER_GREEN_SIZE: GLenum;
5122 readonly RENDERBUFFER_HEIGHT: GLenum;
5123 readonly RENDERBUFFER_INTERNAL_FORMAT: GLenum;
5124 readonly RENDERBUFFER_RED_SIZE: GLenum;
5125 readonly RENDERBUFFER_STENCIL_SIZE: GLenum;
5126 readonly RENDERBUFFER_WIDTH: GLenum;
5127 readonly RENDERER: GLenum;
5128 readonly REPEAT: GLenum;
5129 readonly REPLACE: GLenum;
5130 readonly RGB: GLenum;
5131 readonly RGB565: GLenum;
5132 readonly RGB5_A1: GLenum;
5133 readonly RGBA: GLenum;
5134 readonly RGBA4: GLenum;
5135 readonly SAMPLER_2D: GLenum;
5136 readonly SAMPLER_CUBE: GLenum;
5137 readonly SAMPLES: GLenum;
5138 readonly SAMPLE_ALPHA_TO_COVERAGE: GLenum;
5139 readonly SAMPLE_BUFFERS: GLenum;
5140 readonly SAMPLE_COVERAGE: GLenum;
5141 readonly SAMPLE_COVERAGE_INVERT: GLenum;
5142 readonly SAMPLE_COVERAGE_VALUE: GLenum;
5143 readonly SCISSOR_BOX: GLenum;
5144 readonly SCISSOR_TEST: GLenum;
5145 readonly SHADER_TYPE: GLenum;
5146 readonly SHADING_LANGUAGE_VERSION: GLenum;
5147 readonly SHORT: GLenum;
5148 readonly SRC_ALPHA: GLenum;
5149 readonly SRC_ALPHA_SATURATE: GLenum;
5150 readonly SRC_COLOR: GLenum;
5151 readonly STATIC_DRAW: GLenum;
5152 readonly STENCIL_ATTACHMENT: GLenum;
5153 readonly STENCIL_BACK_FAIL: GLenum;
5154 readonly STENCIL_BACK_FUNC: GLenum;
5155 readonly STENCIL_BACK_PASS_DEPTH_FAIL: GLenum;
5156 readonly STENCIL_BACK_PASS_DEPTH_PASS: GLenum;
5157 readonly STENCIL_BACK_REF: GLenum;
5158 readonly STENCIL_BACK_VALUE_MASK: GLenum;
5159 readonly STENCIL_BACK_WRITEMASK: GLenum;
5160 readonly STENCIL_BITS: GLenum;
5161 readonly STENCIL_BUFFER_BIT: GLenum;
5162 readonly STENCIL_CLEAR_VALUE: GLenum;
5163 readonly STENCIL_FAIL: GLenum;
5164 readonly STENCIL_FUNC: GLenum;
5165 readonly STENCIL_INDEX8: GLenum;
5166 readonly STENCIL_PASS_DEPTH_FAIL: GLenum;
5167 readonly STENCIL_PASS_DEPTH_PASS: GLenum;
5168 readonly STENCIL_REF: GLenum;
5169 readonly STENCIL_TEST: GLenum;
5170 readonly STENCIL_VALUE_MASK: GLenum;
5171 readonly STENCIL_WRITEMASK: GLenum;
5172 readonly STREAM_DRAW: GLenum;
5173 readonly SUBPIXEL_BITS: GLenum;
5174 readonly TEXTURE: GLenum;
5175 readonly TEXTURE0: GLenum;
5176 readonly TEXTURE1: GLenum;
5177 readonly TEXTURE10: GLenum;
5178 readonly TEXTURE11: GLenum;
5179 readonly TEXTURE12: GLenum;
5180 readonly TEXTURE13: GLenum;
5181 readonly TEXTURE14: GLenum;
5182 readonly TEXTURE15: GLenum;
5183 readonly TEXTURE16: GLenum;
5184 readonly TEXTURE17: GLenum;
5185 readonly TEXTURE18: GLenum;
5186 readonly TEXTURE19: GLenum;
5187 readonly TEXTURE2: GLenum;
5188 readonly TEXTURE20: GLenum;
5189 readonly TEXTURE21: GLenum;
5190 readonly TEXTURE22: GLenum;
5191 readonly TEXTURE23: GLenum;
5192 readonly TEXTURE24: GLenum;
5193 readonly TEXTURE25: GLenum;
5194 readonly TEXTURE26: GLenum;
5195 readonly TEXTURE27: GLenum;
5196 readonly TEXTURE28: GLenum;
5197 readonly TEXTURE29: GLenum;
5198 readonly TEXTURE3: GLenum;
5199 readonly TEXTURE30: GLenum;
5200 readonly TEXTURE31: GLenum;
5201 readonly TEXTURE4: GLenum;
5202 readonly TEXTURE5: GLenum;
5203 readonly TEXTURE6: GLenum;
5204 readonly TEXTURE7: GLenum;
5205 readonly TEXTURE8: GLenum;
5206 readonly TEXTURE9: GLenum;
5207 readonly TEXTURE_2D: GLenum;
5208 readonly TEXTURE_BINDING_2D: GLenum;
5209 readonly TEXTURE_BINDING_CUBE_MAP: GLenum;
5210 readonly TEXTURE_CUBE_MAP: GLenum;
5211 readonly TEXTURE_CUBE_MAP_NEGATIVE_X: GLenum;
5212 readonly TEXTURE_CUBE_MAP_NEGATIVE_Y: GLenum;
5213 readonly TEXTURE_CUBE_MAP_NEGATIVE_Z: GLenum;
5214 readonly TEXTURE_CUBE_MAP_POSITIVE_X: GLenum;
5215 readonly TEXTURE_CUBE_MAP_POSITIVE_Y: GLenum;
5216 readonly TEXTURE_CUBE_MAP_POSITIVE_Z: GLenum;
5217 readonly TEXTURE_MAG_FILTER: GLenum;
5218 readonly TEXTURE_MIN_FILTER: GLenum;
5219 readonly TEXTURE_WRAP_S: GLenum;
5220 readonly TEXTURE_WRAP_T: GLenum;
5221 readonly TRIANGLES: GLenum;
5222 readonly TRIANGLE_FAN: GLenum;
5223 readonly TRIANGLE_STRIP: GLenum;
5224 readonly UNPACK_ALIGNMENT: GLenum;
5225 readonly UNPACK_COLORSPACE_CONVERSION_WEBGL: GLenum;
5226 readonly UNPACK_FLIP_Y_WEBGL: GLenum;
5227 readonly UNPACK_PREMULTIPLY_ALPHA_WEBGL: GLenum;
5228 readonly UNSIGNED_BYTE: GLenum;
5229 readonly UNSIGNED_INT: GLenum;
5230 readonly UNSIGNED_SHORT: GLenum;
5231 readonly UNSIGNED_SHORT_4_4_4_4: GLenum;
5232 readonly UNSIGNED_SHORT_5_5_5_1: GLenum;
5233 readonly UNSIGNED_SHORT_5_6_5: GLenum;
5234 readonly VALIDATE_STATUS: GLenum;
5235 readonly VENDOR: GLenum;
5236 readonly VERSION: GLenum;
5237 readonly VERTEX_ATTRIB_ARRAY_BUFFER_BINDING: GLenum;
5238 readonly VERTEX_ATTRIB_ARRAY_ENABLED: GLenum;
5239 readonly VERTEX_ATTRIB_ARRAY_NORMALIZED: GLenum;
5240 readonly VERTEX_ATTRIB_ARRAY_POINTER: GLenum;
5241 readonly VERTEX_ATTRIB_ARRAY_SIZE: GLenum;
5242 readonly VERTEX_ATTRIB_ARRAY_STRIDE: GLenum;
5243 readonly VERTEX_ATTRIB_ARRAY_TYPE: GLenum;
5244 readonly VERTEX_SHADER: GLenum;
5245 readonly VIEWPORT: GLenum;
5246 readonly ZERO: GLenum;
5249 interface WebGLRenderingContextOverloads {
5250 bufferData(target: GLenum, size: GLsizeiptr, usage: GLenum): void;
5251 bufferData(target: GLenum, data: BufferSource | null, usage: GLenum): void;
5252 bufferSubData(target: GLenum, offset: GLintptr, data: BufferSource): void;
5253 compressedTexImage2D(target: GLenum, level: GLint, internalformat: GLenum, width: GLsizei, height: GLsizei, border: GLint, data: ArrayBufferView): void;
5254 compressedTexSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, data: ArrayBufferView): void;
5255 readPixels(x: GLint, y: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, pixels: ArrayBufferView | null): void;
5256 texImage2D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, border: GLint, format: GLenum, type: GLenum, pixels: ArrayBufferView | null): void;
5257 texImage2D(target: GLenum, level: GLint, internalformat: GLint, format: GLenum, type: GLenum, source: TexImageSource): void;
5258 texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, pixels: ArrayBufferView | null): void;
5259 texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, format: GLenum, type: GLenum, source: TexImageSource): void;
5260 uniform1fv(location: WebGLUniformLocation | null, v: Float32List): void;
5261 uniform1iv(location: WebGLUniformLocation | null, v: Int32List): void;
5262 uniform2fv(location: WebGLUniformLocation | null, v: Float32List): void;
5263 uniform2iv(location: WebGLUniformLocation | null, v: Int32List): void;
5264 uniform3fv(location: WebGLUniformLocation | null, v: Float32List): void;
5265 uniform3iv(location: WebGLUniformLocation | null, v: Int32List): void;
5266 uniform4fv(location: WebGLUniformLocation | null, v: Float32List): void;
5267 uniform4iv(location: WebGLUniformLocation | null, v: Int32List): void;
5268 uniformMatrix2fv(location: WebGLUniformLocation | null, transpose: GLboolean, value: Float32List): void;
5269 uniformMatrix3fv(location: WebGLUniformLocation | null, transpose: GLboolean, value: Float32List): void;
5270 uniformMatrix4fv(location: WebGLUniformLocation | null, transpose: GLboolean, value: Float32List): void;
5273 interface WebGLSampler extends WebGLObject {
5276 declare var WebGLSampler: {
5277 prototype: WebGLSampler;
5278 new(): WebGLSampler;
5281 /** The WebGLShader is part of the WebGL API and can either be a vertex or a fragment shader. A WebGLProgram requires both types of shaders. */
5282 interface WebGLShader extends WebGLObject {
5285 declare var WebGLShader: {
5286 prototype: WebGLShader;
5290 /** Part of the WebGL API and represents the information returned by calling the WebGLRenderingContext.getShaderPrecisionFormat() method. */
5291 interface WebGLShaderPrecisionFormat {
5292 readonly precision: GLint;
5293 readonly rangeMax: GLint;
5294 readonly rangeMin: GLint;
5297 declare var WebGLShaderPrecisionFormat: {
5298 prototype: WebGLShaderPrecisionFormat;
5299 new(): WebGLShaderPrecisionFormat;
5302 interface WebGLSync extends WebGLObject {
5305 declare var WebGLSync: {
5306 prototype: WebGLSync;
5310 /** Part of the WebGL API and represents an opaque texture object providing storage and state for texturing operations. */
5311 interface WebGLTexture extends WebGLObject {
5314 declare var WebGLTexture: {
5315 prototype: WebGLTexture;
5316 new(): WebGLTexture;
5319 interface WebGLTransformFeedback extends WebGLObject {
5322 declare var WebGLTransformFeedback: {
5323 prototype: WebGLTransformFeedback;
5324 new(): WebGLTransformFeedback;
5327 /** Part of the WebGL API and represents the location of a uniform variable in a shader program. */
5328 interface WebGLUniformLocation {
5331 declare var WebGLUniformLocation: {
5332 prototype: WebGLUniformLocation;
5333 new(): WebGLUniformLocation;
5336 interface WebGLVertexArrayObject extends WebGLObject {
5339 declare var WebGLVertexArrayObject: {
5340 prototype: WebGLVertexArrayObject;
5341 new(): WebGLVertexArrayObject;
5344 interface WebGLVertexArrayObjectOES extends WebGLObject {
5347 interface WebSocketEventMap {
5348 "close": CloseEvent;
5350 "message": MessageEvent;
5354 /** Provides the API for creating and managing a WebSocket connection to a server, as well as for sending and receiving data on the connection. */
5355 interface WebSocket extends EventTarget {
5357 * Returns a string that indicates how binary data from the WebSocket object is exposed to scripts:
5359 * Can be set, to change how binary data is returned. The default is "blob".
5361 binaryType: BinaryType;
5363 * Returns the number of bytes of application data (UTF-8 text and binary data) that have been queued using send() but not yet been transmitted to the network.
5365 * If the WebSocket connection is closed, this attribute's value will only increase with each call to the send() method. (The number does not reset to zero once the connection closes.)
5367 readonly bufferedAmount: number;
5369 * Returns the extensions selected by the server, if any.
5371 readonly extensions: string;
5372 onclose: ((this: WebSocket, ev: CloseEvent) => any) | null;
5373 onerror: ((this: WebSocket, ev: Event) => any) | null;
5374 onmessage: ((this: WebSocket, ev: MessageEvent) => any) | null;
5375 onopen: ((this: WebSocket, ev: Event) => any) | null;
5377 * Returns the subprotocol selected by the server, if any. It can be used in conjunction with the array form of the constructor's second argument to perform subprotocol negotiation.
5379 readonly protocol: string;
5381 * Returns the state of the WebSocket object's connection. It can have the values described below.
5383 readonly readyState: number;
5385 * Returns the URL that was used to establish the WebSocket connection.
5387 readonly url: string;
5389 * Closes the WebSocket connection, optionally using code as the the WebSocket connection close code and reason as the the WebSocket connection close reason.
5391 close(code?: number, reason?: string): void;
5393 * Transmits data using the WebSocket connection. data can be a string, a Blob, an ArrayBuffer, or an ArrayBufferView.
5395 send(data: string | ArrayBufferLike | Blob | ArrayBufferView): void;
5396 readonly CLOSED: number;
5397 readonly CLOSING: number;
5398 readonly CONNECTING: number;
5399 readonly OPEN: number;
5400 addEventListener<K extends keyof WebSocketEventMap>(type: K, listener: (this: WebSocket, ev: WebSocketEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
5401 addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
5402 removeEventListener<K extends keyof WebSocketEventMap>(type: K, listener: (this: WebSocket, ev: WebSocketEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
5403 removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
5406 declare var WebSocket: {
5407 prototype: WebSocket;
5408 new(url: string, protocols?: string | string[]): WebSocket;
5409 readonly CLOSED: number;
5410 readonly CLOSING: number;
5411 readonly CONNECTING: number;
5412 readonly OPEN: number;
5415 /** This ServiceWorker API interface represents the scope of a service worker client that is a document in a browser context, controlled by an active worker. The service worker client independently selects and uses a service worker for its own loading and sub-resources. */
5416 interface WindowClient extends Client {
5417 readonly ancestorOrigins: ReadonlyArray<string>;
5418 readonly focused: boolean;
5419 readonly visibilityState: VisibilityState;
5420 focus(): Promise<WindowClient>;
5421 navigate(url: string): Promise<WindowClient | null>;
5424 declare var WindowClient: {
5425 prototype: WindowClient;
5426 new(): WindowClient;
5429 interface WindowOrWorkerGlobalScope {
5430 readonly caches: CacheStorage;
5431 readonly crypto: Crypto;
5432 readonly indexedDB: IDBFactory;
5433 readonly isSecureContext: boolean;
5434 readonly origin: string;
5435 readonly performance: Performance;
5436 atob(data: string): string;
5437 btoa(data: string): string;
5438 clearInterval(handle?: number): void;
5439 clearTimeout(handle?: number): void;
5440 createImageBitmap(image: ImageBitmapSource, options?: ImageBitmapOptions): Promise<ImageBitmap>;
5441 createImageBitmap(image: ImageBitmapSource, sx: number, sy: number, sw: number, sh: number, options?: ImageBitmapOptions): Promise<ImageBitmap>;
5442 fetch(input: RequestInfo, init?: RequestInit): Promise<Response>;
5443 queueMicrotask(callback: VoidFunction): void;
5444 setInterval(handler: TimerHandler, timeout?: number, ...arguments: any[]): number;
5445 setTimeout(handler: TimerHandler, timeout?: number, ...arguments: any[]): number;
5448 interface WorkerEventMap extends AbstractWorkerEventMap {
5449 "message": MessageEvent;
5450 "messageerror": MessageEvent;
5453 /** This Web Workers API interface represents a background task that can be easily created and can send messages back to its creator. Creating a worker is as simple as calling the Worker() constructor and specifying a script to be run in the worker thread. */
5454 interface Worker extends EventTarget, AbstractWorker {
5455 onmessage: ((this: Worker, ev: MessageEvent) => any) | null;
5456 onmessageerror: ((this: Worker, ev: MessageEvent) => any) | null;
5458 * Clones message and transmits it to worker's global environment. transfer can be passed as a list of objects that are to be transferred rather than cloned.
5460 postMessage(message: any, transfer: Transferable[]): void;
5461 postMessage(message: any, options?: PostMessageOptions): void;
5463 * Aborts worker's associated global environment.
5466 addEventListener<K extends keyof WorkerEventMap>(type: K, listener: (this: Worker, ev: WorkerEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
5467 addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
5468 removeEventListener<K extends keyof WorkerEventMap>(type: K, listener: (this: Worker, ev: WorkerEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
5469 removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
5472 declare var Worker: {
5474 new(stringUrl: string | URL, options?: WorkerOptions): Worker;
5477 interface WorkerGlobalScopeEventMap {
5478 "error": ErrorEvent;
5479 "languagechange": Event;
5482 "rejectionhandled": PromiseRejectionEvent;
5483 "unhandledrejection": PromiseRejectionEvent;
5486 /** 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. */
5487 interface WorkerGlobalScope extends EventTarget, WindowOrWorkerGlobalScope {
5489 * Returns workerGlobal's WorkerLocation object.
5491 readonly location: WorkerLocation;
5492 readonly navigator: WorkerNavigator;
5493 onerror: ((this: WorkerGlobalScope, ev: ErrorEvent) => any) | null;
5494 onlanguagechange: ((this: WorkerGlobalScope, ev: Event) => any) | null;
5495 onoffline: ((this: WorkerGlobalScope, ev: Event) => any) | null;
5496 ononline: ((this: WorkerGlobalScope, ev: Event) => any) | null;
5497 onrejectionhandled: ((this: WorkerGlobalScope, ev: PromiseRejectionEvent) => any) | null;
5498 onunhandledrejection: ((this: WorkerGlobalScope, ev: PromiseRejectionEvent) => any) | null;
5500 * Returns workerGlobal.
5502 readonly self: WorkerGlobalScope & typeof globalThis;
5504 * 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).
5506 importScripts(...urls: string[]): void;
5507 addEventListener<K extends keyof WorkerGlobalScopeEventMap>(type: K, listener: (this: WorkerGlobalScope, ev: WorkerGlobalScopeEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
5508 addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
5509 removeEventListener<K extends keyof WorkerGlobalScopeEventMap>(type: K, listener: (this: WorkerGlobalScope, ev: WorkerGlobalScopeEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
5510 removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
5513 declare var WorkerGlobalScope: {
5514 prototype: WorkerGlobalScope;
5515 new(): WorkerGlobalScope;
5518 /** The absolute location of the script executed by the Worker. Such an object is initialized for each worker and is available via the WorkerGlobalScope.location property obtained by calling self.location. */
5519 interface WorkerLocation {
5520 readonly hash: string;
5521 readonly host: string;
5522 readonly hostname: string;
5523 readonly href: string;
5525 readonly origin: string;
5526 readonly pathname: string;
5527 readonly port: string;
5528 readonly protocol: string;
5529 readonly search: string;
5532 declare var WorkerLocation: {
5533 prototype: WorkerLocation;
5534 new(): WorkerLocation;
5537 /** 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. */
5538 interface WorkerNavigator extends NavigatorConcurrentHardware, NavigatorID, NavigatorLanguage, NavigatorOnLine, NavigatorStorage {
5539 readonly permissions: Permissions;
5540 readonly serviceWorker: ServiceWorkerContainer;
5543 declare var WorkerNavigator: {
5544 prototype: WorkerNavigator;
5545 new(): WorkerNavigator;
5548 /** This Streams API interface provides a standard abstraction for writing streaming data to a destination, known as a sink. This object comes with built-in backpressure and queuing. */
5549 interface WritableStream<W = any> {
5550 readonly locked: boolean;
5551 abort(reason?: any): Promise<void>;
5552 getWriter(): WritableStreamDefaultWriter<W>;
5555 declare var WritableStream: {
5556 prototype: WritableStream;
5557 new<W = any>(underlyingSink?: UnderlyingSink<W>, strategy?: QueuingStrategy<W>): WritableStream<W>;
5560 /** This Streams API interface represents a controller allowing control of a WritableStream's state. When constructing a WritableStream, the underlying sink is given a corresponding WritableStreamDefaultController instance to manipulate. */
5561 interface WritableStreamDefaultController {
5562 error(error?: any): void;
5565 declare var WritableStreamDefaultController: {
5566 prototype: WritableStreamDefaultController;
5567 new(): WritableStreamDefaultController;
5570 /** This Streams API interface is the object returned by WritableStream.getWriter() and once created locks the < writer to the WritableStream ensuring that no other streams can write to the underlying sink. */
5571 interface WritableStreamDefaultWriter<W = any> {
5572 readonly closed: Promise<void>;
5573 readonly desiredSize: number | null;
5574 readonly ready: Promise<void>;
5575 abort(reason?: any): Promise<void>;
5576 close(): Promise<void>;
5577 releaseLock(): void;
5578 write(chunk: W): Promise<void>;
5581 declare var WritableStreamDefaultWriter: {
5582 prototype: WritableStreamDefaultWriter;
5583 new(): WritableStreamDefaultWriter;
5586 interface XMLHttpRequestEventMap extends XMLHttpRequestEventTargetEventMap {
5587 "readystatechange": Event;
5590 /** Use XMLHttpRequest (XHR) objects to interact with servers. You can retrieve data from a URL without having to do a full page refresh. This enables a Web page to update just part of a page without disrupting what the user is doing. */
5591 interface XMLHttpRequest extends XMLHttpRequestEventTarget {
5592 onreadystatechange: ((this: XMLHttpRequest, ev: Event) => any) | null;
5594 * Returns client's state.
5596 readonly readyState: number;
5598 * Returns the response's body.
5600 readonly response: any;
5602 * Returns the text response.
5604 * Throws an "InvalidStateError" DOMException if responseType is not the empty string or "text".
5606 readonly responseText: string;
5608 * Returns the response type.
5610 * Can be set to change the response type. Values are: the empty string (default), "arraybuffer", "blob", "document", "json", and "text".
5612 * When set: setting to "document" is ignored if current global object is not a Window object.
5614 * When set: throws an "InvalidStateError" DOMException if state is loading or done.
5616 * When set: throws an "InvalidAccessError" DOMException if the synchronous flag is set and current global object is a Window object.
5618 responseType: XMLHttpRequestResponseType;
5619 readonly responseURL: string;
5620 readonly status: number;
5621 readonly statusText: string;
5623 * 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).
5625 * When set: throws an "InvalidAccessError" DOMException if the synchronous flag is set and current global object is a Window object.
5629 * Returns the associated XMLHttpRequestUpload object. It can be used to gather transmission information when data is transferred to a server.
5631 readonly upload: XMLHttpRequestUpload;
5633 * True when credentials are to be included in a cross-origin request. False when they are to be excluded in a cross-origin request and when cookies are to be ignored in its response. Initially false.
5635 * When set: throws an "InvalidStateError" DOMException if state is not unsent or opened, or if the send() flag is set.
5637 withCredentials: boolean;
5639 * Cancels any network activity.
5642 getAllResponseHeaders(): string;
5643 getResponseHeader(name: string): string | null;
5645 * Sets the request method, request URL, and synchronous flag.
5647 * Throws a "SyntaxError" DOMException if either method is not a valid HTTP method or url cannot be parsed.
5649 * Throws a "SecurityError" DOMException if method is a case-insensitive match for `CONNECT`, `TRACE`, or `TRACK`.
5651 * 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.
5653 open(method: string, url: string): void;
5654 open(method: string, url: string, async: boolean, username?: string | null, password?: string | null): void;
5656 * Acts as if the `Content-Type` header value for response is mime. (It does not actually change the header though.)
5658 * Throws an "InvalidStateError" DOMException if state is loading or done.
5660 overrideMimeType(mime: string): void;
5662 * Initiates the request. The body argument provides the request body, if any, and is ignored if the request method is GET or HEAD.
5664 * Throws an "InvalidStateError" DOMException if either state is not opened or the send() flag is set.
5666 send(body?: BodyInit | null): void;
5668 * Combines a header in author request headers.
5670 * Throws an "InvalidStateError" DOMException if either state is not opened or the send() flag is set.
5672 * Throws a "SyntaxError" DOMException if name is not a header name or if value is not a header value.
5674 setRequestHeader(name: string, value: string): void;
5675 readonly DONE: number;
5676 readonly HEADERS_RECEIVED: number;
5677 readonly LOADING: number;
5678 readonly OPENED: number;
5679 readonly UNSENT: number;
5680 addEventListener<K extends keyof XMLHttpRequestEventMap>(type: K, listener: (this: XMLHttpRequest, ev: XMLHttpRequestEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
5681 addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
5682 removeEventListener<K extends keyof XMLHttpRequestEventMap>(type: K, listener: (this: XMLHttpRequest, ev: XMLHttpRequestEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
5683 removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
5686 declare var XMLHttpRequest: {
5687 prototype: XMLHttpRequest;
5688 new(): XMLHttpRequest;
5689 readonly DONE: number;
5690 readonly HEADERS_RECEIVED: number;
5691 readonly LOADING: number;
5692 readonly OPENED: number;
5693 readonly UNSENT: number;
5696 interface XMLHttpRequestEventTargetEventMap {
5697 "abort": ProgressEvent<XMLHttpRequestEventTarget>;
5698 "error": ProgressEvent<XMLHttpRequestEventTarget>;
5699 "load": ProgressEvent<XMLHttpRequestEventTarget>;
5700 "loadend": ProgressEvent<XMLHttpRequestEventTarget>;
5701 "loadstart": ProgressEvent<XMLHttpRequestEventTarget>;
5702 "progress": ProgressEvent<XMLHttpRequestEventTarget>;
5703 "timeout": ProgressEvent<XMLHttpRequestEventTarget>;
5706 interface XMLHttpRequestEventTarget extends EventTarget {
5707 onabort: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null;
5708 onerror: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null;
5709 onload: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null;
5710 onloadend: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null;
5711 onloadstart: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null;
5712 onprogress: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null;
5713 ontimeout: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null;
5714 addEventListener<K extends keyof XMLHttpRequestEventTargetEventMap>(type: K, listener: (this: XMLHttpRequestEventTarget, ev: XMLHttpRequestEventTargetEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
5715 addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
5716 removeEventListener<K extends keyof XMLHttpRequestEventTargetEventMap>(type: K, listener: (this: XMLHttpRequestEventTarget, ev: XMLHttpRequestEventTargetEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
5717 removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
5720 declare var XMLHttpRequestEventTarget: {
5721 prototype: XMLHttpRequestEventTarget;
5722 new(): XMLHttpRequestEventTarget;
5725 interface XMLHttpRequestUpload extends XMLHttpRequestEventTarget {
5726 addEventListener<K extends keyof XMLHttpRequestEventTargetEventMap>(type: K, listener: (this: XMLHttpRequestUpload, ev: XMLHttpRequestEventTargetEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
5727 addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
5728 removeEventListener<K extends keyof XMLHttpRequestEventTargetEventMap>(type: K, listener: (this: XMLHttpRequestUpload, ev: XMLHttpRequestEventTargetEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
5729 removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
5732 declare var XMLHttpRequestUpload: {
5733 prototype: XMLHttpRequestUpload;
5734 new(): XMLHttpRequestUpload;
5737 declare type EventListenerOrEventListenerObject = EventListener | EventListenerObject;
5741 assert(condition?: boolean, ...data: any[]): void;
5743 count(label?: string): void;
5744 countReset(label?: string): void;
5745 debug(...data: any[]): void;
5746 dir(item?: any, options?: any): void;
5747 dirxml(...data: any[]): void;
5748 error(...data: any[]): void;
5749 exception(message?: string, ...optionalParams: any[]): void;
5750 group(...data: any[]): void;
5751 groupCollapsed(...data: any[]): void;
5753 info(...data: any[]): void;
5754 log(...data: any[]): void;
5755 table(tabularData?: any, properties?: string[]): void;
5756 time(label?: string): void;
5757 timeEnd(label?: string): void;
5758 timeLog(label?: string, ...data: any[]): void;
5759 timeStamp(label?: string): void;
5760 trace(...data: any[]): void;
5761 warn(...data: any[]): void;
5764 declare var console: Console;
5766 declare namespace WebAssembly {
5774 new(descriptor: GlobalDescriptor, v?: any): Global;
5777 interface Instance {
5778 readonly exports: Exports;
5782 prototype: Instance;
5783 new(module: Module, importObject?: Imports): Instance;
5787 readonly buffer: ArrayBuffer;
5788 grow(delta: number): number;
5793 new(descriptor: MemoryDescriptor): Memory;
5801 new(bytes: BufferSource): Module;
5802 customSections(moduleObject: Module, sectionName: string): ArrayBuffer[];
5803 exports(moduleObject: Module): ModuleExportDescriptor[];
5804 imports(moduleObject: Module): ModuleImportDescriptor[];
5808 readonly length: number;
5809 get(index: number): Function | null;
5810 grow(delta: number): number;
5811 set(index: number, value: Function | null): void;
5816 new(descriptor: TableDescriptor): Table;
5819 interface GlobalDescriptor {
5824 interface MemoryDescriptor {
5829 interface ModuleExportDescriptor {
5830 kind: ImportExportKind;
5834 interface ModuleImportDescriptor {
5835 kind: ImportExportKind;
5840 interface TableDescriptor {
5846 interface WebAssemblyInstantiatedSource {
5851 type ImportExportKind = "function" | "global" | "memory" | "table";
5852 type TableKind = "anyfunc";
5853 type ValueType = "f32" | "f64" | "i32" | "i64";
5854 type ExportValue = Function | Global | Memory | Table;
5855 type Exports = Record<string, ExportValue>;
5856 type ImportValue = ExportValue | number;
5857 type ModuleImports = Record<string, ImportValue>;
5858 type Imports = Record<string, ModuleImports>;
5859 function compile(bytes: BufferSource): Promise<Module>;
5860 function compileStreaming(source: Response | Promise<Response>): Promise<Module>;
5861 function instantiate(bytes: BufferSource, importObject?: Imports): Promise<WebAssemblyInstantiatedSource>;
5862 function instantiate(moduleObject: Module, importObject?: Imports): Promise<Instance>;
5863 function instantiateStreaming(response: Response | PromiseLike<Response>, importObject?: Imports): Promise<WebAssemblyInstantiatedSource>;
5864 function validate(bytes: BufferSource): boolean;
5867 interface FrameRequestCallback {
5868 (time: number): void;
5871 interface OnErrorEventHandlerNonNull {
5872 (event: Event | string, source?: string, lineno?: number, colno?: number, error?: Error): any;
5875 interface PerformanceObserverCallback {
5876 (entries: PerformanceObserverEntryList, observer: PerformanceObserver): void;
5879 interface QueuingStrategySizeCallback<T = any> {
5883 interface ReadableByteStreamControllerCallback {
5884 (controller: ReadableByteStreamController): void | PromiseLike<void>;
5887 interface ReadableStreamDefaultControllerCallback<R> {
5888 (controller: ReadableStreamDefaultController<R>): void | PromiseLike<void>;
5891 interface ReadableStreamErrorCallback {
5892 (reason: any): void | PromiseLike<void>;
5895 interface TransformStreamDefaultControllerCallback<O> {
5896 (controller: TransformStreamDefaultController<O>): void | PromiseLike<void>;
5899 interface TransformStreamDefaultControllerTransformCallback<I, O> {
5900 (chunk: I, controller: TransformStreamDefaultController<O>): void | PromiseLike<void>;
5903 interface VoidFunction {
5907 interface WritableStreamDefaultControllerCloseCallback {
5908 (): void | PromiseLike<void>;
5911 interface WritableStreamDefaultControllerStartCallback {
5912 (controller: WritableStreamDefaultController): void | PromiseLike<void>;
5915 interface WritableStreamDefaultControllerWriteCallback<W> {
5916 (chunk: W, controller: WritableStreamDefaultController): void | PromiseLike<void>;
5919 interface WritableStreamErrorCallback {
5920 (reason: any): void | PromiseLike<void>;
5924 * Returns dedicatedWorkerGlobal's name, i.e. the value given to the Worker constructor. Primarily useful for debugging.
5926 declare var name: string;
5927 declare var onmessage: ((this: DedicatedWorkerGlobalScope, ev: MessageEvent) => any) | null;
5928 declare var onmessageerror: ((this: DedicatedWorkerGlobalScope, ev: MessageEvent) => any) | null;
5930 * Aborts dedicatedWorkerGlobal.
5932 declare function close(): void;
5934 * Clones message and transmits it to the Worker object associated with dedicatedWorkerGlobal. transfer can be passed as a list of objects that are to be transferred rather than cloned.
5936 declare function postMessage(message: any, transfer: Transferable[]): void;
5937 declare function postMessage(message: any, options?: PostMessageOptions): void;
5939 * 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.
5941 declare function dispatchEvent(event: Event): boolean;
5943 * Returns workerGlobal's WorkerLocation object.
5945 declare var location: WorkerLocation;
5946 declare var navigator: WorkerNavigator;
5947 declare var onerror: ((this: DedicatedWorkerGlobalScope, ev: ErrorEvent) => any) | null;
5948 declare var onlanguagechange: ((this: DedicatedWorkerGlobalScope, ev: Event) => any) | null;
5949 declare var onoffline: ((this: DedicatedWorkerGlobalScope, ev: Event) => any) | null;
5950 declare var ononline: ((this: DedicatedWorkerGlobalScope, ev: Event) => any) | null;
5951 declare var onrejectionhandled: ((this: DedicatedWorkerGlobalScope, ev: PromiseRejectionEvent) => any) | null;
5952 declare var onunhandledrejection: ((this: DedicatedWorkerGlobalScope, ev: PromiseRejectionEvent) => any) | null;
5954 * Returns workerGlobal.
5956 declare var self: WorkerGlobalScope & typeof globalThis;
5958 * 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).
5960 declare function importScripts(...urls: string[]): void;
5962 * 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.
5964 declare function dispatchEvent(event: Event): boolean;
5965 declare var caches: CacheStorage;
5966 declare var crypto: Crypto;
5967 declare var indexedDB: IDBFactory;
5968 declare var isSecureContext: boolean;
5969 declare var origin: string;
5970 declare var performance: Performance;
5971 declare function atob(data: string): string;
5972 declare function btoa(data: string): string;
5973 declare function clearInterval(handle?: number): void;
5974 declare function clearTimeout(handle?: number): void;
5975 declare function createImageBitmap(image: ImageBitmapSource, options?: ImageBitmapOptions): Promise<ImageBitmap>;
5976 declare function createImageBitmap(image: ImageBitmapSource, sx: number, sy: number, sw: number, sh: number, options?: ImageBitmapOptions): Promise<ImageBitmap>;
5977 declare function fetch(input: RequestInfo, init?: RequestInit): Promise<Response>;
5978 declare function queueMicrotask(callback: VoidFunction): void;
5979 declare function setInterval(handler: TimerHandler, timeout?: number, ...arguments: any[]): number;
5980 declare function setTimeout(handler: TimerHandler, timeout?: number, ...arguments: any[]): number;
5981 declare function cancelAnimationFrame(handle: number): void;
5982 declare function requestAnimationFrame(callback: FrameRequestCallback): number;
5983 declare function addEventListener<K extends keyof DedicatedWorkerGlobalScopeEventMap>(type: K, listener: (this: DedicatedWorkerGlobalScope, ev: DedicatedWorkerGlobalScopeEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
5984 declare function addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
5985 declare function removeEventListener<K extends keyof DedicatedWorkerGlobalScopeEventMap>(type: K, listener: (this: DedicatedWorkerGlobalScope, ev: DedicatedWorkerGlobalScopeEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
5986 declare function removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
5987 type HeadersInit = Headers | string[][] | Record<string, string>;
5988 type BodyInit = Blob | BufferSource | FormData | URLSearchParams | ReadableStream<Uint8Array> | string;
5989 type RequestInfo = Request | string;
5990 type BlobPart = BufferSource | Blob | string;
5991 type DOMHighResTimeStamp = number;
5992 type CanvasImageSource = ImageBitmap | OffscreenCanvas;
5993 type OffscreenRenderingContext = OffscreenCanvasRenderingContext2D | ImageBitmapRenderingContext | WebGLRenderingContext | WebGL2RenderingContext;
5994 type MessageEventSource = MessagePort | ServiceWorker;
5995 type ImageBitmapSource = CanvasImageSource | Blob | ImageData;
5996 type OnErrorEventHandler = OnErrorEventHandlerNonNull | null;
5997 type TimerHandler = string | Function;
5998 type PerformanceEntryList = PerformanceEntry[];
5999 type PushMessageDataInit = BufferSource | string;
6000 type ReadableStreamReadResult<T> = ReadableStreamReadValueResult<T> | ReadableStreamReadDoneResult<T>;
6001 type VibratePattern = number | number[];
6002 type AlgorithmIdentifier = string | Algorithm;
6003 type HashAlgorithmIdentifier = AlgorithmIdentifier;
6004 type BigInteger = Uint8Array;
6005 type NamedCurve = string;
6006 type GLenum = number;
6007 type GLboolean = boolean;
6008 type GLbitfield = number;
6009 type GLint = number;
6010 type GLsizei = number;
6011 type GLintptr = number;
6012 type GLsizeiptr = number;
6013 type GLuint = number;
6014 type GLfloat = number;
6015 type GLclampf = number;
6016 type TexImageSource = ImageBitmap | ImageData | OffscreenCanvas;
6017 type Float32List = Float32Array | GLfloat[];
6018 type Int32List = Int32Array | GLint[];
6019 type GLint64 = number;
6020 type GLuint64 = number;
6021 type Uint32List = Uint32Array | GLuint[];
6022 type BufferSource = ArrayBufferView | ArrayBuffer;
6023 type DOMTimeStamp = number;
6024 type FormDataEntryValue = File | string;
6025 type IDBValidKey = number | string | Date | BufferSource | IDBArrayKey;
6026 type Transferable = ArrayBuffer | MessagePort | ImageBitmap | OffscreenCanvas;
6027 type BinaryType = "arraybuffer" | "blob";
6028 type CanvasDirection = "inherit" | "ltr" | "rtl";
6029 type CanvasFillRule = "evenodd" | "nonzero";
6030 type CanvasLineCap = "butt" | "round" | "square";
6031 type CanvasLineJoin = "bevel" | "miter" | "round";
6032 type CanvasTextAlign = "center" | "end" | "left" | "right" | "start";
6033 type CanvasTextBaseline = "alphabetic" | "bottom" | "hanging" | "ideographic" | "middle" | "top";
6034 type ClientTypes = "all" | "sharedworker" | "window" | "worker";
6035 type ColorSpaceConversion = "default" | "none";
6036 type EndingType = "native" | "transparent";
6037 type FrameType = "auxiliary" | "nested" | "none" | "top-level";
6038 type IDBCursorDirection = "next" | "nextunique" | "prev" | "prevunique";
6039 type IDBRequestReadyState = "done" | "pending";
6040 type IDBTransactionMode = "readonly" | "readwrite" | "versionchange";
6041 type ImageOrientation = "flipY" | "none";
6042 type ImageSmoothingQuality = "high" | "low" | "medium";
6043 type KeyFormat = "jwk" | "pkcs8" | "raw" | "spki";
6044 type KeyType = "private" | "public" | "secret";
6045 type KeyUsage = "decrypt" | "deriveBits" | "deriveKey" | "encrypt" | "sign" | "unwrapKey" | "verify" | "wrapKey";
6046 type NotificationDirection = "auto" | "ltr" | "rtl";
6047 type NotificationPermission = "default" | "denied" | "granted";
6048 type OffscreenRenderingContextId = "2d" | "bitmaprenderer" | "webgl" | "webgl2";
6049 type PermissionName = "accelerometer" | "ambient-light-sensor" | "background-sync" | "bluetooth" | "camera" | "clipboard" | "device-info" | "geolocation" | "gyroscope" | "magnetometer" | "microphone" | "midi" | "notifications" | "persistent-storage" | "push" | "speaker";
6050 type PermissionState = "denied" | "granted" | "prompt";
6051 type PremultiplyAlpha = "default" | "none" | "premultiply";
6052 type PushEncryptionKeyName = "auth" | "p256dh";
6053 type PushPermissionState = "denied" | "granted" | "prompt";
6054 type ReferrerPolicy = "" | "no-referrer" | "no-referrer-when-downgrade" | "origin" | "origin-when-cross-origin" | "same-origin" | "strict-origin" | "strict-origin-when-cross-origin" | "unsafe-url";
6055 type RequestCache = "default" | "force-cache" | "no-cache" | "no-store" | "only-if-cached" | "reload";
6056 type RequestCredentials = "include" | "omit" | "same-origin";
6057 type RequestDestination = "" | "audio" | "audioworklet" | "document" | "embed" | "font" | "image" | "manifest" | "object" | "paintworklet" | "report" | "script" | "sharedworker" | "style" | "track" | "video" | "worker" | "xslt";
6058 type RequestMode = "cors" | "navigate" | "no-cors" | "same-origin";
6059 type RequestRedirect = "error" | "follow" | "manual";
6060 type ResizeQuality = "high" | "low" | "medium" | "pixelated";
6061 type ResponseType = "basic" | "cors" | "default" | "error" | "opaque" | "opaqueredirect";
6062 type ServiceWorkerState = "activated" | "activating" | "installed" | "installing" | "parsed" | "redundant";
6063 type ServiceWorkerUpdateViaCache = "all" | "imports" | "none";
6064 type VisibilityState = "hidden" | "visible";
6065 type WebGLPowerPreference = "default" | "high-performance" | "low-power";
6066 type WorkerType = "classic" | "module";
6067 type XMLHttpRequestResponseType = "" | "arraybuffer" | "blob" | "document" | "json" | "text";