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 ImportMeta {
270 interface JsonWebKey {
282 oth?: RsaOtherPrimesInfo[];
291 interface KeyAlgorithm {
295 interface MessageEventInit<T = any> extends EventInit {
297 lastEventId?: string;
299 ports?: MessagePort[];
300 source?: MessageEventSource | null;
303 interface MidiPermissionDescriptor extends PermissionDescriptor {
308 interface MultiCacheQueryOptions extends CacheQueryOptions {
312 interface NavigationPreloadState {
314 headerValue?: string;
317 interface NotificationAction {
323 interface NotificationEventInit extends ExtendableEventInit {
325 notification: Notification;
328 interface NotificationOptions {
329 actions?: NotificationAction[];
333 dir?: NotificationDirection;
338 requireInteraction?: boolean;
342 vibrate?: VibratePattern;
345 interface Pbkdf2Params extends Algorithm {
346 hash: HashAlgorithmIdentifier;
348 salt: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer;
351 interface PerformanceObserverInit {
353 entryTypes?: string[];
357 interface PermissionDescriptor {
358 name: PermissionName;
361 interface PostMessageOptions {
365 interface ProgressEventInit extends EventInit {
366 lengthComputable?: boolean;
371 interface PromiseRejectionEventInit extends EventInit {
372 promise: Promise<any>;
376 interface PushEventInit extends ExtendableEventInit {
377 data?: PushMessageDataInit;
380 interface PushPermissionDescriptor extends PermissionDescriptor {
382 userVisibleOnly?: boolean;
385 interface PushSubscriptionChangeEventInit extends ExtendableEventInit {
386 newSubscription?: PushSubscription;
387 oldSubscription?: PushSubscription;
390 interface PushSubscriptionJSON {
392 expirationTime?: number | null;
393 keys?: Record<string, string>;
396 interface PushSubscriptionOptionsInit {
397 applicationServerKey?: BufferSource | string | null;
398 userVisibleOnly?: boolean;
401 interface QueuingStrategy<T = any> {
402 highWaterMark?: number;
403 size?: QueuingStrategySize<T>;
406 interface QueuingStrategyInit {
408 * Creates a new ByteLengthQueuingStrategy with the provided high water mark.
410 * Note that the provided high water mark will not be validated ahead of time. Instead, if it is negative, NaN, or not a number, the resulting ByteLengthQueuingStrategy will cause the corresponding stream constructor to throw.
412 highWaterMark: number;
415 interface ReadableStreamDefaultReadDoneResult {
420 interface ReadableStreamDefaultReadValueResult<T> {
425 interface ReadableWritablePair<R = any, W = any> {
426 readable: ReadableStream<R>;
428 * Provides a convenient, chainable way of piping this readable stream through a transform stream (or any other { writable, readable } pair). It simply pipes the stream into the writable side of the supplied pair, and returns the readable side for further use.
430 * Piping a stream will lock it for the duration of the pipe, preventing any other consumer from acquiring a reader.
432 writable: WritableStream<W>;
435 interface RegistrationOptions {
438 updateViaCache?: ServiceWorkerUpdateViaCache;
441 interface RequestInit {
443 * A BodyInit object or null to set request's body.
445 body?: BodyInit | null;
447 * A string indicating how the request will interact with the browser's cache to set request's cache.
449 cache?: RequestCache;
451 * 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.
453 credentials?: RequestCredentials;
455 * A Headers object, an object literal, or an array of two-item arrays to set request's headers.
457 headers?: HeadersInit;
459 * A cryptographic hash of the resource to be fetched by request. Sets request's integrity.
463 * A boolean to set request's keepalive.
467 * A string to set request's method.
471 * A string to indicate whether the request will use CORS, or will be restricted to same-origin URLs. Sets request's mode.
475 * 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.
477 redirect?: RequestRedirect;
479 * A string whose value is a same-origin URL, "about:client", or the empty string, to set request's referrer.
483 * A referrer policy to set request's referrerPolicy.
485 referrerPolicy?: ReferrerPolicy;
487 * An AbortSignal to set request's signal.
489 signal?: AbortSignal | null;
491 * Can only be null. Used to disassociate request from any Window.
496 interface ResponseInit {
497 headers?: HeadersInit;
502 interface RsaHashedImportParams extends Algorithm {
503 hash: HashAlgorithmIdentifier;
506 interface RsaHashedKeyGenParams extends RsaKeyGenParams {
507 hash: HashAlgorithmIdentifier;
510 interface RsaKeyGenParams extends Algorithm {
511 modulusLength: number;
512 publicExponent: BigInteger;
515 interface RsaOaepParams extends Algorithm {
516 label?: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer;
519 interface RsaOtherPrimesInfo {
525 interface RsaPssParams extends Algorithm {
529 interface StorageEstimate {
534 interface StreamPipeOptions {
535 preventAbort?: boolean;
536 preventCancel?: boolean;
538 * Pipes this readable stream to a given writable stream destination. The way in which the piping process behaves under various error conditions can be customized with a number of passed options. It returns a promise that fulfills when the piping process completes successfully, or rejects if any errors were encountered.
540 * Piping a stream will lock it for the duration of the pipe, preventing any other consumer from acquiring a reader.
542 * Errors and closures of the source and destination streams propagate as follows:
544 * An error in this source readable stream will abort destination, unless preventAbort is truthy. The returned promise will be rejected with the source's error, or with any error that occurs during aborting the destination.
546 * An error in destination will cancel this source readable stream, unless preventCancel is truthy. The returned promise will be rejected with the destination's error, or with any error that occurs during canceling the source.
548 * When this source readable stream closes, destination will be closed, unless preventClose is truthy. The returned promise will be fulfilled once this process completes, unless an error is encountered while closing the destination, in which case it will be rejected with that error.
550 * If destination starts out closed or closing, this source readable stream will be canceled, unless preventCancel is true. The returned promise will be rejected with an error indicating piping to a closed stream failed, or with any error that occurs during canceling the source.
552 * The signal option can be set to an AbortSignal to allow aborting an ongoing pipe operation via the corresponding AbortController. In this case, this source readable stream will be canceled, and destination aborted, unless the respective options preventCancel or preventAbort are set.
554 preventClose?: boolean;
555 signal?: AbortSignal;
558 interface SyncEventInit extends ExtendableEventInit {
559 lastChance?: boolean;
563 interface TextDecodeOptions {
567 interface TextDecoderOptions {
572 interface TextEncoderEncodeIntoResult {
577 interface Transformer<I = any, O = any> {
578 flush?: TransformerFlushCallback<O>;
579 readableType?: undefined;
580 start?: TransformerStartCallback<O>;
581 transform?: TransformerTransformCallback<I, O>;
582 writableType?: undefined;
585 interface UnderlyingSink<W = any> {
586 abort?: UnderlyingSinkAbortCallback;
587 close?: UnderlyingSinkCloseCallback;
588 start?: UnderlyingSinkStartCallback;
590 write?: UnderlyingSinkWriteCallback<W>;
593 interface UnderlyingSource<R = any> {
594 cancel?: UnderlyingSourceCancelCallback;
595 pull?: UnderlyingSourcePullCallback<R>;
596 start?: UnderlyingSourceStartCallback<R>;
600 interface WebGLContextAttributes {
604 desynchronized?: boolean;
605 failIfMajorPerformanceCaveat?: boolean;
606 powerPreference?: WebGLPowerPreference;
607 premultipliedAlpha?: boolean;
608 preserveDrawingBuffer?: boolean;
612 interface WebGLContextEventInit extends EventInit {
613 statusMessage?: string;
616 interface WorkerOptions {
617 credentials?: RequestCredentials;
622 interface EventListener {
626 /** 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. */
627 interface ANGLE_instanced_arrays {
628 drawArraysInstancedANGLE(mode: GLenum, first: GLint, count: GLsizei, primcount: GLsizei): void;
629 drawElementsInstancedANGLE(mode: GLenum, count: GLsizei, type: GLenum, offset: GLintptr, primcount: GLsizei): void;
630 vertexAttribDivisorANGLE(index: GLuint, divisor: GLuint): void;
631 readonly VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE: GLenum;
634 /** A controller object that allows you to abort one or more DOM requests as and when desired. */
635 interface AbortController {
637 * Returns the AbortSignal object associated with this object.
639 readonly signal: AbortSignal;
641 * 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.
646 declare var AbortController: {
647 prototype: AbortController;
648 new(): AbortController;
651 interface AbortSignalEventMap {
655 /** 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. */
656 interface AbortSignal extends EventTarget {
658 * Returns true if this AbortSignal's AbortController has signaled to abort, and false otherwise.
660 readonly aborted: boolean;
661 onabort: ((this: AbortSignal, ev: Event) => any) | null;
662 addEventListener<K extends keyof AbortSignalEventMap>(type: K, listener: (this: AbortSignal, ev: AbortSignalEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
663 addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
664 removeEventListener<K extends keyof AbortSignalEventMap>(type: K, listener: (this: AbortSignal, ev: AbortSignalEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
665 removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
668 declare var AbortSignal: {
669 prototype: AbortSignal;
673 interface AbstractWorkerEventMap {
677 interface AbstractWorker {
678 onerror: ((this: AbstractWorker, ev: ErrorEvent) => any) | null;
679 addEventListener<K extends keyof AbstractWorkerEventMap>(type: K, listener: (this: AbstractWorker, ev: AbstractWorkerEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
680 addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
681 removeEventListener<K extends keyof AbstractWorkerEventMap>(type: K, listener: (this: AbstractWorker, ev: AbstractWorkerEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
682 removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
685 interface AesCfbParams extends Algorithm {
686 iv: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer;
689 interface AesCmacParams extends Algorithm {
693 interface AnimationFrameProvider {
694 cancelAnimationFrame(handle: number): void;
695 requestAnimationFrame(callback: FrameRequestCallback): number;
698 /** 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. */
700 readonly size: number;
701 readonly type: string;
702 arrayBuffer(): Promise<ArrayBuffer>;
703 slice(start?: number, end?: number, contentType?: string): Blob;
704 stream(): ReadableStream;
705 text(): Promise<string>;
710 new(blobParts?: BlobPart[], options?: BlobPropertyBag): Blob;
714 readonly body: ReadableStream<Uint8Array> | null;
715 readonly bodyUsed: boolean;
716 arrayBuffer(): Promise<ArrayBuffer>;
717 blob(): Promise<Blob>;
718 formData(): Promise<FormData>;
719 json(): Promise<any>;
720 text(): Promise<string>;
723 interface BroadcastChannelEventMap {
724 "message": MessageEvent;
725 "messageerror": MessageEvent;
728 interface BroadcastChannel extends EventTarget {
730 * Returns the channel name (as passed to the constructor).
732 readonly name: string;
733 onmessage: ((this: BroadcastChannel, ev: MessageEvent) => any) | null;
734 onmessageerror: ((this: BroadcastChannel, ev: MessageEvent) => any) | null;
736 * Closes the BroadcastChannel object, opening it up to garbage collection.
740 * Sends the given message to other BroadcastChannel objects set up for this channel. Messages can be structured objects, e.g. nested objects and arrays.
742 postMessage(message: any): void;
743 addEventListener<K extends keyof BroadcastChannelEventMap>(type: K, listener: (this: BroadcastChannel, ev: BroadcastChannelEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
744 addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
745 removeEventListener<K extends keyof BroadcastChannelEventMap>(type: K, listener: (this: BroadcastChannel, ev: BroadcastChannelEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
746 removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
749 declare var BroadcastChannel: {
750 prototype: BroadcastChannel;
751 new(name: string): BroadcastChannel;
754 /** This Streams API interface provides a built-in byte length queuing strategy that can be used when constructing streams. */
755 interface ByteLengthQueuingStrategy extends QueuingStrategy<ArrayBufferView> {
756 readonly highWaterMark: number;
757 readonly size: QueuingStrategySize<ArrayBufferView>;
760 declare var ByteLengthQueuingStrategy: {
761 prototype: ByteLengthQueuingStrategy;
762 new(init: QueuingStrategyInit): ByteLengthQueuingStrategy;
765 /** 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. */
767 add(request: RequestInfo): Promise<void>;
768 addAll(requests: RequestInfo[]): Promise<void>;
769 delete(request: RequestInfo, options?: CacheQueryOptions): Promise<boolean>;
770 keys(request?: RequestInfo, options?: CacheQueryOptions): Promise<ReadonlyArray<Request>>;
771 match(request: RequestInfo, options?: CacheQueryOptions): Promise<Response | undefined>;
772 matchAll(request?: RequestInfo, options?: CacheQueryOptions): Promise<ReadonlyArray<Response>>;
773 put(request: RequestInfo, response: Response): Promise<void>;
781 /** The storage for Cache objects. */
782 interface CacheStorage {
783 delete(cacheName: string): Promise<boolean>;
784 has(cacheName: string): Promise<boolean>;
785 keys(): Promise<string[]>;
786 match(request: RequestInfo, options?: MultiCacheQueryOptions): Promise<Response | undefined>;
787 open(cacheName: string): Promise<Cache>;
790 declare var CacheStorage: {
791 prototype: CacheStorage;
795 interface CanvasCompositing {
797 globalCompositeOperation: string;
800 interface CanvasDrawImage {
801 drawImage(image: CanvasImageSource, dx: number, dy: number): void;
802 drawImage(image: CanvasImageSource, dx: number, dy: number, dw: number, dh: number): void;
803 drawImage(image: CanvasImageSource, sx: number, sy: number, sw: number, sh: number, dx: number, dy: number, dw: number, dh: number): void;
806 interface CanvasDrawPath {
808 clip(fillRule?: CanvasFillRule): void;
809 clip(path: Path2D, fillRule?: CanvasFillRule): void;
810 fill(fillRule?: CanvasFillRule): void;
811 fill(path: Path2D, fillRule?: CanvasFillRule): void;
812 isPointInPath(x: number, y: number, fillRule?: CanvasFillRule): boolean;
813 isPointInPath(path: Path2D, x: number, y: number, fillRule?: CanvasFillRule): boolean;
814 isPointInStroke(x: number, y: number): boolean;
815 isPointInStroke(path: Path2D, x: number, y: number): boolean;
817 stroke(path: Path2D): void;
820 interface CanvasFillStrokeStyles {
821 fillStyle: string | CanvasGradient | CanvasPattern;
822 strokeStyle: string | CanvasGradient | CanvasPattern;
823 createLinearGradient(x0: number, y0: number, x1: number, y1: number): CanvasGradient;
824 createPattern(image: CanvasImageSource, repetition: string | null): CanvasPattern | null;
825 createRadialGradient(x0: number, y0: number, r0: number, x1: number, y1: number, r1: number): CanvasGradient;
828 interface CanvasFilters {
832 /** An opaque object describing a gradient. It is returned by the methods CanvasRenderingContext2D.createLinearGradient() or CanvasRenderingContext2D.createRadialGradient(). */
833 interface CanvasGradient {
835 * 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.
837 * Throws an "IndexSizeError" DOMException if the offset is out of range. Throws a "SyntaxError" DOMException if the color cannot be parsed.
839 addColorStop(offset: number, color: string): void;
842 declare var CanvasGradient: {
843 prototype: CanvasGradient;
844 new(): CanvasGradient;
847 interface CanvasImageData {
848 createImageData(sw: number, sh: number): ImageData;
849 createImageData(imagedata: ImageData): ImageData;
850 getImageData(sx: number, sy: number, sw: number, sh: number): ImageData;
851 putImageData(imagedata: ImageData, dx: number, dy: number): void;
852 putImageData(imagedata: ImageData, dx: number, dy: number, dirtyX: number, dirtyY: number, dirtyWidth: number, dirtyHeight: number): void;
855 interface CanvasImageSmoothing {
856 imageSmoothingEnabled: boolean;
857 imageSmoothingQuality: ImageSmoothingQuality;
860 interface CanvasPath {
861 arc(x: number, y: number, radius: number, startAngle: number, endAngle: number, anticlockwise?: boolean): void;
862 arcTo(x1: number, y1: number, x2: number, y2: number, radius: number): void;
863 bezierCurveTo(cp1x: number, cp1y: number, cp2x: number, cp2y: number, x: number, y: number): void;
865 ellipse(x: number, y: number, radiusX: number, radiusY: number, rotation: number, startAngle: number, endAngle: number, anticlockwise?: boolean): void;
866 lineTo(x: number, y: number): void;
867 moveTo(x: number, y: number): void;
868 quadraticCurveTo(cpx: number, cpy: number, x: number, y: number): void;
869 rect(x: number, y: number, w: number, h: number): void;
872 interface CanvasPathDrawingStyles {
873 lineCap: CanvasLineCap;
874 lineDashOffset: number;
875 lineJoin: CanvasLineJoin;
878 getLineDash(): number[];
879 setLineDash(segments: number[]): void;
882 /** An opaque object describing a pattern, based on an image, a canvas, or a video, created by the CanvasRenderingContext2D.createPattern() method. */
883 interface CanvasPattern {
885 * Sets the transformation matrix that will be used when rendering the pattern during a fill or stroke painting operation.
887 setTransform(transform?: DOMMatrix2DInit): void;
890 declare var CanvasPattern: {
891 prototype: CanvasPattern;
892 new(): CanvasPattern;
895 interface CanvasRect {
896 clearRect(x: number, y: number, w: number, h: number): void;
897 fillRect(x: number, y: number, w: number, h: number): void;
898 strokeRect(x: number, y: number, w: number, h: number): void;
901 interface CanvasShadowStyles {
904 shadowOffsetX: number;
905 shadowOffsetY: number;
908 interface CanvasState {
913 interface CanvasText {
914 fillText(text: string, x: number, y: number, maxWidth?: number): void;
915 measureText(text: string): TextMetrics;
916 strokeText(text: string, x: number, y: number, maxWidth?: number): void;
919 interface CanvasTextDrawingStyles {
920 direction: CanvasDirection;
922 textAlign: CanvasTextAlign;
923 textBaseline: CanvasTextBaseline;
926 interface CanvasTransform {
927 getTransform(): DOMMatrix;
928 resetTransform(): void;
929 rotate(angle: number): void;
930 scale(x: number, y: number): void;
931 setTransform(a: number, b: number, c: number, d: number, e: number, f: number): void;
932 setTransform(transform?: DOMMatrix2DInit): void;
933 transform(a: number, b: number, c: number, d: number, e: number, f: number): void;
934 translate(x: number, y: number): void;
937 /** 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(). */
939 readonly frameType: FrameType;
941 readonly type: ClientTypes;
942 readonly url: string;
943 postMessage(message: any, transfer?: Transferable[]): void;
946 declare var Client: {
951 /** Provides access to Client objects. Access it via self.clients within a service worker. */
953 claim(): Promise<void>;
954 get(id: string): Promise<Client | undefined>;
955 matchAll<T extends ClientQueryOptions>(options?: T): Promise<ReadonlyArray<T["type"] extends "window" ? WindowClient : Client>>;
956 openWindow(url: string): Promise<WindowClient | null>;
959 declare var Clients: {
964 /** 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. */
965 interface CloseEvent extends Event {
967 * Returns the WebSocket connection close code provided by the server.
969 readonly code: number;
971 * Returns the WebSocket connection close reason provided by the server.
973 readonly reason: string;
975 * Returns true if the connection closed cleanly; false otherwise.
977 readonly wasClean: boolean;
980 declare var CloseEvent: {
981 prototype: CloseEvent;
982 new(type: string, eventInitDict?: CloseEventInit): CloseEvent;
985 interface ConcatParams extends Algorithm {
986 algorithmId: Uint8Array;
987 hash?: string | Algorithm;
988 partyUInfo: Uint8Array;
989 partyVInfo: Uint8Array;
990 privateInfo?: Uint8Array;
991 publicInfo?: Uint8Array;
994 /** This Streams API interface provides a built-in byte length queuing strategy that can be used when constructing streams. */
995 interface CountQueuingStrategy extends QueuingStrategy {
996 readonly highWaterMark: number;
997 readonly size: QueuingStrategySize;
1000 declare var CountQueuingStrategy: {
1001 prototype: CountQueuingStrategy;
1002 new(init: QueuingStrategyInit): CountQueuingStrategy;
1005 /** Basic cryptography features available in the current context. It allows access to a cryptographically strong random number generator and to cryptographic primitives. */
1007 readonly subtle: SubtleCrypto;
1008 getRandomValues<T extends Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | null>(array: T): T;
1011 declare var Crypto: {
1016 /** The CryptoKey dictionary of the Web Crypto API represents a cryptographic key. */
1017 interface CryptoKey {
1018 readonly algorithm: KeyAlgorithm;
1019 readonly extractable: boolean;
1020 readonly type: KeyType;
1021 readonly usages: KeyUsage[];
1024 declare var CryptoKey: {
1025 prototype: CryptoKey;
1029 interface CustomEvent<T = any> extends Event {
1031 * Returns any custom data event was created with. Typically used for synthetic events.
1034 initCustomEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, detailArg: T): void;
1037 declare var CustomEvent: {
1038 prototype: CustomEvent;
1039 new<T>(typeArg: string, eventInitDict?: CustomEventInit<T>): CustomEvent<T>;
1042 /** An abnormal event (called an exception) which occurs as a result of calling a method or accessing a property of a web API. */
1043 interface DOMException {
1044 readonly code: number;
1045 readonly message: string;
1046 readonly name: string;
1047 readonly ABORT_ERR: number;
1048 readonly DATA_CLONE_ERR: number;
1049 readonly DOMSTRING_SIZE_ERR: number;
1050 readonly HIERARCHY_REQUEST_ERR: number;
1051 readonly INDEX_SIZE_ERR: number;
1052 readonly INUSE_ATTRIBUTE_ERR: number;
1053 readonly INVALID_ACCESS_ERR: number;
1054 readonly INVALID_CHARACTER_ERR: number;
1055 readonly INVALID_MODIFICATION_ERR: number;
1056 readonly INVALID_NODE_TYPE_ERR: number;
1057 readonly INVALID_STATE_ERR: number;
1058 readonly NAMESPACE_ERR: number;
1059 readonly NETWORK_ERR: number;
1060 readonly NOT_FOUND_ERR: number;
1061 readonly NOT_SUPPORTED_ERR: number;
1062 readonly NO_DATA_ALLOWED_ERR: number;
1063 readonly NO_MODIFICATION_ALLOWED_ERR: number;
1064 readonly QUOTA_EXCEEDED_ERR: number;
1065 readonly SECURITY_ERR: number;
1066 readonly SYNTAX_ERR: number;
1067 readonly TIMEOUT_ERR: number;
1068 readonly TYPE_MISMATCH_ERR: number;
1069 readonly URL_MISMATCH_ERR: number;
1070 readonly VALIDATION_ERR: number;
1071 readonly WRONG_DOCUMENT_ERR: number;
1074 declare var DOMException: {
1075 prototype: DOMException;
1076 new(message?: string, name?: string): DOMException;
1077 readonly ABORT_ERR: number;
1078 readonly DATA_CLONE_ERR: number;
1079 readonly DOMSTRING_SIZE_ERR: number;
1080 readonly HIERARCHY_REQUEST_ERR: number;
1081 readonly INDEX_SIZE_ERR: number;
1082 readonly INUSE_ATTRIBUTE_ERR: number;
1083 readonly INVALID_ACCESS_ERR: number;
1084 readonly INVALID_CHARACTER_ERR: number;
1085 readonly INVALID_MODIFICATION_ERR: number;
1086 readonly INVALID_NODE_TYPE_ERR: number;
1087 readonly INVALID_STATE_ERR: number;
1088 readonly NAMESPACE_ERR: number;
1089 readonly NETWORK_ERR: number;
1090 readonly NOT_FOUND_ERR: number;
1091 readonly NOT_SUPPORTED_ERR: number;
1092 readonly NO_DATA_ALLOWED_ERR: number;
1093 readonly NO_MODIFICATION_ALLOWED_ERR: number;
1094 readonly QUOTA_EXCEEDED_ERR: number;
1095 readonly SECURITY_ERR: number;
1096 readonly SYNTAX_ERR: number;
1097 readonly TIMEOUT_ERR: number;
1098 readonly TYPE_MISMATCH_ERR: number;
1099 readonly URL_MISMATCH_ERR: number;
1100 readonly VALIDATION_ERR: number;
1101 readonly WRONG_DOCUMENT_ERR: number;
1104 interface DOMMatrix extends DOMMatrixReadOnly {
1127 invertSelf(): DOMMatrix;
1128 multiplySelf(other?: DOMMatrixInit): DOMMatrix;
1129 preMultiplySelf(other?: DOMMatrixInit): DOMMatrix;
1130 rotateAxisAngleSelf(x?: number, y?: number, z?: number, angle?: number): DOMMatrix;
1131 rotateFromVectorSelf(x?: number, y?: number): DOMMatrix;
1132 rotateSelf(rotX?: number, rotY?: number, rotZ?: number): DOMMatrix;
1133 scale3dSelf(scale?: number, originX?: number, originY?: number, originZ?: number): DOMMatrix;
1134 scaleSelf(scaleX?: number, scaleY?: number, scaleZ?: number, originX?: number, originY?: number, originZ?: number): DOMMatrix;
1135 skewXSelf(sx?: number): DOMMatrix;
1136 skewYSelf(sy?: number): DOMMatrix;
1137 translateSelf(tx?: number, ty?: number, tz?: number): DOMMatrix;
1140 declare var DOMMatrix: {
1141 prototype: DOMMatrix;
1142 new(init?: string | number[]): DOMMatrix;
1143 fromFloat32Array(array32: Float32Array): DOMMatrix;
1144 fromFloat64Array(array64: Float64Array): DOMMatrix;
1145 fromMatrix(other?: DOMMatrixInit): DOMMatrix;
1148 interface DOMMatrixReadOnly {
1155 readonly is2D: boolean;
1156 readonly isIdentity: boolean;
1157 readonly m11: number;
1158 readonly m12: number;
1159 readonly m13: number;
1160 readonly m14: number;
1161 readonly m21: number;
1162 readonly m22: number;
1163 readonly m23: number;
1164 readonly m24: number;
1165 readonly m31: number;
1166 readonly m32: number;
1167 readonly m33: number;
1168 readonly m34: number;
1169 readonly m41: number;
1170 readonly m42: number;
1171 readonly m43: number;
1172 readonly m44: number;
1175 inverse(): DOMMatrix;
1176 multiply(other?: DOMMatrixInit): DOMMatrix;
1177 rotate(rotX?: number, rotY?: number, rotZ?: number): DOMMatrix;
1178 rotateAxisAngle(x?: number, y?: number, z?: number, angle?: number): DOMMatrix;
1179 rotateFromVector(x?: number, y?: number): DOMMatrix;
1180 scale(scaleX?: number, scaleY?: number, scaleZ?: number, originX?: number, originY?: number, originZ?: number): DOMMatrix;
1181 scale3d(scale?: number, originX?: number, originY?: number, originZ?: number): DOMMatrix;
1183 scaleNonUniform(scaleX?: number, scaleY?: number): DOMMatrix;
1184 skewX(sx?: number): DOMMatrix;
1185 skewY(sy?: number): DOMMatrix;
1186 toFloat32Array(): Float32Array;
1187 toFloat64Array(): Float64Array;
1189 transformPoint(point?: DOMPointInit): DOMPoint;
1190 translate(tx?: number, ty?: number, tz?: number): DOMMatrix;
1193 declare var DOMMatrixReadOnly: {
1194 prototype: DOMMatrixReadOnly;
1195 new(init?: string | number[]): DOMMatrixReadOnly;
1196 fromFloat32Array(array32: Float32Array): DOMMatrixReadOnly;
1197 fromFloat64Array(array64: Float64Array): DOMMatrixReadOnly;
1198 fromMatrix(other?: DOMMatrixInit): DOMMatrixReadOnly;
1201 interface DOMPoint extends DOMPointReadOnly {
1208 declare var DOMPoint: {
1209 prototype: DOMPoint;
1210 new(x?: number, y?: number, z?: number, w?: number): DOMPoint;
1211 fromPoint(other?: DOMPointInit): DOMPoint;
1214 interface DOMPointReadOnly {
1219 matrixTransform(matrix?: DOMMatrixInit): DOMPoint;
1223 declare var DOMPointReadOnly: {
1224 prototype: DOMPointReadOnly;
1225 new(x?: number, y?: number, z?: number, w?: number): DOMPointReadOnly;
1226 fromPoint(other?: DOMPointInit): DOMPointReadOnly;
1230 readonly p1: DOMPoint;
1231 readonly p2: DOMPoint;
1232 readonly p3: DOMPoint;
1233 readonly p4: DOMPoint;
1234 getBounds(): DOMRect;
1238 declare var DOMQuad: {
1240 new(p1?: DOMPointInit, p2?: DOMPointInit, p3?: DOMPointInit, p4?: DOMPointInit): DOMQuad;
1241 fromQuad(other?: DOMQuadInit): DOMQuad;
1242 fromRect(other?: DOMRectInit): DOMQuad;
1245 interface DOMRect extends DOMRectReadOnly {
1252 declare var DOMRect: {
1254 new(x?: number, y?: number, width?: number, height?: number): DOMRect;
1255 fromRect(other?: DOMRectInit): DOMRect;
1258 interface DOMRectReadOnly {
1259 readonly bottom: number;
1260 readonly height: number;
1261 readonly left: number;
1262 readonly right: number;
1263 readonly top: number;
1264 readonly width: number;
1270 declare var DOMRectReadOnly: {
1271 prototype: DOMRectReadOnly;
1272 new(x?: number, y?: number, width?: number, height?: number): DOMRectReadOnly;
1273 fromRect(other?: DOMRectInit): DOMRectReadOnly;
1276 /** A type returned by some APIs which contains a list of DOMString (strings). */
1277 interface DOMStringList {
1279 * Returns the number of strings in strings.
1281 readonly length: number;
1283 * Returns true if strings contains string, and false otherwise.
1285 contains(string: string): boolean;
1287 * Returns the string with index index from strings.
1289 item(index: number): string | null;
1290 [index: number]: string;
1293 declare var DOMStringList: {
1294 prototype: DOMStringList;
1295 new(): DOMStringList;
1298 interface DedicatedWorkerGlobalScopeEventMap extends WorkerGlobalScopeEventMap {
1299 "message": MessageEvent;
1300 "messageerror": MessageEvent;
1303 /** (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. */
1304 interface DedicatedWorkerGlobalScope extends WorkerGlobalScope, AnimationFrameProvider {
1306 * Returns dedicatedWorkerGlobal's name, i.e. the value given to the Worker constructor. Primarily useful for debugging.
1308 readonly name: string;
1309 onmessage: ((this: DedicatedWorkerGlobalScope, ev: MessageEvent) => any) | null;
1310 onmessageerror: ((this: DedicatedWorkerGlobalScope, ev: MessageEvent) => any) | null;
1312 * Aborts dedicatedWorkerGlobal.
1316 * 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.
1318 postMessage(message: any, transfer: Transferable[]): void;
1319 postMessage(message: any, options?: PostMessageOptions): void;
1320 addEventListener<K extends keyof DedicatedWorkerGlobalScopeEventMap>(type: K, listener: (this: DedicatedWorkerGlobalScope, ev: DedicatedWorkerGlobalScopeEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
1321 addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
1322 removeEventListener<K extends keyof DedicatedWorkerGlobalScopeEventMap>(type: K, listener: (this: DedicatedWorkerGlobalScope, ev: DedicatedWorkerGlobalScopeEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
1323 removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
1326 declare var DedicatedWorkerGlobalScope: {
1327 prototype: DedicatedWorkerGlobalScope;
1328 new(): DedicatedWorkerGlobalScope;
1331 interface DhImportKeyParams extends Algorithm {
1332 generator: Uint8Array;
1336 interface DhKeyAlgorithm extends KeyAlgorithm {
1337 generator: Uint8Array;
1341 interface DhKeyDeriveParams extends Algorithm {
1345 interface DhKeyGenParams extends Algorithm {
1346 generator: Uint8Array;
1350 interface EXT_blend_minmax {
1351 readonly MAX_EXT: GLenum;
1352 readonly MIN_EXT: GLenum;
1355 /** 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. */
1356 interface EXT_frag_depth {
1359 interface EXT_sRGB {
1360 readonly FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT: GLenum;
1361 readonly SRGB8_ALPHA8_EXT: GLenum;
1362 readonly SRGB_ALPHA_EXT: GLenum;
1363 readonly SRGB_EXT: GLenum;
1366 interface EXT_shader_texture_lod {
1369 /** The EXT_texture_filter_anisotropic extension is part of the WebGL API and exposes two constants for anisotropic filtering (AF). */
1370 interface EXT_texture_filter_anisotropic {
1371 readonly MAX_TEXTURE_MAX_ANISOTROPY_EXT: GLenum;
1372 readonly TEXTURE_MAX_ANISOTROPY_EXT: GLenum;
1375 /** Events providing information related to errors in scripts or in files. */
1376 interface ErrorEvent extends Event {
1377 readonly colno: number;
1378 readonly error: any;
1379 readonly filename: string;
1380 readonly lineno: number;
1381 readonly message: string;
1384 declare var ErrorEvent: {
1385 prototype: ErrorEvent;
1386 new(type: string, eventInitDict?: ErrorEventInit): ErrorEvent;
1389 /** An event which takes place in the DOM. */
1392 * 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.
1394 readonly bubbles: boolean;
1395 cancelBubble: boolean;
1397 * 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.
1399 readonly cancelable: boolean;
1401 * 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.
1403 readonly composed: boolean;
1405 * Returns the object whose event listener's callback is currently being invoked.
1407 readonly currentTarget: EventTarget | null;
1409 * Returns true if preventDefault() was invoked successfully to indicate cancelation, and false otherwise.
1411 readonly defaultPrevented: boolean;
1413 * Returns the event's phase, which is one of NONE, CAPTURING_PHASE, AT_TARGET, and BUBBLING_PHASE.
1415 readonly eventPhase: number;
1417 * Returns true if event was dispatched by the user agent, and false otherwise.
1419 readonly isTrusted: boolean;
1420 returnValue: boolean;
1422 readonly srcElement: EventTarget | null;
1424 * Returns the object to which event is dispatched (its target).
1426 readonly target: EventTarget | null;
1428 * Returns the event's timestamp as the number of milliseconds measured relative to the time origin.
1430 readonly timeStamp: number;
1432 * Returns the type of event, e.g. "click", "hashchange", or "submit".
1434 readonly type: string;
1436 * 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.
1438 composedPath(): EventTarget[];
1439 initEvent(type: string, bubbles?: boolean, cancelable?: boolean): void;
1441 * 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.
1443 preventDefault(): void;
1445 * 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.
1447 stopImmediatePropagation(): void;
1449 * When dispatched in a tree, invoking this method prevents event from reaching any objects other than the current object.
1451 stopPropagation(): void;
1452 readonly AT_TARGET: number;
1453 readonly BUBBLING_PHASE: number;
1454 readonly CAPTURING_PHASE: number;
1455 readonly NONE: number;
1458 declare var Event: {
1460 new(type: string, eventInitDict?: EventInit): Event;
1461 readonly AT_TARGET: number;
1462 readonly BUBBLING_PHASE: number;
1463 readonly CAPTURING_PHASE: number;
1464 readonly NONE: number;
1467 interface EventListenerObject {
1468 handleEvent(evt: Event): void;
1471 interface EventSourceEventMap {
1473 "message": MessageEvent;
1477 interface EventSource extends EventTarget {
1478 onerror: ((this: EventSource, ev: Event) => any) | null;
1479 onmessage: ((this: EventSource, ev: MessageEvent) => any) | null;
1480 onopen: ((this: EventSource, ev: Event) => any) | null;
1482 * Returns the state of this EventSource object's connection. It can have the values described below.
1484 readonly readyState: number;
1486 * Returns the URL providing the event stream.
1488 readonly url: string;
1490 * Returns true if the credentials mode for connection requests to the URL providing the event stream is set to "include", and false otherwise.
1492 readonly withCredentials: boolean;
1494 * Aborts any instances of the fetch algorithm started for this EventSource object, and sets the readyState attribute to CLOSED.
1497 readonly CLOSED: number;
1498 readonly CONNECTING: number;
1499 readonly OPEN: number;
1500 addEventListener<K extends keyof EventSourceEventMap>(type: K, listener: (this: EventSource, ev: EventSourceEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
1501 addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
1502 removeEventListener<K extends keyof EventSourceEventMap>(type: K, listener: (this: EventSource, ev: EventSourceEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
1503 removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
1506 declare var EventSource: {
1507 prototype: EventSource;
1508 new(url: string, eventSourceInitDict?: EventSourceInit): EventSource;
1509 readonly CLOSED: number;
1510 readonly CONNECTING: number;
1511 readonly OPEN: number;
1514 /** EventTarget is a DOM interface implemented by objects that can receive events and may have listeners for them. */
1515 interface EventTarget {
1517 * 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.
1519 * 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.
1521 * 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.
1523 * 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.
1525 * When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed.
1527 * The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
1529 addEventListener(type: string, listener: EventListenerOrEventListenerObject | null, options?: boolean | AddEventListenerOptions): void;
1531 * 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.
1533 dispatchEvent(event: Event): boolean;
1535 * Removes the event listener in target's event listener list with the same type, callback, and options.
1537 removeEventListener(type: string, callback: EventListenerOrEventListenerObject | null, options?: EventListenerOptions | boolean): void;
1540 declare var EventTarget: {
1541 prototype: EventTarget;
1545 /** 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. */
1546 interface ExtendableEvent extends Event {
1547 waitUntil(f: any): void;
1550 declare var ExtendableEvent: {
1551 prototype: ExtendableEvent;
1552 new(type: string, eventInitDict?: ExtendableEventInit): ExtendableEvent;
1555 /** 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. */
1556 interface ExtendableMessageEvent extends ExtendableEvent {
1558 readonly lastEventId: string;
1559 readonly origin: string;
1560 readonly ports: ReadonlyArray<MessagePort>;
1561 readonly source: Client | ServiceWorker | MessagePort | null;
1564 declare var ExtendableMessageEvent: {
1565 prototype: ExtendableMessageEvent;
1566 new(type: string, eventInitDict?: ExtendableMessageEventInit): ExtendableMessageEvent;
1569 /** 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. */
1570 interface FetchEvent extends ExtendableEvent {
1571 readonly clientId: string;
1572 readonly preloadResponse: Promise<any>;
1573 readonly replacesClientId: string;
1574 readonly request: Request;
1575 readonly resultingClientId: string;
1576 respondWith(r: Response | Promise<Response>): void;
1579 declare var FetchEvent: {
1580 prototype: FetchEvent;
1581 new(type: string, eventInitDict: FetchEventInit): FetchEvent;
1584 /** Provides information about files and allows JavaScript in a web page to access their content. */
1585 interface File extends Blob {
1586 readonly lastModified: number;
1587 readonly name: string;
1592 new(fileBits: BlobPart[], fileName: string, options?: FilePropertyBag): File;
1595 /** 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. */
1596 interface FileList {
1597 readonly length: number;
1598 item(index: number): File | null;
1599 [index: number]: File;
1602 declare var FileList: {
1603 prototype: FileList;
1607 interface FileReaderEventMap {
1608 "abort": ProgressEvent<FileReader>;
1609 "error": ProgressEvent<FileReader>;
1610 "load": ProgressEvent<FileReader>;
1611 "loadend": ProgressEvent<FileReader>;
1612 "loadstart": ProgressEvent<FileReader>;
1613 "progress": ProgressEvent<FileReader>;
1616 /** 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. */
1617 interface FileReader extends EventTarget {
1618 readonly error: DOMException | null;
1619 onabort: ((this: FileReader, ev: ProgressEvent<FileReader>) => any) | null;
1620 onerror: ((this: FileReader, ev: ProgressEvent<FileReader>) => any) | null;
1621 onload: ((this: FileReader, ev: ProgressEvent<FileReader>) => any) | null;
1622 onloadend: ((this: FileReader, ev: ProgressEvent<FileReader>) => any) | null;
1623 onloadstart: ((this: FileReader, ev: ProgressEvent<FileReader>) => any) | null;
1624 onprogress: ((this: FileReader, ev: ProgressEvent<FileReader>) => any) | null;
1625 readonly readyState: number;
1626 readonly result: string | ArrayBuffer | null;
1628 readAsArrayBuffer(blob: Blob): void;
1629 readAsBinaryString(blob: Blob): void;
1630 readAsDataURL(blob: Blob): void;
1631 readAsText(blob: Blob, encoding?: string): void;
1632 readonly DONE: number;
1633 readonly EMPTY: number;
1634 readonly LOADING: number;
1635 addEventListener<K extends keyof FileReaderEventMap>(type: K, listener: (this: FileReader, ev: FileReaderEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
1636 addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
1637 removeEventListener<K extends keyof FileReaderEventMap>(type: K, listener: (this: FileReader, ev: FileReaderEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
1638 removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
1641 declare var FileReader: {
1642 prototype: FileReader;
1644 readonly DONE: number;
1645 readonly EMPTY: number;
1646 readonly LOADING: number;
1649 /** Allows to read File or Blob objects in a synchronous way. */
1650 interface FileReaderSync {
1651 readAsArrayBuffer(blob: Blob): ArrayBuffer;
1652 readAsBinaryString(blob: Blob): string;
1653 readAsDataURL(blob: Blob): string;
1654 readAsText(blob: Blob, encoding?: string): string;
1657 declare var FileReaderSync: {
1658 prototype: FileReaderSync;
1659 new(): FileReaderSync;
1662 /** 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". */
1663 interface FormData {
1664 append(name: string, value: string | Blob, fileName?: string): void;
1665 delete(name: string): void;
1666 get(name: string): FormDataEntryValue | null;
1667 getAll(name: string): FormDataEntryValue[];
1668 has(name: string): boolean;
1669 set(name: string, value: string | Blob, fileName?: string): void;
1670 forEach(callbackfn: (value: FormDataEntryValue, key: string, parent: FormData) => void, thisArg?: any): void;
1673 declare var FormData: {
1674 prototype: FormData;
1678 interface GenericTransformStream {
1679 readonly readable: ReadableStream;
1680 readonly writable: WritableStream;
1683 /** 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. */
1685 append(name: string, value: string): void;
1686 delete(name: string): void;
1687 get(name: string): string | null;
1688 has(name: string): boolean;
1689 set(name: string, value: string): void;
1690 forEach(callbackfn: (value: string, key: string, parent: Headers) => void, thisArg?: any): void;
1693 declare var Headers: {
1695 new(init?: HeadersInit): Headers;
1698 interface IDBArrayKey extends Array<IDBValidKey> {
1701 /** This IndexedDB API interface represents a cursor for traversing or iterating over multiple records in a database. */
1702 interface IDBCursor {
1704 * Returns the direction ("next", "nextunique", "prev" or "prevunique") of the cursor.
1706 readonly direction: IDBCursorDirection;
1708 * Returns the key of the cursor. Throws a "InvalidStateError" DOMException if the cursor is advancing or is finished.
1710 readonly key: IDBValidKey;
1712 * Returns the effective key of the cursor. Throws a "InvalidStateError" DOMException if the cursor is advancing or is finished.
1714 readonly primaryKey: IDBValidKey;
1716 * Returns the IDBObjectStore or IDBIndex the cursor was opened from.
1718 readonly source: IDBObjectStore | IDBIndex;
1720 * Advances the cursor through the next count records in range.
1722 advance(count: number): void;
1724 * Advances the cursor to the next record in range.
1726 continue(key?: IDBValidKey): void;
1728 * 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.
1730 continuePrimaryKey(key: IDBValidKey, primaryKey: IDBValidKey): void;
1732 * Delete the record pointed at by the cursor with a new value.
1734 * If successful, request's result will be undefined.
1736 delete(): IDBRequest<undefined>;
1738 * Updated the record pointed at by the cursor with a new value.
1740 * Throws a "DataError" DOMException if the effective object store uses in-line keys and the key would have changed.
1742 * If successful, request's result will be the record's key.
1744 update(value: any): IDBRequest<IDBValidKey>;
1747 declare var IDBCursor: {
1748 prototype: IDBCursor;
1752 /** 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. */
1753 interface IDBCursorWithValue extends IDBCursor {
1755 * Returns the cursor's current value.
1757 readonly value: any;
1760 declare var IDBCursorWithValue: {
1761 prototype: IDBCursorWithValue;
1762 new(): IDBCursorWithValue;
1765 interface IDBDatabaseEventMap {
1769 "versionchange": IDBVersionChangeEvent;
1772 /** 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. */
1773 interface IDBDatabase extends EventTarget {
1775 * Returns the name of the database.
1777 readonly name: string;
1779 * Returns a list of the names of object stores in the database.
1781 readonly objectStoreNames: DOMStringList;
1782 onabort: ((this: IDBDatabase, ev: Event) => any) | null;
1783 onclose: ((this: IDBDatabase, ev: Event) => any) | null;
1784 onerror: ((this: IDBDatabase, ev: Event) => any) | null;
1785 onversionchange: ((this: IDBDatabase, ev: IDBVersionChangeEvent) => any) | null;
1787 * Returns the version of the database.
1789 readonly version: number;
1791 * Closes the connection once all running transactions have finished.
1795 * Creates a new object store with the given name and options and returns a new IDBObjectStore.
1797 * Throws a "InvalidStateError" DOMException if not called within an upgrade transaction.
1799 createObjectStore(name: string, options?: IDBObjectStoreParameters): IDBObjectStore;
1801 * Deletes the object store with the given name.
1803 * Throws a "InvalidStateError" DOMException if not called within an upgrade transaction.
1805 deleteObjectStore(name: string): void;
1807 * 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.
1809 transaction(storeNames: string | string[], mode?: IDBTransactionMode): IDBTransaction;
1810 addEventListener<K extends keyof IDBDatabaseEventMap>(type: K, listener: (this: IDBDatabase, ev: IDBDatabaseEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
1811 addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
1812 removeEventListener<K extends keyof IDBDatabaseEventMap>(type: K, listener: (this: IDBDatabase, ev: IDBDatabaseEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
1813 removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
1816 declare var IDBDatabase: {
1817 prototype: IDBDatabase;
1821 /** 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.) */
1822 interface IDBFactory {
1824 * Compares two values as keys. Returns -1 if key1 precedes key2, 1 if key2 precedes key1, and 0 if the keys are equal.
1826 * Throws a "DataError" DOMException if either input is not a valid key.
1828 cmp(first: any, second: any): number;
1830 * 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.
1832 deleteDatabase(name: string): IDBOpenDBRequest;
1834 * 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.
1836 open(name: string, version?: number): IDBOpenDBRequest;
1839 declare var IDBFactory: {
1840 prototype: IDBFactory;
1844 /** 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. */
1845 interface IDBIndex {
1846 readonly keyPath: string | string[];
1847 readonly multiEntry: boolean;
1849 * Returns the name of the index.
1853 * Returns the IDBObjectStore the index belongs to.
1855 readonly objectStore: IDBObjectStore;
1856 readonly unique: boolean;
1858 * Retrieves the number of records matching the given key or key range in query.
1860 * If successful, request's result will be the count.
1862 count(key?: IDBValidKey | IDBKeyRange): IDBRequest<number>;
1864 * Retrieves the value of the first record matching the given key or key range in query.
1866 * If successful, request's result will be the value, or undefined if there was no matching record.
1868 get(key: IDBValidKey | IDBKeyRange): IDBRequest<any | undefined>;
1870 * Retrieves the values of the records matching the given key or key range in query (up to count if given).
1872 * If successful, request's result will be an Array of the values.
1874 getAll(query?: IDBValidKey | IDBKeyRange | null, count?: number): IDBRequest<any[]>;
1876 * Retrieves the keys of records matching the given key or key range in query (up to count if given).
1878 * If successful, request's result will be an Array of the keys.
1880 getAllKeys(query?: IDBValidKey | IDBKeyRange | null, count?: number): IDBRequest<IDBValidKey[]>;
1882 * Retrieves the key of the first record matching the given key or key range in query.
1884 * If successful, request's result will be the key, or undefined if there was no matching record.
1886 getKey(key: IDBValidKey | IDBKeyRange): IDBRequest<IDBValidKey | undefined>;
1888 * Opens a cursor over the records matching query, ordered by direction. If query is null, all records in index are matched.
1890 * If successful, request's result will be an IDBCursorWithValue, or null if there were no matching records.
1892 openCursor(query?: IDBValidKey | IDBKeyRange | null, direction?: IDBCursorDirection): IDBRequest<IDBCursorWithValue | null>;
1894 * 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.
1896 * If successful, request's result will be an IDBCursor, or null if there were no matching records.
1898 openKeyCursor(query?: IDBValidKey | IDBKeyRange | null, direction?: IDBCursorDirection): IDBRequest<IDBCursor | null>;
1901 declare var IDBIndex: {
1902 prototype: IDBIndex;
1906 /** 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: */
1907 interface IDBKeyRange {
1909 * Returns lower bound, or undefined if none.
1911 readonly lower: any;
1913 * Returns true if the lower open flag is set, and false otherwise.
1915 readonly lowerOpen: boolean;
1917 * Returns upper bound, or undefined if none.
1919 readonly upper: any;
1921 * Returns true if the upper open flag is set, and false otherwise.
1923 readonly upperOpen: boolean;
1925 * Returns true if key is included in the range, and false otherwise.
1927 includes(key: any): boolean;
1930 declare var IDBKeyRange: {
1931 prototype: IDBKeyRange;
1934 * 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.
1936 bound(lower: any, upper: any, lowerOpen?: boolean, upperOpen?: boolean): IDBKeyRange;
1938 * Returns a new IDBKeyRange starting at key with no upper bound. If open is true, key is not included in the range.
1940 lowerBound(lower: any, open?: boolean): IDBKeyRange;
1942 * Returns a new IDBKeyRange spanning only key.
1944 only(value: any): IDBKeyRange;
1946 * Returns a new IDBKeyRange with no lower bound and ending at key. If open is true, key is not included in the range.
1948 upperBound(upper: any, open?: boolean): IDBKeyRange;
1951 /** 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.) */
1952 interface IDBObjectStore {
1954 * Returns true if the store has a key generator, and false otherwise.
1956 readonly autoIncrement: boolean;
1958 * Returns a list of the names of indexes in the store.
1960 readonly indexNames: DOMStringList;
1962 * Returns the key path of the store, or null if none.
1964 readonly keyPath: string | string[];
1966 * Returns the name of the store.
1970 * Returns the associated transaction.
1972 readonly transaction: IDBTransaction;
1974 * Adds or updates a record in store with the given value and key.
1976 * If the store uses in-line keys and key is specified a "DataError" DOMException will be thrown.
1978 * 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.
1980 * If successful, request's result will be the record's key.
1982 add(value: any, key?: IDBValidKey): IDBRequest<IDBValidKey>;
1984 * Deletes all records in store.
1986 * If successful, request's result will be undefined.
1988 clear(): IDBRequest<undefined>;
1990 * Retrieves the number of records matching the given key or key range in query.
1992 * If successful, request's result will be the count.
1994 count(key?: IDBValidKey | IDBKeyRange): IDBRequest<number>;
1996 * 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.
1998 * Throws an "InvalidStateError" DOMException if not called within an upgrade transaction.
2000 createIndex(name: string, keyPath: string | string[], options?: IDBIndexParameters): IDBIndex;
2002 * Deletes records in store with the given key or in the given key range in query.
2004 * If successful, request's result will be undefined.
2006 delete(key: IDBValidKey | IDBKeyRange): IDBRequest<undefined>;
2008 * Deletes the index in store with the given name.
2010 * Throws an "InvalidStateError" DOMException if not called within an upgrade transaction.
2012 deleteIndex(name: string): void;
2014 * Retrieves the value of the first record matching the given key or key range in query.
2016 * If successful, request's result will be the value, or undefined if there was no matching record.
2018 get(query: IDBValidKey | IDBKeyRange): IDBRequest<any | undefined>;
2020 * Retrieves the values of the records matching the given key or key range in query (up to count if given).
2022 * If successful, request's result will be an Array of the values.
2024 getAll(query?: IDBValidKey | IDBKeyRange | null, count?: number): IDBRequest<any[]>;
2026 * Retrieves the keys of records matching the given key or key range in query (up to count if given).
2028 * If successful, request's result will be an Array of the keys.
2030 getAllKeys(query?: IDBValidKey | IDBKeyRange | null, count?: number): IDBRequest<IDBValidKey[]>;
2032 * Retrieves the key of the first record matching the given key or key range in query.
2034 * If successful, request's result will be the key, or undefined if there was no matching record.
2036 getKey(query: IDBValidKey | IDBKeyRange): IDBRequest<IDBValidKey | undefined>;
2037 index(name: string): IDBIndex;
2039 * Opens a cursor over the records matching query, ordered by direction. If query is null, all records in store are matched.
2041 * If successful, request's result will be an IDBCursorWithValue pointing at the first matching record, or null if there were no matching records.
2043 openCursor(query?: IDBValidKey | IDBKeyRange | null, direction?: IDBCursorDirection): IDBRequest<IDBCursorWithValue | null>;
2045 * 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.
2047 * If successful, request's result will be an IDBCursor pointing at the first matching record, or null if there were no matching records.
2049 openKeyCursor(query?: IDBValidKey | IDBKeyRange | null, direction?: IDBCursorDirection): IDBRequest<IDBCursor | null>;
2051 * Adds or updates a record in store with the given value and key.
2053 * If the store uses in-line keys and key is specified a "DataError" DOMException will be thrown.
2055 * 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.
2057 * If successful, request's result will be the record's key.
2059 put(value: any, key?: IDBValidKey): IDBRequest<IDBValidKey>;
2062 declare var IDBObjectStore: {
2063 prototype: IDBObjectStore;
2064 new(): IDBObjectStore;
2067 interface IDBOpenDBRequestEventMap extends IDBRequestEventMap {
2069 "upgradeneeded": IDBVersionChangeEvent;
2072 /** Also inherits methods from its parents IDBRequest and EventTarget. */
2073 interface IDBOpenDBRequest extends IDBRequest<IDBDatabase> {
2074 onblocked: ((this: IDBOpenDBRequest, ev: Event) => any) | null;
2075 onupgradeneeded: ((this: IDBOpenDBRequest, ev: IDBVersionChangeEvent) => any) | null;
2076 addEventListener<K extends keyof IDBOpenDBRequestEventMap>(type: K, listener: (this: IDBOpenDBRequest, ev: IDBOpenDBRequestEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
2077 addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
2078 removeEventListener<K extends keyof IDBOpenDBRequestEventMap>(type: K, listener: (this: IDBOpenDBRequest, ev: IDBOpenDBRequestEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
2079 removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
2082 declare var IDBOpenDBRequest: {
2083 prototype: IDBOpenDBRequest;
2084 new(): IDBOpenDBRequest;
2087 interface IDBRequestEventMap {
2092 /** 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. */
2093 interface IDBRequest<T = any> extends EventTarget {
2095 * 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.
2097 readonly error: DOMException | null;
2098 onerror: ((this: IDBRequest<T>, ev: Event) => any) | null;
2099 onsuccess: ((this: IDBRequest<T>, ev: Event) => any) | null;
2101 * Returns "pending" until a request is complete, then returns "done".
2103 readonly readyState: IDBRequestReadyState;
2105 * When a request is completed, returns the result, or undefined if the request failed. Throws a "InvalidStateError" DOMException if the request is still pending.
2109 * Returns the IDBObjectStore, IDBIndex, or IDBCursor the request was made against, or null if is was an open request.
2111 readonly source: IDBObjectStore | IDBIndex | IDBCursor;
2113 * 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.
2115 readonly transaction: IDBTransaction | null;
2116 addEventListener<K extends keyof IDBRequestEventMap>(type: K, listener: (this: IDBRequest<T>, ev: IDBRequestEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
2117 addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
2118 removeEventListener<K extends keyof IDBRequestEventMap>(type: K, listener: (this: IDBRequest<T>, ev: IDBRequestEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
2119 removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
2122 declare var IDBRequest: {
2123 prototype: IDBRequest;
2127 interface IDBTransactionEventMap {
2133 interface IDBTransaction extends EventTarget {
2135 * Returns the transaction's connection.
2137 readonly db: IDBDatabase;
2139 * If the transaction was aborted, returns the error (a DOMException) providing the reason.
2141 readonly error: DOMException;
2143 * Returns the mode the transaction was created with ("readonly" or "readwrite"), or "versionchange" for an upgrade transaction.
2145 readonly mode: IDBTransactionMode;
2147 * 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.
2149 readonly objectStoreNames: DOMStringList;
2150 onabort: ((this: IDBTransaction, ev: Event) => any) | null;
2151 oncomplete: ((this: IDBTransaction, ev: Event) => any) | null;
2152 onerror: ((this: IDBTransaction, ev: Event) => any) | null;
2154 * Aborts the transaction. All pending requests will fail with a "AbortError" DOMException and all changes made to the database will be reverted.
2158 * Returns an IDBObjectStore in the transaction's scope.
2160 objectStore(name: string): IDBObjectStore;
2161 addEventListener<K extends keyof IDBTransactionEventMap>(type: K, listener: (this: IDBTransaction, ev: IDBTransactionEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
2162 addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
2163 removeEventListener<K extends keyof IDBTransactionEventMap>(type: K, listener: (this: IDBTransaction, ev: IDBTransactionEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
2164 removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
2167 declare var IDBTransaction: {
2168 prototype: IDBTransaction;
2169 new(): IDBTransaction;
2172 /** This IndexedDB API interface indicates that the version of the database has changed, as the result of an IDBOpenDBRequest.onupgradeneeded event handler function. */
2173 interface IDBVersionChangeEvent extends Event {
2174 readonly newVersion: number | null;
2175 readonly oldVersion: number;
2178 declare var IDBVersionChangeEvent: {
2179 prototype: IDBVersionChangeEvent;
2180 new(type: string, eventInitDict?: IDBVersionChangeEventInit): IDBVersionChangeEvent;
2183 interface ImageBitmap {
2185 * Returns the intrinsic height of the image, in CSS pixels.
2187 readonly height: number;
2189 * Returns the intrinsic width of the image, in CSS pixels.
2191 readonly width: number;
2193 * Releases imageBitmap's underlying bitmap data.
2198 declare var ImageBitmap: {
2199 prototype: ImageBitmap;
2203 interface ImageBitmapRenderingContext {
2205 * Returns the canvas element that the context is bound to.
2207 readonly canvas: OffscreenCanvas;
2209 * Transfers the underlying bitmap data from imageBitmap to context, and the bitmap becomes the contents of the canvas element to which context is bound.
2211 transferFromImageBitmap(bitmap: ImageBitmap | null): void;
2214 declare var ImageBitmapRenderingContext: {
2215 prototype: ImageBitmapRenderingContext;
2216 new(): ImageBitmapRenderingContext;
2219 /** 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(). */
2220 interface ImageData {
2222 * Returns the one-dimensional array containing the data in RGBA order, as integers in the range 0 to 255.
2224 readonly data: Uint8ClampedArray;
2226 * Returns the actual dimensions of the data in the ImageData object, in pixels.
2228 readonly height: number;
2230 * Returns the actual dimensions of the data in the ImageData object, in pixels.
2232 readonly width: number;
2235 declare var ImageData: {
2236 prototype: ImageData;
2237 new(sw: number, sh: number): ImageData;
2238 new(data: Uint8ClampedArray, sw: number, sh?: number): ImageData;
2241 /** This Channel Messaging API interface allows us to create a new message channel and send data through it via its two MessagePort properties. */
2242 interface MessageChannel {
2244 * Returns the first MessagePort object.
2246 readonly port1: MessagePort;
2248 * Returns the second MessagePort object.
2250 readonly port2: MessagePort;
2253 declare var MessageChannel: {
2254 prototype: MessageChannel;
2255 new(): MessageChannel;
2258 /** A message received by a target object. */
2259 interface MessageEvent<T = any> extends Event {
2261 * Returns the data of the message.
2265 * Returns the last event ID string, for server-sent events.
2267 readonly lastEventId: string;
2269 * Returns the origin of the message, for server-sent events and cross-document messaging.
2271 readonly origin: string;
2273 * Returns the MessagePort array sent with the message, for cross-document messaging and channel messaging.
2275 readonly ports: ReadonlyArray<MessagePort>;
2277 * Returns the WindowProxy of the source window, for cross-document messaging, and the MessagePort being attached, in the connect event fired at SharedWorkerGlobalScope objects.
2279 readonly source: MessageEventSource | null;
2282 declare var MessageEvent: {
2283 prototype: MessageEvent;
2284 new<T>(type: string, eventInitDict?: MessageEventInit<T>): MessageEvent<T>;
2287 interface MessagePortEventMap {
2288 "message": MessageEvent;
2289 "messageerror": MessageEvent;
2292 /** 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. */
2293 interface MessagePort extends EventTarget {
2294 onmessage: ((this: MessagePort, ev: MessageEvent) => any) | null;
2295 onmessageerror: ((this: MessagePort, ev: MessageEvent) => any) | null;
2297 * Disconnects the port, so that it is no longer active.
2301 * 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.
2303 * Throws a "DataCloneError" DOMException if transfer contains duplicate objects or port, or if message could not be cloned.
2305 postMessage(message: any, transfer: Transferable[]): void;
2306 postMessage(message: any, options?: PostMessageOptions): void;
2308 * Begins dispatching messages received on the port.
2311 addEventListener<K extends keyof MessagePortEventMap>(type: K, listener: (this: MessagePort, ev: MessagePortEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
2312 addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
2313 removeEventListener<K extends keyof MessagePortEventMap>(type: K, listener: (this: MessagePort, ev: MessagePortEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
2314 removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
2317 declare var MessagePort: {
2318 prototype: MessagePort;
2322 interface NavigationPreloadManager {
2323 disable(): Promise<void>;
2324 enable(): Promise<void>;
2325 getState(): Promise<NavigationPreloadState>;
2326 setHeaderValue(value: string): Promise<void>;
2329 declare var NavigationPreloadManager: {
2330 prototype: NavigationPreloadManager;
2331 new(): NavigationPreloadManager;
2334 interface NavigatorConcurrentHardware {
2335 readonly hardwareConcurrency: number;
2338 interface NavigatorID {
2339 readonly appCodeName: string;
2340 readonly appName: string;
2341 readonly appVersion: string;
2342 readonly platform: string;
2343 readonly product: string;
2344 readonly userAgent: string;
2347 interface NavigatorLanguage {
2348 readonly language: string;
2349 readonly languages: ReadonlyArray<string>;
2352 interface NavigatorOnLine {
2353 readonly onLine: boolean;
2356 interface NavigatorStorage {
2357 readonly storage: StorageManager;
2360 interface NotificationEventMap {
2367 /** This Notifications API interface is used to configure and display desktop notifications to the user. */
2368 interface Notification extends EventTarget {
2369 readonly actions: ReadonlyArray<NotificationAction>;
2370 readonly badge: string;
2371 readonly body: string;
2373 readonly dir: NotificationDirection;
2374 readonly icon: string;
2375 readonly image: string;
2376 readonly lang: string;
2377 onclick: ((this: Notification, ev: Event) => any) | null;
2378 onclose: ((this: Notification, ev: Event) => any) | null;
2379 onerror: ((this: Notification, ev: Event) => any) | null;
2380 onshow: ((this: Notification, ev: Event) => any) | null;
2381 readonly renotify: boolean;
2382 readonly requireInteraction: boolean;
2383 readonly silent: boolean;
2384 readonly tag: string;
2385 readonly timestamp: number;
2386 readonly title: string;
2387 readonly vibrate: ReadonlyArray<number>;
2389 addEventListener<K extends keyof NotificationEventMap>(type: K, listener: (this: Notification, ev: NotificationEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
2390 addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
2391 removeEventListener<K extends keyof NotificationEventMap>(type: K, listener: (this: Notification, ev: NotificationEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
2392 removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
2395 declare var Notification: {
2396 prototype: Notification;
2397 new(title: string, options?: NotificationOptions): Notification;
2398 readonly maxActions: number;
2399 readonly permission: NotificationPermission;
2402 /** The parameter passed into the onnotificationclick handler, the NotificationEvent interface represents a notification click event that is dispatched on the ServiceWorkerGlobalScope of a ServiceWorker. */
2403 interface NotificationEvent extends ExtendableEvent {
2404 readonly action: string;
2405 readonly notification: Notification;
2408 declare var NotificationEvent: {
2409 prototype: NotificationEvent;
2410 new(type: string, eventInitDict: NotificationEventInit): NotificationEvent;
2413 /** The OES_element_index_uint extension is part of the WebGL API and adds support for gl.UNSIGNED_INT types to WebGLRenderingContext.drawElements(). */
2414 interface OES_element_index_uint {
2417 /** The OES_standard_derivatives extension is part of the WebGL API and adds the GLSL derivative functions dFdx, dFdy, and fwidth. */
2418 interface OES_standard_derivatives {
2419 readonly FRAGMENT_SHADER_DERIVATIVE_HINT_OES: GLenum;
2422 /** The OES_texture_float extension is part of the WebGL API and exposes floating-point pixel types for textures. */
2423 interface OES_texture_float {
2426 /** The OES_texture_float_linear extension is part of the WebGL API and allows linear filtering with floating-point pixel types for textures. */
2427 interface OES_texture_float_linear {
2430 /** 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. */
2431 interface OES_texture_half_float {
2432 readonly HALF_FLOAT_OES: GLenum;
2435 /** 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. */
2436 interface OES_texture_half_float_linear {
2439 interface OES_vertex_array_object {
2440 bindVertexArrayOES(arrayObject: WebGLVertexArrayObjectOES | null): void;
2441 createVertexArrayOES(): WebGLVertexArrayObjectOES | null;
2442 deleteVertexArrayOES(arrayObject: WebGLVertexArrayObjectOES | null): void;
2443 isVertexArrayOES(arrayObject: WebGLVertexArrayObjectOES | null): GLboolean;
2444 readonly VERTEX_ARRAY_BINDING_OES: GLenum;
2447 interface OffscreenCanvas extends EventTarget {
2449 * These attributes return the dimensions of the OffscreenCanvas object's bitmap.
2451 * They can be set, to replace the bitmap with a new, transparent black bitmap of the specified dimensions (effectively resizing it).
2455 * These attributes return the dimensions of the OffscreenCanvas object's bitmap.
2457 * They can be set, to replace the bitmap with a new, transparent black bitmap of the specified dimensions (effectively resizing it).
2461 * Returns a promise that will fulfill with a new Blob object representing a file containing the image in the OffscreenCanvas object.
2463 * 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.
2465 convertToBlob(options?: ImageEncodeOptions): Promise<Blob>;
2467 * 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.
2469 * 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]
2471 * 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).
2473 getContext(contextId: "2d", options?: CanvasRenderingContext2DSettings): OffscreenCanvasRenderingContext2D | null;
2474 getContext(contextId: "bitmaprenderer", options?: ImageBitmapRenderingContextSettings): ImageBitmapRenderingContext | null;
2475 getContext(contextId: "webgl", options?: WebGLContextAttributes): WebGLRenderingContext | null;
2476 getContext(contextId: "webgl2", options?: WebGLContextAttributes): WebGL2RenderingContext | null;
2477 getContext(contextId: OffscreenRenderingContextId, options?: any): OffscreenRenderingContext | null;
2479 * 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.
2481 transferToImageBitmap(): ImageBitmap;
2484 declare var OffscreenCanvas: {
2485 prototype: OffscreenCanvas;
2486 new(width: number, height: number): OffscreenCanvas;
2489 interface OffscreenCanvasRenderingContext2D extends CanvasCompositing, CanvasDrawImage, CanvasDrawPath, CanvasFillStrokeStyles, CanvasFilters, CanvasImageData, CanvasImageSmoothing, CanvasPath, CanvasPathDrawingStyles, CanvasRect, CanvasShadowStyles, CanvasState, CanvasText, CanvasTextDrawingStyles, CanvasTransform {
2490 readonly canvas: OffscreenCanvas;
2494 declare var OffscreenCanvasRenderingContext2D: {
2495 prototype: OffscreenCanvasRenderingContext2D;
2496 new(): OffscreenCanvasRenderingContext2D;
2499 /** 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. */
2500 interface Path2D extends CanvasPath {
2502 * Adds to the path the path given by the argument.
2504 addPath(path: Path2D, transform?: DOMMatrix2DInit): void;
2507 declare var Path2D: {
2509 new(path?: Path2D | string): Path2D;
2512 interface PerformanceEventMap {
2513 "resourcetimingbufferfull": Event;
2516 /** 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. */
2517 interface Performance extends EventTarget {
2518 onresourcetimingbufferfull: ((this: Performance, ev: Event) => any) | null;
2519 readonly timeOrigin: number;
2520 clearMarks(markName?: string): void;
2521 clearMeasures(measureName?: string): void;
2522 clearResourceTimings(): void;
2523 getEntries(): PerformanceEntryList;
2524 getEntriesByName(name: string, type?: string): PerformanceEntryList;
2525 getEntriesByType(type: string): PerformanceEntryList;
2526 mark(markName: string): void;
2527 measure(measureName: string, startMark?: string, endMark?: string): void;
2529 setResourceTimingBufferSize(maxSize: number): void;
2531 addEventListener<K extends keyof PerformanceEventMap>(type: K, listener: (this: Performance, ev: PerformanceEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
2532 addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
2533 removeEventListener<K extends keyof PerformanceEventMap>(type: K, listener: (this: Performance, ev: PerformanceEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
2534 removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
2537 declare var Performance: {
2538 prototype: Performance;
2542 /** 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). */
2543 interface PerformanceEntry {
2544 readonly duration: number;
2545 readonly entryType: string;
2546 readonly name: string;
2547 readonly startTime: number;
2551 declare var PerformanceEntry: {
2552 prototype: PerformanceEntry;
2553 new(): PerformanceEntry;
2556 /** 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. */
2557 interface PerformanceMark extends PerformanceEntry {
2560 declare var PerformanceMark: {
2561 prototype: PerformanceMark;
2562 new(): PerformanceMark;
2565 /** 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. */
2566 interface PerformanceMeasure extends PerformanceEntry {
2569 declare var PerformanceMeasure: {
2570 prototype: PerformanceMeasure;
2571 new(): PerformanceMeasure;
2574 interface PerformanceObserver {
2576 observe(options?: PerformanceObserverInit): void;
2577 takeRecords(): PerformanceEntryList;
2580 declare var PerformanceObserver: {
2581 prototype: PerformanceObserver;
2582 new(callback: PerformanceObserverCallback): PerformanceObserver;
2583 readonly supportedEntryTypes: ReadonlyArray<string>;
2586 interface PerformanceObserverEntryList {
2587 getEntries(): PerformanceEntryList;
2588 getEntriesByName(name: string, type?: string): PerformanceEntryList;
2589 getEntriesByType(type: string): PerformanceEntryList;
2592 declare var PerformanceObserverEntryList: {
2593 prototype: PerformanceObserverEntryList;
2594 new(): PerformanceObserverEntryList;
2597 /** 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. */
2598 interface PerformanceResourceTiming extends PerformanceEntry {
2599 readonly connectEnd: number;
2600 readonly connectStart: number;
2601 readonly decodedBodySize: number;
2602 readonly domainLookupEnd: number;
2603 readonly domainLookupStart: number;
2604 readonly encodedBodySize: number;
2605 readonly fetchStart: number;
2606 readonly initiatorType: string;
2607 readonly nextHopProtocol: string;
2608 readonly redirectEnd: number;
2609 readonly redirectStart: number;
2610 readonly requestStart: number;
2611 readonly responseEnd: number;
2612 readonly responseStart: number;
2613 readonly secureConnectionStart: number;
2614 readonly transferSize: number;
2615 readonly workerStart: number;
2619 declare var PerformanceResourceTiming: {
2620 prototype: PerformanceResourceTiming;
2621 new(): PerformanceResourceTiming;
2624 interface PermissionStatusEventMap {
2628 interface PermissionStatus extends EventTarget {
2629 onchange: ((this: PermissionStatus, ev: Event) => any) | null;
2630 readonly state: PermissionState;
2631 addEventListener<K extends keyof PermissionStatusEventMap>(type: K, listener: (this: PermissionStatus, ev: PermissionStatusEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
2632 addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
2633 removeEventListener<K extends keyof PermissionStatusEventMap>(type: K, listener: (this: PermissionStatus, ev: PermissionStatusEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
2634 removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
2637 declare var PermissionStatus: {
2638 prototype: PermissionStatus;
2639 new(): PermissionStatus;
2642 interface Permissions {
2643 query(permissionDesc: PermissionDescriptor | DevicePermissionDescriptor | MidiPermissionDescriptor | PushPermissionDescriptor): Promise<PermissionStatus>;
2646 declare var Permissions: {
2647 prototype: Permissions;
2651 /** 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>). */
2652 interface ProgressEvent<T extends EventTarget = EventTarget> extends Event {
2653 readonly lengthComputable: boolean;
2654 readonly loaded: number;
2655 readonly target: T | null;
2656 readonly total: number;
2659 declare var ProgressEvent: {
2660 prototype: ProgressEvent;
2661 new(type: string, eventInitDict?: ProgressEventInit): ProgressEvent;
2664 interface PromiseRejectionEvent extends Event {
2665 readonly promise: Promise<any>;
2666 readonly reason: any;
2669 declare var PromiseRejectionEvent: {
2670 prototype: PromiseRejectionEvent;
2671 new(type: string, eventInitDict: PromiseRejectionEventInit): PromiseRejectionEvent;
2674 /** 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. */
2675 interface PushEvent extends ExtendableEvent {
2676 readonly data: PushMessageData | null;
2679 declare var PushEvent: {
2680 prototype: PushEvent;
2681 new(type: string, eventInitDict?: PushEventInit): PushEvent;
2684 /** This Push API interface provides a way to receive notifications from third-party servers as well as request URLs for push notifications. */
2685 interface PushManager {
2686 getSubscription(): Promise<PushSubscription | null>;
2687 permissionState(options?: PushSubscriptionOptionsInit): Promise<PushPermissionState>;
2688 subscribe(options?: PushSubscriptionOptionsInit): Promise<PushSubscription>;
2691 declare var PushManager: {
2692 prototype: PushManager;
2694 readonly supportedContentEncodings: ReadonlyArray<string>;
2697 /** This Push API interface provides methods which let you retrieve the push data sent by a server in various formats. */
2698 interface PushMessageData {
2699 arrayBuffer(): ArrayBuffer;
2705 declare var PushMessageData: {
2706 prototype: PushMessageData;
2707 new(): PushMessageData;
2710 /** This Push API interface provides a subcription's URL endpoint and allows unsubscription from a push service. */
2711 interface PushSubscription {
2712 readonly endpoint: string;
2713 readonly expirationTime: number | null;
2714 readonly options: PushSubscriptionOptions;
2715 getKey(name: PushEncryptionKeyName): ArrayBuffer | null;
2716 toJSON(): PushSubscriptionJSON;
2717 unsubscribe(): Promise<boolean>;
2720 declare var PushSubscription: {
2721 prototype: PushSubscription;
2722 new(): PushSubscription;
2725 interface PushSubscriptionChangeEvent extends ExtendableEvent {
2726 readonly newSubscription: PushSubscription | null;
2727 readonly oldSubscription: PushSubscription | null;
2730 declare var PushSubscriptionChangeEvent: {
2731 prototype: PushSubscriptionChangeEvent;
2732 new(type: string, eventInitDict?: PushSubscriptionChangeEventInit): PushSubscriptionChangeEvent;
2735 interface PushSubscriptionOptions {
2736 readonly applicationServerKey: ArrayBuffer | null;
2737 readonly userVisibleOnly: boolean;
2740 declare var PushSubscriptionOptions: {
2741 prototype: PushSubscriptionOptions;
2742 new(): PushSubscriptionOptions;
2745 /** 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. */
2746 interface ReadableStream<R = any> {
2747 readonly locked: boolean;
2748 cancel(reason?: any): Promise<void>;
2749 getReader(): ReadableStreamDefaultReader<R>;
2750 pipeThrough<T>(transform: ReadableWritablePair<T, R>, options?: StreamPipeOptions): ReadableStream<T>;
2751 pipeTo(dest: WritableStream<R>, options?: StreamPipeOptions): Promise<void>;
2752 tee(): [ReadableStream<R>, ReadableStream<R>];
2755 declare var ReadableStream: {
2756 prototype: ReadableStream;
2757 new<R = any>(underlyingSource?: UnderlyingSource<R>, strategy?: QueuingStrategy<R>): ReadableStream<R>;
2760 interface ReadableStreamDefaultController<R = any> {
2761 readonly desiredSize: number | null;
2763 enqueue(chunk: R): void;
2764 error(e?: any): void;
2767 declare var ReadableStreamDefaultController: {
2768 prototype: ReadableStreamDefaultController;
2769 new(): ReadableStreamDefaultController;
2772 interface ReadableStreamDefaultReader<R = any> extends ReadableStreamGenericReader {
2773 read(): Promise<ReadableStreamDefaultReadResult<R>>;
2774 releaseLock(): void;
2777 declare var ReadableStreamDefaultReader: {
2778 prototype: ReadableStreamDefaultReader;
2779 new<R = any>(stream: ReadableStream<R>): ReadableStreamDefaultReader<R>;
2782 interface ReadableStreamGenericReader {
2783 readonly closed: Promise<undefined>;
2784 cancel(reason?: any): Promise<void>;
2787 /** This Fetch API interface represents a resource request. */
2788 interface Request extends Body {
2790 * Returns the cache mode associated with request, which is a string indicating how the request will interact with the browser's cache when fetching.
2792 readonly cache: RequestCache;
2794 * 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.
2796 readonly credentials: RequestCredentials;
2798 * Returns the kind of resource requested by request, e.g., "document" or "script".
2800 readonly destination: RequestDestination;
2802 * 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.
2804 readonly headers: Headers;
2806 * 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]
2808 readonly integrity: string;
2810 * Returns a boolean indicating whether or not request is for a history navigation (a.k.a. back-foward navigation).
2812 readonly isHistoryNavigation: boolean;
2814 * Returns a boolean indicating whether or not request is for a reload navigation.
2816 readonly isReloadNavigation: boolean;
2818 * Returns a boolean indicating whether or not request can outlive the global in which it was created.
2820 readonly keepalive: boolean;
2822 * Returns request's HTTP method, which is "GET" by default.
2824 readonly method: string;
2826 * 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.
2828 readonly mode: RequestMode;
2830 * 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.
2832 readonly redirect: RequestRedirect;
2834 * 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.
2836 readonly referrer: string;
2838 * Returns the referrer policy associated with request. This is used during fetching to compute the value of the request's referrer.
2840 readonly referrerPolicy: ReferrerPolicy;
2842 * Returns the signal associated with request, which is an AbortSignal object indicating whether or not request has been aborted, and its abort event handler.
2844 readonly signal: AbortSignal;
2846 * Returns the URL of request as a string.
2848 readonly url: string;
2852 declare var Request: {
2854 new(input: RequestInfo, init?: RequestInit): Request;
2857 /** This Fetch API interface represents the response to a request. */
2858 interface Response extends Body {
2859 readonly headers: Headers;
2860 readonly ok: boolean;
2861 readonly redirected: boolean;
2862 readonly status: number;
2863 readonly statusText: string;
2864 readonly trailer: Promise<Headers>;
2865 readonly type: ResponseType;
2866 readonly url: string;
2870 declare var Response: {
2871 prototype: Response;
2872 new(body?: BodyInit | null, init?: ResponseInit): Response;
2874 redirect(url: string, status?: number): Response;
2877 interface ServiceWorkerEventMap extends AbstractWorkerEventMap {
2878 "statechange": Event;
2881 /** 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. */
2882 interface ServiceWorker extends EventTarget, AbstractWorker {
2883 onstatechange: ((this: ServiceWorker, ev: Event) => any) | null;
2884 readonly scriptURL: string;
2885 readonly state: ServiceWorkerState;
2886 postMessage(message: any, transfer: Transferable[]): void;
2887 postMessage(message: any, options?: PostMessageOptions): void;
2888 addEventListener<K extends keyof ServiceWorkerEventMap>(type: K, listener: (this: ServiceWorker, ev: ServiceWorkerEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
2889 addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
2890 removeEventListener<K extends keyof ServiceWorkerEventMap>(type: K, listener: (this: ServiceWorker, ev: ServiceWorkerEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
2891 removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
2894 declare var ServiceWorker: {
2895 prototype: ServiceWorker;
2896 new(): ServiceWorker;
2899 interface ServiceWorkerContainerEventMap {
2900 "controllerchange": Event;
2901 "message": MessageEvent;
2902 "messageerror": MessageEvent;
2905 /** 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. */
2906 interface ServiceWorkerContainer extends EventTarget {
2907 readonly controller: ServiceWorker | null;
2908 oncontrollerchange: ((this: ServiceWorkerContainer, ev: Event) => any) | null;
2909 onmessage: ((this: ServiceWorkerContainer, ev: MessageEvent) => any) | null;
2910 onmessageerror: ((this: ServiceWorkerContainer, ev: MessageEvent) => any) | null;
2911 readonly ready: Promise<ServiceWorkerRegistration>;
2912 getRegistration(clientURL?: string): Promise<ServiceWorkerRegistration | undefined>;
2913 getRegistrations(): Promise<ReadonlyArray<ServiceWorkerRegistration>>;
2914 register(scriptURL: string | URL, options?: RegistrationOptions): Promise<ServiceWorkerRegistration>;
2915 startMessages(): void;
2916 addEventListener<K extends keyof ServiceWorkerContainerEventMap>(type: K, listener: (this: ServiceWorkerContainer, ev: ServiceWorkerContainerEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
2917 addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
2918 removeEventListener<K extends keyof ServiceWorkerContainerEventMap>(type: K, listener: (this: ServiceWorkerContainer, ev: ServiceWorkerContainerEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
2919 removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
2922 declare var ServiceWorkerContainer: {
2923 prototype: ServiceWorkerContainer;
2924 new(): ServiceWorkerContainer;
2927 interface ServiceWorkerGlobalScopeEventMap extends WorkerGlobalScopeEventMap {
2928 "activate": ExtendableEvent;
2929 "fetch": FetchEvent;
2930 "install": ExtendableEvent;
2931 "message": ExtendableMessageEvent;
2932 "messageerror": MessageEvent;
2933 "notificationclick": NotificationEvent;
2934 "notificationclose": NotificationEvent;
2936 "pushsubscriptionchange": PushSubscriptionChangeEvent;
2940 /** This ServiceWorker API interface represents the global execution context of a service worker. */
2941 interface ServiceWorkerGlobalScope extends WorkerGlobalScope {
2942 readonly clients: Clients;
2943 onactivate: ((this: ServiceWorkerGlobalScope, ev: ExtendableEvent) => any) | null;
2944 onfetch: ((this: ServiceWorkerGlobalScope, ev: FetchEvent) => any) | null;
2945 oninstall: ((this: ServiceWorkerGlobalScope, ev: ExtendableEvent) => any) | null;
2946 onmessage: ((this: ServiceWorkerGlobalScope, ev: ExtendableMessageEvent) => any) | null;
2947 onmessageerror: ((this: ServiceWorkerGlobalScope, ev: MessageEvent) => any) | null;
2948 onnotificationclick: ((this: ServiceWorkerGlobalScope, ev: NotificationEvent) => any) | null;
2949 onnotificationclose: ((this: ServiceWorkerGlobalScope, ev: NotificationEvent) => any) | null;
2950 onpush: ((this: ServiceWorkerGlobalScope, ev: PushEvent) => any) | null;
2951 onpushsubscriptionchange: ((this: ServiceWorkerGlobalScope, ev: PushSubscriptionChangeEvent) => any) | null;
2952 onsync: ((this: ServiceWorkerGlobalScope, ev: SyncEvent) => any) | null;
2953 readonly registration: ServiceWorkerRegistration;
2954 readonly serviceWorker: ServiceWorker;
2955 skipWaiting(): Promise<void>;
2956 addEventListener<K extends keyof ServiceWorkerGlobalScopeEventMap>(type: K, listener: (this: ServiceWorkerGlobalScope, ev: ServiceWorkerGlobalScopeEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
2957 addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
2958 removeEventListener<K extends keyof ServiceWorkerGlobalScopeEventMap>(type: K, listener: (this: ServiceWorkerGlobalScope, ev: ServiceWorkerGlobalScopeEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
2959 removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
2962 declare var ServiceWorkerGlobalScope: {
2963 prototype: ServiceWorkerGlobalScope;
2964 new(): ServiceWorkerGlobalScope;
2967 interface ServiceWorkerRegistrationEventMap {
2968 "updatefound": Event;
2971 /** 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. */
2972 interface ServiceWorkerRegistration extends EventTarget {
2973 readonly active: ServiceWorker | null;
2974 readonly installing: ServiceWorker | null;
2975 readonly navigationPreload: NavigationPreloadManager;
2976 onupdatefound: ((this: ServiceWorkerRegistration, ev: Event) => any) | null;
2977 readonly pushManager: PushManager;
2978 readonly scope: string;
2979 readonly sync: SyncManager;
2980 readonly updateViaCache: ServiceWorkerUpdateViaCache;
2981 readonly waiting: ServiceWorker | null;
2982 getNotifications(filter?: GetNotificationOptions): Promise<Notification[]>;
2983 showNotification(title: string, options?: NotificationOptions): Promise<void>;
2984 unregister(): Promise<boolean>;
2985 update(): Promise<void>;
2986 addEventListener<K extends keyof ServiceWorkerRegistrationEventMap>(type: K, listener: (this: ServiceWorkerRegistration, ev: ServiceWorkerRegistrationEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
2987 addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
2988 removeEventListener<K extends keyof ServiceWorkerRegistrationEventMap>(type: K, listener: (this: ServiceWorkerRegistration, ev: ServiceWorkerRegistrationEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
2989 removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
2992 declare var ServiceWorkerRegistration: {
2993 prototype: ServiceWorkerRegistration;
2994 new(): ServiceWorkerRegistration;
2997 interface SharedWorker extends EventTarget, AbstractWorker {
2999 * Returns sharedWorker's MessagePort object which can be used to communicate with the global environment.
3001 readonly port: MessagePort;
3002 addEventListener<K extends keyof AbstractWorkerEventMap>(type: K, listener: (this: SharedWorker, ev: AbstractWorkerEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
3003 addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
3004 removeEventListener<K extends keyof AbstractWorkerEventMap>(type: K, listener: (this: SharedWorker, ev: AbstractWorkerEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
3005 removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
3008 declare var SharedWorker: {
3009 prototype: SharedWorker;
3010 new(scriptURL: string, options?: string | WorkerOptions): SharedWorker;
3013 interface SharedWorkerGlobalScopeEventMap extends WorkerGlobalScopeEventMap {
3014 "connect": MessageEvent;
3017 interface SharedWorkerGlobalScope extends WorkerGlobalScope {
3019 * 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.
3021 readonly name: string;
3022 onconnect: ((this: SharedWorkerGlobalScope, ev: MessageEvent) => any) | null;
3024 * Aborts sharedWorkerGlobal.
3027 addEventListener<K extends keyof SharedWorkerGlobalScopeEventMap>(type: K, listener: (this: SharedWorkerGlobalScope, ev: SharedWorkerGlobalScopeEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
3028 addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
3029 removeEventListener<K extends keyof SharedWorkerGlobalScopeEventMap>(type: K, listener: (this: SharedWorkerGlobalScope, ev: SharedWorkerGlobalScopeEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
3030 removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
3033 declare var SharedWorkerGlobalScope: {
3034 prototype: SharedWorkerGlobalScope;
3035 new(): SharedWorkerGlobalScope;
3038 interface StorageManager {
3039 estimate(): Promise<StorageEstimate>;
3040 persisted(): Promise<boolean>;
3043 declare var StorageManager: {
3044 prototype: StorageManager;
3045 new(): StorageManager;
3048 /** 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). */
3049 interface SubtleCrypto {
3050 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>;
3051 deriveBits(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | DhKeyDeriveParams | ConcatParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, length: number): Promise<ArrayBuffer>;
3052 deriveKey(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | DhKeyDeriveParams | ConcatParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, derivedKeyType: string | AesDerivedKeyParams | HmacImportParams | ConcatParams | HkdfParams | Pbkdf2Params, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey>;
3053 digest(algorithm: AlgorithmIdentifier, data: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer): Promise<ArrayBuffer>;
3054 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>;
3055 exportKey(format: "jwk", key: CryptoKey): Promise<JsonWebKey>;
3056 exportKey(format: "raw" | "pkcs8" | "spki", key: CryptoKey): Promise<ArrayBuffer>;
3057 exportKey(format: string, key: CryptoKey): Promise<JsonWebKey | ArrayBuffer>;
3058 generateKey(algorithm: RsaHashedKeyGenParams | EcKeyGenParams | DhKeyGenParams, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKeyPair>;
3059 generateKey(algorithm: AesKeyGenParams | HmacKeyGenParams | Pbkdf2Params, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey>;
3060 generateKey(algorithm: AlgorithmIdentifier, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKeyPair | CryptoKey>;
3061 importKey(format: "jwk", keyData: JsonWebKey, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | DhImportKeyParams | AesKeyAlgorithm, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey>;
3062 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>;
3063 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>;
3064 sign(algorithm: AlgorithmIdentifier | RsaPssParams | EcdsaParams | AesCmacParams, key: CryptoKey, data: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer): Promise<ArrayBuffer>;
3065 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>;
3066 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>;
3067 wrapKey(format: "raw" | "pkcs8" | "spki" | "jwk" | string, key: CryptoKey, wrappingKey: CryptoKey, wrapAlgorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesCmacParams | AesGcmParams | AesCfbParams): Promise<ArrayBuffer>;
3070 declare var SubtleCrypto: {
3071 prototype: SubtleCrypto;
3072 new(): SubtleCrypto;
3075 /** A sync action that is dispatched on the ServiceWorkerGlobalScope of a ServiceWorker. */
3076 interface SyncEvent extends ExtendableEvent {
3077 readonly lastChance: boolean;
3078 readonly tag: string;
3081 declare var SyncEvent: {
3082 prototype: SyncEvent;
3083 new(type: string, init: SyncEventInit): SyncEvent;
3086 /** This ServiceWorker API interface provides an interface for registering and listing sync registrations. */
3087 interface SyncManager {
3088 getTags(): Promise<string[]>;
3089 register(tag: string): Promise<void>;
3092 declare var SyncManager: {
3093 prototype: SyncManager;
3097 /** 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. */
3098 interface TextDecoder extends TextDecoderCommon {
3100 * 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 input. If the invocation without options's stream (or set to false) has no input, it's clearest to omit both arguments.
3103 * var string = "", decoder = new TextDecoder(encoding), buffer;
3104 * while(buffer = next_chunk()) {
3105 * string += decoder.decode(buffer, {stream:true});
3107 * string += decoder.decode(); // end-of-queue
3110 * If the error mode is "fatal" and encoding's decoder returns error, throws a TypeError.
3112 decode(input?: BufferSource, options?: TextDecodeOptions): string;
3115 declare var TextDecoder: {
3116 prototype: TextDecoder;
3117 new(label?: string, options?: TextDecoderOptions): TextDecoder;
3120 interface TextDecoderCommon {
3122 * Returns encoding's name, lowercased.
3124 readonly encoding: string;
3126 * Returns true if error mode is "fatal", otherwise false.
3128 readonly fatal: boolean;
3130 * Returns the value of ignore BOM.
3132 readonly ignoreBOM: boolean;
3135 interface TextDecoderStream extends GenericTransformStream, TextDecoderCommon {
3136 readonly readable: ReadableStream<string>;
3137 readonly writable: WritableStream<BufferSource>;
3140 declare var TextDecoderStream: {
3141 prototype: TextDecoderStream;
3142 new(label?: string, options?: TextDecoderOptions): TextDecoderStream;
3145 /** 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. */
3146 interface TextEncoder extends TextEncoderCommon {
3148 * Returns the result of running UTF-8's encoder.
3150 encode(input?: string): Uint8Array;
3152 * Runs the UTF-8 encoder on source, stores the result of that operation into destination, and returns the progress made as an object wherein read is the number of converted code units of source and written is the number of bytes modified in destination.
3154 encodeInto(source: string, destination: Uint8Array): TextEncoderEncodeIntoResult;
3157 declare var TextEncoder: {
3158 prototype: TextEncoder;
3162 interface TextEncoderCommon {
3166 readonly encoding: string;
3169 interface TextEncoderStream extends GenericTransformStream, TextEncoderCommon {
3170 readonly readable: ReadableStream<Uint8Array>;
3171 readonly writable: WritableStream<string>;
3174 declare var TextEncoderStream: {
3175 prototype: TextEncoderStream;
3176 new(): TextEncoderStream;
3179 /** The dimensions of a piece of text in the canvas, as created by the CanvasRenderingContext2D.measureText() method. */
3180 interface TextMetrics {
3182 * Returns the measurement described below.
3184 readonly actualBoundingBoxAscent: number;
3186 * Returns the measurement described below.
3188 readonly actualBoundingBoxDescent: number;
3190 * Returns the measurement described below.
3192 readonly actualBoundingBoxLeft: number;
3194 * Returns the measurement described below.
3196 readonly actualBoundingBoxRight: number;
3198 * Returns the measurement described below.
3200 readonly alphabeticBaseline: number;
3202 * Returns the measurement described below.
3204 readonly emHeightAscent: number;
3206 * Returns the measurement described below.
3208 readonly emHeightDescent: number;
3210 * Returns the measurement described below.
3212 readonly fontBoundingBoxAscent: number;
3214 * Returns the measurement described below.
3216 readonly fontBoundingBoxDescent: number;
3218 * Returns the measurement described below.
3220 readonly hangingBaseline: number;
3222 * Returns the measurement described below.
3224 readonly ideographicBaseline: number;
3226 * Returns the measurement described below.
3228 readonly width: number;
3231 declare var TextMetrics: {
3232 prototype: TextMetrics;
3236 interface TransformStream<I = any, O = any> {
3237 readonly readable: ReadableStream<O>;
3238 readonly writable: WritableStream<I>;
3241 declare var TransformStream: {
3242 prototype: TransformStream;
3243 new<I = any, O = any>(transformer?: Transformer<I, O>, writableStrategy?: QueuingStrategy<I>, readableStrategy?: QueuingStrategy<O>): TransformStream<I, O>;
3246 interface TransformStreamDefaultController<O = any> {
3247 readonly desiredSize: number | null;
3248 enqueue(chunk: O): void;
3249 error(reason?: any): void;
3253 declare var TransformStreamDefaultController: {
3254 prototype: TransformStreamDefaultController;
3255 new(): TransformStreamDefaultController;
3258 /** The URLÂ interface represents an object providing static methods used for creating object URLs. */
3265 readonly origin: string;
3271 readonly searchParams: URLSearchParams;
3278 new(url: string, base?: string | URL): URL;
3279 createObjectURL(object: any): string;
3280 revokeObjectURL(url: string): void;
3283 interface URLSearchParams {
3285 * Appends a specified key/value pair as a new search parameter.
3287 append(name: string, value: string): void;
3289 * Deletes the given search parameter, and its associated value, from the list of all search parameters.
3291 delete(name: string): void;
3293 * Returns the first value associated to the given search parameter.
3295 get(name: string): string | null;
3297 * Returns all the values association with a given search parameter.
3299 getAll(name: string): string[];
3301 * Returns a Boolean indicating if such a search parameter exists.
3303 has(name: string): boolean;
3305 * Sets the value associated to a given search parameter to the given value. If there were several values, delete the others.
3307 set(name: string, value: string): void;
3310 * Returns a string containing a query string suitable for use in a URL. Does not include the question mark.
3313 forEach(callbackfn: (value: string, key: string, parent: URLSearchParams) => void, thisArg?: any): void;
3316 declare var URLSearchParams: {
3317 prototype: URLSearchParams;
3318 new(init?: string[][] | Record<string, string> | string | URLSearchParams): URLSearchParams;
3322 interface WEBGL_color_buffer_float {
3323 readonly FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT: GLenum;
3324 readonly RGBA32F_EXT: GLenum;
3325 readonly UNSIGNED_NORMALIZED_EXT: GLenum;
3328 interface WEBGL_compressed_texture_astc {
3329 getSupportedProfiles(): string[];
3330 readonly COMPRESSED_RGBA_ASTC_10x10_KHR: GLenum;
3331 readonly COMPRESSED_RGBA_ASTC_10x5_KHR: GLenum;
3332 readonly COMPRESSED_RGBA_ASTC_10x6_KHR: GLenum;
3333 readonly COMPRESSED_RGBA_ASTC_10x8_KHR: GLenum;
3334 readonly COMPRESSED_RGBA_ASTC_12x10_KHR: GLenum;
3335 readonly COMPRESSED_RGBA_ASTC_12x12_KHR: GLenum;
3336 readonly COMPRESSED_RGBA_ASTC_4x4_KHR: GLenum;
3337 readonly COMPRESSED_RGBA_ASTC_5x4_KHR: GLenum;
3338 readonly COMPRESSED_RGBA_ASTC_5x5_KHR: GLenum;
3339 readonly COMPRESSED_RGBA_ASTC_6x5_KHR: GLenum;
3340 readonly COMPRESSED_RGBA_ASTC_6x6_KHR: GLenum;
3341 readonly COMPRESSED_RGBA_ASTC_8x5_KHR: GLenum;
3342 readonly COMPRESSED_RGBA_ASTC_8x6_KHR: GLenum;
3343 readonly COMPRESSED_RGBA_ASTC_8x8_KHR: GLenum;
3344 readonly COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR: GLenum;
3345 readonly COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR: GLenum;
3346 readonly COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR: GLenum;
3347 readonly COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR: GLenum;
3348 readonly COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR: GLenum;
3349 readonly COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR: GLenum;
3350 readonly COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR: GLenum;
3351 readonly COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR: GLenum;
3352 readonly COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR: GLenum;
3353 readonly COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR: GLenum;
3354 readonly COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR: GLenum;
3355 readonly COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR: GLenum;
3356 readonly COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR: GLenum;
3357 readonly COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR: GLenum;
3360 /** The WEBGL_compressed_texture_s3tc extension is part of the WebGL API and exposes four S3TC compressed texture formats. */
3361 interface WEBGL_compressed_texture_s3tc {
3362 readonly COMPRESSED_RGBA_S3TC_DXT1_EXT: GLenum;
3363 readonly COMPRESSED_RGBA_S3TC_DXT3_EXT: GLenum;
3364 readonly COMPRESSED_RGBA_S3TC_DXT5_EXT: GLenum;
3365 readonly COMPRESSED_RGB_S3TC_DXT1_EXT: GLenum;
3368 interface WEBGL_compressed_texture_s3tc_srgb {
3369 readonly COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT: GLenum;
3370 readonly COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT: GLenum;
3371 readonly COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT: GLenum;
3372 readonly COMPRESSED_SRGB_S3TC_DXT1_EXT: GLenum;
3375 /** 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. */
3376 interface WEBGL_debug_renderer_info {
3377 readonly UNMASKED_RENDERER_WEBGL: GLenum;
3378 readonly UNMASKED_VENDOR_WEBGL: GLenum;
3381 interface WEBGL_debug_shaders {
3382 getTranslatedShaderSource(shader: WebGLShader): string;
3385 /** The WEBGL_depth_texture extension is part of the WebGL API and defines 2D depth and depth-stencil textures. */
3386 interface WEBGL_depth_texture {
3387 readonly UNSIGNED_INT_24_8_WEBGL: GLenum;
3390 interface WEBGL_draw_buffers {
3391 drawBuffersWEBGL(buffers: GLenum[]): void;
3392 readonly COLOR_ATTACHMENT0_WEBGL: GLenum;
3393 readonly COLOR_ATTACHMENT10_WEBGL: GLenum;
3394 readonly COLOR_ATTACHMENT11_WEBGL: GLenum;
3395 readonly COLOR_ATTACHMENT12_WEBGL: GLenum;
3396 readonly COLOR_ATTACHMENT13_WEBGL: GLenum;
3397 readonly COLOR_ATTACHMENT14_WEBGL: GLenum;
3398 readonly COLOR_ATTACHMENT15_WEBGL: GLenum;
3399 readonly COLOR_ATTACHMENT1_WEBGL: GLenum;
3400 readonly COLOR_ATTACHMENT2_WEBGL: GLenum;
3401 readonly COLOR_ATTACHMENT3_WEBGL: GLenum;
3402 readonly COLOR_ATTACHMENT4_WEBGL: GLenum;
3403 readonly COLOR_ATTACHMENT5_WEBGL: GLenum;
3404 readonly COLOR_ATTACHMENT6_WEBGL: GLenum;
3405 readonly COLOR_ATTACHMENT7_WEBGL: GLenum;
3406 readonly COLOR_ATTACHMENT8_WEBGL: GLenum;
3407 readonly COLOR_ATTACHMENT9_WEBGL: GLenum;
3408 readonly DRAW_BUFFER0_WEBGL: GLenum;
3409 readonly DRAW_BUFFER10_WEBGL: GLenum;
3410 readonly DRAW_BUFFER11_WEBGL: GLenum;
3411 readonly DRAW_BUFFER12_WEBGL: GLenum;
3412 readonly DRAW_BUFFER13_WEBGL: GLenum;
3413 readonly DRAW_BUFFER14_WEBGL: GLenum;
3414 readonly DRAW_BUFFER15_WEBGL: GLenum;
3415 readonly DRAW_BUFFER1_WEBGL: GLenum;
3416 readonly DRAW_BUFFER2_WEBGL: GLenum;
3417 readonly DRAW_BUFFER3_WEBGL: GLenum;
3418 readonly DRAW_BUFFER4_WEBGL: GLenum;
3419 readonly DRAW_BUFFER5_WEBGL: GLenum;
3420 readonly DRAW_BUFFER6_WEBGL: GLenum;
3421 readonly DRAW_BUFFER7_WEBGL: GLenum;
3422 readonly DRAW_BUFFER8_WEBGL: GLenum;
3423 readonly DRAW_BUFFER9_WEBGL: GLenum;
3424 readonly MAX_COLOR_ATTACHMENTS_WEBGL: GLenum;
3425 readonly MAX_DRAW_BUFFERS_WEBGL: GLenum;
3428 interface WEBGL_lose_context {
3429 loseContext(): void;
3430 restoreContext(): void;
3433 interface WebGL2RenderingContext extends WebGL2RenderingContextBase, WebGL2RenderingContextOverloads, WebGLRenderingContextBase {
3436 declare var WebGL2RenderingContext: {
3437 prototype: WebGL2RenderingContext;
3438 new(): WebGL2RenderingContext;
3439 readonly ACTIVE_ATTRIBUTES: GLenum;
3440 readonly ACTIVE_TEXTURE: GLenum;
3441 readonly ACTIVE_UNIFORMS: GLenum;
3442 readonly ALIASED_LINE_WIDTH_RANGE: GLenum;
3443 readonly ALIASED_POINT_SIZE_RANGE: GLenum;
3444 readonly ALPHA: GLenum;
3445 readonly ALPHA_BITS: GLenum;
3446 readonly ALWAYS: GLenum;
3447 readonly ARRAY_BUFFER: GLenum;
3448 readonly ARRAY_BUFFER_BINDING: GLenum;
3449 readonly ATTACHED_SHADERS: GLenum;
3450 readonly BACK: GLenum;
3451 readonly BLEND: GLenum;
3452 readonly BLEND_COLOR: GLenum;
3453 readonly BLEND_DST_ALPHA: GLenum;
3454 readonly BLEND_DST_RGB: GLenum;
3455 readonly BLEND_EQUATION: GLenum;
3456 readonly BLEND_EQUATION_ALPHA: GLenum;
3457 readonly BLEND_EQUATION_RGB: GLenum;
3458 readonly BLEND_SRC_ALPHA: GLenum;
3459 readonly BLEND_SRC_RGB: GLenum;
3460 readonly BLUE_BITS: GLenum;
3461 readonly BOOL: GLenum;
3462 readonly BOOL_VEC2: GLenum;
3463 readonly BOOL_VEC3: GLenum;
3464 readonly BOOL_VEC4: GLenum;
3465 readonly BROWSER_DEFAULT_WEBGL: GLenum;
3466 readonly BUFFER_SIZE: GLenum;
3467 readonly BUFFER_USAGE: GLenum;
3468 readonly BYTE: GLenum;
3469 readonly CCW: GLenum;
3470 readonly CLAMP_TO_EDGE: GLenum;
3471 readonly COLOR_ATTACHMENT0: GLenum;
3472 readonly COLOR_BUFFER_BIT: GLenum;
3473 readonly COLOR_CLEAR_VALUE: GLenum;
3474 readonly COLOR_WRITEMASK: GLenum;
3475 readonly COMPILE_STATUS: GLenum;
3476 readonly COMPRESSED_TEXTURE_FORMATS: GLenum;
3477 readonly CONSTANT_ALPHA: GLenum;
3478 readonly CONSTANT_COLOR: GLenum;
3479 readonly CONTEXT_LOST_WEBGL: GLenum;
3480 readonly CULL_FACE: GLenum;
3481 readonly CULL_FACE_MODE: GLenum;
3482 readonly CURRENT_PROGRAM: GLenum;
3483 readonly CURRENT_VERTEX_ATTRIB: GLenum;
3484 readonly CW: GLenum;
3485 readonly DECR: GLenum;
3486 readonly DECR_WRAP: GLenum;
3487 readonly DELETE_STATUS: GLenum;
3488 readonly DEPTH_ATTACHMENT: GLenum;
3489 readonly DEPTH_BITS: GLenum;
3490 readonly DEPTH_BUFFER_BIT: GLenum;
3491 readonly DEPTH_CLEAR_VALUE: GLenum;
3492 readonly DEPTH_COMPONENT: GLenum;
3493 readonly DEPTH_COMPONENT16: GLenum;
3494 readonly DEPTH_FUNC: GLenum;
3495 readonly DEPTH_RANGE: GLenum;
3496 readonly DEPTH_STENCIL: GLenum;
3497 readonly DEPTH_STENCIL_ATTACHMENT: GLenum;
3498 readonly DEPTH_TEST: GLenum;
3499 readonly DEPTH_WRITEMASK: GLenum;
3500 readonly DITHER: GLenum;
3501 readonly DONT_CARE: GLenum;
3502 readonly DST_ALPHA: GLenum;
3503 readonly DST_COLOR: GLenum;
3504 readonly DYNAMIC_DRAW: GLenum;
3505 readonly ELEMENT_ARRAY_BUFFER: GLenum;
3506 readonly ELEMENT_ARRAY_BUFFER_BINDING: GLenum;
3507 readonly EQUAL: GLenum;
3508 readonly FASTEST: GLenum;
3509 readonly FLOAT: GLenum;
3510 readonly FLOAT_MAT2: GLenum;
3511 readonly FLOAT_MAT3: GLenum;
3512 readonly FLOAT_MAT4: GLenum;
3513 readonly FLOAT_VEC2: GLenum;
3514 readonly FLOAT_VEC3: GLenum;
3515 readonly FLOAT_VEC4: GLenum;
3516 readonly FRAGMENT_SHADER: GLenum;
3517 readonly FRAMEBUFFER: GLenum;
3518 readonly FRAMEBUFFER_ATTACHMENT_OBJECT_NAME: GLenum;
3519 readonly FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE: GLenum;
3520 readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE: GLenum;
3521 readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL: GLenum;
3522 readonly FRAMEBUFFER_BINDING: GLenum;
3523 readonly FRAMEBUFFER_COMPLETE: GLenum;
3524 readonly FRAMEBUFFER_INCOMPLETE_ATTACHMENT: GLenum;
3525 readonly FRAMEBUFFER_INCOMPLETE_DIMENSIONS: GLenum;
3526 readonly FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT: GLenum;
3527 readonly FRAMEBUFFER_UNSUPPORTED: GLenum;
3528 readonly FRONT: GLenum;
3529 readonly FRONT_AND_BACK: GLenum;
3530 readonly FRONT_FACE: GLenum;
3531 readonly FUNC_ADD: GLenum;
3532 readonly FUNC_REVERSE_SUBTRACT: GLenum;
3533 readonly FUNC_SUBTRACT: GLenum;
3534 readonly GENERATE_MIPMAP_HINT: GLenum;
3535 readonly GEQUAL: GLenum;
3536 readonly GREATER: GLenum;
3537 readonly GREEN_BITS: GLenum;
3538 readonly HIGH_FLOAT: GLenum;
3539 readonly HIGH_INT: GLenum;
3540 readonly IMPLEMENTATION_COLOR_READ_FORMAT: GLenum;
3541 readonly IMPLEMENTATION_COLOR_READ_TYPE: GLenum;
3542 readonly INCR: GLenum;
3543 readonly INCR_WRAP: GLenum;
3544 readonly INT: GLenum;
3545 readonly INT_VEC2: GLenum;
3546 readonly INT_VEC3: GLenum;
3547 readonly INT_VEC4: GLenum;
3548 readonly INVALID_ENUM: GLenum;
3549 readonly INVALID_FRAMEBUFFER_OPERATION: GLenum;
3550 readonly INVALID_OPERATION: GLenum;
3551 readonly INVALID_VALUE: GLenum;
3552 readonly INVERT: GLenum;
3553 readonly KEEP: GLenum;
3554 readonly LEQUAL: GLenum;
3555 readonly LESS: GLenum;
3556 readonly LINEAR: GLenum;
3557 readonly LINEAR_MIPMAP_LINEAR: GLenum;
3558 readonly LINEAR_MIPMAP_NEAREST: GLenum;
3559 readonly LINES: GLenum;
3560 readonly LINE_LOOP: GLenum;
3561 readonly LINE_STRIP: GLenum;
3562 readonly LINE_WIDTH: GLenum;
3563 readonly LINK_STATUS: GLenum;
3564 readonly LOW_FLOAT: GLenum;
3565 readonly LOW_INT: GLenum;
3566 readonly LUMINANCE: GLenum;
3567 readonly LUMINANCE_ALPHA: GLenum;
3568 readonly MAX_COMBINED_TEXTURE_IMAGE_UNITS: GLenum;
3569 readonly MAX_CUBE_MAP_TEXTURE_SIZE: GLenum;
3570 readonly MAX_FRAGMENT_UNIFORM_VECTORS: GLenum;
3571 readonly MAX_RENDERBUFFER_SIZE: GLenum;
3572 readonly MAX_TEXTURE_IMAGE_UNITS: GLenum;
3573 readonly MAX_TEXTURE_SIZE: GLenum;
3574 readonly MAX_VARYING_VECTORS: GLenum;
3575 readonly MAX_VERTEX_ATTRIBS: GLenum;
3576 readonly MAX_VERTEX_TEXTURE_IMAGE_UNITS: GLenum;
3577 readonly MAX_VERTEX_UNIFORM_VECTORS: GLenum;
3578 readonly MAX_VIEWPORT_DIMS: GLenum;
3579 readonly MEDIUM_FLOAT: GLenum;
3580 readonly MEDIUM_INT: GLenum;
3581 readonly MIRRORED_REPEAT: GLenum;
3582 readonly NEAREST: GLenum;
3583 readonly NEAREST_MIPMAP_LINEAR: GLenum;
3584 readonly NEAREST_MIPMAP_NEAREST: GLenum;
3585 readonly NEVER: GLenum;
3586 readonly NICEST: GLenum;
3587 readonly NONE: GLenum;
3588 readonly NOTEQUAL: GLenum;
3589 readonly NO_ERROR: GLenum;
3590 readonly ONE: GLenum;
3591 readonly ONE_MINUS_CONSTANT_ALPHA: GLenum;
3592 readonly ONE_MINUS_CONSTANT_COLOR: GLenum;
3593 readonly ONE_MINUS_DST_ALPHA: GLenum;
3594 readonly ONE_MINUS_DST_COLOR: GLenum;
3595 readonly ONE_MINUS_SRC_ALPHA: GLenum;
3596 readonly ONE_MINUS_SRC_COLOR: GLenum;
3597 readonly OUT_OF_MEMORY: GLenum;
3598 readonly PACK_ALIGNMENT: GLenum;
3599 readonly POINTS: GLenum;
3600 readonly POLYGON_OFFSET_FACTOR: GLenum;
3601 readonly POLYGON_OFFSET_FILL: GLenum;
3602 readonly POLYGON_OFFSET_UNITS: GLenum;
3603 readonly RED_BITS: GLenum;
3604 readonly RENDERBUFFER: GLenum;
3605 readonly RENDERBUFFER_ALPHA_SIZE: GLenum;
3606 readonly RENDERBUFFER_BINDING: GLenum;
3607 readonly RENDERBUFFER_BLUE_SIZE: GLenum;
3608 readonly RENDERBUFFER_DEPTH_SIZE: GLenum;
3609 readonly RENDERBUFFER_GREEN_SIZE: GLenum;
3610 readonly RENDERBUFFER_HEIGHT: GLenum;
3611 readonly RENDERBUFFER_INTERNAL_FORMAT: GLenum;
3612 readonly RENDERBUFFER_RED_SIZE: GLenum;
3613 readonly RENDERBUFFER_STENCIL_SIZE: GLenum;
3614 readonly RENDERBUFFER_WIDTH: GLenum;
3615 readonly RENDERER: GLenum;
3616 readonly REPEAT: GLenum;
3617 readonly REPLACE: GLenum;
3618 readonly RGB: GLenum;
3619 readonly RGB565: GLenum;
3620 readonly RGB5_A1: GLenum;
3621 readonly RGBA: GLenum;
3622 readonly RGBA4: GLenum;
3623 readonly SAMPLER_2D: GLenum;
3624 readonly SAMPLER_CUBE: GLenum;
3625 readonly SAMPLES: GLenum;
3626 readonly SAMPLE_ALPHA_TO_COVERAGE: GLenum;
3627 readonly SAMPLE_BUFFERS: GLenum;
3628 readonly SAMPLE_COVERAGE: GLenum;
3629 readonly SAMPLE_COVERAGE_INVERT: GLenum;
3630 readonly SAMPLE_COVERAGE_VALUE: GLenum;
3631 readonly SCISSOR_BOX: GLenum;
3632 readonly SCISSOR_TEST: GLenum;
3633 readonly SHADER_TYPE: GLenum;
3634 readonly SHADING_LANGUAGE_VERSION: GLenum;
3635 readonly SHORT: GLenum;
3636 readonly SRC_ALPHA: GLenum;
3637 readonly SRC_ALPHA_SATURATE: GLenum;
3638 readonly SRC_COLOR: GLenum;
3639 readonly STATIC_DRAW: GLenum;
3640 readonly STENCIL_ATTACHMENT: GLenum;
3641 readonly STENCIL_BACK_FAIL: GLenum;
3642 readonly STENCIL_BACK_FUNC: GLenum;
3643 readonly STENCIL_BACK_PASS_DEPTH_FAIL: GLenum;
3644 readonly STENCIL_BACK_PASS_DEPTH_PASS: GLenum;
3645 readonly STENCIL_BACK_REF: GLenum;
3646 readonly STENCIL_BACK_VALUE_MASK: GLenum;
3647 readonly STENCIL_BACK_WRITEMASK: GLenum;
3648 readonly STENCIL_BITS: GLenum;
3649 readonly STENCIL_BUFFER_BIT: GLenum;
3650 readonly STENCIL_CLEAR_VALUE: GLenum;
3651 readonly STENCIL_FAIL: GLenum;
3652 readonly STENCIL_FUNC: GLenum;
3653 readonly STENCIL_INDEX8: GLenum;
3654 readonly STENCIL_PASS_DEPTH_FAIL: GLenum;
3655 readonly STENCIL_PASS_DEPTH_PASS: GLenum;
3656 readonly STENCIL_REF: GLenum;
3657 readonly STENCIL_TEST: GLenum;
3658 readonly STENCIL_VALUE_MASK: GLenum;
3659 readonly STENCIL_WRITEMASK: GLenum;
3660 readonly STREAM_DRAW: GLenum;
3661 readonly SUBPIXEL_BITS: GLenum;
3662 readonly TEXTURE: GLenum;
3663 readonly TEXTURE0: GLenum;
3664 readonly TEXTURE1: GLenum;
3665 readonly TEXTURE10: GLenum;
3666 readonly TEXTURE11: GLenum;
3667 readonly TEXTURE12: GLenum;
3668 readonly TEXTURE13: GLenum;
3669 readonly TEXTURE14: GLenum;
3670 readonly TEXTURE15: GLenum;
3671 readonly TEXTURE16: GLenum;
3672 readonly TEXTURE17: GLenum;
3673 readonly TEXTURE18: GLenum;
3674 readonly TEXTURE19: GLenum;
3675 readonly TEXTURE2: GLenum;
3676 readonly TEXTURE20: GLenum;
3677 readonly TEXTURE21: GLenum;
3678 readonly TEXTURE22: GLenum;
3679 readonly TEXTURE23: GLenum;
3680 readonly TEXTURE24: GLenum;
3681 readonly TEXTURE25: GLenum;
3682 readonly TEXTURE26: GLenum;
3683 readonly TEXTURE27: GLenum;
3684 readonly TEXTURE28: GLenum;
3685 readonly TEXTURE29: GLenum;
3686 readonly TEXTURE3: GLenum;
3687 readonly TEXTURE30: GLenum;
3688 readonly TEXTURE31: GLenum;
3689 readonly TEXTURE4: GLenum;
3690 readonly TEXTURE5: GLenum;
3691 readonly TEXTURE6: GLenum;
3692 readonly TEXTURE7: GLenum;
3693 readonly TEXTURE8: GLenum;
3694 readonly TEXTURE9: GLenum;
3695 readonly TEXTURE_2D: GLenum;
3696 readonly TEXTURE_BINDING_2D: GLenum;
3697 readonly TEXTURE_BINDING_CUBE_MAP: GLenum;
3698 readonly TEXTURE_CUBE_MAP: GLenum;
3699 readonly TEXTURE_CUBE_MAP_NEGATIVE_X: GLenum;
3700 readonly TEXTURE_CUBE_MAP_NEGATIVE_Y: GLenum;
3701 readonly TEXTURE_CUBE_MAP_NEGATIVE_Z: GLenum;
3702 readonly TEXTURE_CUBE_MAP_POSITIVE_X: GLenum;
3703 readonly TEXTURE_CUBE_MAP_POSITIVE_Y: GLenum;
3704 readonly TEXTURE_CUBE_MAP_POSITIVE_Z: GLenum;
3705 readonly TEXTURE_MAG_FILTER: GLenum;
3706 readonly TEXTURE_MIN_FILTER: GLenum;
3707 readonly TEXTURE_WRAP_S: GLenum;
3708 readonly TEXTURE_WRAP_T: GLenum;
3709 readonly TRIANGLES: GLenum;
3710 readonly TRIANGLE_FAN: GLenum;
3711 readonly TRIANGLE_STRIP: GLenum;
3712 readonly UNPACK_ALIGNMENT: GLenum;
3713 readonly UNPACK_COLORSPACE_CONVERSION_WEBGL: GLenum;
3714 readonly UNPACK_FLIP_Y_WEBGL: GLenum;
3715 readonly UNPACK_PREMULTIPLY_ALPHA_WEBGL: GLenum;
3716 readonly UNSIGNED_BYTE: GLenum;
3717 readonly UNSIGNED_INT: GLenum;
3718 readonly UNSIGNED_SHORT: GLenum;
3719 readonly UNSIGNED_SHORT_4_4_4_4: GLenum;
3720 readonly UNSIGNED_SHORT_5_5_5_1: GLenum;
3721 readonly UNSIGNED_SHORT_5_6_5: GLenum;
3722 readonly VALIDATE_STATUS: GLenum;
3723 readonly VENDOR: GLenum;
3724 readonly VERSION: GLenum;
3725 readonly VERTEX_ATTRIB_ARRAY_BUFFER_BINDING: GLenum;
3726 readonly VERTEX_ATTRIB_ARRAY_ENABLED: GLenum;
3727 readonly VERTEX_ATTRIB_ARRAY_NORMALIZED: GLenum;
3728 readonly VERTEX_ATTRIB_ARRAY_POINTER: GLenum;
3729 readonly VERTEX_ATTRIB_ARRAY_SIZE: GLenum;
3730 readonly VERTEX_ATTRIB_ARRAY_STRIDE: GLenum;
3731 readonly VERTEX_ATTRIB_ARRAY_TYPE: GLenum;
3732 readonly VERTEX_SHADER: GLenum;
3733 readonly VIEWPORT: GLenum;
3734 readonly ZERO: GLenum;
3735 readonly ACTIVE_UNIFORM_BLOCKS: GLenum;
3736 readonly ALREADY_SIGNALED: GLenum;
3737 readonly ANY_SAMPLES_PASSED: GLenum;
3738 readonly ANY_SAMPLES_PASSED_CONSERVATIVE: GLenum;
3739 readonly COLOR: GLenum;
3740 readonly COLOR_ATTACHMENT1: GLenum;
3741 readonly COLOR_ATTACHMENT10: GLenum;
3742 readonly COLOR_ATTACHMENT11: GLenum;
3743 readonly COLOR_ATTACHMENT12: GLenum;
3744 readonly COLOR_ATTACHMENT13: GLenum;
3745 readonly COLOR_ATTACHMENT14: GLenum;
3746 readonly COLOR_ATTACHMENT15: GLenum;
3747 readonly COLOR_ATTACHMENT2: GLenum;
3748 readonly COLOR_ATTACHMENT3: GLenum;
3749 readonly COLOR_ATTACHMENT4: GLenum;
3750 readonly COLOR_ATTACHMENT5: GLenum;
3751 readonly COLOR_ATTACHMENT6: GLenum;
3752 readonly COLOR_ATTACHMENT7: GLenum;
3753 readonly COLOR_ATTACHMENT8: GLenum;
3754 readonly COLOR_ATTACHMENT9: GLenum;
3755 readonly COMPARE_REF_TO_TEXTURE: GLenum;
3756 readonly CONDITION_SATISFIED: GLenum;
3757 readonly COPY_READ_BUFFER: GLenum;
3758 readonly COPY_READ_BUFFER_BINDING: GLenum;
3759 readonly COPY_WRITE_BUFFER: GLenum;
3760 readonly COPY_WRITE_BUFFER_BINDING: GLenum;
3761 readonly CURRENT_QUERY: GLenum;
3762 readonly DEPTH: GLenum;
3763 readonly DEPTH24_STENCIL8: GLenum;
3764 readonly DEPTH32F_STENCIL8: GLenum;
3765 readonly DEPTH_COMPONENT24: GLenum;
3766 readonly DEPTH_COMPONENT32F: GLenum;
3767 readonly DRAW_BUFFER0: GLenum;
3768 readonly DRAW_BUFFER1: GLenum;
3769 readonly DRAW_BUFFER10: GLenum;
3770 readonly DRAW_BUFFER11: GLenum;
3771 readonly DRAW_BUFFER12: GLenum;
3772 readonly DRAW_BUFFER13: GLenum;
3773 readonly DRAW_BUFFER14: GLenum;
3774 readonly DRAW_BUFFER15: GLenum;
3775 readonly DRAW_BUFFER2: GLenum;
3776 readonly DRAW_BUFFER3: GLenum;
3777 readonly DRAW_BUFFER4: GLenum;
3778 readonly DRAW_BUFFER5: GLenum;
3779 readonly DRAW_BUFFER6: GLenum;
3780 readonly DRAW_BUFFER7: GLenum;
3781 readonly DRAW_BUFFER8: GLenum;
3782 readonly DRAW_BUFFER9: GLenum;
3783 readonly DRAW_FRAMEBUFFER: GLenum;
3784 readonly DRAW_FRAMEBUFFER_BINDING: GLenum;
3785 readonly DYNAMIC_COPY: GLenum;
3786 readonly DYNAMIC_READ: GLenum;
3787 readonly FLOAT_32_UNSIGNED_INT_24_8_REV: GLenum;
3788 readonly FLOAT_MAT2x3: GLenum;
3789 readonly FLOAT_MAT2x4: GLenum;
3790 readonly FLOAT_MAT3x2: GLenum;
3791 readonly FLOAT_MAT3x4: GLenum;
3792 readonly FLOAT_MAT4x2: GLenum;
3793 readonly FLOAT_MAT4x3: GLenum;
3794 readonly FRAGMENT_SHADER_DERIVATIVE_HINT: GLenum;
3795 readonly FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE: GLenum;
3796 readonly FRAMEBUFFER_ATTACHMENT_BLUE_SIZE: GLenum;
3797 readonly FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING: GLenum;
3798 readonly FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE: GLenum;
3799 readonly FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE: GLenum;
3800 readonly FRAMEBUFFER_ATTACHMENT_GREEN_SIZE: GLenum;
3801 readonly FRAMEBUFFER_ATTACHMENT_RED_SIZE: GLenum;
3802 readonly FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE: GLenum;
3803 readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER: GLenum;
3804 readonly FRAMEBUFFER_DEFAULT: GLenum;
3805 readonly FRAMEBUFFER_INCOMPLETE_MULTISAMPLE: GLenum;
3806 readonly HALF_FLOAT: GLenum;
3807 readonly INTERLEAVED_ATTRIBS: GLenum;
3808 readonly INT_2_10_10_10_REV: GLenum;
3809 readonly INT_SAMPLER_2D: GLenum;
3810 readonly INT_SAMPLER_2D_ARRAY: GLenum;
3811 readonly INT_SAMPLER_3D: GLenum;
3812 readonly INT_SAMPLER_CUBE: GLenum;
3813 readonly INVALID_INDEX: GLenum;
3814 readonly MAX: GLenum;
3815 readonly MAX_3D_TEXTURE_SIZE: GLenum;
3816 readonly MAX_ARRAY_TEXTURE_LAYERS: GLenum;
3817 readonly MAX_CLIENT_WAIT_TIMEOUT_WEBGL: GLenum;
3818 readonly MAX_COLOR_ATTACHMENTS: GLenum;
3819 readonly MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS: GLenum;
3820 readonly MAX_COMBINED_UNIFORM_BLOCKS: GLenum;
3821 readonly MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS: GLenum;
3822 readonly MAX_DRAW_BUFFERS: GLenum;
3823 readonly MAX_ELEMENTS_INDICES: GLenum;
3824 readonly MAX_ELEMENTS_VERTICES: GLenum;
3825 readonly MAX_ELEMENT_INDEX: GLenum;
3826 readonly MAX_FRAGMENT_INPUT_COMPONENTS: GLenum;
3827 readonly MAX_FRAGMENT_UNIFORM_BLOCKS: GLenum;
3828 readonly MAX_FRAGMENT_UNIFORM_COMPONENTS: GLenum;
3829 readonly MAX_PROGRAM_TEXEL_OFFSET: GLenum;
3830 readonly MAX_SAMPLES: GLenum;
3831 readonly MAX_SERVER_WAIT_TIMEOUT: GLenum;
3832 readonly MAX_TEXTURE_LOD_BIAS: GLenum;
3833 readonly MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS: GLenum;
3834 readonly MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS: GLenum;
3835 readonly MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS: GLenum;
3836 readonly MAX_UNIFORM_BLOCK_SIZE: GLenum;
3837 readonly MAX_UNIFORM_BUFFER_BINDINGS: GLenum;
3838 readonly MAX_VARYING_COMPONENTS: GLenum;
3839 readonly MAX_VERTEX_OUTPUT_COMPONENTS: GLenum;
3840 readonly MAX_VERTEX_UNIFORM_BLOCKS: GLenum;
3841 readonly MAX_VERTEX_UNIFORM_COMPONENTS: GLenum;
3842 readonly MIN: GLenum;
3843 readonly MIN_PROGRAM_TEXEL_OFFSET: GLenum;
3844 readonly OBJECT_TYPE: GLenum;
3845 readonly PACK_ROW_LENGTH: GLenum;
3846 readonly PACK_SKIP_PIXELS: GLenum;
3847 readonly PACK_SKIP_ROWS: GLenum;
3848 readonly PIXEL_PACK_BUFFER: GLenum;
3849 readonly PIXEL_PACK_BUFFER_BINDING: GLenum;
3850 readonly PIXEL_UNPACK_BUFFER: GLenum;
3851 readonly PIXEL_UNPACK_BUFFER_BINDING: GLenum;
3852 readonly QUERY_RESULT: GLenum;
3853 readonly QUERY_RESULT_AVAILABLE: GLenum;
3854 readonly R11F_G11F_B10F: GLenum;
3855 readonly R16F: GLenum;
3856 readonly R16I: GLenum;
3857 readonly R16UI: GLenum;
3858 readonly R32F: GLenum;
3859 readonly R32I: GLenum;
3860 readonly R32UI: GLenum;
3861 readonly R8: GLenum;
3862 readonly R8I: GLenum;
3863 readonly R8UI: GLenum;
3864 readonly R8_SNORM: GLenum;
3865 readonly RASTERIZER_DISCARD: GLenum;
3866 readonly READ_BUFFER: GLenum;
3867 readonly READ_FRAMEBUFFER: GLenum;
3868 readonly READ_FRAMEBUFFER_BINDING: GLenum;
3869 readonly RED: GLenum;
3870 readonly RED_INTEGER: GLenum;
3871 readonly RENDERBUFFER_SAMPLES: GLenum;
3872 readonly RG: GLenum;
3873 readonly RG16F: GLenum;
3874 readonly RG16I: GLenum;
3875 readonly RG16UI: GLenum;
3876 readonly RG32F: GLenum;
3877 readonly RG32I: GLenum;
3878 readonly RG32UI: GLenum;
3879 readonly RG8: GLenum;
3880 readonly RG8I: GLenum;
3881 readonly RG8UI: GLenum;
3882 readonly RG8_SNORM: GLenum;
3883 readonly RGB10_A2: GLenum;
3884 readonly RGB10_A2UI: GLenum;
3885 readonly RGB16F: GLenum;
3886 readonly RGB16I: GLenum;
3887 readonly RGB16UI: GLenum;
3888 readonly RGB32F: GLenum;
3889 readonly RGB32I: GLenum;
3890 readonly RGB32UI: GLenum;
3891 readonly RGB8: GLenum;
3892 readonly RGB8I: GLenum;
3893 readonly RGB8UI: GLenum;
3894 readonly RGB8_SNORM: GLenum;
3895 readonly RGB9_E5: GLenum;
3896 readonly RGBA16F: GLenum;
3897 readonly RGBA16I: GLenum;
3898 readonly RGBA16UI: GLenum;
3899 readonly RGBA32F: GLenum;
3900 readonly RGBA32I: GLenum;
3901 readonly RGBA32UI: GLenum;
3902 readonly RGBA8: GLenum;
3903 readonly RGBA8I: GLenum;
3904 readonly RGBA8UI: GLenum;
3905 readonly RGBA8_SNORM: GLenum;
3906 readonly RGBA_INTEGER: GLenum;
3907 readonly RGB_INTEGER: GLenum;
3908 readonly RG_INTEGER: GLenum;
3909 readonly SAMPLER_2D_ARRAY: GLenum;
3910 readonly SAMPLER_2D_ARRAY_SHADOW: GLenum;
3911 readonly SAMPLER_2D_SHADOW: GLenum;
3912 readonly SAMPLER_3D: GLenum;
3913 readonly SAMPLER_BINDING: GLenum;
3914 readonly SAMPLER_CUBE_SHADOW: GLenum;
3915 readonly SEPARATE_ATTRIBS: GLenum;
3916 readonly SIGNALED: GLenum;
3917 readonly SIGNED_NORMALIZED: GLenum;
3918 readonly SRGB: GLenum;
3919 readonly SRGB8: GLenum;
3920 readonly SRGB8_ALPHA8: GLenum;
3921 readonly STATIC_COPY: GLenum;
3922 readonly STATIC_READ: GLenum;
3923 readonly STENCIL: GLenum;
3924 readonly STREAM_COPY: GLenum;
3925 readonly STREAM_READ: GLenum;
3926 readonly SYNC_CONDITION: GLenum;
3927 readonly SYNC_FENCE: GLenum;
3928 readonly SYNC_FLAGS: GLenum;
3929 readonly SYNC_FLUSH_COMMANDS_BIT: GLenum;
3930 readonly SYNC_GPU_COMMANDS_COMPLETE: GLenum;
3931 readonly SYNC_STATUS: GLenum;
3932 readonly TEXTURE_2D_ARRAY: GLenum;
3933 readonly TEXTURE_3D: GLenum;
3934 readonly TEXTURE_BASE_LEVEL: GLenum;
3935 readonly TEXTURE_BINDING_2D_ARRAY: GLenum;
3936 readonly TEXTURE_BINDING_3D: GLenum;
3937 readonly TEXTURE_COMPARE_FUNC: GLenum;
3938 readonly TEXTURE_COMPARE_MODE: GLenum;
3939 readonly TEXTURE_IMMUTABLE_FORMAT: GLenum;
3940 readonly TEXTURE_IMMUTABLE_LEVELS: GLenum;
3941 readonly TEXTURE_MAX_LEVEL: GLenum;
3942 readonly TEXTURE_MAX_LOD: GLenum;
3943 readonly TEXTURE_MIN_LOD: GLenum;
3944 readonly TEXTURE_WRAP_R: GLenum;
3945 readonly TIMEOUT_EXPIRED: GLenum;
3946 readonly TIMEOUT_IGNORED: GLint64;
3947 readonly TRANSFORM_FEEDBACK: GLenum;
3948 readonly TRANSFORM_FEEDBACK_ACTIVE: GLenum;
3949 readonly TRANSFORM_FEEDBACK_BINDING: GLenum;
3950 readonly TRANSFORM_FEEDBACK_BUFFER: GLenum;
3951 readonly TRANSFORM_FEEDBACK_BUFFER_BINDING: GLenum;
3952 readonly TRANSFORM_FEEDBACK_BUFFER_MODE: GLenum;
3953 readonly TRANSFORM_FEEDBACK_BUFFER_SIZE: GLenum;
3954 readonly TRANSFORM_FEEDBACK_BUFFER_START: GLenum;
3955 readonly TRANSFORM_FEEDBACK_PAUSED: GLenum;
3956 readonly TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN: GLenum;
3957 readonly TRANSFORM_FEEDBACK_VARYINGS: GLenum;
3958 readonly UNIFORM_ARRAY_STRIDE: GLenum;
3959 readonly UNIFORM_BLOCK_ACTIVE_UNIFORMS: GLenum;
3960 readonly UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES: GLenum;
3961 readonly UNIFORM_BLOCK_BINDING: GLenum;
3962 readonly UNIFORM_BLOCK_DATA_SIZE: GLenum;
3963 readonly UNIFORM_BLOCK_INDEX: GLenum;
3964 readonly UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER: GLenum;
3965 readonly UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER: GLenum;
3966 readonly UNIFORM_BUFFER: GLenum;
3967 readonly UNIFORM_BUFFER_BINDING: GLenum;
3968 readonly UNIFORM_BUFFER_OFFSET_ALIGNMENT: GLenum;
3969 readonly UNIFORM_BUFFER_SIZE: GLenum;
3970 readonly UNIFORM_BUFFER_START: GLenum;
3971 readonly UNIFORM_IS_ROW_MAJOR: GLenum;
3972 readonly UNIFORM_MATRIX_STRIDE: GLenum;
3973 readonly UNIFORM_OFFSET: GLenum;
3974 readonly UNIFORM_SIZE: GLenum;
3975 readonly UNIFORM_TYPE: GLenum;
3976 readonly UNPACK_IMAGE_HEIGHT: GLenum;
3977 readonly UNPACK_ROW_LENGTH: GLenum;
3978 readonly UNPACK_SKIP_IMAGES: GLenum;
3979 readonly UNPACK_SKIP_PIXELS: GLenum;
3980 readonly UNPACK_SKIP_ROWS: GLenum;
3981 readonly UNSIGNALED: GLenum;
3982 readonly UNSIGNED_INT_10F_11F_11F_REV: GLenum;
3983 readonly UNSIGNED_INT_24_8: GLenum;
3984 readonly UNSIGNED_INT_2_10_10_10_REV: GLenum;
3985 readonly UNSIGNED_INT_5_9_9_9_REV: GLenum;
3986 readonly UNSIGNED_INT_SAMPLER_2D: GLenum;
3987 readonly UNSIGNED_INT_SAMPLER_2D_ARRAY: GLenum;
3988 readonly UNSIGNED_INT_SAMPLER_3D: GLenum;
3989 readonly UNSIGNED_INT_SAMPLER_CUBE: GLenum;
3990 readonly UNSIGNED_INT_VEC2: GLenum;
3991 readonly UNSIGNED_INT_VEC3: GLenum;
3992 readonly UNSIGNED_INT_VEC4: GLenum;
3993 readonly UNSIGNED_NORMALIZED: GLenum;
3994 readonly VERTEX_ARRAY_BINDING: GLenum;
3995 readonly VERTEX_ATTRIB_ARRAY_DIVISOR: GLenum;
3996 readonly VERTEX_ATTRIB_ARRAY_INTEGER: GLenum;
3997 readonly WAIT_FAILED: GLenum;
4000 interface WebGL2RenderingContextBase {
4001 beginQuery(target: GLenum, query: WebGLQuery): void;
4002 beginTransformFeedback(primitiveMode: GLenum): void;
4003 bindBufferBase(target: GLenum, index: GLuint, buffer: WebGLBuffer | null): void;
4004 bindBufferRange(target: GLenum, index: GLuint, buffer: WebGLBuffer | null, offset: GLintptr, size: GLsizeiptr): void;
4005 bindSampler(unit: GLuint, sampler: WebGLSampler | null): void;
4006 bindTransformFeedback(target: GLenum, tf: WebGLTransformFeedback | null): void;
4007 bindVertexArray(array: WebGLVertexArrayObject | null): void;
4008 blitFramebuffer(srcX0: GLint, srcY0: GLint, srcX1: GLint, srcY1: GLint, dstX0: GLint, dstY0: GLint, dstX1: GLint, dstY1: GLint, mask: GLbitfield, filter: GLenum): void;
4009 clearBufferfi(buffer: GLenum, drawbuffer: GLint, depth: GLfloat, stencil: GLint): void;
4010 clearBufferfv(buffer: GLenum, drawbuffer: GLint, values: Float32List, srcOffset?: GLuint): void;
4011 clearBufferiv(buffer: GLenum, drawbuffer: GLint, values: Int32List, srcOffset?: GLuint): void;
4012 clearBufferuiv(buffer: GLenum, drawbuffer: GLint, values: Uint32List, srcOffset?: GLuint): void;
4013 clientWaitSync(sync: WebGLSync, flags: GLbitfield, timeout: GLuint64): GLenum;
4014 compressedTexImage3D(target: GLenum, level: GLint, internalformat: GLenum, width: GLsizei, height: GLsizei, depth: GLsizei, border: GLint, imageSize: GLsizei, offset: GLintptr): void;
4015 compressedTexImage3D(target: GLenum, level: GLint, internalformat: GLenum, width: GLsizei, height: GLsizei, depth: GLsizei, border: GLint, srcData: ArrayBufferView, srcOffset?: GLuint, srcLengthOverride?: GLuint): void;
4016 compressedTexSubImage3D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, format: GLenum, imageSize: GLsizei, offset: GLintptr): void;
4017 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;
4018 copyBufferSubData(readTarget: GLenum, writeTarget: GLenum, readOffset: GLintptr, writeOffset: GLintptr, size: GLsizeiptr): void;
4019 copyTexSubImage3D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, x: GLint, y: GLint, width: GLsizei, height: GLsizei): void;
4020 createQuery(): WebGLQuery | null;
4021 createSampler(): WebGLSampler | null;
4022 createTransformFeedback(): WebGLTransformFeedback | null;
4023 createVertexArray(): WebGLVertexArrayObject | null;
4024 deleteQuery(query: WebGLQuery | null): void;
4025 deleteSampler(sampler: WebGLSampler | null): void;
4026 deleteSync(sync: WebGLSync | null): void;
4027 deleteTransformFeedback(tf: WebGLTransformFeedback | null): void;
4028 deleteVertexArray(vertexArray: WebGLVertexArrayObject | null): void;
4029 drawArraysInstanced(mode: GLenum, first: GLint, count: GLsizei, instanceCount: GLsizei): void;
4030 drawBuffers(buffers: GLenum[]): void;
4031 drawElementsInstanced(mode: GLenum, count: GLsizei, type: GLenum, offset: GLintptr, instanceCount: GLsizei): void;
4032 drawRangeElements(mode: GLenum, start: GLuint, end: GLuint, count: GLsizei, type: GLenum, offset: GLintptr): void;
4033 endQuery(target: GLenum): void;
4034 endTransformFeedback(): void;
4035 fenceSync(condition: GLenum, flags: GLbitfield): WebGLSync | null;
4036 framebufferTextureLayer(target: GLenum, attachment: GLenum, texture: WebGLTexture | null, level: GLint, layer: GLint): void;
4037 getActiveUniformBlockName(program: WebGLProgram, uniformBlockIndex: GLuint): string | null;
4038 getActiveUniformBlockParameter(program: WebGLProgram, uniformBlockIndex: GLuint, pname: GLenum): any;
4039 getActiveUniforms(program: WebGLProgram, uniformIndices: GLuint[], pname: GLenum): any;
4040 getBufferSubData(target: GLenum, srcByteOffset: GLintptr, dstBuffer: ArrayBufferView, dstOffset?: GLuint, length?: GLuint): void;
4041 getFragDataLocation(program: WebGLProgram, name: string): GLint;
4042 getIndexedParameter(target: GLenum, index: GLuint): any;
4043 getInternalformatParameter(target: GLenum, internalformat: GLenum, pname: GLenum): any;
4044 getQuery(target: GLenum, pname: GLenum): WebGLQuery | null;
4045 getQueryParameter(query: WebGLQuery, pname: GLenum): any;
4046 getSamplerParameter(sampler: WebGLSampler, pname: GLenum): any;
4047 getSyncParameter(sync: WebGLSync, pname: GLenum): any;
4048 getTransformFeedbackVarying(program: WebGLProgram, index: GLuint): WebGLActiveInfo | null;
4049 getUniformBlockIndex(program: WebGLProgram, uniformBlockName: string): GLuint;
4050 getUniformIndices(program: WebGLProgram, uniformNames: string[]): GLuint[] | null;
4051 invalidateFramebuffer(target: GLenum, attachments: GLenum[]): void;
4052 invalidateSubFramebuffer(target: GLenum, attachments: GLenum[], x: GLint, y: GLint, width: GLsizei, height: GLsizei): void;
4053 isQuery(query: WebGLQuery | null): GLboolean;
4054 isSampler(sampler: WebGLSampler | null): GLboolean;
4055 isSync(sync: WebGLSync | null): GLboolean;
4056 isTransformFeedback(tf: WebGLTransformFeedback | null): GLboolean;
4057 isVertexArray(vertexArray: WebGLVertexArrayObject | null): GLboolean;
4058 pauseTransformFeedback(): void;
4059 readBuffer(src: GLenum): void;
4060 renderbufferStorageMultisample(target: GLenum, samples: GLsizei, internalformat: GLenum, width: GLsizei, height: GLsizei): void;
4061 resumeTransformFeedback(): void;
4062 samplerParameterf(sampler: WebGLSampler, pname: GLenum, param: GLfloat): void;
4063 samplerParameteri(sampler: WebGLSampler, pname: GLenum, param: GLint): void;
4064 texImage3D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, border: GLint, format: GLenum, type: GLenum, pboOffset: GLintptr): void;
4065 texImage3D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, border: GLint, format: GLenum, type: GLenum, source: TexImageSource): void;
4066 texImage3D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, border: GLint, format: GLenum, type: GLenum, srcData: ArrayBufferView | null): void;
4067 texImage3D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, border: GLint, format: GLenum, type: GLenum, srcData: ArrayBufferView, srcOffset: GLuint): void;
4068 texStorage2D(target: GLenum, levels: GLsizei, internalformat: GLenum, width: GLsizei, height: GLsizei): void;
4069 texStorage3D(target: GLenum, levels: GLsizei, internalformat: GLenum, width: GLsizei, height: GLsizei, depth: GLsizei): void;
4070 texSubImage3D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, format: GLenum, type: GLenum, pboOffset: GLintptr): void;
4071 texSubImage3D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, format: GLenum, type: GLenum, source: TexImageSource): void;
4072 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;
4073 transformFeedbackVaryings(program: WebGLProgram, varyings: string[], bufferMode: GLenum): void;
4074 uniform1ui(location: WebGLUniformLocation | null, v0: GLuint): void;
4075 uniform1uiv(location: WebGLUniformLocation | null, data: Uint32List, srcOffset?: GLuint, srcLength?: GLuint): void;
4076 uniform2ui(location: WebGLUniformLocation | null, v0: GLuint, v1: GLuint): void;
4077 uniform2uiv(location: WebGLUniformLocation | null, data: Uint32List, srcOffset?: GLuint, srcLength?: GLuint): void;
4078 uniform3ui(location: WebGLUniformLocation | null, v0: GLuint, v1: GLuint, v2: GLuint): void;
4079 uniform3uiv(location: WebGLUniformLocation | null, data: Uint32List, srcOffset?: GLuint, srcLength?: GLuint): void;
4080 uniform4ui(location: WebGLUniformLocation | null, v0: GLuint, v1: GLuint, v2: GLuint, v3: GLuint): void;
4081 uniform4uiv(location: WebGLUniformLocation | null, data: Uint32List, srcOffset?: GLuint, srcLength?: GLuint): void;
4082 uniformBlockBinding(program: WebGLProgram, uniformBlockIndex: GLuint, uniformBlockBinding: GLuint): void;
4083 uniformMatrix2x3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void;
4084 uniformMatrix2x4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void;
4085 uniformMatrix3x2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void;
4086 uniformMatrix3x4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void;
4087 uniformMatrix4x2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void;
4088 uniformMatrix4x3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void;
4089 vertexAttribDivisor(index: GLuint, divisor: GLuint): void;
4090 vertexAttribI4i(index: GLuint, x: GLint, y: GLint, z: GLint, w: GLint): void;
4091 vertexAttribI4iv(index: GLuint, values: Int32List): void;
4092 vertexAttribI4ui(index: GLuint, x: GLuint, y: GLuint, z: GLuint, w: GLuint): void;
4093 vertexAttribI4uiv(index: GLuint, values: Uint32List): void;
4094 vertexAttribIPointer(index: GLuint, size: GLint, type: GLenum, stride: GLsizei, offset: GLintptr): void;
4095 waitSync(sync: WebGLSync, flags: GLbitfield, timeout: GLint64): void;
4096 readonly ACTIVE_UNIFORM_BLOCKS: GLenum;
4097 readonly ALREADY_SIGNALED: GLenum;
4098 readonly ANY_SAMPLES_PASSED: GLenum;
4099 readonly ANY_SAMPLES_PASSED_CONSERVATIVE: GLenum;
4100 readonly COLOR: GLenum;
4101 readonly COLOR_ATTACHMENT1: GLenum;
4102 readonly COLOR_ATTACHMENT10: GLenum;
4103 readonly COLOR_ATTACHMENT11: GLenum;
4104 readonly COLOR_ATTACHMENT12: GLenum;
4105 readonly COLOR_ATTACHMENT13: GLenum;
4106 readonly COLOR_ATTACHMENT14: GLenum;
4107 readonly COLOR_ATTACHMENT15: GLenum;
4108 readonly COLOR_ATTACHMENT2: GLenum;
4109 readonly COLOR_ATTACHMENT3: GLenum;
4110 readonly COLOR_ATTACHMENT4: GLenum;
4111 readonly COLOR_ATTACHMENT5: GLenum;
4112 readonly COLOR_ATTACHMENT6: GLenum;
4113 readonly COLOR_ATTACHMENT7: GLenum;
4114 readonly COLOR_ATTACHMENT8: GLenum;
4115 readonly COLOR_ATTACHMENT9: GLenum;
4116 readonly COMPARE_REF_TO_TEXTURE: GLenum;
4117 readonly CONDITION_SATISFIED: GLenum;
4118 readonly COPY_READ_BUFFER: GLenum;
4119 readonly COPY_READ_BUFFER_BINDING: GLenum;
4120 readonly COPY_WRITE_BUFFER: GLenum;
4121 readonly COPY_WRITE_BUFFER_BINDING: GLenum;
4122 readonly CURRENT_QUERY: GLenum;
4123 readonly DEPTH: GLenum;
4124 readonly DEPTH24_STENCIL8: GLenum;
4125 readonly DEPTH32F_STENCIL8: GLenum;
4126 readonly DEPTH_COMPONENT24: GLenum;
4127 readonly DEPTH_COMPONENT32F: GLenum;
4128 readonly DRAW_BUFFER0: GLenum;
4129 readonly DRAW_BUFFER1: GLenum;
4130 readonly DRAW_BUFFER10: GLenum;
4131 readonly DRAW_BUFFER11: GLenum;
4132 readonly DRAW_BUFFER12: GLenum;
4133 readonly DRAW_BUFFER13: GLenum;
4134 readonly DRAW_BUFFER14: GLenum;
4135 readonly DRAW_BUFFER15: GLenum;
4136 readonly DRAW_BUFFER2: GLenum;
4137 readonly DRAW_BUFFER3: GLenum;
4138 readonly DRAW_BUFFER4: GLenum;
4139 readonly DRAW_BUFFER5: GLenum;
4140 readonly DRAW_BUFFER6: GLenum;
4141 readonly DRAW_BUFFER7: GLenum;
4142 readonly DRAW_BUFFER8: GLenum;
4143 readonly DRAW_BUFFER9: GLenum;
4144 readonly DRAW_FRAMEBUFFER: GLenum;
4145 readonly DRAW_FRAMEBUFFER_BINDING: GLenum;
4146 readonly DYNAMIC_COPY: GLenum;
4147 readonly DYNAMIC_READ: GLenum;
4148 readonly FLOAT_32_UNSIGNED_INT_24_8_REV: GLenum;
4149 readonly FLOAT_MAT2x3: GLenum;
4150 readonly FLOAT_MAT2x4: GLenum;
4151 readonly FLOAT_MAT3x2: GLenum;
4152 readonly FLOAT_MAT3x4: GLenum;
4153 readonly FLOAT_MAT4x2: GLenum;
4154 readonly FLOAT_MAT4x3: GLenum;
4155 readonly FRAGMENT_SHADER_DERIVATIVE_HINT: GLenum;
4156 readonly FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE: GLenum;
4157 readonly FRAMEBUFFER_ATTACHMENT_BLUE_SIZE: GLenum;
4158 readonly FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING: GLenum;
4159 readonly FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE: GLenum;
4160 readonly FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE: GLenum;
4161 readonly FRAMEBUFFER_ATTACHMENT_GREEN_SIZE: GLenum;
4162 readonly FRAMEBUFFER_ATTACHMENT_RED_SIZE: GLenum;
4163 readonly FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE: GLenum;
4164 readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER: GLenum;
4165 readonly FRAMEBUFFER_DEFAULT: GLenum;
4166 readonly FRAMEBUFFER_INCOMPLETE_MULTISAMPLE: GLenum;
4167 readonly HALF_FLOAT: GLenum;
4168 readonly INTERLEAVED_ATTRIBS: GLenum;
4169 readonly INT_2_10_10_10_REV: GLenum;
4170 readonly INT_SAMPLER_2D: GLenum;
4171 readonly INT_SAMPLER_2D_ARRAY: GLenum;
4172 readonly INT_SAMPLER_3D: GLenum;
4173 readonly INT_SAMPLER_CUBE: GLenum;
4174 readonly INVALID_INDEX: GLenum;
4175 readonly MAX: GLenum;
4176 readonly MAX_3D_TEXTURE_SIZE: GLenum;
4177 readonly MAX_ARRAY_TEXTURE_LAYERS: GLenum;
4178 readonly MAX_CLIENT_WAIT_TIMEOUT_WEBGL: GLenum;
4179 readonly MAX_COLOR_ATTACHMENTS: GLenum;
4180 readonly MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS: GLenum;
4181 readonly MAX_COMBINED_UNIFORM_BLOCKS: GLenum;
4182 readonly MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS: GLenum;
4183 readonly MAX_DRAW_BUFFERS: GLenum;
4184 readonly MAX_ELEMENTS_INDICES: GLenum;
4185 readonly MAX_ELEMENTS_VERTICES: GLenum;
4186 readonly MAX_ELEMENT_INDEX: GLenum;
4187 readonly MAX_FRAGMENT_INPUT_COMPONENTS: GLenum;
4188 readonly MAX_FRAGMENT_UNIFORM_BLOCKS: GLenum;
4189 readonly MAX_FRAGMENT_UNIFORM_COMPONENTS: GLenum;
4190 readonly MAX_PROGRAM_TEXEL_OFFSET: GLenum;
4191 readonly MAX_SAMPLES: GLenum;
4192 readonly MAX_SERVER_WAIT_TIMEOUT: GLenum;
4193 readonly MAX_TEXTURE_LOD_BIAS: GLenum;
4194 readonly MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS: GLenum;
4195 readonly MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS: GLenum;
4196 readonly MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS: GLenum;
4197 readonly MAX_UNIFORM_BLOCK_SIZE: GLenum;
4198 readonly MAX_UNIFORM_BUFFER_BINDINGS: GLenum;
4199 readonly MAX_VARYING_COMPONENTS: GLenum;
4200 readonly MAX_VERTEX_OUTPUT_COMPONENTS: GLenum;
4201 readonly MAX_VERTEX_UNIFORM_BLOCKS: GLenum;
4202 readonly MAX_VERTEX_UNIFORM_COMPONENTS: GLenum;
4203 readonly MIN: GLenum;
4204 readonly MIN_PROGRAM_TEXEL_OFFSET: GLenum;
4205 readonly OBJECT_TYPE: GLenum;
4206 readonly PACK_ROW_LENGTH: GLenum;
4207 readonly PACK_SKIP_PIXELS: GLenum;
4208 readonly PACK_SKIP_ROWS: GLenum;
4209 readonly PIXEL_PACK_BUFFER: GLenum;
4210 readonly PIXEL_PACK_BUFFER_BINDING: GLenum;
4211 readonly PIXEL_UNPACK_BUFFER: GLenum;
4212 readonly PIXEL_UNPACK_BUFFER_BINDING: GLenum;
4213 readonly QUERY_RESULT: GLenum;
4214 readonly QUERY_RESULT_AVAILABLE: GLenum;
4215 readonly R11F_G11F_B10F: GLenum;
4216 readonly R16F: GLenum;
4217 readonly R16I: GLenum;
4218 readonly R16UI: GLenum;
4219 readonly R32F: GLenum;
4220 readonly R32I: GLenum;
4221 readonly R32UI: GLenum;
4222 readonly R8: GLenum;
4223 readonly R8I: GLenum;
4224 readonly R8UI: GLenum;
4225 readonly R8_SNORM: GLenum;
4226 readonly RASTERIZER_DISCARD: GLenum;
4227 readonly READ_BUFFER: GLenum;
4228 readonly READ_FRAMEBUFFER: GLenum;
4229 readonly READ_FRAMEBUFFER_BINDING: GLenum;
4230 readonly RED: GLenum;
4231 readonly RED_INTEGER: GLenum;
4232 readonly RENDERBUFFER_SAMPLES: GLenum;
4233 readonly RG: GLenum;
4234 readonly RG16F: GLenum;
4235 readonly RG16I: GLenum;
4236 readonly RG16UI: GLenum;
4237 readonly RG32F: GLenum;
4238 readonly RG32I: GLenum;
4239 readonly RG32UI: GLenum;
4240 readonly RG8: GLenum;
4241 readonly RG8I: GLenum;
4242 readonly RG8UI: GLenum;
4243 readonly RG8_SNORM: GLenum;
4244 readonly RGB10_A2: GLenum;
4245 readonly RGB10_A2UI: GLenum;
4246 readonly RGB16F: GLenum;
4247 readonly RGB16I: GLenum;
4248 readonly RGB16UI: GLenum;
4249 readonly RGB32F: GLenum;
4250 readonly RGB32I: GLenum;
4251 readonly RGB32UI: GLenum;
4252 readonly RGB8: GLenum;
4253 readonly RGB8I: GLenum;
4254 readonly RGB8UI: GLenum;
4255 readonly RGB8_SNORM: GLenum;
4256 readonly RGB9_E5: GLenum;
4257 readonly RGBA16F: GLenum;
4258 readonly RGBA16I: GLenum;
4259 readonly RGBA16UI: GLenum;
4260 readonly RGBA32F: GLenum;
4261 readonly RGBA32I: GLenum;
4262 readonly RGBA32UI: GLenum;
4263 readonly RGBA8: GLenum;
4264 readonly RGBA8I: GLenum;
4265 readonly RGBA8UI: GLenum;
4266 readonly RGBA8_SNORM: GLenum;
4267 readonly RGBA_INTEGER: GLenum;
4268 readonly RGB_INTEGER: GLenum;
4269 readonly RG_INTEGER: GLenum;
4270 readonly SAMPLER_2D_ARRAY: GLenum;
4271 readonly SAMPLER_2D_ARRAY_SHADOW: GLenum;
4272 readonly SAMPLER_2D_SHADOW: GLenum;
4273 readonly SAMPLER_3D: GLenum;
4274 readonly SAMPLER_BINDING: GLenum;
4275 readonly SAMPLER_CUBE_SHADOW: GLenum;
4276 readonly SEPARATE_ATTRIBS: GLenum;
4277 readonly SIGNALED: GLenum;
4278 readonly SIGNED_NORMALIZED: GLenum;
4279 readonly SRGB: GLenum;
4280 readonly SRGB8: GLenum;
4281 readonly SRGB8_ALPHA8: GLenum;
4282 readonly STATIC_COPY: GLenum;
4283 readonly STATIC_READ: GLenum;
4284 readonly STENCIL: GLenum;
4285 readonly STREAM_COPY: GLenum;
4286 readonly STREAM_READ: GLenum;
4287 readonly SYNC_CONDITION: GLenum;
4288 readonly SYNC_FENCE: GLenum;
4289 readonly SYNC_FLAGS: GLenum;
4290 readonly SYNC_FLUSH_COMMANDS_BIT: GLenum;
4291 readonly SYNC_GPU_COMMANDS_COMPLETE: GLenum;
4292 readonly SYNC_STATUS: GLenum;
4293 readonly TEXTURE_2D_ARRAY: GLenum;
4294 readonly TEXTURE_3D: GLenum;
4295 readonly TEXTURE_BASE_LEVEL: GLenum;
4296 readonly TEXTURE_BINDING_2D_ARRAY: GLenum;
4297 readonly TEXTURE_BINDING_3D: GLenum;
4298 readonly TEXTURE_COMPARE_FUNC: GLenum;
4299 readonly TEXTURE_COMPARE_MODE: GLenum;
4300 readonly TEXTURE_IMMUTABLE_FORMAT: GLenum;
4301 readonly TEXTURE_IMMUTABLE_LEVELS: GLenum;
4302 readonly TEXTURE_MAX_LEVEL: GLenum;
4303 readonly TEXTURE_MAX_LOD: GLenum;
4304 readonly TEXTURE_MIN_LOD: GLenum;
4305 readonly TEXTURE_WRAP_R: GLenum;
4306 readonly TIMEOUT_EXPIRED: GLenum;
4307 readonly TIMEOUT_IGNORED: GLint64;
4308 readonly TRANSFORM_FEEDBACK: GLenum;
4309 readonly TRANSFORM_FEEDBACK_ACTIVE: GLenum;
4310 readonly TRANSFORM_FEEDBACK_BINDING: GLenum;
4311 readonly TRANSFORM_FEEDBACK_BUFFER: GLenum;
4312 readonly TRANSFORM_FEEDBACK_BUFFER_BINDING: GLenum;
4313 readonly TRANSFORM_FEEDBACK_BUFFER_MODE: GLenum;
4314 readonly TRANSFORM_FEEDBACK_BUFFER_SIZE: GLenum;
4315 readonly TRANSFORM_FEEDBACK_BUFFER_START: GLenum;
4316 readonly TRANSFORM_FEEDBACK_PAUSED: GLenum;
4317 readonly TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN: GLenum;
4318 readonly TRANSFORM_FEEDBACK_VARYINGS: GLenum;
4319 readonly UNIFORM_ARRAY_STRIDE: GLenum;
4320 readonly UNIFORM_BLOCK_ACTIVE_UNIFORMS: GLenum;
4321 readonly UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES: GLenum;
4322 readonly UNIFORM_BLOCK_BINDING: GLenum;
4323 readonly UNIFORM_BLOCK_DATA_SIZE: GLenum;
4324 readonly UNIFORM_BLOCK_INDEX: GLenum;
4325 readonly UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER: GLenum;
4326 readonly UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER: GLenum;
4327 readonly UNIFORM_BUFFER: GLenum;
4328 readonly UNIFORM_BUFFER_BINDING: GLenum;
4329 readonly UNIFORM_BUFFER_OFFSET_ALIGNMENT: GLenum;
4330 readonly UNIFORM_BUFFER_SIZE: GLenum;
4331 readonly UNIFORM_BUFFER_START: GLenum;
4332 readonly UNIFORM_IS_ROW_MAJOR: GLenum;
4333 readonly UNIFORM_MATRIX_STRIDE: GLenum;
4334 readonly UNIFORM_OFFSET: GLenum;
4335 readonly UNIFORM_SIZE: GLenum;
4336 readonly UNIFORM_TYPE: GLenum;
4337 readonly UNPACK_IMAGE_HEIGHT: GLenum;
4338 readonly UNPACK_ROW_LENGTH: GLenum;
4339 readonly UNPACK_SKIP_IMAGES: GLenum;
4340 readonly UNPACK_SKIP_PIXELS: GLenum;
4341 readonly UNPACK_SKIP_ROWS: GLenum;
4342 readonly UNSIGNALED: GLenum;
4343 readonly UNSIGNED_INT_10F_11F_11F_REV: GLenum;
4344 readonly UNSIGNED_INT_24_8: GLenum;
4345 readonly UNSIGNED_INT_2_10_10_10_REV: GLenum;
4346 readonly UNSIGNED_INT_5_9_9_9_REV: GLenum;
4347 readonly UNSIGNED_INT_SAMPLER_2D: GLenum;
4348 readonly UNSIGNED_INT_SAMPLER_2D_ARRAY: GLenum;
4349 readonly UNSIGNED_INT_SAMPLER_3D: GLenum;
4350 readonly UNSIGNED_INT_SAMPLER_CUBE: GLenum;
4351 readonly UNSIGNED_INT_VEC2: GLenum;
4352 readonly UNSIGNED_INT_VEC3: GLenum;
4353 readonly UNSIGNED_INT_VEC4: GLenum;
4354 readonly UNSIGNED_NORMALIZED: GLenum;
4355 readonly VERTEX_ARRAY_BINDING: GLenum;
4356 readonly VERTEX_ATTRIB_ARRAY_DIVISOR: GLenum;
4357 readonly VERTEX_ATTRIB_ARRAY_INTEGER: GLenum;
4358 readonly WAIT_FAILED: GLenum;
4361 interface WebGL2RenderingContextOverloads {
4362 bufferData(target: GLenum, size: GLsizeiptr, usage: GLenum): void;
4363 bufferData(target: GLenum, srcData: BufferSource | null, usage: GLenum): void;
4364 bufferData(target: GLenum, srcData: ArrayBufferView, usage: GLenum, srcOffset: GLuint, length?: GLuint): void;
4365 bufferSubData(target: GLenum, dstByteOffset: GLintptr, srcData: BufferSource): void;
4366 bufferSubData(target: GLenum, dstByteOffset: GLintptr, srcData: ArrayBufferView, srcOffset: GLuint, length?: GLuint): void;
4367 compressedTexImage2D(target: GLenum, level: GLint, internalformat: GLenum, width: GLsizei, height: GLsizei, border: GLint, imageSize: GLsizei, offset: GLintptr): void;
4368 compressedTexImage2D(target: GLenum, level: GLint, internalformat: GLenum, width: GLsizei, height: GLsizei, border: GLint, srcData: ArrayBufferView, srcOffset?: GLuint, srcLengthOverride?: GLuint): void;
4369 compressedTexSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, imageSize: GLsizei, offset: GLintptr): void;
4370 compressedTexSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, srcData: ArrayBufferView, srcOffset?: GLuint, srcLengthOverride?: GLuint): void;
4371 readPixels(x: GLint, y: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, dstData: ArrayBufferView | null): void;
4372 readPixels(x: GLint, y: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, offset: GLintptr): void;
4373 readPixels(x: GLint, y: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, dstData: ArrayBufferView, dstOffset: GLuint): void;
4374 texImage2D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, border: GLint, format: GLenum, type: GLenum, pixels: ArrayBufferView | null): void;
4375 texImage2D(target: GLenum, level: GLint, internalformat: GLint, format: GLenum, type: GLenum, source: TexImageSource): void;
4376 texImage2D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, border: GLint, format: GLenum, type: GLenum, pboOffset: GLintptr): void;
4377 texImage2D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, border: GLint, format: GLenum, type: GLenum, source: TexImageSource): void;
4378 texImage2D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, border: GLint, format: GLenum, type: GLenum, srcData: ArrayBufferView, srcOffset: GLuint): void;
4379 texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, pixels: ArrayBufferView | null): void;
4380 texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, format: GLenum, type: GLenum, source: TexImageSource): void;
4381 texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, pboOffset: GLintptr): void;
4382 texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, source: TexImageSource): void;
4383 texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, srcData: ArrayBufferView, srcOffset: GLuint): void;
4384 uniform1fv(location: WebGLUniformLocation | null, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void;
4385 uniform1iv(location: WebGLUniformLocation | null, data: Int32List, srcOffset?: GLuint, srcLength?: GLuint): void;
4386 uniform2fv(location: WebGLUniformLocation | null, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void;
4387 uniform2iv(location: WebGLUniformLocation | null, data: Int32List, srcOffset?: GLuint, srcLength?: GLuint): void;
4388 uniform3fv(location: WebGLUniformLocation | null, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void;
4389 uniform3iv(location: WebGLUniformLocation | null, data: Int32List, srcOffset?: GLuint, srcLength?: GLuint): void;
4390 uniform4fv(location: WebGLUniformLocation | null, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void;
4391 uniform4iv(location: WebGLUniformLocation | null, data: Int32List, srcOffset?: GLuint, srcLength?: GLuint): void;
4392 uniformMatrix2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void;
4393 uniformMatrix3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void;
4394 uniformMatrix4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void;
4397 /** Part of the WebGL API and represents the information returned by calling the WebGLRenderingContext.getActiveAttrib() and WebGLRenderingContext.getActiveUniform() methods. */
4398 interface WebGLActiveInfo {
4399 readonly name: string;
4400 readonly size: GLint;
4401 readonly type: GLenum;
4404 declare var WebGLActiveInfo: {
4405 prototype: WebGLActiveInfo;
4406 new(): WebGLActiveInfo;
4409 /** Part of the WebGL API and represents an opaque buffer object storing data such as vertices or colors. */
4410 interface WebGLBuffer extends WebGLObject {
4413 declare var WebGLBuffer: {
4414 prototype: WebGLBuffer;
4418 /** 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. */
4419 interface WebGLContextEvent extends Event {
4420 readonly statusMessage: string;
4423 declare var WebGLContextEvent: {
4424 prototype: WebGLContextEvent;
4425 new(type: string, eventInit?: WebGLContextEventInit): WebGLContextEvent;
4428 /** Part of the WebGL API and represents a collection of buffers that serve as a rendering destination. */
4429 interface WebGLFramebuffer extends WebGLObject {
4432 declare var WebGLFramebuffer: {
4433 prototype: WebGLFramebuffer;
4434 new(): WebGLFramebuffer;
4437 interface WebGLObject {
4440 declare var WebGLObject: {
4441 prototype: WebGLObject;
4445 /** 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). */
4446 interface WebGLProgram extends WebGLObject {
4449 declare var WebGLProgram: {
4450 prototype: WebGLProgram;
4451 new(): WebGLProgram;
4454 interface WebGLQuery extends WebGLObject {
4457 declare var WebGLQuery: {
4458 prototype: WebGLQuery;
4462 /** Part of the WebGL API and represents a buffer that can contain an image, or can be source or target of an rendering operation. */
4463 interface WebGLRenderbuffer extends WebGLObject {
4466 declare var WebGLRenderbuffer: {
4467 prototype: WebGLRenderbuffer;
4468 new(): WebGLRenderbuffer;
4471 /** Provides an interface to the OpenGL ES 2.0 graphics rendering context for the drawing surface of an HTML <canvas> element. */
4472 interface WebGLRenderingContext extends WebGLRenderingContextBase, WebGLRenderingContextOverloads {
4475 declare var WebGLRenderingContext: {
4476 prototype: WebGLRenderingContext;
4477 new(): WebGLRenderingContext;
4478 readonly ACTIVE_ATTRIBUTES: GLenum;
4479 readonly ACTIVE_TEXTURE: GLenum;
4480 readonly ACTIVE_UNIFORMS: GLenum;
4481 readonly ALIASED_LINE_WIDTH_RANGE: GLenum;
4482 readonly ALIASED_POINT_SIZE_RANGE: GLenum;
4483 readonly ALPHA: GLenum;
4484 readonly ALPHA_BITS: GLenum;
4485 readonly ALWAYS: GLenum;
4486 readonly ARRAY_BUFFER: GLenum;
4487 readonly ARRAY_BUFFER_BINDING: GLenum;
4488 readonly ATTACHED_SHADERS: GLenum;
4489 readonly BACK: GLenum;
4490 readonly BLEND: GLenum;
4491 readonly BLEND_COLOR: GLenum;
4492 readonly BLEND_DST_ALPHA: GLenum;
4493 readonly BLEND_DST_RGB: GLenum;
4494 readonly BLEND_EQUATION: GLenum;
4495 readonly BLEND_EQUATION_ALPHA: GLenum;
4496 readonly BLEND_EQUATION_RGB: GLenum;
4497 readonly BLEND_SRC_ALPHA: GLenum;
4498 readonly BLEND_SRC_RGB: GLenum;
4499 readonly BLUE_BITS: GLenum;
4500 readonly BOOL: GLenum;
4501 readonly BOOL_VEC2: GLenum;
4502 readonly BOOL_VEC3: GLenum;
4503 readonly BOOL_VEC4: GLenum;
4504 readonly BROWSER_DEFAULT_WEBGL: GLenum;
4505 readonly BUFFER_SIZE: GLenum;
4506 readonly BUFFER_USAGE: GLenum;
4507 readonly BYTE: GLenum;
4508 readonly CCW: GLenum;
4509 readonly CLAMP_TO_EDGE: GLenum;
4510 readonly COLOR_ATTACHMENT0: GLenum;
4511 readonly COLOR_BUFFER_BIT: GLenum;
4512 readonly COLOR_CLEAR_VALUE: GLenum;
4513 readonly COLOR_WRITEMASK: GLenum;
4514 readonly COMPILE_STATUS: GLenum;
4515 readonly COMPRESSED_TEXTURE_FORMATS: GLenum;
4516 readonly CONSTANT_ALPHA: GLenum;
4517 readonly CONSTANT_COLOR: GLenum;
4518 readonly CONTEXT_LOST_WEBGL: GLenum;
4519 readonly CULL_FACE: GLenum;
4520 readonly CULL_FACE_MODE: GLenum;
4521 readonly CURRENT_PROGRAM: GLenum;
4522 readonly CURRENT_VERTEX_ATTRIB: GLenum;
4523 readonly CW: GLenum;
4524 readonly DECR: GLenum;
4525 readonly DECR_WRAP: GLenum;
4526 readonly DELETE_STATUS: GLenum;
4527 readonly DEPTH_ATTACHMENT: GLenum;
4528 readonly DEPTH_BITS: GLenum;
4529 readonly DEPTH_BUFFER_BIT: GLenum;
4530 readonly DEPTH_CLEAR_VALUE: GLenum;
4531 readonly DEPTH_COMPONENT: GLenum;
4532 readonly DEPTH_COMPONENT16: GLenum;
4533 readonly DEPTH_FUNC: GLenum;
4534 readonly DEPTH_RANGE: GLenum;
4535 readonly DEPTH_STENCIL: GLenum;
4536 readonly DEPTH_STENCIL_ATTACHMENT: GLenum;
4537 readonly DEPTH_TEST: GLenum;
4538 readonly DEPTH_WRITEMASK: GLenum;
4539 readonly DITHER: GLenum;
4540 readonly DONT_CARE: GLenum;
4541 readonly DST_ALPHA: GLenum;
4542 readonly DST_COLOR: GLenum;
4543 readonly DYNAMIC_DRAW: GLenum;
4544 readonly ELEMENT_ARRAY_BUFFER: GLenum;
4545 readonly ELEMENT_ARRAY_BUFFER_BINDING: GLenum;
4546 readonly EQUAL: GLenum;
4547 readonly FASTEST: GLenum;
4548 readonly FLOAT: GLenum;
4549 readonly FLOAT_MAT2: GLenum;
4550 readonly FLOAT_MAT3: GLenum;
4551 readonly FLOAT_MAT4: GLenum;
4552 readonly FLOAT_VEC2: GLenum;
4553 readonly FLOAT_VEC3: GLenum;
4554 readonly FLOAT_VEC4: GLenum;
4555 readonly FRAGMENT_SHADER: GLenum;
4556 readonly FRAMEBUFFER: GLenum;
4557 readonly FRAMEBUFFER_ATTACHMENT_OBJECT_NAME: GLenum;
4558 readonly FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE: GLenum;
4559 readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE: GLenum;
4560 readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL: GLenum;
4561 readonly FRAMEBUFFER_BINDING: GLenum;
4562 readonly FRAMEBUFFER_COMPLETE: GLenum;
4563 readonly FRAMEBUFFER_INCOMPLETE_ATTACHMENT: GLenum;
4564 readonly FRAMEBUFFER_INCOMPLETE_DIMENSIONS: GLenum;
4565 readonly FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT: GLenum;
4566 readonly FRAMEBUFFER_UNSUPPORTED: GLenum;
4567 readonly FRONT: GLenum;
4568 readonly FRONT_AND_BACK: GLenum;
4569 readonly FRONT_FACE: GLenum;
4570 readonly FUNC_ADD: GLenum;
4571 readonly FUNC_REVERSE_SUBTRACT: GLenum;
4572 readonly FUNC_SUBTRACT: GLenum;
4573 readonly GENERATE_MIPMAP_HINT: GLenum;
4574 readonly GEQUAL: GLenum;
4575 readonly GREATER: GLenum;
4576 readonly GREEN_BITS: GLenum;
4577 readonly HIGH_FLOAT: GLenum;
4578 readonly HIGH_INT: GLenum;
4579 readonly IMPLEMENTATION_COLOR_READ_FORMAT: GLenum;
4580 readonly IMPLEMENTATION_COLOR_READ_TYPE: GLenum;
4581 readonly INCR: GLenum;
4582 readonly INCR_WRAP: GLenum;
4583 readonly INT: GLenum;
4584 readonly INT_VEC2: GLenum;
4585 readonly INT_VEC3: GLenum;
4586 readonly INT_VEC4: GLenum;
4587 readonly INVALID_ENUM: GLenum;
4588 readonly INVALID_FRAMEBUFFER_OPERATION: GLenum;
4589 readonly INVALID_OPERATION: GLenum;
4590 readonly INVALID_VALUE: GLenum;
4591 readonly INVERT: GLenum;
4592 readonly KEEP: GLenum;
4593 readonly LEQUAL: GLenum;
4594 readonly LESS: GLenum;
4595 readonly LINEAR: GLenum;
4596 readonly LINEAR_MIPMAP_LINEAR: GLenum;
4597 readonly LINEAR_MIPMAP_NEAREST: GLenum;
4598 readonly LINES: GLenum;
4599 readonly LINE_LOOP: GLenum;
4600 readonly LINE_STRIP: GLenum;
4601 readonly LINE_WIDTH: GLenum;
4602 readonly LINK_STATUS: GLenum;
4603 readonly LOW_FLOAT: GLenum;
4604 readonly LOW_INT: GLenum;
4605 readonly LUMINANCE: GLenum;
4606 readonly LUMINANCE_ALPHA: GLenum;
4607 readonly MAX_COMBINED_TEXTURE_IMAGE_UNITS: GLenum;
4608 readonly MAX_CUBE_MAP_TEXTURE_SIZE: GLenum;
4609 readonly MAX_FRAGMENT_UNIFORM_VECTORS: GLenum;
4610 readonly MAX_RENDERBUFFER_SIZE: GLenum;
4611 readonly MAX_TEXTURE_IMAGE_UNITS: GLenum;
4612 readonly MAX_TEXTURE_SIZE: GLenum;
4613 readonly MAX_VARYING_VECTORS: GLenum;
4614 readonly MAX_VERTEX_ATTRIBS: GLenum;
4615 readonly MAX_VERTEX_TEXTURE_IMAGE_UNITS: GLenum;
4616 readonly MAX_VERTEX_UNIFORM_VECTORS: GLenum;
4617 readonly MAX_VIEWPORT_DIMS: GLenum;
4618 readonly MEDIUM_FLOAT: GLenum;
4619 readonly MEDIUM_INT: GLenum;
4620 readonly MIRRORED_REPEAT: GLenum;
4621 readonly NEAREST: GLenum;
4622 readonly NEAREST_MIPMAP_LINEAR: GLenum;
4623 readonly NEAREST_MIPMAP_NEAREST: GLenum;
4624 readonly NEVER: GLenum;
4625 readonly NICEST: GLenum;
4626 readonly NONE: GLenum;
4627 readonly NOTEQUAL: GLenum;
4628 readonly NO_ERROR: GLenum;
4629 readonly ONE: GLenum;
4630 readonly ONE_MINUS_CONSTANT_ALPHA: GLenum;
4631 readonly ONE_MINUS_CONSTANT_COLOR: GLenum;
4632 readonly ONE_MINUS_DST_ALPHA: GLenum;
4633 readonly ONE_MINUS_DST_COLOR: GLenum;
4634 readonly ONE_MINUS_SRC_ALPHA: GLenum;
4635 readonly ONE_MINUS_SRC_COLOR: GLenum;
4636 readonly OUT_OF_MEMORY: GLenum;
4637 readonly PACK_ALIGNMENT: GLenum;
4638 readonly POINTS: GLenum;
4639 readonly POLYGON_OFFSET_FACTOR: GLenum;
4640 readonly POLYGON_OFFSET_FILL: GLenum;
4641 readonly POLYGON_OFFSET_UNITS: GLenum;
4642 readonly RED_BITS: GLenum;
4643 readonly RENDERBUFFER: GLenum;
4644 readonly RENDERBUFFER_ALPHA_SIZE: GLenum;
4645 readonly RENDERBUFFER_BINDING: GLenum;
4646 readonly RENDERBUFFER_BLUE_SIZE: GLenum;
4647 readonly RENDERBUFFER_DEPTH_SIZE: GLenum;
4648 readonly RENDERBUFFER_GREEN_SIZE: GLenum;
4649 readonly RENDERBUFFER_HEIGHT: GLenum;
4650 readonly RENDERBUFFER_INTERNAL_FORMAT: GLenum;
4651 readonly RENDERBUFFER_RED_SIZE: GLenum;
4652 readonly RENDERBUFFER_STENCIL_SIZE: GLenum;
4653 readonly RENDERBUFFER_WIDTH: GLenum;
4654 readonly RENDERER: GLenum;
4655 readonly REPEAT: GLenum;
4656 readonly REPLACE: GLenum;
4657 readonly RGB: GLenum;
4658 readonly RGB565: GLenum;
4659 readonly RGB5_A1: GLenum;
4660 readonly RGBA: GLenum;
4661 readonly RGBA4: GLenum;
4662 readonly SAMPLER_2D: GLenum;
4663 readonly SAMPLER_CUBE: GLenum;
4664 readonly SAMPLES: GLenum;
4665 readonly SAMPLE_ALPHA_TO_COVERAGE: GLenum;
4666 readonly SAMPLE_BUFFERS: GLenum;
4667 readonly SAMPLE_COVERAGE: GLenum;
4668 readonly SAMPLE_COVERAGE_INVERT: GLenum;
4669 readonly SAMPLE_COVERAGE_VALUE: GLenum;
4670 readonly SCISSOR_BOX: GLenum;
4671 readonly SCISSOR_TEST: GLenum;
4672 readonly SHADER_TYPE: GLenum;
4673 readonly SHADING_LANGUAGE_VERSION: GLenum;
4674 readonly SHORT: GLenum;
4675 readonly SRC_ALPHA: GLenum;
4676 readonly SRC_ALPHA_SATURATE: GLenum;
4677 readonly SRC_COLOR: GLenum;
4678 readonly STATIC_DRAW: GLenum;
4679 readonly STENCIL_ATTACHMENT: GLenum;
4680 readonly STENCIL_BACK_FAIL: GLenum;
4681 readonly STENCIL_BACK_FUNC: GLenum;
4682 readonly STENCIL_BACK_PASS_DEPTH_FAIL: GLenum;
4683 readonly STENCIL_BACK_PASS_DEPTH_PASS: GLenum;
4684 readonly STENCIL_BACK_REF: GLenum;
4685 readonly STENCIL_BACK_VALUE_MASK: GLenum;
4686 readonly STENCIL_BACK_WRITEMASK: GLenum;
4687 readonly STENCIL_BITS: GLenum;
4688 readonly STENCIL_BUFFER_BIT: GLenum;
4689 readonly STENCIL_CLEAR_VALUE: GLenum;
4690 readonly STENCIL_FAIL: GLenum;
4691 readonly STENCIL_FUNC: GLenum;
4692 readonly STENCIL_INDEX8: GLenum;
4693 readonly STENCIL_PASS_DEPTH_FAIL: GLenum;
4694 readonly STENCIL_PASS_DEPTH_PASS: GLenum;
4695 readonly STENCIL_REF: GLenum;
4696 readonly STENCIL_TEST: GLenum;
4697 readonly STENCIL_VALUE_MASK: GLenum;
4698 readonly STENCIL_WRITEMASK: GLenum;
4699 readonly STREAM_DRAW: GLenum;
4700 readonly SUBPIXEL_BITS: GLenum;
4701 readonly TEXTURE: GLenum;
4702 readonly TEXTURE0: GLenum;
4703 readonly TEXTURE1: GLenum;
4704 readonly TEXTURE10: GLenum;
4705 readonly TEXTURE11: GLenum;
4706 readonly TEXTURE12: GLenum;
4707 readonly TEXTURE13: GLenum;
4708 readonly TEXTURE14: GLenum;
4709 readonly TEXTURE15: GLenum;
4710 readonly TEXTURE16: GLenum;
4711 readonly TEXTURE17: GLenum;
4712 readonly TEXTURE18: GLenum;
4713 readonly TEXTURE19: GLenum;
4714 readonly TEXTURE2: GLenum;
4715 readonly TEXTURE20: GLenum;
4716 readonly TEXTURE21: GLenum;
4717 readonly TEXTURE22: GLenum;
4718 readonly TEXTURE23: GLenum;
4719 readonly TEXTURE24: GLenum;
4720 readonly TEXTURE25: GLenum;
4721 readonly TEXTURE26: GLenum;
4722 readonly TEXTURE27: GLenum;
4723 readonly TEXTURE28: GLenum;
4724 readonly TEXTURE29: GLenum;
4725 readonly TEXTURE3: GLenum;
4726 readonly TEXTURE30: GLenum;
4727 readonly TEXTURE31: GLenum;
4728 readonly TEXTURE4: GLenum;
4729 readonly TEXTURE5: GLenum;
4730 readonly TEXTURE6: GLenum;
4731 readonly TEXTURE7: GLenum;
4732 readonly TEXTURE8: GLenum;
4733 readonly TEXTURE9: GLenum;
4734 readonly TEXTURE_2D: GLenum;
4735 readonly TEXTURE_BINDING_2D: GLenum;
4736 readonly TEXTURE_BINDING_CUBE_MAP: GLenum;
4737 readonly TEXTURE_CUBE_MAP: GLenum;
4738 readonly TEXTURE_CUBE_MAP_NEGATIVE_X: GLenum;
4739 readonly TEXTURE_CUBE_MAP_NEGATIVE_Y: GLenum;
4740 readonly TEXTURE_CUBE_MAP_NEGATIVE_Z: GLenum;
4741 readonly TEXTURE_CUBE_MAP_POSITIVE_X: GLenum;
4742 readonly TEXTURE_CUBE_MAP_POSITIVE_Y: GLenum;
4743 readonly TEXTURE_CUBE_MAP_POSITIVE_Z: GLenum;
4744 readonly TEXTURE_MAG_FILTER: GLenum;
4745 readonly TEXTURE_MIN_FILTER: GLenum;
4746 readonly TEXTURE_WRAP_S: GLenum;
4747 readonly TEXTURE_WRAP_T: GLenum;
4748 readonly TRIANGLES: GLenum;
4749 readonly TRIANGLE_FAN: GLenum;
4750 readonly TRIANGLE_STRIP: GLenum;
4751 readonly UNPACK_ALIGNMENT: GLenum;
4752 readonly UNPACK_COLORSPACE_CONVERSION_WEBGL: GLenum;
4753 readonly UNPACK_FLIP_Y_WEBGL: GLenum;
4754 readonly UNPACK_PREMULTIPLY_ALPHA_WEBGL: GLenum;
4755 readonly UNSIGNED_BYTE: GLenum;
4756 readonly UNSIGNED_INT: GLenum;
4757 readonly UNSIGNED_SHORT: GLenum;
4758 readonly UNSIGNED_SHORT_4_4_4_4: GLenum;
4759 readonly UNSIGNED_SHORT_5_5_5_1: GLenum;
4760 readonly UNSIGNED_SHORT_5_6_5: GLenum;
4761 readonly VALIDATE_STATUS: GLenum;
4762 readonly VENDOR: GLenum;
4763 readonly VERSION: GLenum;
4764 readonly VERTEX_ATTRIB_ARRAY_BUFFER_BINDING: GLenum;
4765 readonly VERTEX_ATTRIB_ARRAY_ENABLED: GLenum;
4766 readonly VERTEX_ATTRIB_ARRAY_NORMALIZED: GLenum;
4767 readonly VERTEX_ATTRIB_ARRAY_POINTER: GLenum;
4768 readonly VERTEX_ATTRIB_ARRAY_SIZE: GLenum;
4769 readonly VERTEX_ATTRIB_ARRAY_STRIDE: GLenum;
4770 readonly VERTEX_ATTRIB_ARRAY_TYPE: GLenum;
4771 readonly VERTEX_SHADER: GLenum;
4772 readonly VIEWPORT: GLenum;
4773 readonly ZERO: GLenum;
4776 interface WebGLRenderingContextBase {
4777 readonly canvas: OffscreenCanvas;
4778 readonly drawingBufferHeight: GLsizei;
4779 readonly drawingBufferWidth: GLsizei;
4780 activeTexture(texture: GLenum): void;
4781 attachShader(program: WebGLProgram, shader: WebGLShader): void;
4782 bindAttribLocation(program: WebGLProgram, index: GLuint, name: string): void;
4783 bindBuffer(target: GLenum, buffer: WebGLBuffer | null): void;
4784 bindFramebuffer(target: GLenum, framebuffer: WebGLFramebuffer | null): void;
4785 bindRenderbuffer(target: GLenum, renderbuffer: WebGLRenderbuffer | null): void;
4786 bindTexture(target: GLenum, texture: WebGLTexture | null): void;
4787 blendColor(red: GLclampf, green: GLclampf, blue: GLclampf, alpha: GLclampf): void;
4788 blendEquation(mode: GLenum): void;
4789 blendEquationSeparate(modeRGB: GLenum, modeAlpha: GLenum): void;
4790 blendFunc(sfactor: GLenum, dfactor: GLenum): void;
4791 blendFuncSeparate(srcRGB: GLenum, dstRGB: GLenum, srcAlpha: GLenum, dstAlpha: GLenum): void;
4792 checkFramebufferStatus(target: GLenum): GLenum;
4793 clear(mask: GLbitfield): void;
4794 clearColor(red: GLclampf, green: GLclampf, blue: GLclampf, alpha: GLclampf): void;
4795 clearDepth(depth: GLclampf): void;
4796 clearStencil(s: GLint): void;
4797 colorMask(red: GLboolean, green: GLboolean, blue: GLboolean, alpha: GLboolean): void;
4798 compileShader(shader: WebGLShader): void;
4799 copyTexImage2D(target: GLenum, level: GLint, internalformat: GLenum, x: GLint, y: GLint, width: GLsizei, height: GLsizei, border: GLint): void;
4800 copyTexSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, x: GLint, y: GLint, width: GLsizei, height: GLsizei): void;
4801 createBuffer(): WebGLBuffer | null;
4802 createFramebuffer(): WebGLFramebuffer | null;
4803 createProgram(): WebGLProgram | null;
4804 createRenderbuffer(): WebGLRenderbuffer | null;
4805 createShader(type: GLenum): WebGLShader | null;
4806 createTexture(): WebGLTexture | null;
4807 cullFace(mode: GLenum): void;
4808 deleteBuffer(buffer: WebGLBuffer | null): void;
4809 deleteFramebuffer(framebuffer: WebGLFramebuffer | null): void;
4810 deleteProgram(program: WebGLProgram | null): void;
4811 deleteRenderbuffer(renderbuffer: WebGLRenderbuffer | null): void;
4812 deleteShader(shader: WebGLShader | null): void;
4813 deleteTexture(texture: WebGLTexture | null): void;
4814 depthFunc(func: GLenum): void;
4815 depthMask(flag: GLboolean): void;
4816 depthRange(zNear: GLclampf, zFar: GLclampf): void;
4817 detachShader(program: WebGLProgram, shader: WebGLShader): void;
4818 disable(cap: GLenum): void;
4819 disableVertexAttribArray(index: GLuint): void;
4820 drawArrays(mode: GLenum, first: GLint, count: GLsizei): void;
4821 drawElements(mode: GLenum, count: GLsizei, type: GLenum, offset: GLintptr): void;
4822 enable(cap: GLenum): void;
4823 enableVertexAttribArray(index: GLuint): void;
4826 framebufferRenderbuffer(target: GLenum, attachment: GLenum, renderbuffertarget: GLenum, renderbuffer: WebGLRenderbuffer | null): void;
4827 framebufferTexture2D(target: GLenum, attachment: GLenum, textarget: GLenum, texture: WebGLTexture | null, level: GLint): void;
4828 frontFace(mode: GLenum): void;
4829 generateMipmap(target: GLenum): void;
4830 getActiveAttrib(program: WebGLProgram, index: GLuint): WebGLActiveInfo | null;
4831 getActiveUniform(program: WebGLProgram, index: GLuint): WebGLActiveInfo | null;
4832 getAttachedShaders(program: WebGLProgram): WebGLShader[] | null;
4833 getAttribLocation(program: WebGLProgram, name: string): GLint;
4834 getBufferParameter(target: GLenum, pname: GLenum): any;
4835 getContextAttributes(): WebGLContextAttributes | null;
4837 getExtension(extensionName: "EXT_blend_minmax"): EXT_blend_minmax | null;
4838 getExtension(extensionName: "EXT_texture_filter_anisotropic"): EXT_texture_filter_anisotropic | null;
4839 getExtension(extensionName: "EXT_frag_depth"): EXT_frag_depth | null;
4840 getExtension(extensionName: "EXT_shader_texture_lod"): EXT_shader_texture_lod | null;
4841 getExtension(extensionName: "EXT_sRGB"): EXT_sRGB | null;
4842 getExtension(extensionName: "OES_vertex_array_object"): OES_vertex_array_object | null;
4843 getExtension(extensionName: "WEBGL_color_buffer_float"): WEBGL_color_buffer_float | null;
4844 getExtension(extensionName: "WEBGL_compressed_texture_astc"): WEBGL_compressed_texture_astc | null;
4845 getExtension(extensionName: "WEBGL_compressed_texture_s3tc_srgb"): WEBGL_compressed_texture_s3tc_srgb | null;
4846 getExtension(extensionName: "WEBGL_debug_shaders"): WEBGL_debug_shaders | null;
4847 getExtension(extensionName: "WEBGL_draw_buffers"): WEBGL_draw_buffers | null;
4848 getExtension(extensionName: "WEBGL_lose_context"): WEBGL_lose_context | null;
4849 getExtension(extensionName: "WEBGL_depth_texture"): WEBGL_depth_texture | null;
4850 getExtension(extensionName: "WEBGL_debug_renderer_info"): WEBGL_debug_renderer_info | null;
4851 getExtension(extensionName: "WEBGL_compressed_texture_s3tc"): WEBGL_compressed_texture_s3tc | null;
4852 getExtension(extensionName: "OES_texture_half_float_linear"): OES_texture_half_float_linear | null;
4853 getExtension(extensionName: "OES_texture_half_float"): OES_texture_half_float | null;
4854 getExtension(extensionName: "OES_texture_float_linear"): OES_texture_float_linear | null;
4855 getExtension(extensionName: "OES_texture_float"): OES_texture_float | null;
4856 getExtension(extensionName: "OES_standard_derivatives"): OES_standard_derivatives | null;
4857 getExtension(extensionName: "OES_element_index_uint"): OES_element_index_uint | null;
4858 getExtension(extensionName: "ANGLE_instanced_arrays"): ANGLE_instanced_arrays | null;
4859 getExtension(extensionName: string): any;
4860 getFramebufferAttachmentParameter(target: GLenum, attachment: GLenum, pname: GLenum): any;
4861 getParameter(pname: GLenum): any;
4862 getProgramInfoLog(program: WebGLProgram): string | null;
4863 getProgramParameter(program: WebGLProgram, pname: GLenum): any;
4864 getRenderbufferParameter(target: GLenum, pname: GLenum): any;
4865 getShaderInfoLog(shader: WebGLShader): string | null;
4866 getShaderParameter(shader: WebGLShader, pname: GLenum): any;
4867 getShaderPrecisionFormat(shadertype: GLenum, precisiontype: GLenum): WebGLShaderPrecisionFormat | null;
4868 getShaderSource(shader: WebGLShader): string | null;
4869 getSupportedExtensions(): string[] | null;
4870 getTexParameter(target: GLenum, pname: GLenum): any;
4871 getUniform(program: WebGLProgram, location: WebGLUniformLocation): any;
4872 getUniformLocation(program: WebGLProgram, name: string): WebGLUniformLocation | null;
4873 getVertexAttrib(index: GLuint, pname: GLenum): any;
4874 getVertexAttribOffset(index: GLuint, pname: GLenum): GLintptr;
4875 hint(target: GLenum, mode: GLenum): void;
4876 isBuffer(buffer: WebGLBuffer | null): GLboolean;
4877 isContextLost(): boolean;
4878 isEnabled(cap: GLenum): GLboolean;
4879 isFramebuffer(framebuffer: WebGLFramebuffer | null): GLboolean;
4880 isProgram(program: WebGLProgram | null): GLboolean;
4881 isRenderbuffer(renderbuffer: WebGLRenderbuffer | null): GLboolean;
4882 isShader(shader: WebGLShader | null): GLboolean;
4883 isTexture(texture: WebGLTexture | null): GLboolean;
4884 lineWidth(width: GLfloat): void;
4885 linkProgram(program: WebGLProgram): void;
4886 pixelStorei(pname: GLenum, param: GLint | GLboolean): void;
4887 polygonOffset(factor: GLfloat, units: GLfloat): void;
4888 renderbufferStorage(target: GLenum, internalformat: GLenum, width: GLsizei, height: GLsizei): void;
4889 sampleCoverage(value: GLclampf, invert: GLboolean): void;
4890 scissor(x: GLint, y: GLint, width: GLsizei, height: GLsizei): void;
4891 shaderSource(shader: WebGLShader, source: string): void;
4892 stencilFunc(func: GLenum, ref: GLint, mask: GLuint): void;
4893 stencilFuncSeparate(face: GLenum, func: GLenum, ref: GLint, mask: GLuint): void;
4894 stencilMask(mask: GLuint): void;
4895 stencilMaskSeparate(face: GLenum, mask: GLuint): void;
4896 stencilOp(fail: GLenum, zfail: GLenum, zpass: GLenum): void;
4897 stencilOpSeparate(face: GLenum, fail: GLenum, zfail: GLenum, zpass: GLenum): void;
4898 texParameterf(target: GLenum, pname: GLenum, param: GLfloat): void;
4899 texParameteri(target: GLenum, pname: GLenum, param: GLint): void;
4900 uniform1f(location: WebGLUniformLocation | null, x: GLfloat): void;
4901 uniform1i(location: WebGLUniformLocation | null, x: GLint): void;
4902 uniform2f(location: WebGLUniformLocation | null, x: GLfloat, y: GLfloat): void;
4903 uniform2i(location: WebGLUniformLocation | null, x: GLint, y: GLint): void;
4904 uniform3f(location: WebGLUniformLocation | null, x: GLfloat, y: GLfloat, z: GLfloat): void;
4905 uniform3i(location: WebGLUniformLocation | null, x: GLint, y: GLint, z: GLint): void;
4906 uniform4f(location: WebGLUniformLocation | null, x: GLfloat, y: GLfloat, z: GLfloat, w: GLfloat): void;
4907 uniform4i(location: WebGLUniformLocation | null, x: GLint, y: GLint, z: GLint, w: GLint): void;
4908 useProgram(program: WebGLProgram | null): void;
4909 validateProgram(program: WebGLProgram): void;
4910 vertexAttrib1f(index: GLuint, x: GLfloat): void;
4911 vertexAttrib1fv(index: GLuint, values: Float32List): void;
4912 vertexAttrib2f(index: GLuint, x: GLfloat, y: GLfloat): void;
4913 vertexAttrib2fv(index: GLuint, values: Float32List): void;
4914 vertexAttrib3f(index: GLuint, x: GLfloat, y: GLfloat, z: GLfloat): void;
4915 vertexAttrib3fv(index: GLuint, values: Float32List): void;
4916 vertexAttrib4f(index: GLuint, x: GLfloat, y: GLfloat, z: GLfloat, w: GLfloat): void;
4917 vertexAttrib4fv(index: GLuint, values: Float32List): void;
4918 vertexAttribPointer(index: GLuint, size: GLint, type: GLenum, normalized: GLboolean, stride: GLsizei, offset: GLintptr): void;
4919 viewport(x: GLint, y: GLint, width: GLsizei, height: GLsizei): void;
4920 readonly ACTIVE_ATTRIBUTES: GLenum;
4921 readonly ACTIVE_TEXTURE: GLenum;
4922 readonly ACTIVE_UNIFORMS: GLenum;
4923 readonly ALIASED_LINE_WIDTH_RANGE: GLenum;
4924 readonly ALIASED_POINT_SIZE_RANGE: GLenum;
4925 readonly ALPHA: GLenum;
4926 readonly ALPHA_BITS: GLenum;
4927 readonly ALWAYS: GLenum;
4928 readonly ARRAY_BUFFER: GLenum;
4929 readonly ARRAY_BUFFER_BINDING: GLenum;
4930 readonly ATTACHED_SHADERS: GLenum;
4931 readonly BACK: GLenum;
4932 readonly BLEND: GLenum;
4933 readonly BLEND_COLOR: GLenum;
4934 readonly BLEND_DST_ALPHA: GLenum;
4935 readonly BLEND_DST_RGB: GLenum;
4936 readonly BLEND_EQUATION: GLenum;
4937 readonly BLEND_EQUATION_ALPHA: GLenum;
4938 readonly BLEND_EQUATION_RGB: GLenum;
4939 readonly BLEND_SRC_ALPHA: GLenum;
4940 readonly BLEND_SRC_RGB: GLenum;
4941 readonly BLUE_BITS: GLenum;
4942 readonly BOOL: GLenum;
4943 readonly BOOL_VEC2: GLenum;
4944 readonly BOOL_VEC3: GLenum;
4945 readonly BOOL_VEC4: GLenum;
4946 readonly BROWSER_DEFAULT_WEBGL: GLenum;
4947 readonly BUFFER_SIZE: GLenum;
4948 readonly BUFFER_USAGE: GLenum;
4949 readonly BYTE: GLenum;
4950 readonly CCW: GLenum;
4951 readonly CLAMP_TO_EDGE: GLenum;
4952 readonly COLOR_ATTACHMENT0: GLenum;
4953 readonly COLOR_BUFFER_BIT: GLenum;
4954 readonly COLOR_CLEAR_VALUE: GLenum;
4955 readonly COLOR_WRITEMASK: GLenum;
4956 readonly COMPILE_STATUS: GLenum;
4957 readonly COMPRESSED_TEXTURE_FORMATS: GLenum;
4958 readonly CONSTANT_ALPHA: GLenum;
4959 readonly CONSTANT_COLOR: GLenum;
4960 readonly CONTEXT_LOST_WEBGL: GLenum;
4961 readonly CULL_FACE: GLenum;
4962 readonly CULL_FACE_MODE: GLenum;
4963 readonly CURRENT_PROGRAM: GLenum;
4964 readonly CURRENT_VERTEX_ATTRIB: GLenum;
4965 readonly CW: GLenum;
4966 readonly DECR: GLenum;
4967 readonly DECR_WRAP: GLenum;
4968 readonly DELETE_STATUS: GLenum;
4969 readonly DEPTH_ATTACHMENT: GLenum;
4970 readonly DEPTH_BITS: GLenum;
4971 readonly DEPTH_BUFFER_BIT: GLenum;
4972 readonly DEPTH_CLEAR_VALUE: GLenum;
4973 readonly DEPTH_COMPONENT: GLenum;
4974 readonly DEPTH_COMPONENT16: GLenum;
4975 readonly DEPTH_FUNC: GLenum;
4976 readonly DEPTH_RANGE: GLenum;
4977 readonly DEPTH_STENCIL: GLenum;
4978 readonly DEPTH_STENCIL_ATTACHMENT: GLenum;
4979 readonly DEPTH_TEST: GLenum;
4980 readonly DEPTH_WRITEMASK: GLenum;
4981 readonly DITHER: GLenum;
4982 readonly DONT_CARE: GLenum;
4983 readonly DST_ALPHA: GLenum;
4984 readonly DST_COLOR: GLenum;
4985 readonly DYNAMIC_DRAW: GLenum;
4986 readonly ELEMENT_ARRAY_BUFFER: GLenum;
4987 readonly ELEMENT_ARRAY_BUFFER_BINDING: GLenum;
4988 readonly EQUAL: GLenum;
4989 readonly FASTEST: GLenum;
4990 readonly FLOAT: GLenum;
4991 readonly FLOAT_MAT2: GLenum;
4992 readonly FLOAT_MAT3: GLenum;
4993 readonly FLOAT_MAT4: GLenum;
4994 readonly FLOAT_VEC2: GLenum;
4995 readonly FLOAT_VEC3: GLenum;
4996 readonly FLOAT_VEC4: GLenum;
4997 readonly FRAGMENT_SHADER: GLenum;
4998 readonly FRAMEBUFFER: GLenum;
4999 readonly FRAMEBUFFER_ATTACHMENT_OBJECT_NAME: GLenum;
5000 readonly FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE: GLenum;
5001 readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE: GLenum;
5002 readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL: GLenum;
5003 readonly FRAMEBUFFER_BINDING: GLenum;
5004 readonly FRAMEBUFFER_COMPLETE: GLenum;
5005 readonly FRAMEBUFFER_INCOMPLETE_ATTACHMENT: GLenum;
5006 readonly FRAMEBUFFER_INCOMPLETE_DIMENSIONS: GLenum;
5007 readonly FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT: GLenum;
5008 readonly FRAMEBUFFER_UNSUPPORTED: GLenum;
5009 readonly FRONT: GLenum;
5010 readonly FRONT_AND_BACK: GLenum;
5011 readonly FRONT_FACE: GLenum;
5012 readonly FUNC_ADD: GLenum;
5013 readonly FUNC_REVERSE_SUBTRACT: GLenum;
5014 readonly FUNC_SUBTRACT: GLenum;
5015 readonly GENERATE_MIPMAP_HINT: GLenum;
5016 readonly GEQUAL: GLenum;
5017 readonly GREATER: GLenum;
5018 readonly GREEN_BITS: GLenum;
5019 readonly HIGH_FLOAT: GLenum;
5020 readonly HIGH_INT: GLenum;
5021 readonly IMPLEMENTATION_COLOR_READ_FORMAT: GLenum;
5022 readonly IMPLEMENTATION_COLOR_READ_TYPE: GLenum;
5023 readonly INCR: GLenum;
5024 readonly INCR_WRAP: GLenum;
5025 readonly INT: GLenum;
5026 readonly INT_VEC2: GLenum;
5027 readonly INT_VEC3: GLenum;
5028 readonly INT_VEC4: GLenum;
5029 readonly INVALID_ENUM: GLenum;
5030 readonly INVALID_FRAMEBUFFER_OPERATION: GLenum;
5031 readonly INVALID_OPERATION: GLenum;
5032 readonly INVALID_VALUE: GLenum;
5033 readonly INVERT: GLenum;
5034 readonly KEEP: GLenum;
5035 readonly LEQUAL: GLenum;
5036 readonly LESS: GLenum;
5037 readonly LINEAR: GLenum;
5038 readonly LINEAR_MIPMAP_LINEAR: GLenum;
5039 readonly LINEAR_MIPMAP_NEAREST: GLenum;
5040 readonly LINES: GLenum;
5041 readonly LINE_LOOP: GLenum;
5042 readonly LINE_STRIP: GLenum;
5043 readonly LINE_WIDTH: GLenum;
5044 readonly LINK_STATUS: GLenum;
5045 readonly LOW_FLOAT: GLenum;
5046 readonly LOW_INT: GLenum;
5047 readonly LUMINANCE: GLenum;
5048 readonly LUMINANCE_ALPHA: GLenum;
5049 readonly MAX_COMBINED_TEXTURE_IMAGE_UNITS: GLenum;
5050 readonly MAX_CUBE_MAP_TEXTURE_SIZE: GLenum;
5051 readonly MAX_FRAGMENT_UNIFORM_VECTORS: GLenum;
5052 readonly MAX_RENDERBUFFER_SIZE: GLenum;
5053 readonly MAX_TEXTURE_IMAGE_UNITS: GLenum;
5054 readonly MAX_TEXTURE_SIZE: GLenum;
5055 readonly MAX_VARYING_VECTORS: GLenum;
5056 readonly MAX_VERTEX_ATTRIBS: GLenum;
5057 readonly MAX_VERTEX_TEXTURE_IMAGE_UNITS: GLenum;
5058 readonly MAX_VERTEX_UNIFORM_VECTORS: GLenum;
5059 readonly MAX_VIEWPORT_DIMS: GLenum;
5060 readonly MEDIUM_FLOAT: GLenum;
5061 readonly MEDIUM_INT: GLenum;
5062 readonly MIRRORED_REPEAT: GLenum;
5063 readonly NEAREST: GLenum;
5064 readonly NEAREST_MIPMAP_LINEAR: GLenum;
5065 readonly NEAREST_MIPMAP_NEAREST: GLenum;
5066 readonly NEVER: GLenum;
5067 readonly NICEST: GLenum;
5068 readonly NONE: GLenum;
5069 readonly NOTEQUAL: GLenum;
5070 readonly NO_ERROR: GLenum;
5071 readonly ONE: GLenum;
5072 readonly ONE_MINUS_CONSTANT_ALPHA: GLenum;
5073 readonly ONE_MINUS_CONSTANT_COLOR: GLenum;
5074 readonly ONE_MINUS_DST_ALPHA: GLenum;
5075 readonly ONE_MINUS_DST_COLOR: GLenum;
5076 readonly ONE_MINUS_SRC_ALPHA: GLenum;
5077 readonly ONE_MINUS_SRC_COLOR: GLenum;
5078 readonly OUT_OF_MEMORY: GLenum;
5079 readonly PACK_ALIGNMENT: GLenum;
5080 readonly POINTS: GLenum;
5081 readonly POLYGON_OFFSET_FACTOR: GLenum;
5082 readonly POLYGON_OFFSET_FILL: GLenum;
5083 readonly POLYGON_OFFSET_UNITS: GLenum;
5084 readonly RED_BITS: GLenum;
5085 readonly RENDERBUFFER: GLenum;
5086 readonly RENDERBUFFER_ALPHA_SIZE: GLenum;
5087 readonly RENDERBUFFER_BINDING: GLenum;
5088 readonly RENDERBUFFER_BLUE_SIZE: GLenum;
5089 readonly RENDERBUFFER_DEPTH_SIZE: GLenum;
5090 readonly RENDERBUFFER_GREEN_SIZE: GLenum;
5091 readonly RENDERBUFFER_HEIGHT: GLenum;
5092 readonly RENDERBUFFER_INTERNAL_FORMAT: GLenum;
5093 readonly RENDERBUFFER_RED_SIZE: GLenum;
5094 readonly RENDERBUFFER_STENCIL_SIZE: GLenum;
5095 readonly RENDERBUFFER_WIDTH: GLenum;
5096 readonly RENDERER: GLenum;
5097 readonly REPEAT: GLenum;
5098 readonly REPLACE: GLenum;
5099 readonly RGB: GLenum;
5100 readonly RGB565: GLenum;
5101 readonly RGB5_A1: GLenum;
5102 readonly RGBA: GLenum;
5103 readonly RGBA4: GLenum;
5104 readonly SAMPLER_2D: GLenum;
5105 readonly SAMPLER_CUBE: GLenum;
5106 readonly SAMPLES: GLenum;
5107 readonly SAMPLE_ALPHA_TO_COVERAGE: GLenum;
5108 readonly SAMPLE_BUFFERS: GLenum;
5109 readonly SAMPLE_COVERAGE: GLenum;
5110 readonly SAMPLE_COVERAGE_INVERT: GLenum;
5111 readonly SAMPLE_COVERAGE_VALUE: GLenum;
5112 readonly SCISSOR_BOX: GLenum;
5113 readonly SCISSOR_TEST: GLenum;
5114 readonly SHADER_TYPE: GLenum;
5115 readonly SHADING_LANGUAGE_VERSION: GLenum;
5116 readonly SHORT: GLenum;
5117 readonly SRC_ALPHA: GLenum;
5118 readonly SRC_ALPHA_SATURATE: GLenum;
5119 readonly SRC_COLOR: GLenum;
5120 readonly STATIC_DRAW: GLenum;
5121 readonly STENCIL_ATTACHMENT: GLenum;
5122 readonly STENCIL_BACK_FAIL: GLenum;
5123 readonly STENCIL_BACK_FUNC: GLenum;
5124 readonly STENCIL_BACK_PASS_DEPTH_FAIL: GLenum;
5125 readonly STENCIL_BACK_PASS_DEPTH_PASS: GLenum;
5126 readonly STENCIL_BACK_REF: GLenum;
5127 readonly STENCIL_BACK_VALUE_MASK: GLenum;
5128 readonly STENCIL_BACK_WRITEMASK: GLenum;
5129 readonly STENCIL_BITS: GLenum;
5130 readonly STENCIL_BUFFER_BIT: GLenum;
5131 readonly STENCIL_CLEAR_VALUE: GLenum;
5132 readonly STENCIL_FAIL: GLenum;
5133 readonly STENCIL_FUNC: GLenum;
5134 readonly STENCIL_INDEX8: GLenum;
5135 readonly STENCIL_PASS_DEPTH_FAIL: GLenum;
5136 readonly STENCIL_PASS_DEPTH_PASS: GLenum;
5137 readonly STENCIL_REF: GLenum;
5138 readonly STENCIL_TEST: GLenum;
5139 readonly STENCIL_VALUE_MASK: GLenum;
5140 readonly STENCIL_WRITEMASK: GLenum;
5141 readonly STREAM_DRAW: GLenum;
5142 readonly SUBPIXEL_BITS: GLenum;
5143 readonly TEXTURE: GLenum;
5144 readonly TEXTURE0: GLenum;
5145 readonly TEXTURE1: GLenum;
5146 readonly TEXTURE10: GLenum;
5147 readonly TEXTURE11: GLenum;
5148 readonly TEXTURE12: GLenum;
5149 readonly TEXTURE13: GLenum;
5150 readonly TEXTURE14: GLenum;
5151 readonly TEXTURE15: GLenum;
5152 readonly TEXTURE16: GLenum;
5153 readonly TEXTURE17: GLenum;
5154 readonly TEXTURE18: GLenum;
5155 readonly TEXTURE19: GLenum;
5156 readonly TEXTURE2: GLenum;
5157 readonly TEXTURE20: GLenum;
5158 readonly TEXTURE21: GLenum;
5159 readonly TEXTURE22: GLenum;
5160 readonly TEXTURE23: GLenum;
5161 readonly TEXTURE24: GLenum;
5162 readonly TEXTURE25: GLenum;
5163 readonly TEXTURE26: GLenum;
5164 readonly TEXTURE27: GLenum;
5165 readonly TEXTURE28: GLenum;
5166 readonly TEXTURE29: GLenum;
5167 readonly TEXTURE3: GLenum;
5168 readonly TEXTURE30: GLenum;
5169 readonly TEXTURE31: GLenum;
5170 readonly TEXTURE4: GLenum;
5171 readonly TEXTURE5: GLenum;
5172 readonly TEXTURE6: GLenum;
5173 readonly TEXTURE7: GLenum;
5174 readonly TEXTURE8: GLenum;
5175 readonly TEXTURE9: GLenum;
5176 readonly TEXTURE_2D: GLenum;
5177 readonly TEXTURE_BINDING_2D: GLenum;
5178 readonly TEXTURE_BINDING_CUBE_MAP: GLenum;
5179 readonly TEXTURE_CUBE_MAP: GLenum;
5180 readonly TEXTURE_CUBE_MAP_NEGATIVE_X: GLenum;
5181 readonly TEXTURE_CUBE_MAP_NEGATIVE_Y: GLenum;
5182 readonly TEXTURE_CUBE_MAP_NEGATIVE_Z: GLenum;
5183 readonly TEXTURE_CUBE_MAP_POSITIVE_X: GLenum;
5184 readonly TEXTURE_CUBE_MAP_POSITIVE_Y: GLenum;
5185 readonly TEXTURE_CUBE_MAP_POSITIVE_Z: GLenum;
5186 readonly TEXTURE_MAG_FILTER: GLenum;
5187 readonly TEXTURE_MIN_FILTER: GLenum;
5188 readonly TEXTURE_WRAP_S: GLenum;
5189 readonly TEXTURE_WRAP_T: GLenum;
5190 readonly TRIANGLES: GLenum;
5191 readonly TRIANGLE_FAN: GLenum;
5192 readonly TRIANGLE_STRIP: GLenum;
5193 readonly UNPACK_ALIGNMENT: GLenum;
5194 readonly UNPACK_COLORSPACE_CONVERSION_WEBGL: GLenum;
5195 readonly UNPACK_FLIP_Y_WEBGL: GLenum;
5196 readonly UNPACK_PREMULTIPLY_ALPHA_WEBGL: GLenum;
5197 readonly UNSIGNED_BYTE: GLenum;
5198 readonly UNSIGNED_INT: GLenum;
5199 readonly UNSIGNED_SHORT: GLenum;
5200 readonly UNSIGNED_SHORT_4_4_4_4: GLenum;
5201 readonly UNSIGNED_SHORT_5_5_5_1: GLenum;
5202 readonly UNSIGNED_SHORT_5_6_5: GLenum;
5203 readonly VALIDATE_STATUS: GLenum;
5204 readonly VENDOR: GLenum;
5205 readonly VERSION: GLenum;
5206 readonly VERTEX_ATTRIB_ARRAY_BUFFER_BINDING: GLenum;
5207 readonly VERTEX_ATTRIB_ARRAY_ENABLED: GLenum;
5208 readonly VERTEX_ATTRIB_ARRAY_NORMALIZED: GLenum;
5209 readonly VERTEX_ATTRIB_ARRAY_POINTER: GLenum;
5210 readonly VERTEX_ATTRIB_ARRAY_SIZE: GLenum;
5211 readonly VERTEX_ATTRIB_ARRAY_STRIDE: GLenum;
5212 readonly VERTEX_ATTRIB_ARRAY_TYPE: GLenum;
5213 readonly VERTEX_SHADER: GLenum;
5214 readonly VIEWPORT: GLenum;
5215 readonly ZERO: GLenum;
5218 interface WebGLRenderingContextOverloads {
5219 bufferData(target: GLenum, size: GLsizeiptr, usage: GLenum): void;
5220 bufferData(target: GLenum, data: BufferSource | null, usage: GLenum): void;
5221 bufferSubData(target: GLenum, offset: GLintptr, data: BufferSource): void;
5222 compressedTexImage2D(target: GLenum, level: GLint, internalformat: GLenum, width: GLsizei, height: GLsizei, border: GLint, data: ArrayBufferView): void;
5223 compressedTexSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, data: ArrayBufferView): void;
5224 readPixels(x: GLint, y: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, pixels: ArrayBufferView | null): void;
5225 texImage2D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, border: GLint, format: GLenum, type: GLenum, pixels: ArrayBufferView | null): void;
5226 texImage2D(target: GLenum, level: GLint, internalformat: GLint, format: GLenum, type: GLenum, source: TexImageSource): void;
5227 texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, pixels: ArrayBufferView | null): void;
5228 texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, format: GLenum, type: GLenum, source: TexImageSource): void;
5229 uniform1fv(location: WebGLUniformLocation | null, v: Float32List): void;
5230 uniform1iv(location: WebGLUniformLocation | null, v: Int32List): void;
5231 uniform2fv(location: WebGLUniformLocation | null, v: Float32List): void;
5232 uniform2iv(location: WebGLUniformLocation | null, v: Int32List): void;
5233 uniform3fv(location: WebGLUniformLocation | null, v: Float32List): void;
5234 uniform3iv(location: WebGLUniformLocation | null, v: Int32List): void;
5235 uniform4fv(location: WebGLUniformLocation | null, v: Float32List): void;
5236 uniform4iv(location: WebGLUniformLocation | null, v: Int32List): void;
5237 uniformMatrix2fv(location: WebGLUniformLocation | null, transpose: GLboolean, value: Float32List): void;
5238 uniformMatrix3fv(location: WebGLUniformLocation | null, transpose: GLboolean, value: Float32List): void;
5239 uniformMatrix4fv(location: WebGLUniformLocation | null, transpose: GLboolean, value: Float32List): void;
5242 interface WebGLSampler extends WebGLObject {
5245 declare var WebGLSampler: {
5246 prototype: WebGLSampler;
5247 new(): WebGLSampler;
5250 /** 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. */
5251 interface WebGLShader extends WebGLObject {
5254 declare var WebGLShader: {
5255 prototype: WebGLShader;
5259 /** Part of the WebGL API and represents the information returned by calling the WebGLRenderingContext.getShaderPrecisionFormat() method. */
5260 interface WebGLShaderPrecisionFormat {
5261 readonly precision: GLint;
5262 readonly rangeMax: GLint;
5263 readonly rangeMin: GLint;
5266 declare var WebGLShaderPrecisionFormat: {
5267 prototype: WebGLShaderPrecisionFormat;
5268 new(): WebGLShaderPrecisionFormat;
5271 interface WebGLSync extends WebGLObject {
5274 declare var WebGLSync: {
5275 prototype: WebGLSync;
5279 /** Part of the WebGL API and represents an opaque texture object providing storage and state for texturing operations. */
5280 interface WebGLTexture extends WebGLObject {
5283 declare var WebGLTexture: {
5284 prototype: WebGLTexture;
5285 new(): WebGLTexture;
5288 interface WebGLTransformFeedback extends WebGLObject {
5291 declare var WebGLTransformFeedback: {
5292 prototype: WebGLTransformFeedback;
5293 new(): WebGLTransformFeedback;
5296 /** Part of the WebGL API and represents the location of a uniform variable in a shader program. */
5297 interface WebGLUniformLocation {
5300 declare var WebGLUniformLocation: {
5301 prototype: WebGLUniformLocation;
5302 new(): WebGLUniformLocation;
5305 interface WebGLVertexArrayObject extends WebGLObject {
5308 declare var WebGLVertexArrayObject: {
5309 prototype: WebGLVertexArrayObject;
5310 new(): WebGLVertexArrayObject;
5313 interface WebGLVertexArrayObjectOES extends WebGLObject {
5316 interface WebSocketEventMap {
5317 "close": CloseEvent;
5319 "message": MessageEvent;
5323 /** Provides the API for creating and managing a WebSocket connection to a server, as well as for sending and receiving data on the connection. */
5324 interface WebSocket extends EventTarget {
5326 * Returns a string that indicates how binary data from the WebSocket object is exposed to scripts:
5328 * Can be set, to change how binary data is returned. The default is "blob".
5330 binaryType: BinaryType;
5332 * 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.
5334 * 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.)
5336 readonly bufferedAmount: number;
5338 * Returns the extensions selected by the server, if any.
5340 readonly extensions: string;
5341 onclose: ((this: WebSocket, ev: CloseEvent) => any) | null;
5342 onerror: ((this: WebSocket, ev: Event) => any) | null;
5343 onmessage: ((this: WebSocket, ev: MessageEvent) => any) | null;
5344 onopen: ((this: WebSocket, ev: Event) => any) | null;
5346 * 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.
5348 readonly protocol: string;
5350 * Returns the state of the WebSocket object's connection. It can have the values described below.
5352 readonly readyState: number;
5354 * Returns the URL that was used to establish the WebSocket connection.
5356 readonly url: string;
5358 * Closes the WebSocket connection, optionally using code as the the WebSocket connection close code and reason as the the WebSocket connection close reason.
5360 close(code?: number, reason?: string): void;
5362 * Transmits data using the WebSocket connection. data can be a string, a Blob, an ArrayBuffer, or an ArrayBufferView.
5364 send(data: string | ArrayBufferLike | Blob | ArrayBufferView): void;
5365 readonly CLOSED: number;
5366 readonly CLOSING: number;
5367 readonly CONNECTING: number;
5368 readonly OPEN: number;
5369 addEventListener<K extends keyof WebSocketEventMap>(type: K, listener: (this: WebSocket, ev: WebSocketEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
5370 addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
5371 removeEventListener<K extends keyof WebSocketEventMap>(type: K, listener: (this: WebSocket, ev: WebSocketEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
5372 removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
5375 declare var WebSocket: {
5376 prototype: WebSocket;
5377 new(url: string, protocols?: string | string[]): WebSocket;
5378 readonly CLOSED: number;
5379 readonly CLOSING: number;
5380 readonly CONNECTING: number;
5381 readonly OPEN: number;
5384 /** 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. */
5385 interface WindowClient extends Client {
5386 readonly ancestorOrigins: ReadonlyArray<string>;
5387 readonly focused: boolean;
5388 readonly visibilityState: VisibilityState;
5389 focus(): Promise<WindowClient>;
5390 navigate(url: string): Promise<WindowClient | null>;
5393 declare var WindowClient: {
5394 prototype: WindowClient;
5395 new(): WindowClient;
5398 interface WindowOrWorkerGlobalScope {
5399 readonly caches: CacheStorage;
5400 readonly crypto: Crypto;
5401 readonly indexedDB: IDBFactory;
5402 readonly isSecureContext: boolean;
5403 readonly origin: string;
5404 readonly performance: Performance;
5405 atob(data: string): string;
5406 btoa(data: string): string;
5407 clearInterval(handle?: number): void;
5408 clearTimeout(handle?: number): void;
5409 createImageBitmap(image: ImageBitmapSource, options?: ImageBitmapOptions): Promise<ImageBitmap>;
5410 createImageBitmap(image: ImageBitmapSource, sx: number, sy: number, sw: number, sh: number, options?: ImageBitmapOptions): Promise<ImageBitmap>;
5411 fetch(input: RequestInfo, init?: RequestInit): Promise<Response>;
5412 queueMicrotask(callback: VoidFunction): void;
5413 setInterval(handler: TimerHandler, timeout?: number, ...arguments: any[]): number;
5414 setTimeout(handler: TimerHandler, timeout?: number, ...arguments: any[]): number;
5417 interface WorkerEventMap extends AbstractWorkerEventMap {
5418 "message": MessageEvent;
5419 "messageerror": MessageEvent;
5422 /** 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. */
5423 interface Worker extends EventTarget, AbstractWorker {
5424 onmessage: ((this: Worker, ev: MessageEvent) => any) | null;
5425 onmessageerror: ((this: Worker, ev: MessageEvent) => any) | null;
5427 * 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.
5429 postMessage(message: any, transfer: Transferable[]): void;
5430 postMessage(message: any, options?: PostMessageOptions): void;
5432 * Aborts worker's associated global environment.
5435 addEventListener<K extends keyof WorkerEventMap>(type: K, listener: (this: Worker, ev: WorkerEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
5436 addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
5437 removeEventListener<K extends keyof WorkerEventMap>(type: K, listener: (this: Worker, ev: WorkerEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
5438 removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
5441 declare var Worker: {
5443 new(stringUrl: string | URL, options?: WorkerOptions): Worker;
5446 interface WorkerGlobalScopeEventMap {
5447 "error": ErrorEvent;
5448 "languagechange": Event;
5451 "rejectionhandled": PromiseRejectionEvent;
5452 "unhandledrejection": PromiseRejectionEvent;
5455 /** 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. */
5456 interface WorkerGlobalScope extends EventTarget, WindowOrWorkerGlobalScope {
5458 * Returns workerGlobal's WorkerLocation object.
5460 readonly location: WorkerLocation;
5461 readonly navigator: WorkerNavigator;
5462 onerror: ((this: WorkerGlobalScope, ev: ErrorEvent) => any) | null;
5463 onlanguagechange: ((this: WorkerGlobalScope, ev: Event) => any) | null;
5464 onoffline: ((this: WorkerGlobalScope, ev: Event) => any) | null;
5465 ononline: ((this: WorkerGlobalScope, ev: Event) => any) | null;
5466 onrejectionhandled: ((this: WorkerGlobalScope, ev: PromiseRejectionEvent) => any) | null;
5467 onunhandledrejection: ((this: WorkerGlobalScope, ev: PromiseRejectionEvent) => any) | null;
5469 * Returns workerGlobal.
5471 readonly self: WorkerGlobalScope & typeof globalThis;
5473 * 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).
5475 importScripts(...urls: string[]): void;
5476 addEventListener<K extends keyof WorkerGlobalScopeEventMap>(type: K, listener: (this: WorkerGlobalScope, ev: WorkerGlobalScopeEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
5477 addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
5478 removeEventListener<K extends keyof WorkerGlobalScopeEventMap>(type: K, listener: (this: WorkerGlobalScope, ev: WorkerGlobalScopeEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
5479 removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
5482 declare var WorkerGlobalScope: {
5483 prototype: WorkerGlobalScope;
5484 new(): WorkerGlobalScope;
5487 /** 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. */
5488 interface WorkerLocation {
5489 readonly hash: string;
5490 readonly host: string;
5491 readonly hostname: string;
5492 readonly href: string;
5494 readonly origin: string;
5495 readonly pathname: string;
5496 readonly port: string;
5497 readonly protocol: string;
5498 readonly search: string;
5501 declare var WorkerLocation: {
5502 prototype: WorkerLocation;
5503 new(): WorkerLocation;
5506 /** 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. */
5507 interface WorkerNavigator extends NavigatorConcurrentHardware, NavigatorID, NavigatorLanguage, NavigatorOnLine, NavigatorStorage {
5508 readonly permissions: Permissions;
5509 readonly serviceWorker: ServiceWorkerContainer;
5512 declare var WorkerNavigator: {
5513 prototype: WorkerNavigator;
5514 new(): WorkerNavigator;
5517 /** 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. */
5518 interface WritableStream<W = any> {
5519 readonly locked: boolean;
5520 abort(reason?: any): Promise<void>;
5521 getWriter(): WritableStreamDefaultWriter<W>;
5524 declare var WritableStream: {
5525 prototype: WritableStream;
5526 new<W = any>(underlyingSink?: UnderlyingSink<W>, strategy?: QueuingStrategy<W>): WritableStream<W>;
5529 /** 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. */
5530 interface WritableStreamDefaultController {
5531 error(e?: any): void;
5534 declare var WritableStreamDefaultController: {
5535 prototype: WritableStreamDefaultController;
5536 new(): WritableStreamDefaultController;
5539 /** 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. */
5540 interface WritableStreamDefaultWriter<W = any> {
5541 readonly closed: Promise<undefined>;
5542 readonly desiredSize: number | null;
5543 readonly ready: Promise<undefined>;
5544 abort(reason?: any): Promise<void>;
5545 close(): Promise<void>;
5546 releaseLock(): void;
5547 write(chunk: W): Promise<void>;
5550 declare var WritableStreamDefaultWriter: {
5551 prototype: WritableStreamDefaultWriter;
5552 new<W = any>(stream: WritableStream<W>): WritableStreamDefaultWriter<W>;
5555 interface XMLHttpRequestEventMap extends XMLHttpRequestEventTargetEventMap {
5556 "readystatechange": Event;
5559 /** 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. */
5560 interface XMLHttpRequest extends XMLHttpRequestEventTarget {
5561 onreadystatechange: ((this: XMLHttpRequest, ev: Event) => any) | null;
5563 * Returns client's state.
5565 readonly readyState: number;
5567 * Returns the response's body.
5569 readonly response: any;
5571 * Returns the text response.
5573 * Throws an "InvalidStateError" DOMException if responseType is not the empty string or "text".
5575 readonly responseText: string;
5577 * Returns the response type.
5579 * Can be set to change the response type. Values are: the empty string (default), "arraybuffer", "blob", "document", "json", and "text".
5581 * When set: setting to "document" is ignored if current global object is not a Window object.
5583 * When set: throws an "InvalidStateError" DOMException if state is loading or done.
5585 * When set: throws an "InvalidAccessError" DOMException if the synchronous flag is set and current global object is a Window object.
5587 responseType: XMLHttpRequestResponseType;
5588 readonly responseURL: string;
5589 readonly status: number;
5590 readonly statusText: string;
5592 * 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).
5594 * When set: throws an "InvalidAccessError" DOMException if the synchronous flag is set and current global object is a Window object.
5598 * Returns the associated XMLHttpRequestUpload object. It can be used to gather transmission information when data is transferred to a server.
5600 readonly upload: XMLHttpRequestUpload;
5602 * 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.
5604 * When set: throws an "InvalidStateError" DOMException if state is not unsent or opened, or if the send() flag is set.
5606 withCredentials: boolean;
5608 * Cancels any network activity.
5611 getAllResponseHeaders(): string;
5612 getResponseHeader(name: string): string | null;
5614 * Sets the request method, request URL, and synchronous flag.
5616 * Throws a "SyntaxError" DOMException if either method is not a valid HTTP method or url cannot be parsed.
5618 * Throws a "SecurityError" DOMException if method is a case-insensitive match for `CONNECT`, `TRACE`, or `TRACK`.
5620 * 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.
5622 open(method: string, url: string): void;
5623 open(method: string, url: string, async: boolean, username?: string | null, password?: string | null): void;
5625 * Acts as if the `Content-Type` header value for response is mime. (It does not actually change the header though.)
5627 * Throws an "InvalidStateError" DOMException if state is loading or done.
5629 overrideMimeType(mime: string): void;
5631 * Initiates the request. The body argument provides the request body, if any, and is ignored if the request method is GET or HEAD.
5633 * Throws an "InvalidStateError" DOMException if either state is not opened or the send() flag is set.
5635 send(body?: BodyInit | null): void;
5637 * Combines a header in author request headers.
5639 * Throws an "InvalidStateError" DOMException if either state is not opened or the send() flag is set.
5641 * Throws a "SyntaxError" DOMException if name is not a header name or if value is not a header value.
5643 setRequestHeader(name: string, value: string): void;
5644 readonly DONE: number;
5645 readonly HEADERS_RECEIVED: number;
5646 readonly LOADING: number;
5647 readonly OPENED: number;
5648 readonly UNSENT: number;
5649 addEventListener<K extends keyof XMLHttpRequestEventMap>(type: K, listener: (this: XMLHttpRequest, ev: XMLHttpRequestEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
5650 addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
5651 removeEventListener<K extends keyof XMLHttpRequestEventMap>(type: K, listener: (this: XMLHttpRequest, ev: XMLHttpRequestEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
5652 removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
5655 declare var XMLHttpRequest: {
5656 prototype: XMLHttpRequest;
5657 new(): XMLHttpRequest;
5658 readonly DONE: number;
5659 readonly HEADERS_RECEIVED: number;
5660 readonly LOADING: number;
5661 readonly OPENED: number;
5662 readonly UNSENT: number;
5665 interface XMLHttpRequestEventTargetEventMap {
5666 "abort": ProgressEvent<XMLHttpRequestEventTarget>;
5667 "error": ProgressEvent<XMLHttpRequestEventTarget>;
5668 "load": ProgressEvent<XMLHttpRequestEventTarget>;
5669 "loadend": ProgressEvent<XMLHttpRequestEventTarget>;
5670 "loadstart": ProgressEvent<XMLHttpRequestEventTarget>;
5671 "progress": ProgressEvent<XMLHttpRequestEventTarget>;
5672 "timeout": ProgressEvent<XMLHttpRequestEventTarget>;
5675 interface XMLHttpRequestEventTarget extends EventTarget {
5676 onabort: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null;
5677 onerror: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null;
5678 onload: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null;
5679 onloadend: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null;
5680 onloadstart: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null;
5681 onprogress: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null;
5682 ontimeout: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null;
5683 addEventListener<K extends keyof XMLHttpRequestEventTargetEventMap>(type: K, listener: (this: XMLHttpRequestEventTarget, ev: XMLHttpRequestEventTargetEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
5684 addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
5685 removeEventListener<K extends keyof XMLHttpRequestEventTargetEventMap>(type: K, listener: (this: XMLHttpRequestEventTarget, ev: XMLHttpRequestEventTargetEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
5686 removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
5689 declare var XMLHttpRequestEventTarget: {
5690 prototype: XMLHttpRequestEventTarget;
5691 new(): XMLHttpRequestEventTarget;
5694 interface XMLHttpRequestUpload extends XMLHttpRequestEventTarget {
5695 addEventListener<K extends keyof XMLHttpRequestEventTargetEventMap>(type: K, listener: (this: XMLHttpRequestUpload, ev: XMLHttpRequestEventTargetEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
5696 addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
5697 removeEventListener<K extends keyof XMLHttpRequestEventTargetEventMap>(type: K, listener: (this: XMLHttpRequestUpload, ev: XMLHttpRequestEventTargetEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
5698 removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
5701 declare var XMLHttpRequestUpload: {
5702 prototype: XMLHttpRequestUpload;
5703 new(): XMLHttpRequestUpload;
5706 declare type EventListenerOrEventListenerObject = EventListener | EventListenerObject;
5710 assert(condition?: boolean, ...data: any[]): void;
5712 count(label?: string): void;
5713 countReset(label?: string): void;
5714 debug(...data: any[]): void;
5715 dir(item?: any, options?: any): void;
5716 dirxml(...data: any[]): void;
5717 error(...data: any[]): void;
5718 exception(message?: string, ...optionalParams: any[]): void;
5719 group(...data: any[]): void;
5720 groupCollapsed(...data: any[]): void;
5722 info(...data: any[]): void;
5723 log(...data: any[]): void;
5724 table(tabularData?: any, properties?: string[]): void;
5725 time(label?: string): void;
5726 timeEnd(label?: string): void;
5727 timeLog(label?: string, ...data: any[]): void;
5728 timeStamp(label?: string): void;
5729 trace(...data: any[]): void;
5730 warn(...data: any[]): void;
5733 declare var console: Console;
5735 declare namespace WebAssembly {
5743 new(descriptor: GlobalDescriptor, v?: any): Global;
5746 interface Instance {
5747 readonly exports: Exports;
5751 prototype: Instance;
5752 new(module: Module, importObject?: Imports): Instance;
5756 readonly buffer: ArrayBuffer;
5757 grow(delta: number): number;
5762 new(descriptor: MemoryDescriptor): Memory;
5770 new(bytes: BufferSource): Module;
5771 customSections(moduleObject: Module, sectionName: string): ArrayBuffer[];
5772 exports(moduleObject: Module): ModuleExportDescriptor[];
5773 imports(moduleObject: Module): ModuleImportDescriptor[];
5777 readonly length: number;
5778 get(index: number): Function | null;
5779 grow(delta: number): number;
5780 set(index: number, value: Function | null): void;
5785 new(descriptor: TableDescriptor): Table;
5788 interface GlobalDescriptor {
5793 interface MemoryDescriptor {
5798 interface ModuleExportDescriptor {
5799 kind: ImportExportKind;
5803 interface ModuleImportDescriptor {
5804 kind: ImportExportKind;
5809 interface TableDescriptor {
5815 interface WebAssemblyInstantiatedSource {
5820 type ImportExportKind = "function" | "global" | "memory" | "table";
5821 type TableKind = "anyfunc";
5822 type ValueType = "f32" | "f64" | "i32" | "i64";
5823 type ExportValue = Function | Global | Memory | Table;
5824 type Exports = Record<string, ExportValue>;
5825 type ImportValue = ExportValue | number;
5826 type ModuleImports = Record<string, ImportValue>;
5827 type Imports = Record<string, ModuleImports>;
5828 function compile(bytes: BufferSource): Promise<Module>;
5829 function compileStreaming(source: Response | Promise<Response>): Promise<Module>;
5830 function instantiate(bytes: BufferSource, importObject?: Imports): Promise<WebAssemblyInstantiatedSource>;
5831 function instantiate(moduleObject: Module, importObject?: Imports): Promise<Instance>;
5832 function instantiateStreaming(response: Response | PromiseLike<Response>, importObject?: Imports): Promise<WebAssemblyInstantiatedSource>;
5833 function validate(bytes: BufferSource): boolean;
5836 interface FrameRequestCallback {
5837 (time: number): void;
5840 interface OnErrorEventHandlerNonNull {
5841 (event: Event | string, source?: string, lineno?: number, colno?: number, error?: Error): any;
5844 interface PerformanceObserverCallback {
5845 (entries: PerformanceObserverEntryList, observer: PerformanceObserver): void;
5848 interface QueuingStrategySize<T = any> {
5852 interface TransformerFlushCallback<O> {
5853 (controller: TransformStreamDefaultController<O>): void | PromiseLike<void>;
5856 interface TransformerStartCallback<O> {
5857 (controller: TransformStreamDefaultController<O>): void | PromiseLike<void>;
5860 interface TransformerTransformCallback<I, O> {
5861 (chunk: I, controller: TransformStreamDefaultController<O>): void | PromiseLike<void>;
5864 interface UnderlyingSinkAbortCallback {
5865 (reason: any): void | PromiseLike<void>;
5868 interface UnderlyingSinkCloseCallback {
5869 (): void | PromiseLike<void>;
5872 interface UnderlyingSinkStartCallback {
5873 (controller: WritableStreamDefaultController): void | PromiseLike<void>;
5876 interface UnderlyingSinkWriteCallback<W> {
5877 (chunk: W, controller: WritableStreamDefaultController): void | PromiseLike<void>;
5880 interface UnderlyingSourceCancelCallback {
5881 (reason: any): void | PromiseLike<void>;
5884 interface UnderlyingSourcePullCallback<R> {
5885 (controller: ReadableStreamController<R>): void | PromiseLike<void>;
5888 interface UnderlyingSourceStartCallback<R> {
5889 (controller: ReadableStreamController<R>): void | PromiseLike<void>;
5892 interface VoidFunction {
5897 * Returns dedicatedWorkerGlobal's name, i.e. the value given to the Worker constructor. Primarily useful for debugging.
5899 declare var name: string;
5900 declare var onmessage: ((this: DedicatedWorkerGlobalScope, ev: MessageEvent) => any) | null;
5901 declare var onmessageerror: ((this: DedicatedWorkerGlobalScope, ev: MessageEvent) => any) | null;
5903 * Aborts dedicatedWorkerGlobal.
5905 declare function close(): void;
5907 * 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.
5909 declare function postMessage(message: any, transfer: Transferable[]): void;
5910 declare function postMessage(message: any, options?: PostMessageOptions): void;
5912 * 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.
5914 declare function dispatchEvent(event: Event): boolean;
5916 * Returns workerGlobal's WorkerLocation object.
5918 declare var location: WorkerLocation;
5919 declare var navigator: WorkerNavigator;
5920 declare var onerror: ((this: DedicatedWorkerGlobalScope, ev: ErrorEvent) => any) | null;
5921 declare var onlanguagechange: ((this: DedicatedWorkerGlobalScope, ev: Event) => any) | null;
5922 declare var onoffline: ((this: DedicatedWorkerGlobalScope, ev: Event) => any) | null;
5923 declare var ononline: ((this: DedicatedWorkerGlobalScope, ev: Event) => any) | null;
5924 declare var onrejectionhandled: ((this: DedicatedWorkerGlobalScope, ev: PromiseRejectionEvent) => any) | null;
5925 declare var onunhandledrejection: ((this: DedicatedWorkerGlobalScope, ev: PromiseRejectionEvent) => any) | null;
5927 * Returns workerGlobal.
5929 declare var self: WorkerGlobalScope & typeof globalThis;
5931 * 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).
5933 declare function importScripts(...urls: string[]): void;
5935 * 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.
5937 declare function dispatchEvent(event: Event): boolean;
5938 declare var caches: CacheStorage;
5939 declare var crypto: Crypto;
5940 declare var indexedDB: IDBFactory;
5941 declare var isSecureContext: boolean;
5942 declare var origin: string;
5943 declare var performance: Performance;
5944 declare function atob(data: string): string;
5945 declare function btoa(data: string): string;
5946 declare function clearInterval(handle?: number): void;
5947 declare function clearTimeout(handle?: number): void;
5948 declare function createImageBitmap(image: ImageBitmapSource, options?: ImageBitmapOptions): Promise<ImageBitmap>;
5949 declare function createImageBitmap(image: ImageBitmapSource, sx: number, sy: number, sw: number, sh: number, options?: ImageBitmapOptions): Promise<ImageBitmap>;
5950 declare function fetch(input: RequestInfo, init?: RequestInit): Promise<Response>;
5951 declare function queueMicrotask(callback: VoidFunction): void;
5952 declare function setInterval(handler: TimerHandler, timeout?: number, ...arguments: any[]): number;
5953 declare function setTimeout(handler: TimerHandler, timeout?: number, ...arguments: any[]): number;
5954 declare function cancelAnimationFrame(handle: number): void;
5955 declare function requestAnimationFrame(callback: FrameRequestCallback): number;
5956 declare function addEventListener<K extends keyof DedicatedWorkerGlobalScopeEventMap>(type: K, listener: (this: DedicatedWorkerGlobalScope, ev: DedicatedWorkerGlobalScopeEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
5957 declare function addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
5958 declare function removeEventListener<K extends keyof DedicatedWorkerGlobalScopeEventMap>(type: K, listener: (this: DedicatedWorkerGlobalScope, ev: DedicatedWorkerGlobalScopeEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
5959 declare function removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
5960 type HeadersInit = Headers | string[][] | Record<string, string>;
5961 type BodyInit = Blob | BufferSource | FormData | URLSearchParams | ReadableStream<Uint8Array> | string;
5962 type RequestInfo = Request | string;
5963 type BlobPart = BufferSource | Blob | string;
5964 type DOMHighResTimeStamp = number;
5965 type CanvasImageSource = ImageBitmap | OffscreenCanvas;
5966 type OffscreenRenderingContext = OffscreenCanvasRenderingContext2D | ImageBitmapRenderingContext | WebGLRenderingContext | WebGL2RenderingContext;
5967 type MessageEventSource = MessagePort | ServiceWorker;
5968 type ImageBitmapSource = CanvasImageSource | Blob | ImageData;
5969 type OnErrorEventHandler = OnErrorEventHandlerNonNull | null;
5970 type TimerHandler = string | Function;
5971 type PerformanceEntryList = PerformanceEntry[];
5972 type PushMessageDataInit = BufferSource | string;
5973 type ReadableStreamReader<T> = ReadableStreamDefaultReader<T>;
5974 type ReadableStreamController<T> = ReadableStreamDefaultController<T>;
5975 type VibratePattern = number | number[];
5976 type AlgorithmIdentifier = string | Algorithm;
5977 type HashAlgorithmIdentifier = AlgorithmIdentifier;
5978 type BigInteger = Uint8Array;
5979 type NamedCurve = string;
5980 type GLenum = number;
5981 type GLboolean = boolean;
5982 type GLbitfield = number;
5983 type GLint = number;
5984 type GLsizei = number;
5985 type GLintptr = number;
5986 type GLsizeiptr = number;
5987 type GLuint = number;
5988 type GLfloat = number;
5989 type GLclampf = number;
5990 type TexImageSource = ImageBitmap | ImageData | OffscreenCanvas;
5991 type Float32List = Float32Array | GLfloat[];
5992 type Int32List = Int32Array | GLint[];
5993 type GLint64 = number;
5994 type GLuint64 = number;
5995 type Uint32List = Uint32Array | GLuint[];
5996 type BufferSource = ArrayBufferView | ArrayBuffer;
5997 type DOMTimeStamp = number;
5998 type FormDataEntryValue = File | string;
5999 type IDBValidKey = number | string | Date | BufferSource | IDBArrayKey;
6000 type Transferable = ArrayBuffer | MessagePort | ImageBitmap | OffscreenCanvas;
6001 type ReadableStreamDefaultReadResult<T> = ReadableStreamDefaultReadValueResult<T> | ReadableStreamDefaultReadDoneResult;
6002 type BinaryType = "arraybuffer" | "blob";
6003 type CanvasDirection = "inherit" | "ltr" | "rtl";
6004 type CanvasFillRule = "evenodd" | "nonzero";
6005 type CanvasLineCap = "butt" | "round" | "square";
6006 type CanvasLineJoin = "bevel" | "miter" | "round";
6007 type CanvasTextAlign = "center" | "end" | "left" | "right" | "start";
6008 type CanvasTextBaseline = "alphabetic" | "bottom" | "hanging" | "ideographic" | "middle" | "top";
6009 type ClientTypes = "all" | "sharedworker" | "window" | "worker";
6010 type ColorSpaceConversion = "default" | "none";
6011 type EndingType = "native" | "transparent";
6012 type FrameType = "auxiliary" | "nested" | "none" | "top-level";
6013 type IDBCursorDirection = "next" | "nextunique" | "prev" | "prevunique";
6014 type IDBRequestReadyState = "done" | "pending";
6015 type IDBTransactionMode = "readonly" | "readwrite" | "versionchange";
6016 type ImageOrientation = "flipY" | "none";
6017 type ImageSmoothingQuality = "high" | "low" | "medium";
6018 type KeyFormat = "jwk" | "pkcs8" | "raw" | "spki";
6019 type KeyType = "private" | "public" | "secret";
6020 type KeyUsage = "decrypt" | "deriveBits" | "deriveKey" | "encrypt" | "sign" | "unwrapKey" | "verify" | "wrapKey";
6021 type NotificationDirection = "auto" | "ltr" | "rtl";
6022 type NotificationPermission = "default" | "denied" | "granted";
6023 type OffscreenRenderingContextId = "2d" | "bitmaprenderer" | "webgl" | "webgl2";
6024 type PermissionName = "accelerometer" | "ambient-light-sensor" | "background-fetch" | "background-sync" | "bluetooth" | "camera" | "clipboard-read" | "clipboard-write" | "device-info" | "display-capture" | "geolocation" | "gyroscope" | "magnetometer" | "microphone" | "midi" | "nfc" | "notifications" | "persistent-storage" | "push" | "speaker";
6025 type PermissionState = "denied" | "granted" | "prompt";
6026 type PremultiplyAlpha = "default" | "none" | "premultiply";
6027 type PushEncryptionKeyName = "auth" | "p256dh";
6028 type PushPermissionState = "denied" | "granted" | "prompt";
6029 type ReferrerPolicy = "" | "no-referrer" | "no-referrer-when-downgrade" | "origin" | "origin-when-cross-origin" | "same-origin" | "strict-origin" | "strict-origin-when-cross-origin" | "unsafe-url";
6030 type RequestCache = "default" | "force-cache" | "no-cache" | "no-store" | "only-if-cached" | "reload";
6031 type RequestCredentials = "include" | "omit" | "same-origin";
6032 type RequestDestination = "" | "audio" | "audioworklet" | "document" | "embed" | "font" | "image" | "manifest" | "object" | "paintworklet" | "report" | "script" | "sharedworker" | "style" | "track" | "video" | "worker" | "xslt";
6033 type RequestMode = "cors" | "navigate" | "no-cors" | "same-origin";
6034 type RequestRedirect = "error" | "follow" | "manual";
6035 type ResizeQuality = "high" | "low" | "medium" | "pixelated";
6036 type ResponseType = "basic" | "cors" | "default" | "error" | "opaque" | "opaqueredirect";
6037 type ServiceWorkerState = "activated" | "activating" | "installed" | "installing" | "parsed" | "redundant";
6038 type ServiceWorkerUpdateViaCache = "all" | "imports" | "none";
6039 type VisibilityState = "hidden" | "visible";
6040 type WebGLPowerPreference = "default" | "high-performance" | "low-power";
6041 type WorkerType = "classic" | "module";
6042 type XMLHttpRequestResponseType = "" | "arraybuffer" | "blob" | "document" | "json" | "text";