UNPKG

260 kBTypeScriptView Raw
1/*! *****************************************************************************
2Copyright (c) Microsoft Corporation. All rights reserved.
3Licensed under the Apache License, Version 2.0 (the "License"); you may not use
4this file except in compliance with the License. You may obtain a copy of the
5License at http://www.apache.org/licenses/LICENSE-2.0
6
7THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
8KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
9WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
10MERCHANTABLITY OR NON-INFRINGEMENT.
11
12See the Apache Version 2.0 License for specific language governing permissions
13and limitations under the License.
14***************************************************************************** */
15
16
17
18/// <reference no-default-lib="true"/>
19
20
21/////////////////////////////
22/// Worker APIs
23/////////////////////////////
24
25interface AddEventListenerOptions extends EventListenerOptions {
26 once?: boolean;
27 passive?: boolean;
28 signal?: AbortSignal;
29}
30
31interface AesCbcParams extends Algorithm {
32 iv: BufferSource;
33}
34
35interface AesCtrParams extends Algorithm {
36 counter: BufferSource;
37 length: number;
38}
39
40interface AesDerivedKeyParams extends Algorithm {
41 length: number;
42}
43
44interface AesGcmParams extends Algorithm {
45 additionalData?: BufferSource;
46 iv: BufferSource;
47 tagLength?: number;
48}
49
50interface AesKeyAlgorithm extends KeyAlgorithm {
51 length: number;
52}
53
54interface AesKeyGenParams extends Algorithm {
55 length: number;
56}
57
58interface Algorithm {
59 name: string;
60}
61
62interface AudioConfiguration {
63 bitrate?: number;
64 channels?: string;
65 contentType: string;
66 samplerate?: number;
67 spatialRendering?: boolean;
68}
69
70interface BlobPropertyBag {
71 endings?: EndingType;
72 type?: string;
73}
74
75interface CacheQueryOptions {
76 ignoreMethod?: boolean;
77 ignoreSearch?: boolean;
78 ignoreVary?: boolean;
79}
80
81interface ClientQueryOptions {
82 includeUncontrolled?: boolean;
83 type?: ClientTypes;
84}
85
86interface CloseEventInit extends EventInit {
87 code?: number;
88 reason?: string;
89 wasClean?: boolean;
90}
91
92interface CryptoKeyPair {
93 privateKey: CryptoKey;
94 publicKey: CryptoKey;
95}
96
97interface CustomEventInit<T = any> extends EventInit {
98 detail?: T;
99}
100
101interface DOMMatrix2DInit {
102 a?: number;
103 b?: number;
104 c?: number;
105 d?: number;
106 e?: number;
107 f?: number;
108 m11?: number;
109 m12?: number;
110 m21?: number;
111 m22?: number;
112 m41?: number;
113 m42?: number;
114}
115
116interface DOMMatrixInit extends DOMMatrix2DInit {
117 is2D?: boolean;
118 m13?: number;
119 m14?: number;
120 m23?: number;
121 m24?: number;
122 m31?: number;
123 m32?: number;
124 m33?: number;
125 m34?: number;
126 m43?: number;
127 m44?: number;
128}
129
130interface DOMPointInit {
131 w?: number;
132 x?: number;
133 y?: number;
134 z?: number;
135}
136
137interface DOMQuadInit {
138 p1?: DOMPointInit;
139 p2?: DOMPointInit;
140 p3?: DOMPointInit;
141 p4?: DOMPointInit;
142}
143
144interface DOMRectInit {
145 height?: number;
146 width?: number;
147 x?: number;
148 y?: number;
149}
150
151interface EcKeyGenParams extends Algorithm {
152 namedCurve: NamedCurve;
153}
154
155interface EcKeyImportParams extends Algorithm {
156 namedCurve: NamedCurve;
157}
158
159interface EcdhKeyDeriveParams extends Algorithm {
160 public: CryptoKey;
161}
162
163interface EcdsaParams extends Algorithm {
164 hash: HashAlgorithmIdentifier;
165}
166
167interface ErrorEventInit extends EventInit {
168 colno?: number;
169 error?: any;
170 filename?: string;
171 lineno?: number;
172 message?: string;
173}
174
175interface EventInit {
176 bubbles?: boolean;
177 cancelable?: boolean;
178 composed?: boolean;
179}
180
181interface EventListenerOptions {
182 capture?: boolean;
183}
184
185interface EventSourceInit {
186 withCredentials?: boolean;
187}
188
189interface ExtendableEventInit extends EventInit {
190}
191
192interface ExtendableMessageEventInit extends ExtendableEventInit {
193 data?: any;
194 lastEventId?: string;
195 origin?: string;
196 ports?: MessagePort[];
197 source?: Client | ServiceWorker | MessagePort | null;
198}
199
200interface FetchEventInit extends ExtendableEventInit {
201 clientId?: string;
202 handled?: Promise<undefined>;
203 preloadResponse?: Promise<any>;
204 replacesClientId?: string;
205 request: Request;
206 resultingClientId?: string;
207}
208
209interface FilePropertyBag extends BlobPropertyBag {
210 lastModified?: number;
211}
212
213interface FileSystemGetDirectoryOptions {
214 create?: boolean;
215}
216
217interface FileSystemGetFileOptions {
218 create?: boolean;
219}
220
221interface FileSystemRemoveOptions {
222 recursive?: boolean;
223}
224
225interface FontFaceDescriptors {
226 display?: string;
227 featureSettings?: string;
228 stretch?: string;
229 style?: string;
230 unicodeRange?: string;
231 variant?: string;
232 weight?: string;
233}
234
235interface FontFaceSetLoadEventInit extends EventInit {
236 fontfaces?: FontFace[];
237}
238
239interface GetNotificationOptions {
240 tag?: string;
241}
242
243interface HkdfParams extends Algorithm {
244 hash: HashAlgorithmIdentifier;
245 info: BufferSource;
246 salt: BufferSource;
247}
248
249interface HmacImportParams extends Algorithm {
250 hash: HashAlgorithmIdentifier;
251 length?: number;
252}
253
254interface HmacKeyGenParams extends Algorithm {
255 hash: HashAlgorithmIdentifier;
256 length?: number;
257}
258
259interface IDBDatabaseInfo {
260 name?: string;
261 version?: number;
262}
263
264interface IDBIndexParameters {
265 multiEntry?: boolean;
266 unique?: boolean;
267}
268
269interface IDBObjectStoreParameters {
270 autoIncrement?: boolean;
271 keyPath?: string | string[] | null;
272}
273
274interface IDBTransactionOptions {
275 durability?: IDBTransactionDurability;
276}
277
278interface IDBVersionChangeEventInit extends EventInit {
279 newVersion?: number | null;
280 oldVersion?: number;
281}
282
283interface ImageBitmapOptions {
284 colorSpaceConversion?: ColorSpaceConversion;
285 imageOrientation?: ImageOrientation;
286 premultiplyAlpha?: PremultiplyAlpha;
287 resizeHeight?: number;
288 resizeQuality?: ResizeQuality;
289 resizeWidth?: number;
290}
291
292interface ImageBitmapRenderingContextSettings {
293 alpha?: boolean;
294}
295
296interface ImageDataSettings {
297 colorSpace?: PredefinedColorSpace;
298}
299
300interface ImportMeta {
301 url: string;
302}
303
304interface JsonWebKey {
305 alg?: string;
306 crv?: string;
307 d?: string;
308 dp?: string;
309 dq?: string;
310 e?: string;
311 ext?: boolean;
312 k?: string;
313 key_ops?: string[];
314 kty?: string;
315 n?: string;
316 oth?: RsaOtherPrimesInfo[];
317 p?: string;
318 q?: string;
319 qi?: string;
320 use?: string;
321 x?: string;
322 y?: string;
323}
324
325interface KeyAlgorithm {
326 name: string;
327}
328
329interface LockInfo {
330 clientId?: string;
331 mode?: LockMode;
332 name?: string;
333}
334
335interface LockManagerSnapshot {
336 held?: LockInfo[];
337 pending?: LockInfo[];
338}
339
340interface LockOptions {
341 ifAvailable?: boolean;
342 mode?: LockMode;
343 signal?: AbortSignal;
344 steal?: boolean;
345}
346
347interface MediaCapabilitiesDecodingInfo extends MediaCapabilitiesInfo {
348 configuration?: MediaDecodingConfiguration;
349}
350
351interface MediaCapabilitiesEncodingInfo extends MediaCapabilitiesInfo {
352 configuration?: MediaEncodingConfiguration;
353}
354
355interface MediaCapabilitiesInfo {
356 powerEfficient: boolean;
357 smooth: boolean;
358 supported: boolean;
359}
360
361interface MediaConfiguration {
362 audio?: AudioConfiguration;
363 video?: VideoConfiguration;
364}
365
366interface MediaDecodingConfiguration extends MediaConfiguration {
367 type: MediaDecodingType;
368}
369
370interface MediaEncodingConfiguration extends MediaConfiguration {
371 type: MediaEncodingType;
372}
373
374interface MessageEventInit<T = any> extends EventInit {
375 data?: T;
376 lastEventId?: string;
377 origin?: string;
378 ports?: MessagePort[];
379 source?: MessageEventSource | null;
380}
381
382interface MultiCacheQueryOptions extends CacheQueryOptions {
383 cacheName?: string;
384}
385
386interface NavigationPreloadState {
387 enabled?: boolean;
388 headerValue?: string;
389}
390
391interface NotificationAction {
392 action: string;
393 icon?: string;
394 title: string;
395}
396
397interface NotificationEventInit extends ExtendableEventInit {
398 action?: string;
399 notification: Notification;
400}
401
402interface NotificationOptions {
403 actions?: NotificationAction[];
404 badge?: string;
405 body?: string;
406 data?: any;
407 dir?: NotificationDirection;
408 icon?: string;
409 image?: string;
410 lang?: string;
411 renotify?: boolean;
412 requireInteraction?: boolean;
413 silent?: boolean;
414 tag?: string;
415 timestamp?: EpochTimeStamp;
416 vibrate?: VibratePattern;
417}
418
419interface Pbkdf2Params extends Algorithm {
420 hash: HashAlgorithmIdentifier;
421 iterations: number;
422 salt: BufferSource;
423}
424
425interface PerformanceMarkOptions {
426 detail?: any;
427 startTime?: DOMHighResTimeStamp;
428}
429
430interface PerformanceMeasureOptions {
431 detail?: any;
432 duration?: DOMHighResTimeStamp;
433 end?: string | DOMHighResTimeStamp;
434 start?: string | DOMHighResTimeStamp;
435}
436
437interface PerformanceObserverInit {
438 buffered?: boolean;
439 entryTypes?: string[];
440 type?: string;
441}
442
443interface PermissionDescriptor {
444 name: PermissionName;
445}
446
447interface ProgressEventInit extends EventInit {
448 lengthComputable?: boolean;
449 loaded?: number;
450 total?: number;
451}
452
453interface PromiseRejectionEventInit extends EventInit {
454 promise: Promise<any>;
455 reason?: any;
456}
457
458interface PushEventInit extends ExtendableEventInit {
459 data?: PushMessageDataInit;
460}
461
462interface PushSubscriptionJSON {
463 endpoint?: string;
464 expirationTime?: EpochTimeStamp | null;
465 keys?: Record<string, string>;
466}
467
468interface PushSubscriptionOptionsInit {
469 applicationServerKey?: BufferSource | string | null;
470 userVisibleOnly?: boolean;
471}
472
473interface QueuingStrategy<T = any> {
474 highWaterMark?: number;
475 size?: QueuingStrategySize<T>;
476}
477
478interface QueuingStrategyInit {
479 /**
480 * Creates a new ByteLengthQueuingStrategy with the provided high water mark.
481 *
482 * 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.
483 */
484 highWaterMark: number;
485}
486
487interface RTCEncodedAudioFrameMetadata {
488 contributingSources?: number[];
489 synchronizationSource?: number;
490}
491
492interface RTCEncodedVideoFrameMetadata {
493 contributingSources?: number[];
494 dependencies?: number[];
495 frameId?: number;
496 height?: number;
497 spatialIndex?: number;
498 synchronizationSource?: number;
499 temporalIndex?: number;
500 width?: number;
501}
502
503interface ReadableStreamReadDoneResult {
504 done: true;
505 value?: undefined;
506}
507
508interface ReadableStreamReadValueResult<T> {
509 done: false;
510 value: T;
511}
512
513interface ReadableWritablePair<R = any, W = any> {
514 readable: ReadableStream<R>;
515 /**
516 * 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.
517 *
518 * Piping a stream will lock it for the duration of the pipe, preventing any other consumer from acquiring a reader.
519 */
520 writable: WritableStream<W>;
521}
522
523interface RegistrationOptions {
524 scope?: string;
525 type?: WorkerType;
526 updateViaCache?: ServiceWorkerUpdateViaCache;
527}
528
529interface RequestInit {
530 /** A BodyInit object or null to set request's body. */
531 body?: BodyInit | null;
532 /** A string indicating how the request will interact with the browser's cache to set request's cache. */
533 cache?: RequestCache;
534 /** 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. */
535 credentials?: RequestCredentials;
536 /** A Headers object, an object literal, or an array of two-item arrays to set request's headers. */
537 headers?: HeadersInit;
538 /** A cryptographic hash of the resource to be fetched by request. Sets request's integrity. */
539 integrity?: string;
540 /** A boolean to set request's keepalive. */
541 keepalive?: boolean;
542 /** A string to set request's method. */
543 method?: string;
544 /** A string to indicate whether the request will use CORS, or will be restricted to same-origin URLs. Sets request's mode. */
545 mode?: RequestMode;
546 /** 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. */
547 redirect?: RequestRedirect;
548 /** A string whose value is a same-origin URL, "about:client", or the empty string, to set request's referrer. */
549 referrer?: string;
550 /** A referrer policy to set request's referrerPolicy. */
551 referrerPolicy?: ReferrerPolicy;
552 /** An AbortSignal to set request's signal. */
553 signal?: AbortSignal | null;
554 /** Can only be null. Used to disassociate request from any Window. */
555 window?: null;
556}
557
558interface ResponseInit {
559 headers?: HeadersInit;
560 status?: number;
561 statusText?: string;
562}
563
564interface RsaHashedImportParams extends Algorithm {
565 hash: HashAlgorithmIdentifier;
566}
567
568interface RsaHashedKeyGenParams extends RsaKeyGenParams {
569 hash: HashAlgorithmIdentifier;
570}
571
572interface RsaKeyGenParams extends Algorithm {
573 modulusLength: number;
574 publicExponent: BigInteger;
575}
576
577interface RsaOaepParams extends Algorithm {
578 label?: BufferSource;
579}
580
581interface RsaOtherPrimesInfo {
582 d?: string;
583 r?: string;
584 t?: string;
585}
586
587interface RsaPssParams extends Algorithm {
588 saltLength: number;
589}
590
591interface SecurityPolicyViolationEventInit extends EventInit {
592 blockedURI?: string;
593 columnNumber?: number;
594 disposition: SecurityPolicyViolationEventDisposition;
595 documentURI: string;
596 effectiveDirective: string;
597 lineNumber?: number;
598 originalPolicy: string;
599 referrer?: string;
600 sample?: string;
601 sourceFile?: string;
602 statusCode: number;
603 violatedDirective: string;
604}
605
606interface StorageEstimate {
607 quota?: number;
608 usage?: number;
609}
610
611interface StreamPipeOptions {
612 preventAbort?: boolean;
613 preventCancel?: boolean;
614 /**
615 * 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.
616 *
617 * Piping a stream will lock it for the duration of the pipe, preventing any other consumer from acquiring a reader.
618 *
619 * Errors and closures of the source and destination streams propagate as follows:
620 *
621 * 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.
622 *
623 * 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.
624 *
625 * 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.
626 *
627 * 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.
628 *
629 * 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.
630 */
631 preventClose?: boolean;
632 signal?: AbortSignal;
633}
634
635interface StructuredSerializeOptions {
636 transfer?: Transferable[];
637}
638
639interface TextDecodeOptions {
640 stream?: boolean;
641}
642
643interface TextDecoderOptions {
644 fatal?: boolean;
645 ignoreBOM?: boolean;
646}
647
648interface TextEncoderEncodeIntoResult {
649 read?: number;
650 written?: number;
651}
652
653interface Transformer<I = any, O = any> {
654 flush?: TransformerFlushCallback<O>;
655 readableType?: undefined;
656 start?: TransformerStartCallback<O>;
657 transform?: TransformerTransformCallback<I, O>;
658 writableType?: undefined;
659}
660
661interface UnderlyingSink<W = any> {
662 abort?: UnderlyingSinkAbortCallback;
663 close?: UnderlyingSinkCloseCallback;
664 start?: UnderlyingSinkStartCallback;
665 type?: undefined;
666 write?: UnderlyingSinkWriteCallback<W>;
667}
668
669interface UnderlyingSource<R = any> {
670 cancel?: UnderlyingSourceCancelCallback;
671 pull?: UnderlyingSourcePullCallback<R>;
672 start?: UnderlyingSourceStartCallback<R>;
673 type?: undefined;
674}
675
676interface VideoColorSpaceInit {
677 fullRange?: boolean;
678 matrix?: VideoMatrixCoefficients;
679 primaries?: VideoColorPrimaries;
680 transfer?: VideoTransferCharacteristics;
681}
682
683interface VideoConfiguration {
684 bitrate: number;
685 colorGamut?: ColorGamut;
686 contentType: string;
687 framerate: number;
688 hdrMetadataType?: HdrMetadataType;
689 height: number;
690 scalabilityMode?: string;
691 transferFunction?: TransferFunction;
692 width: number;
693}
694
695interface WebGLContextAttributes {
696 alpha?: boolean;
697 antialias?: boolean;
698 depth?: boolean;
699 desynchronized?: boolean;
700 failIfMajorPerformanceCaveat?: boolean;
701 powerPreference?: WebGLPowerPreference;
702 premultipliedAlpha?: boolean;
703 preserveDrawingBuffer?: boolean;
704 stencil?: boolean;
705}
706
707interface WebGLContextEventInit extends EventInit {
708 statusMessage?: string;
709}
710
711interface WorkerOptions {
712 credentials?: RequestCredentials;
713 name?: string;
714 type?: WorkerType;
715}
716
717/** 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. */
718interface ANGLE_instanced_arrays {
719 drawArraysInstancedANGLE(mode: GLenum, first: GLint, count: GLsizei, primcount: GLsizei): void;
720 drawElementsInstancedANGLE(mode: GLenum, count: GLsizei, type: GLenum, offset: GLintptr, primcount: GLsizei): void;
721 vertexAttribDivisorANGLE(index: GLuint, divisor: GLuint): void;
722 readonly VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE: GLenum;
723}
724
725/** A controller object that allows you to abort one or more DOM requests as and when desired. */
726interface AbortController {
727 /** Returns the AbortSignal object associated with this object. */
728 readonly signal: AbortSignal;
729 /** 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. */
730 // abort(): AbortSignal; - To be re-added in the future
731}
732
733declare var AbortController: {
734 prototype: AbortController;
735 new(): AbortController;
736};
737
738interface AbortSignalEventMap {
739 "abort": Event;
740}
741
742/** 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. */
743interface AbortSignal extends EventTarget {
744 /** Returns true if this AbortSignal's AbortController has signaled to abort, and false otherwise. */
745 readonly aborted: boolean;
746 onabort: ((this: AbortSignal, ev: Event) => any) | null;
747 readonly reason: any;
748 throwIfAborted(): void;
749 addEventListener<K extends keyof AbortSignalEventMap>(type: K, listener: (this: AbortSignal, ev: AbortSignalEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
750 addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
751 removeEventListener<K extends keyof AbortSignalEventMap>(type: K, listener: (this: AbortSignal, ev: AbortSignalEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
752 removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
753}
754
755declare var AbortSignal: {
756 prototype: AbortSignal;
757 new(): AbortSignal;
758 abort(reason?: any): AbortSignal;
759};
760
761interface AbstractWorkerEventMap {
762 "error": ErrorEvent;
763}
764
765interface AbstractWorker {
766 onerror: ((this: AbstractWorker, ev: ErrorEvent) => any) | null;
767 addEventListener<K extends keyof AbstractWorkerEventMap>(type: K, listener: (this: AbstractWorker, ev: AbstractWorkerEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
768 addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
769 removeEventListener<K extends keyof AbstractWorkerEventMap>(type: K, listener: (this: AbstractWorker, ev: AbstractWorkerEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
770 removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
771}
772
773interface AnimationFrameProvider {
774 cancelAnimationFrame(handle: number): void;
775 requestAnimationFrame(callback: FrameRequestCallback): number;
776}
777
778/** 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. */
779interface Blob {
780 readonly size: number;
781 readonly type: string;
782 arrayBuffer(): Promise<ArrayBuffer>;
783 slice(start?: number, end?: number, contentType?: string): Blob;
784 stream(): ReadableStream<Uint8Array>;
785 text(): Promise<string>;
786}
787
788declare var Blob: {
789 prototype: Blob;
790 new(blobParts?: BlobPart[], options?: BlobPropertyBag): Blob;
791};
792
793interface Body {
794 readonly body: ReadableStream<Uint8Array> | null;
795 readonly bodyUsed: boolean;
796 arrayBuffer(): Promise<ArrayBuffer>;
797 blob(): Promise<Blob>;
798 formData(): Promise<FormData>;
799 json(): Promise<any>;
800 text(): Promise<string>;
801}
802
803interface BroadcastChannelEventMap {
804 "message": MessageEvent;
805 "messageerror": MessageEvent;
806}
807
808interface BroadcastChannel extends EventTarget {
809 /** Returns the channel name (as passed to the constructor). */
810 readonly name: string;
811 onmessage: ((this: BroadcastChannel, ev: MessageEvent) => any) | null;
812 onmessageerror: ((this: BroadcastChannel, ev: MessageEvent) => any) | null;
813 /** Closes the BroadcastChannel object, opening it up to garbage collection. */
814 close(): void;
815 /** Sends the given message to other BroadcastChannel objects set up for this channel. Messages can be structured objects, e.g. nested objects and arrays. */
816 postMessage(message: any): void;
817 addEventListener<K extends keyof BroadcastChannelEventMap>(type: K, listener: (this: BroadcastChannel, ev: BroadcastChannelEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
818 addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
819 removeEventListener<K extends keyof BroadcastChannelEventMap>(type: K, listener: (this: BroadcastChannel, ev: BroadcastChannelEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
820 removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
821}
822
823declare var BroadcastChannel: {
824 prototype: BroadcastChannel;
825 new(name: string): BroadcastChannel;
826};
827
828/** This Streams API interface provides a built-in byte length queuing strategy that can be used when constructing streams. */
829interface ByteLengthQueuingStrategy extends QueuingStrategy<ArrayBufferView> {
830 readonly highWaterMark: number;
831 readonly size: QueuingStrategySize<ArrayBufferView>;
832}
833
834declare var ByteLengthQueuingStrategy: {
835 prototype: ByteLengthQueuingStrategy;
836 new(init: QueuingStrategyInit): ByteLengthQueuingStrategy;
837};
838
839/**
840 * 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.
841 * Available only in secure contexts.
842 */
843interface Cache {
844 add(request: RequestInfo | URL): Promise<void>;
845 addAll(requests: RequestInfo[]): Promise<void>;
846 delete(request: RequestInfo | URL, options?: CacheQueryOptions): Promise<boolean>;
847 keys(request?: RequestInfo | URL, options?: CacheQueryOptions): Promise<ReadonlyArray<Request>>;
848 match(request: RequestInfo | URL, options?: CacheQueryOptions): Promise<Response | undefined>;
849 matchAll(request?: RequestInfo | URL, options?: CacheQueryOptions): Promise<ReadonlyArray<Response>>;
850 put(request: RequestInfo | URL, response: Response): Promise<void>;
851}
852
853declare var Cache: {
854 prototype: Cache;
855 new(): Cache;
856};
857
858/**
859 * The storage for Cache objects.
860 * Available only in secure contexts.
861 */
862interface CacheStorage {
863 delete(cacheName: string): Promise<boolean>;
864 has(cacheName: string): Promise<boolean>;
865 keys(): Promise<string[]>;
866 match(request: RequestInfo | URL, options?: MultiCacheQueryOptions): Promise<Response | undefined>;
867 open(cacheName: string): Promise<Cache>;
868}
869
870declare var CacheStorage: {
871 prototype: CacheStorage;
872 new(): CacheStorage;
873};
874
875/** An opaque object describing a gradient. It is returned by the methods CanvasRenderingContext2D.createLinearGradient() or CanvasRenderingContext2D.createRadialGradient(). */
876interface CanvasGradient {
877 /**
878 * 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.
879 *
880 * Throws an "IndexSizeError" DOMException if the offset is out of range. Throws a "SyntaxError" DOMException if the color cannot be parsed.
881 */
882 addColorStop(offset: number, color: string): void;
883}
884
885declare var CanvasGradient: {
886 prototype: CanvasGradient;
887 new(): CanvasGradient;
888};
889
890interface CanvasPath {
891 arc(x: number, y: number, radius: number, startAngle: number, endAngle: number, counterclockwise?: boolean): void;
892 arcTo(x1: number, y1: number, x2: number, y2: number, radius: number): void;
893 bezierCurveTo(cp1x: number, cp1y: number, cp2x: number, cp2y: number, x: number, y: number): void;
894 closePath(): void;
895 ellipse(x: number, y: number, radiusX: number, radiusY: number, rotation: number, startAngle: number, endAngle: number, counterclockwise?: boolean): void;
896 lineTo(x: number, y: number): void;
897 moveTo(x: number, y: number): void;
898 quadraticCurveTo(cpx: number, cpy: number, x: number, y: number): void;
899 rect(x: number, y: number, w: number, h: number): void;
900}
901
902/** An opaque object describing a pattern, based on an image, a canvas, or a video, created by the CanvasRenderingContext2D.createPattern() method. */
903interface CanvasPattern {
904 /** Sets the transformation matrix that will be used when rendering the pattern during a fill or stroke painting operation. */
905 setTransform(transform?: DOMMatrix2DInit): void;
906}
907
908declare var CanvasPattern: {
909 prototype: CanvasPattern;
910 new(): CanvasPattern;
911};
912
913/** 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(). */
914interface Client {
915 readonly frameType: FrameType;
916 readonly id: string;
917 readonly type: ClientTypes;
918 readonly url: string;
919 postMessage(message: any, transfer: Transferable[]): void;
920 postMessage(message: any, options?: StructuredSerializeOptions): void;
921}
922
923declare var Client: {
924 prototype: Client;
925 new(): Client;
926};
927
928/** Provides access to Client objects. Access it via self.clients within a service worker. */
929interface Clients {
930 claim(): Promise<void>;
931 get(id: string): Promise<Client | undefined>;
932 matchAll<T extends ClientQueryOptions>(options?: T): Promise<ReadonlyArray<T["type"] extends "window" ? WindowClient : Client>>;
933 openWindow(url: string | URL): Promise<WindowClient | null>;
934}
935
936declare var Clients: {
937 prototype: Clients;
938 new(): Clients;
939};
940
941/** 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. */
942interface CloseEvent extends Event {
943 /** Returns the WebSocket connection close code provided by the server. */
944 readonly code: number;
945 /** Returns the WebSocket connection close reason provided by the server. */
946 readonly reason: string;
947 /** Returns true if the connection closed cleanly; false otherwise. */
948 readonly wasClean: boolean;
949}
950
951declare var CloseEvent: {
952 prototype: CloseEvent;
953 new(type: string, eventInitDict?: CloseEventInit): CloseEvent;
954};
955
956/** This Streams API interface provides a built-in byte length queuing strategy that can be used when constructing streams. */
957interface CountQueuingStrategy extends QueuingStrategy {
958 readonly highWaterMark: number;
959 readonly size: QueuingStrategySize;
960}
961
962declare var CountQueuingStrategy: {
963 prototype: CountQueuingStrategy;
964 new(init: QueuingStrategyInit): CountQueuingStrategy;
965};
966
967/** Basic cryptography features available in the current context. It allows access to a cryptographically strong random number generator and to cryptographic primitives. */
968interface Crypto {
969 /** Available only in secure contexts. */
970 readonly subtle: SubtleCrypto;
971 getRandomValues<T extends ArrayBufferView | null>(array: T): T;
972 /** Available only in secure contexts. */
973 randomUUID(): string;
974}
975
976declare var Crypto: {
977 prototype: Crypto;
978 new(): Crypto;
979};
980
981/**
982 * The CryptoKey dictionary of the Web Crypto API represents a cryptographic key.
983 * Available only in secure contexts.
984 */
985interface CryptoKey {
986 readonly algorithm: KeyAlgorithm;
987 readonly extractable: boolean;
988 readonly type: KeyType;
989 readonly usages: KeyUsage[];
990}
991
992declare var CryptoKey: {
993 prototype: CryptoKey;
994 new(): CryptoKey;
995};
996
997interface CustomEvent<T = any> extends Event {
998 /** Returns any custom data event was created with. Typically used for synthetic events. */
999 readonly detail: T;
1000 /** @deprecated */
1001 initCustomEvent(type: string, bubbles?: boolean, cancelable?: boolean, detail?: T): void;
1002}
1003
1004declare var CustomEvent: {
1005 prototype: CustomEvent;
1006 new<T>(type: string, eventInitDict?: CustomEventInit<T>): CustomEvent<T>;
1007};
1008
1009/** An abnormal event (called an exception) which occurs as a result of calling a method or accessing a property of a web API. */
1010interface DOMException extends Error {
1011 /** @deprecated */
1012 readonly code: number;
1013 readonly message: string;
1014 readonly name: string;
1015 readonly ABORT_ERR: number;
1016 readonly DATA_CLONE_ERR: number;
1017 readonly DOMSTRING_SIZE_ERR: number;
1018 readonly HIERARCHY_REQUEST_ERR: number;
1019 readonly INDEX_SIZE_ERR: number;
1020 readonly INUSE_ATTRIBUTE_ERR: number;
1021 readonly INVALID_ACCESS_ERR: number;
1022 readonly INVALID_CHARACTER_ERR: number;
1023 readonly INVALID_MODIFICATION_ERR: number;
1024 readonly INVALID_NODE_TYPE_ERR: number;
1025 readonly INVALID_STATE_ERR: number;
1026 readonly NAMESPACE_ERR: number;
1027 readonly NETWORK_ERR: number;
1028 readonly NOT_FOUND_ERR: number;
1029 readonly NOT_SUPPORTED_ERR: number;
1030 readonly NO_DATA_ALLOWED_ERR: number;
1031 readonly NO_MODIFICATION_ALLOWED_ERR: number;
1032 readonly QUOTA_EXCEEDED_ERR: number;
1033 readonly SECURITY_ERR: number;
1034 readonly SYNTAX_ERR: number;
1035 readonly TIMEOUT_ERR: number;
1036 readonly TYPE_MISMATCH_ERR: number;
1037 readonly URL_MISMATCH_ERR: number;
1038 readonly VALIDATION_ERR: number;
1039 readonly WRONG_DOCUMENT_ERR: number;
1040}
1041
1042declare var DOMException: {
1043 prototype: DOMException;
1044 new(message?: string, name?: string): DOMException;
1045 readonly ABORT_ERR: number;
1046 readonly DATA_CLONE_ERR: number;
1047 readonly DOMSTRING_SIZE_ERR: number;
1048 readonly HIERARCHY_REQUEST_ERR: number;
1049 readonly INDEX_SIZE_ERR: number;
1050 readonly INUSE_ATTRIBUTE_ERR: number;
1051 readonly INVALID_ACCESS_ERR: number;
1052 readonly INVALID_CHARACTER_ERR: number;
1053 readonly INVALID_MODIFICATION_ERR: number;
1054 readonly INVALID_NODE_TYPE_ERR: number;
1055 readonly INVALID_STATE_ERR: number;
1056 readonly NAMESPACE_ERR: number;
1057 readonly NETWORK_ERR: number;
1058 readonly NOT_FOUND_ERR: number;
1059 readonly NOT_SUPPORTED_ERR: number;
1060 readonly NO_DATA_ALLOWED_ERR: number;
1061 readonly NO_MODIFICATION_ALLOWED_ERR: number;
1062 readonly QUOTA_EXCEEDED_ERR: number;
1063 readonly SECURITY_ERR: number;
1064 readonly SYNTAX_ERR: number;
1065 readonly TIMEOUT_ERR: number;
1066 readonly TYPE_MISMATCH_ERR: number;
1067 readonly URL_MISMATCH_ERR: number;
1068 readonly VALIDATION_ERR: number;
1069 readonly WRONG_DOCUMENT_ERR: number;
1070};
1071
1072interface DOMMatrix extends DOMMatrixReadOnly {
1073 a: number;
1074 b: number;
1075 c: number;
1076 d: number;
1077 e: number;
1078 f: number;
1079 m11: number;
1080 m12: number;
1081 m13: number;
1082 m14: number;
1083 m21: number;
1084 m22: number;
1085 m23: number;
1086 m24: number;
1087 m31: number;
1088 m32: number;
1089 m33: number;
1090 m34: number;
1091 m41: number;
1092 m42: number;
1093 m43: number;
1094 m44: number;
1095 invertSelf(): DOMMatrix;
1096 multiplySelf(other?: DOMMatrixInit): DOMMatrix;
1097 preMultiplySelf(other?: DOMMatrixInit): DOMMatrix;
1098 rotateAxisAngleSelf(x?: number, y?: number, z?: number, angle?: number): DOMMatrix;
1099 rotateFromVectorSelf(x?: number, y?: number): DOMMatrix;
1100 rotateSelf(rotX?: number, rotY?: number, rotZ?: number): DOMMatrix;
1101 scale3dSelf(scale?: number, originX?: number, originY?: number, originZ?: number): DOMMatrix;
1102 scaleSelf(scaleX?: number, scaleY?: number, scaleZ?: number, originX?: number, originY?: number, originZ?: number): DOMMatrix;
1103 skewXSelf(sx?: number): DOMMatrix;
1104 skewYSelf(sy?: number): DOMMatrix;
1105 translateSelf(tx?: number, ty?: number, tz?: number): DOMMatrix;
1106}
1107
1108declare var DOMMatrix: {
1109 prototype: DOMMatrix;
1110 new(init?: string | number[]): DOMMatrix;
1111 fromFloat32Array(array32: Float32Array): DOMMatrix;
1112 fromFloat64Array(array64: Float64Array): DOMMatrix;
1113 fromMatrix(other?: DOMMatrixInit): DOMMatrix;
1114};
1115
1116interface DOMMatrixReadOnly {
1117 readonly a: number;
1118 readonly b: number;
1119 readonly c: number;
1120 readonly d: number;
1121 readonly e: number;
1122 readonly f: number;
1123 readonly is2D: boolean;
1124 readonly isIdentity: boolean;
1125 readonly m11: number;
1126 readonly m12: number;
1127 readonly m13: number;
1128 readonly m14: number;
1129 readonly m21: number;
1130 readonly m22: number;
1131 readonly m23: number;
1132 readonly m24: number;
1133 readonly m31: number;
1134 readonly m32: number;
1135 readonly m33: number;
1136 readonly m34: number;
1137 readonly m41: number;
1138 readonly m42: number;
1139 readonly m43: number;
1140 readonly m44: number;
1141 flipX(): DOMMatrix;
1142 flipY(): DOMMatrix;
1143 inverse(): DOMMatrix;
1144 multiply(other?: DOMMatrixInit): DOMMatrix;
1145 rotate(rotX?: number, rotY?: number, rotZ?: number): DOMMatrix;
1146 rotateAxisAngle(x?: number, y?: number, z?: number, angle?: number): DOMMatrix;
1147 rotateFromVector(x?: number, y?: number): DOMMatrix;
1148 scale(scaleX?: number, scaleY?: number, scaleZ?: number, originX?: number, originY?: number, originZ?: number): DOMMatrix;
1149 scale3d(scale?: number, originX?: number, originY?: number, originZ?: number): DOMMatrix;
1150 /** @deprecated */
1151 scaleNonUniform(scaleX?: number, scaleY?: number): DOMMatrix;
1152 skewX(sx?: number): DOMMatrix;
1153 skewY(sy?: number): DOMMatrix;
1154 toFloat32Array(): Float32Array;
1155 toFloat64Array(): Float64Array;
1156 toJSON(): any;
1157 transformPoint(point?: DOMPointInit): DOMPoint;
1158 translate(tx?: number, ty?: number, tz?: number): DOMMatrix;
1159}
1160
1161declare var DOMMatrixReadOnly: {
1162 prototype: DOMMatrixReadOnly;
1163 new(init?: string | number[]): DOMMatrixReadOnly;
1164 fromFloat32Array(array32: Float32Array): DOMMatrixReadOnly;
1165 fromFloat64Array(array64: Float64Array): DOMMatrixReadOnly;
1166 fromMatrix(other?: DOMMatrixInit): DOMMatrixReadOnly;
1167};
1168
1169interface DOMPoint extends DOMPointReadOnly {
1170 w: number;
1171 x: number;
1172 y: number;
1173 z: number;
1174}
1175
1176declare var DOMPoint: {
1177 prototype: DOMPoint;
1178 new(x?: number, y?: number, z?: number, w?: number): DOMPoint;
1179 fromPoint(other?: DOMPointInit): DOMPoint;
1180};
1181
1182interface DOMPointReadOnly {
1183 readonly w: number;
1184 readonly x: number;
1185 readonly y: number;
1186 readonly z: number;
1187 matrixTransform(matrix?: DOMMatrixInit): DOMPoint;
1188 toJSON(): any;
1189}
1190
1191declare var DOMPointReadOnly: {
1192 prototype: DOMPointReadOnly;
1193 new(x?: number, y?: number, z?: number, w?: number): DOMPointReadOnly;
1194 fromPoint(other?: DOMPointInit): DOMPointReadOnly;
1195};
1196
1197interface DOMQuad {
1198 readonly p1: DOMPoint;
1199 readonly p2: DOMPoint;
1200 readonly p3: DOMPoint;
1201 readonly p4: DOMPoint;
1202 getBounds(): DOMRect;
1203 toJSON(): any;
1204}
1205
1206declare var DOMQuad: {
1207 prototype: DOMQuad;
1208 new(p1?: DOMPointInit, p2?: DOMPointInit, p3?: DOMPointInit, p4?: DOMPointInit): DOMQuad;
1209 fromQuad(other?: DOMQuadInit): DOMQuad;
1210 fromRect(other?: DOMRectInit): DOMQuad;
1211};
1212
1213interface DOMRect extends DOMRectReadOnly {
1214 height: number;
1215 width: number;
1216 x: number;
1217 y: number;
1218}
1219
1220declare var DOMRect: {
1221 prototype: DOMRect;
1222 new(x?: number, y?: number, width?: number, height?: number): DOMRect;
1223 fromRect(other?: DOMRectInit): DOMRect;
1224};
1225
1226interface DOMRectReadOnly {
1227 readonly bottom: number;
1228 readonly height: number;
1229 readonly left: number;
1230 readonly right: number;
1231 readonly top: number;
1232 readonly width: number;
1233 readonly x: number;
1234 readonly y: number;
1235 toJSON(): any;
1236}
1237
1238declare var DOMRectReadOnly: {
1239 prototype: DOMRectReadOnly;
1240 new(x?: number, y?: number, width?: number, height?: number): DOMRectReadOnly;
1241 fromRect(other?: DOMRectInit): DOMRectReadOnly;
1242};
1243
1244/** A type returned by some APIs which contains a list of DOMString (strings). */
1245interface DOMStringList {
1246 /** Returns the number of strings in strings. */
1247 readonly length: number;
1248 /** Returns true if strings contains string, and false otherwise. */
1249 contains(string: string): boolean;
1250 /** Returns the string with index index from strings. */
1251 item(index: number): string | null;
1252 [index: number]: string;
1253}
1254
1255declare var DOMStringList: {
1256 prototype: DOMStringList;
1257 new(): DOMStringList;
1258};
1259
1260interface DedicatedWorkerGlobalScopeEventMap extends WorkerGlobalScopeEventMap {
1261 "message": MessageEvent;
1262 "messageerror": MessageEvent;
1263}
1264
1265/** (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. */
1266interface DedicatedWorkerGlobalScope extends WorkerGlobalScope, AnimationFrameProvider {
1267 /** Returns dedicatedWorkerGlobal's name, i.e. the value given to the Worker constructor. Primarily useful for debugging. */
1268 readonly name: string;
1269 onmessage: ((this: DedicatedWorkerGlobalScope, ev: MessageEvent) => any) | null;
1270 onmessageerror: ((this: DedicatedWorkerGlobalScope, ev: MessageEvent) => any) | null;
1271 /** Aborts dedicatedWorkerGlobal. */
1272 close(): void;
1273 /** 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. */
1274 postMessage(message: any, transfer: Transferable[]): void;
1275 postMessage(message: any, options?: StructuredSerializeOptions): void;
1276 addEventListener<K extends keyof DedicatedWorkerGlobalScopeEventMap>(type: K, listener: (this: DedicatedWorkerGlobalScope, ev: DedicatedWorkerGlobalScopeEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
1277 addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
1278 removeEventListener<K extends keyof DedicatedWorkerGlobalScopeEventMap>(type: K, listener: (this: DedicatedWorkerGlobalScope, ev: DedicatedWorkerGlobalScopeEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
1279 removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
1280}
1281
1282declare var DedicatedWorkerGlobalScope: {
1283 prototype: DedicatedWorkerGlobalScope;
1284 new(): DedicatedWorkerGlobalScope;
1285};
1286
1287interface EXT_blend_minmax {
1288 readonly MAX_EXT: GLenum;
1289 readonly MIN_EXT: GLenum;
1290}
1291
1292interface EXT_color_buffer_float {
1293}
1294
1295interface EXT_color_buffer_half_float {
1296 readonly FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT: GLenum;
1297 readonly RGB16F_EXT: GLenum;
1298 readonly RGBA16F_EXT: GLenum;
1299 readonly UNSIGNED_NORMALIZED_EXT: GLenum;
1300}
1301
1302interface EXT_float_blend {
1303}
1304
1305/** 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. */
1306interface EXT_frag_depth {
1307}
1308
1309interface EXT_sRGB {
1310 readonly FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT: GLenum;
1311 readonly SRGB8_ALPHA8_EXT: GLenum;
1312 readonly SRGB_ALPHA_EXT: GLenum;
1313 readonly SRGB_EXT: GLenum;
1314}
1315
1316interface EXT_shader_texture_lod {
1317}
1318
1319interface EXT_texture_compression_rgtc {
1320 readonly COMPRESSED_RED_GREEN_RGTC2_EXT: GLenum;
1321 readonly COMPRESSED_RED_RGTC1_EXT: GLenum;
1322 readonly COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT: GLenum;
1323 readonly COMPRESSED_SIGNED_RED_RGTC1_EXT: GLenum;
1324}
1325
1326/** The EXT_texture_filter_anisotropic extension is part of the WebGL API and exposes two constants for anisotropic filtering (AF). */
1327interface EXT_texture_filter_anisotropic {
1328 readonly MAX_TEXTURE_MAX_ANISOTROPY_EXT: GLenum;
1329 readonly TEXTURE_MAX_ANISOTROPY_EXT: GLenum;
1330}
1331
1332/** Events providing information related to errors in scripts or in files. */
1333interface ErrorEvent extends Event {
1334 readonly colno: number;
1335 readonly error: any;
1336 readonly filename: string;
1337 readonly lineno: number;
1338 readonly message: string;
1339}
1340
1341declare var ErrorEvent: {
1342 prototype: ErrorEvent;
1343 new(type: string, eventInitDict?: ErrorEventInit): ErrorEvent;
1344};
1345
1346/** An event which takes place in the DOM. */
1347interface Event {
1348 /** 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. */
1349 readonly bubbles: boolean;
1350 cancelBubble: boolean;
1351 /** 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. */
1352 readonly cancelable: boolean;
1353 /** 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. */
1354 readonly composed: boolean;
1355 /** Returns the object whose event listener's callback is currently being invoked. */
1356 readonly currentTarget: EventTarget | null;
1357 /** Returns true if preventDefault() was invoked successfully to indicate cancelation, and false otherwise. */
1358 readonly defaultPrevented: boolean;
1359 /** Returns the event's phase, which is one of NONE, CAPTURING_PHASE, AT_TARGET, and BUBBLING_PHASE. */
1360 readonly eventPhase: number;
1361 /** Returns true if event was dispatched by the user agent, and false otherwise. */
1362 readonly isTrusted: boolean;
1363 /** @deprecated */
1364 returnValue: boolean;
1365 /** @deprecated */
1366 readonly srcElement: EventTarget | null;
1367 /** Returns the object to which event is dispatched (its target). */
1368 readonly target: EventTarget | null;
1369 /** Returns the event's timestamp as the number of milliseconds measured relative to the time origin. */
1370 readonly timeStamp: DOMHighResTimeStamp;
1371 /** Returns the type of event, e.g. "click", "hashchange", or "submit". */
1372 readonly type: string;
1373 /** 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. */
1374 composedPath(): EventTarget[];
1375 /** @deprecated */
1376 initEvent(type: string, bubbles?: boolean, cancelable?: boolean): void;
1377 /** 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. */
1378 preventDefault(): void;
1379 /** 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. */
1380 stopImmediatePropagation(): void;
1381 /** When dispatched in a tree, invoking this method prevents event from reaching any objects other than the current object. */
1382 stopPropagation(): void;
1383 readonly AT_TARGET: number;
1384 readonly BUBBLING_PHASE: number;
1385 readonly CAPTURING_PHASE: number;
1386 readonly NONE: number;
1387}
1388
1389declare var Event: {
1390 prototype: Event;
1391 new(type: string, eventInitDict?: EventInit): Event;
1392 readonly AT_TARGET: number;
1393 readonly BUBBLING_PHASE: number;
1394 readonly CAPTURING_PHASE: number;
1395 readonly NONE: number;
1396};
1397
1398interface EventListener {
1399 (evt: Event): void;
1400}
1401
1402interface EventListenerObject {
1403 handleEvent(object: Event): void;
1404}
1405
1406interface EventSourceEventMap {
1407 "error": Event;
1408 "message": MessageEvent;
1409 "open": Event;
1410}
1411
1412interface EventSource extends EventTarget {
1413 onerror: ((this: EventSource, ev: Event) => any) | null;
1414 onmessage: ((this: EventSource, ev: MessageEvent) => any) | null;
1415 onopen: ((this: EventSource, ev: Event) => any) | null;
1416 /** Returns the state of this EventSource object's connection. It can have the values described below. */
1417 readonly readyState: number;
1418 /** Returns the URL providing the event stream. */
1419 readonly url: string;
1420 /** Returns true if the credentials mode for connection requests to the URL providing the event stream is set to "include", and false otherwise. */
1421 readonly withCredentials: boolean;
1422 /** Aborts any instances of the fetch algorithm started for this EventSource object, and sets the readyState attribute to CLOSED. */
1423 close(): void;
1424 readonly CLOSED: number;
1425 readonly CONNECTING: number;
1426 readonly OPEN: number;
1427 addEventListener<K extends keyof EventSourceEventMap>(type: K, listener: (this: EventSource, ev: EventSourceEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
1428 addEventListener(type: string, listener: (this: EventSource, event: MessageEvent) => any, options?: boolean | AddEventListenerOptions): void;
1429 addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
1430 removeEventListener<K extends keyof EventSourceEventMap>(type: K, listener: (this: EventSource, ev: EventSourceEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
1431 removeEventListener(type: string, listener: (this: EventSource, event: MessageEvent) => any, options?: boolean | EventListenerOptions): void;
1432 removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
1433}
1434
1435declare var EventSource: {
1436 prototype: EventSource;
1437 new(url: string | URL, eventSourceInitDict?: EventSourceInit): EventSource;
1438 readonly CLOSED: number;
1439 readonly CONNECTING: number;
1440 readonly OPEN: number;
1441};
1442
1443/** EventTarget is a DOM interface implemented by objects that can receive events and may have listeners for them. */
1444interface EventTarget {
1445 /**
1446 * 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.
1447 *
1448 * 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.
1449 *
1450 * 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.
1451 *
1452 * 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.
1453 *
1454 * When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed.
1455 *
1456 * If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted.
1457 *
1458 * The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
1459 */
1460 addEventListener(type: string, callback: EventListenerOrEventListenerObject | null, options?: AddEventListenerOptions | boolean): void;
1461 /** 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. */
1462 dispatchEvent(event: Event): boolean;
1463 /** Removes the event listener in target's event listener list with the same type, callback, and options. */
1464 removeEventListener(type: string, callback: EventListenerOrEventListenerObject | null, options?: EventListenerOptions | boolean): void;
1465}
1466
1467declare var EventTarget: {
1468 prototype: EventTarget;
1469 new(): EventTarget;
1470};
1471
1472/** 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. */
1473interface ExtendableEvent extends Event {
1474 waitUntil(f: Promise<any>): void;
1475}
1476
1477declare var ExtendableEvent: {
1478 prototype: ExtendableEvent;
1479 new(type: string, eventInitDict?: ExtendableEventInit): ExtendableEvent;
1480};
1481
1482/** 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. */
1483interface ExtendableMessageEvent extends ExtendableEvent {
1484 readonly data: any;
1485 readonly lastEventId: string;
1486 readonly origin: string;
1487 readonly ports: ReadonlyArray<MessagePort>;
1488 readonly source: Client | ServiceWorker | MessagePort | null;
1489}
1490
1491declare var ExtendableMessageEvent: {
1492 prototype: ExtendableMessageEvent;
1493 new(type: string, eventInitDict?: ExtendableMessageEventInit): ExtendableMessageEvent;
1494};
1495
1496/** 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. */
1497interface FetchEvent extends ExtendableEvent {
1498 readonly clientId: string;
1499 readonly handled: Promise<undefined>;
1500 readonly preloadResponse: Promise<any>;
1501 readonly request: Request;
1502 readonly resultingClientId: string;
1503 respondWith(r: Response | PromiseLike<Response>): void;
1504}
1505
1506declare var FetchEvent: {
1507 prototype: FetchEvent;
1508 new(type: string, eventInitDict: FetchEventInit): FetchEvent;
1509};
1510
1511/** Provides information about files and allows JavaScript in a web page to access their content. */
1512interface File extends Blob {
1513 readonly lastModified: number;
1514 readonly name: string;
1515 readonly webkitRelativePath: string;
1516}
1517
1518declare var File: {
1519 prototype: File;
1520 new(fileBits: BlobPart[], fileName: string, options?: FilePropertyBag): File;
1521};
1522
1523/** 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. */
1524interface FileList {
1525 readonly length: number;
1526 item(index: number): File | null;
1527 [index: number]: File;
1528}
1529
1530declare var FileList: {
1531 prototype: FileList;
1532 new(): FileList;
1533};
1534
1535interface FileReaderEventMap {
1536 "abort": ProgressEvent<FileReader>;
1537 "error": ProgressEvent<FileReader>;
1538 "load": ProgressEvent<FileReader>;
1539 "loadend": ProgressEvent<FileReader>;
1540 "loadstart": ProgressEvent<FileReader>;
1541 "progress": ProgressEvent<FileReader>;
1542}
1543
1544/** 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. */
1545interface FileReader extends EventTarget {
1546 readonly error: DOMException | null;
1547 onabort: ((this: FileReader, ev: ProgressEvent<FileReader>) => any) | null;
1548 onerror: ((this: FileReader, ev: ProgressEvent<FileReader>) => any) | null;
1549 onload: ((this: FileReader, ev: ProgressEvent<FileReader>) => any) | null;
1550 onloadend: ((this: FileReader, ev: ProgressEvent<FileReader>) => any) | null;
1551 onloadstart: ((this: FileReader, ev: ProgressEvent<FileReader>) => any) | null;
1552 onprogress: ((this: FileReader, ev: ProgressEvent<FileReader>) => any) | null;
1553 readonly readyState: number;
1554 readonly result: string | ArrayBuffer | null;
1555 abort(): void;
1556 readAsArrayBuffer(blob: Blob): void;
1557 readAsBinaryString(blob: Blob): void;
1558 readAsDataURL(blob: Blob): void;
1559 readAsText(blob: Blob, encoding?: string): void;
1560 readonly DONE: number;
1561 readonly EMPTY: number;
1562 readonly LOADING: number;
1563 addEventListener<K extends keyof FileReaderEventMap>(type: K, listener: (this: FileReader, ev: FileReaderEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
1564 addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
1565 removeEventListener<K extends keyof FileReaderEventMap>(type: K, listener: (this: FileReader, ev: FileReaderEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
1566 removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
1567}
1568
1569declare var FileReader: {
1570 prototype: FileReader;
1571 new(): FileReader;
1572 readonly DONE: number;
1573 readonly EMPTY: number;
1574 readonly LOADING: number;
1575};
1576
1577/** Allows to read File or Blob objects in a synchronous way. */
1578interface FileReaderSync {
1579 readAsArrayBuffer(blob: Blob): ArrayBuffer;
1580 /** @deprecated */
1581 readAsBinaryString(blob: Blob): string;
1582 readAsDataURL(blob: Blob): string;
1583 readAsText(blob: Blob, encoding?: string): string;
1584}
1585
1586declare var FileReaderSync: {
1587 prototype: FileReaderSync;
1588 new(): FileReaderSync;
1589};
1590
1591/** Available only in secure contexts. */
1592interface FileSystemDirectoryHandle extends FileSystemHandle {
1593 readonly kind: "directory";
1594 getDirectoryHandle(name: string, options?: FileSystemGetDirectoryOptions): Promise<FileSystemDirectoryHandle>;
1595 getFileHandle(name: string, options?: FileSystemGetFileOptions): Promise<FileSystemFileHandle>;
1596 removeEntry(name: string, options?: FileSystemRemoveOptions): Promise<void>;
1597 resolve(possibleDescendant: FileSystemHandle): Promise<string[] | null>;
1598}
1599
1600declare var FileSystemDirectoryHandle: {
1601 prototype: FileSystemDirectoryHandle;
1602 new(): FileSystemDirectoryHandle;
1603};
1604
1605/** Available only in secure contexts. */
1606interface FileSystemFileHandle extends FileSystemHandle {
1607 readonly kind: "file";
1608 getFile(): Promise<File>;
1609}
1610
1611declare var FileSystemFileHandle: {
1612 prototype: FileSystemFileHandle;
1613 new(): FileSystemFileHandle;
1614};
1615
1616/** Available only in secure contexts. */
1617interface FileSystemHandle {
1618 readonly kind: FileSystemHandleKind;
1619 readonly name: string;
1620 isSameEntry(other: FileSystemHandle): Promise<boolean>;
1621}
1622
1623declare var FileSystemHandle: {
1624 prototype: FileSystemHandle;
1625 new(): FileSystemHandle;
1626};
1627
1628interface FontFace {
1629 ascentOverride: string;
1630 descentOverride: string;
1631 display: string;
1632 family: string;
1633 featureSettings: string;
1634 lineGapOverride: string;
1635 readonly loaded: Promise<FontFace>;
1636 readonly status: FontFaceLoadStatus;
1637 stretch: string;
1638 style: string;
1639 unicodeRange: string;
1640 variant: string;
1641 variationSettings: string;
1642 weight: string;
1643 load(): Promise<FontFace>;
1644}
1645
1646declare var FontFace: {
1647 prototype: FontFace;
1648 new(family: string, source: string | BinaryData, descriptors?: FontFaceDescriptors): FontFace;
1649};
1650
1651interface FontFaceSetEventMap {
1652 "loading": Event;
1653 "loadingdone": Event;
1654 "loadingerror": Event;
1655}
1656
1657interface FontFaceSet extends EventTarget {
1658 onloading: ((this: FontFaceSet, ev: Event) => any) | null;
1659 onloadingdone: ((this: FontFaceSet, ev: Event) => any) | null;
1660 onloadingerror: ((this: FontFaceSet, ev: Event) => any) | null;
1661 readonly ready: Promise<FontFaceSet>;
1662 readonly status: FontFaceSetLoadStatus;
1663 check(font: string, text?: string): boolean;
1664 load(font: string, text?: string): Promise<FontFace[]>;
1665 forEach(callbackfn: (value: FontFace, key: FontFace, parent: FontFaceSet) => void, thisArg?: any): void;
1666 addEventListener<K extends keyof FontFaceSetEventMap>(type: K, listener: (this: FontFaceSet, ev: FontFaceSetEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
1667 addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
1668 removeEventListener<K extends keyof FontFaceSetEventMap>(type: K, listener: (this: FontFaceSet, ev: FontFaceSetEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
1669 removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
1670}
1671
1672declare var FontFaceSet: {
1673 prototype: FontFaceSet;
1674 new(initialFaces: FontFace[]): FontFaceSet;
1675};
1676
1677interface FontFaceSetLoadEvent extends Event {
1678 readonly fontfaces: ReadonlyArray<FontFace>;
1679}
1680
1681declare var FontFaceSetLoadEvent: {
1682 prototype: FontFaceSetLoadEvent;
1683 new(type: string, eventInitDict?: FontFaceSetLoadEventInit): FontFaceSetLoadEvent;
1684};
1685
1686interface FontFaceSource {
1687 readonly fonts: FontFaceSet;
1688}
1689
1690/** 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". */
1691interface FormData {
1692 append(name: string, value: string | Blob, fileName?: string): void;
1693 delete(name: string): void;
1694 get(name: string): FormDataEntryValue | null;
1695 getAll(name: string): FormDataEntryValue[];
1696 has(name: string): boolean;
1697 set(name: string, value: string | Blob, fileName?: string): void;
1698 forEach(callbackfn: (value: FormDataEntryValue, key: string, parent: FormData) => void, thisArg?: any): void;
1699}
1700
1701declare var FormData: {
1702 prototype: FormData;
1703 new(): FormData;
1704};
1705
1706interface GenericTransformStream {
1707 readonly readable: ReadableStream;
1708 readonly writable: WritableStream;
1709}
1710
1711/** 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. */
1712interface Headers {
1713 append(name: string, value: string): void;
1714 delete(name: string): void;
1715 get(name: string): string | null;
1716 has(name: string): boolean;
1717 set(name: string, value: string): void;
1718 forEach(callbackfn: (value: string, key: string, parent: Headers) => void, thisArg?: any): void;
1719}
1720
1721declare var Headers: {
1722 prototype: Headers;
1723 new(init?: HeadersInit): Headers;
1724};
1725
1726/** This IndexedDB API interface represents a cursor for traversing or iterating over multiple records in a database. */
1727interface IDBCursor {
1728 /** Returns the direction ("next", "nextunique", "prev" or "prevunique") of the cursor. */
1729 readonly direction: IDBCursorDirection;
1730 /** Returns the key of the cursor. Throws a "InvalidStateError" DOMException if the cursor is advancing or is finished. */
1731 readonly key: IDBValidKey;
1732 /** Returns the effective key of the cursor. Throws a "InvalidStateError" DOMException if the cursor is advancing or is finished. */
1733 readonly primaryKey: IDBValidKey;
1734 readonly request: IDBRequest;
1735 /** Returns the IDBObjectStore or IDBIndex the cursor was opened from. */
1736 readonly source: IDBObjectStore | IDBIndex;
1737 /** Advances the cursor through the next count records in range. */
1738 advance(count: number): void;
1739 /** Advances the cursor to the next record in range. */
1740 continue(key?: IDBValidKey): void;
1741 /** 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. */
1742 continuePrimaryKey(key: IDBValidKey, primaryKey: IDBValidKey): void;
1743 /**
1744 * Delete the record pointed at by the cursor with a new value.
1745 *
1746 * If successful, request's result will be undefined.
1747 */
1748 delete(): IDBRequest<undefined>;
1749 /**
1750 * Updated the record pointed at by the cursor with a new value.
1751 *
1752 * Throws a "DataError" DOMException if the effective object store uses in-line keys and the key would have changed.
1753 *
1754 * If successful, request's result will be the record's key.
1755 */
1756 update(value: any): IDBRequest<IDBValidKey>;
1757}
1758
1759declare var IDBCursor: {
1760 prototype: IDBCursor;
1761 new(): IDBCursor;
1762};
1763
1764/** 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. */
1765interface IDBCursorWithValue extends IDBCursor {
1766 /** Returns the cursor's current value. */
1767 readonly value: any;
1768}
1769
1770declare var IDBCursorWithValue: {
1771 prototype: IDBCursorWithValue;
1772 new(): IDBCursorWithValue;
1773};
1774
1775interface IDBDatabaseEventMap {
1776 "abort": Event;
1777 "close": Event;
1778 "error": Event;
1779 "versionchange": IDBVersionChangeEvent;
1780}
1781
1782/** 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. */
1783interface IDBDatabase extends EventTarget {
1784 /** Returns the name of the database. */
1785 readonly name: string;
1786 /** Returns a list of the names of object stores in the database. */
1787 readonly objectStoreNames: DOMStringList;
1788 onabort: ((this: IDBDatabase, ev: Event) => any) | null;
1789 onclose: ((this: IDBDatabase, ev: Event) => any) | null;
1790 onerror: ((this: IDBDatabase, ev: Event) => any) | null;
1791 onversionchange: ((this: IDBDatabase, ev: IDBVersionChangeEvent) => any) | null;
1792 /** Returns the version of the database. */
1793 readonly version: number;
1794 /** Closes the connection once all running transactions have finished. */
1795 close(): void;
1796 /**
1797 * Creates a new object store with the given name and options and returns a new IDBObjectStore.
1798 *
1799 * Throws a "InvalidStateError" DOMException if not called within an upgrade transaction.
1800 */
1801 createObjectStore(name: string, options?: IDBObjectStoreParameters): IDBObjectStore;
1802 /**
1803 * Deletes the object store with the given name.
1804 *
1805 * Throws a "InvalidStateError" DOMException if not called within an upgrade transaction.
1806 */
1807 deleteObjectStore(name: string): void;
1808 /** 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, options?: IDBTransactionOptions): 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;
1814}
1815
1816declare var IDBDatabase: {
1817 prototype: IDBDatabase;
1818 new(): IDBDatabase;
1819};
1820
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.) */
1822interface IDBFactory {
1823 /**
1824 * Compares two values as keys. Returns -1 if key1 precedes key2, 1 if key2 precedes key1, and 0 if the keys are equal.
1825 *
1826 * Throws a "DataError" DOMException if either input is not a valid key.
1827 */
1828 cmp(first: any, second: any): number;
1829 databases(): Promise<IDBDatabaseInfo[]>;
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. */
1831 deleteDatabase(name: string): IDBOpenDBRequest;
1832 /** 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. */
1833 open(name: string, version?: number): IDBOpenDBRequest;
1834}
1835
1836declare var IDBFactory: {
1837 prototype: IDBFactory;
1838 new(): IDBFactory;
1839};
1840
1841/** 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. */
1842interface IDBIndex {
1843 readonly keyPath: string | string[];
1844 readonly multiEntry: boolean;
1845 /** Returns the name of the index. */
1846 name: string;
1847 /** Returns the IDBObjectStore the index belongs to. */
1848 readonly objectStore: IDBObjectStore;
1849 readonly unique: boolean;
1850 /**
1851 * Retrieves the number of records matching the given key or key range in query.
1852 *
1853 * If successful, request's result will be the count.
1854 */
1855 count(query?: IDBValidKey | IDBKeyRange): IDBRequest<number>;
1856 /**
1857 * Retrieves the value of the first record matching the given key or key range in query.
1858 *
1859 * If successful, request's result will be the value, or undefined if there was no matching record.
1860 */
1861 get(query: IDBValidKey | IDBKeyRange): IDBRequest<any>;
1862 /**
1863 * Retrieves the values of the records matching the given key or key range in query (up to count if given).
1864 *
1865 * If successful, request's result will be an Array of the values.
1866 */
1867 getAll(query?: IDBValidKey | IDBKeyRange | null, count?: number): IDBRequest<any[]>;
1868 /**
1869 * Retrieves the keys of records matching the given key or key range in query (up to count if given).
1870 *
1871 * If successful, request's result will be an Array of the keys.
1872 */
1873 getAllKeys(query?: IDBValidKey | IDBKeyRange | null, count?: number): IDBRequest<IDBValidKey[]>;
1874 /**
1875 * Retrieves the key of the first record matching the given key or key range in query.
1876 *
1877 * If successful, request's result will be the key, or undefined if there was no matching record.
1878 */
1879 getKey(query: IDBValidKey | IDBKeyRange): IDBRequest<IDBValidKey | undefined>;
1880 /**
1881 * Opens a cursor over the records matching query, ordered by direction. If query is null, all records in index are matched.
1882 *
1883 * If successful, request's result will be an IDBCursorWithValue, or null if there were no matching records.
1884 */
1885 openCursor(query?: IDBValidKey | IDBKeyRange | null, direction?: IDBCursorDirection): IDBRequest<IDBCursorWithValue | null>;
1886 /**
1887 * 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.
1888 *
1889 * If successful, request's result will be an IDBCursor, or null if there were no matching records.
1890 */
1891 openKeyCursor(query?: IDBValidKey | IDBKeyRange | null, direction?: IDBCursorDirection): IDBRequest<IDBCursor | null>;
1892}
1893
1894declare var IDBIndex: {
1895 prototype: IDBIndex;
1896 new(): IDBIndex;
1897};
1898
1899/** 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: */
1900interface IDBKeyRange {
1901 /** Returns lower bound, or undefined if none. */
1902 readonly lower: any;
1903 /** Returns true if the lower open flag is set, and false otherwise. */
1904 readonly lowerOpen: boolean;
1905 /** Returns upper bound, or undefined if none. */
1906 readonly upper: any;
1907 /** Returns true if the upper open flag is set, and false otherwise. */
1908 readonly upperOpen: boolean;
1909 /** Returns true if key is included in the range, and false otherwise. */
1910 includes(key: any): boolean;
1911}
1912
1913declare var IDBKeyRange: {
1914 prototype: IDBKeyRange;
1915 new(): IDBKeyRange;
1916 /** 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. */
1917 bound(lower: any, upper: any, lowerOpen?: boolean, upperOpen?: boolean): IDBKeyRange;
1918 /** Returns a new IDBKeyRange starting at key with no upper bound. If open is true, key is not included in the range. */
1919 lowerBound(lower: any, open?: boolean): IDBKeyRange;
1920 /** Returns a new IDBKeyRange spanning only key. */
1921 only(value: any): IDBKeyRange;
1922 /** Returns a new IDBKeyRange with no lower bound and ending at key. If open is true, key is not included in the range. */
1923 upperBound(upper: any, open?: boolean): IDBKeyRange;
1924};
1925
1926/** 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.) */
1927interface IDBObjectStore {
1928 /** Returns true if the store has a key generator, and false otherwise. */
1929 readonly autoIncrement: boolean;
1930 /** Returns a list of the names of indexes in the store. */
1931 readonly indexNames: DOMStringList;
1932 /** Returns the key path of the store, or null if none. */
1933 readonly keyPath: string | string[];
1934 /** Returns the name of the store. */
1935 name: string;
1936 /** Returns the associated transaction. */
1937 readonly transaction: IDBTransaction;
1938 /**
1939 * Adds or updates a record in store with the given value and key.
1940 *
1941 * If the store uses in-line keys and key is specified a "DataError" DOMException will be thrown.
1942 *
1943 * 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.
1944 *
1945 * If successful, request's result will be the record's key.
1946 */
1947 add(value: any, key?: IDBValidKey): IDBRequest<IDBValidKey>;
1948 /**
1949 * Deletes all records in store.
1950 *
1951 * If successful, request's result will be undefined.
1952 */
1953 clear(): IDBRequest<undefined>;
1954 /**
1955 * Retrieves the number of records matching the given key or key range in query.
1956 *
1957 * If successful, request's result will be the count.
1958 */
1959 count(query?: IDBValidKey | IDBKeyRange): IDBRequest<number>;
1960 /**
1961 * 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.
1962 *
1963 * Throws an "InvalidStateError" DOMException if not called within an upgrade transaction.
1964 */
1965 createIndex(name: string, keyPath: string | string[], options?: IDBIndexParameters): IDBIndex;
1966 /**
1967 * Deletes records in store with the given key or in the given key range in query.
1968 *
1969 * If successful, request's result will be undefined.
1970 */
1971 delete(query: IDBValidKey | IDBKeyRange): IDBRequest<undefined>;
1972 /**
1973 * Deletes the index in store with the given name.
1974 *
1975 * Throws an "InvalidStateError" DOMException if not called within an upgrade transaction.
1976 */
1977 deleteIndex(name: string): void;
1978 /**
1979 * Retrieves the value of the first record matching the given key or key range in query.
1980 *
1981 * If successful, request's result will be the value, or undefined if there was no matching record.
1982 */
1983 get(query: IDBValidKey | IDBKeyRange): IDBRequest<any>;
1984 /**
1985 * Retrieves the values of the records matching the given key or key range in query (up to count if given).
1986 *
1987 * If successful, request's result will be an Array of the values.
1988 */
1989 getAll(query?: IDBValidKey | IDBKeyRange | null, count?: number): IDBRequest<any[]>;
1990 /**
1991 * Retrieves the keys of records matching the given key or key range in query (up to count if given).
1992 *
1993 * If successful, request's result will be an Array of the keys.
1994 */
1995 getAllKeys(query?: IDBValidKey | IDBKeyRange | null, count?: number): IDBRequest<IDBValidKey[]>;
1996 /**
1997 * Retrieves the key of the first record matching the given key or key range in query.
1998 *
1999 * If successful, request's result will be the key, or undefined if there was no matching record.
2000 */
2001 getKey(query: IDBValidKey | IDBKeyRange): IDBRequest<IDBValidKey | undefined>;
2002 index(name: string): IDBIndex;
2003 /**
2004 * Opens a cursor over the records matching query, ordered by direction. If query is null, all records in store are matched.
2005 *
2006 * If successful, request's result will be an IDBCursorWithValue pointing at the first matching record, or null if there were no matching records.
2007 */
2008 openCursor(query?: IDBValidKey | IDBKeyRange | null, direction?: IDBCursorDirection): IDBRequest<IDBCursorWithValue | null>;
2009 /**
2010 * 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.
2011 *
2012 * If successful, request's result will be an IDBCursor pointing at the first matching record, or null if there were no matching records.
2013 */
2014 openKeyCursor(query?: IDBValidKey | IDBKeyRange | null, direction?: IDBCursorDirection): IDBRequest<IDBCursor | null>;
2015 /**
2016 * Adds or updates a record in store with the given value and key.
2017 *
2018 * If the store uses in-line keys and key is specified a "DataError" DOMException will be thrown.
2019 *
2020 * 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.
2021 *
2022 * If successful, request's result will be the record's key.
2023 */
2024 put(value: any, key?: IDBValidKey): IDBRequest<IDBValidKey>;
2025}
2026
2027declare var IDBObjectStore: {
2028 prototype: IDBObjectStore;
2029 new(): IDBObjectStore;
2030};
2031
2032interface IDBOpenDBRequestEventMap extends IDBRequestEventMap {
2033 "blocked": Event;
2034 "upgradeneeded": IDBVersionChangeEvent;
2035}
2036
2037/** Also inherits methods from its parents IDBRequest and EventTarget. */
2038interface IDBOpenDBRequest extends IDBRequest<IDBDatabase> {
2039 onblocked: ((this: IDBOpenDBRequest, ev: Event) => any) | null;
2040 onupgradeneeded: ((this: IDBOpenDBRequest, ev: IDBVersionChangeEvent) => any) | null;
2041 addEventListener<K extends keyof IDBOpenDBRequestEventMap>(type: K, listener: (this: IDBOpenDBRequest, ev: IDBOpenDBRequestEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
2042 addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
2043 removeEventListener<K extends keyof IDBOpenDBRequestEventMap>(type: K, listener: (this: IDBOpenDBRequest, ev: IDBOpenDBRequestEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
2044 removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
2045}
2046
2047declare var IDBOpenDBRequest: {
2048 prototype: IDBOpenDBRequest;
2049 new(): IDBOpenDBRequest;
2050};
2051
2052interface IDBRequestEventMap {
2053 "error": Event;
2054 "success": Event;
2055}
2056
2057/** 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. */
2058interface IDBRequest<T = any> extends EventTarget {
2059 /** 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. */
2060 readonly error: DOMException | null;
2061 onerror: ((this: IDBRequest<T>, ev: Event) => any) | null;
2062 onsuccess: ((this: IDBRequest<T>, ev: Event) => any) | null;
2063 /** Returns "pending" until a request is complete, then returns "done". */
2064 readonly readyState: IDBRequestReadyState;
2065 /** When a request is completed, returns the result, or undefined if the request failed. Throws a "InvalidStateError" DOMException if the request is still pending. */
2066 readonly result: T;
2067 /** Returns the IDBObjectStore, IDBIndex, or IDBCursor the request was made against, or null if is was an open request. */
2068 readonly source: IDBObjectStore | IDBIndex | IDBCursor;
2069 /** 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. */
2070 readonly transaction: IDBTransaction | null;
2071 addEventListener<K extends keyof IDBRequestEventMap>(type: K, listener: (this: IDBRequest<T>, ev: IDBRequestEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
2072 addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
2073 removeEventListener<K extends keyof IDBRequestEventMap>(type: K, listener: (this: IDBRequest<T>, ev: IDBRequestEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
2074 removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
2075}
2076
2077declare var IDBRequest: {
2078 prototype: IDBRequest;
2079 new(): IDBRequest;
2080};
2081
2082interface IDBTransactionEventMap {
2083 "abort": Event;
2084 "complete": Event;
2085 "error": Event;
2086}
2087
2088interface IDBTransaction extends EventTarget {
2089 /** Returns the transaction's connection. */
2090 readonly db: IDBDatabase;
2091 readonly durability: IDBTransactionDurability;
2092 /** If the transaction was aborted, returns the error (a DOMException) providing the reason. */
2093 readonly error: DOMException | null;
2094 /** Returns the mode the transaction was created with ("readonly" or "readwrite"), or "versionchange" for an upgrade transaction. */
2095 readonly mode: IDBTransactionMode;
2096 /** 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. */
2097 readonly objectStoreNames: DOMStringList;
2098 onabort: ((this: IDBTransaction, ev: Event) => any) | null;
2099 oncomplete: ((this: IDBTransaction, ev: Event) => any) | null;
2100 onerror: ((this: IDBTransaction, ev: Event) => any) | null;
2101 /** Aborts the transaction. All pending requests will fail with a "AbortError" DOMException and all changes made to the database will be reverted. */
2102 abort(): void;
2103 commit(): void;
2104 /** Returns an IDBObjectStore in the transaction's scope. */
2105 objectStore(name: string): IDBObjectStore;
2106 addEventListener<K extends keyof IDBTransactionEventMap>(type: K, listener: (this: IDBTransaction, ev: IDBTransactionEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
2107 addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
2108 removeEventListener<K extends keyof IDBTransactionEventMap>(type: K, listener: (this: IDBTransaction, ev: IDBTransactionEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
2109 removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
2110}
2111
2112declare var IDBTransaction: {
2113 prototype: IDBTransaction;
2114 new(): IDBTransaction;
2115};
2116
2117/** This IndexedDB API interface indicates that the version of the database has changed, as the result of an IDBOpenDBRequest.onupgradeneeded event handler function. */
2118interface IDBVersionChangeEvent extends Event {
2119 readonly newVersion: number | null;
2120 readonly oldVersion: number;
2121}
2122
2123declare var IDBVersionChangeEvent: {
2124 prototype: IDBVersionChangeEvent;
2125 new(type: string, eventInitDict?: IDBVersionChangeEventInit): IDBVersionChangeEvent;
2126};
2127
2128interface ImageBitmap {
2129 /** Returns the intrinsic height of the image, in CSS pixels. */
2130 readonly height: number;
2131 /** Returns the intrinsic width of the image, in CSS pixels. */
2132 readonly width: number;
2133 /** Releases imageBitmap's underlying bitmap data. */
2134 close(): void;
2135}
2136
2137declare var ImageBitmap: {
2138 prototype: ImageBitmap;
2139 new(): ImageBitmap;
2140};
2141
2142interface ImageBitmapRenderingContext {
2143 /** Transfers the underlying bitmap data from imageBitmap to context, and the bitmap becomes the contents of the canvas element to which context is bound. */
2144 transferFromImageBitmap(bitmap: ImageBitmap | null): void;
2145}
2146
2147declare var ImageBitmapRenderingContext: {
2148 prototype: ImageBitmapRenderingContext;
2149 new(): ImageBitmapRenderingContext;
2150};
2151
2152/** 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(). */
2153interface ImageData {
2154 readonly colorSpace: PredefinedColorSpace;
2155 /** Returns the one-dimensional array containing the data in RGBA order, as integers in the range 0 to 255. */
2156 readonly data: Uint8ClampedArray;
2157 /** Returns the actual dimensions of the data in the ImageData object, in pixels. */
2158 readonly height: number;
2159 /** Returns the actual dimensions of the data in the ImageData object, in pixels. */
2160 readonly width: number;
2161}
2162
2163declare var ImageData: {
2164 prototype: ImageData;
2165 new(sw: number, sh: number, settings?: ImageDataSettings): ImageData;
2166 new(data: Uint8ClampedArray, sw: number, sh?: number, settings?: ImageDataSettings): ImageData;
2167};
2168
2169interface KHR_parallel_shader_compile {
2170 readonly COMPLETION_STATUS_KHR: GLenum;
2171}
2172
2173/** Available only in secure contexts. */
2174interface Lock {
2175 readonly mode: LockMode;
2176 readonly name: string;
2177}
2178
2179declare var Lock: {
2180 prototype: Lock;
2181 new(): Lock;
2182};
2183
2184/** Available only in secure contexts. */
2185interface LockManager {
2186 query(): Promise<LockManagerSnapshot>;
2187 request(name: string, callback: LockGrantedCallback): Promise<any>;
2188 request(name: string, options: LockOptions, callback: LockGrantedCallback): Promise<any>;
2189}
2190
2191declare var LockManager: {
2192 prototype: LockManager;
2193 new(): LockManager;
2194};
2195
2196interface MediaCapabilities {
2197 decodingInfo(configuration: MediaDecodingConfiguration): Promise<MediaCapabilitiesDecodingInfo>;
2198 encodingInfo(configuration: MediaEncodingConfiguration): Promise<MediaCapabilitiesEncodingInfo>;
2199}
2200
2201declare var MediaCapabilities: {
2202 prototype: MediaCapabilities;
2203 new(): MediaCapabilities;
2204};
2205
2206/** This Channel Messaging API interface allows us to create a new message channel and send data through it via its two MessagePort properties. */
2207interface MessageChannel {
2208 /** Returns the first MessagePort object. */
2209 readonly port1: MessagePort;
2210 /** Returns the second MessagePort object. */
2211 readonly port2: MessagePort;
2212}
2213
2214declare var MessageChannel: {
2215 prototype: MessageChannel;
2216 new(): MessageChannel;
2217};
2218
2219/** A message received by a target object. */
2220interface MessageEvent<T = any> extends Event {
2221 /** Returns the data of the message. */
2222 readonly data: T;
2223 /** Returns the last event ID string, for server-sent events. */
2224 readonly lastEventId: string;
2225 /** Returns the origin of the message, for server-sent events and cross-document messaging. */
2226 readonly origin: string;
2227 /** Returns the MessagePort array sent with the message, for cross-document messaging and channel messaging. */
2228 readonly ports: ReadonlyArray<MessagePort>;
2229 /** Returns the WindowProxy of the source window, for cross-document messaging, and the MessagePort being attached, in the connect event fired at SharedWorkerGlobalScope objects. */
2230 readonly source: MessageEventSource | null;
2231 /** @deprecated */
2232 initMessageEvent(type: string, bubbles?: boolean, cancelable?: boolean, data?: any, origin?: string, lastEventId?: string, source?: MessageEventSource | null, ports?: MessagePort[]): void;
2233}
2234
2235declare var MessageEvent: {
2236 prototype: MessageEvent;
2237 new<T>(type: string, eventInitDict?: MessageEventInit<T>): MessageEvent<T>;
2238};
2239
2240interface MessagePortEventMap {
2241 "message": MessageEvent;
2242 "messageerror": MessageEvent;
2243}
2244
2245/** 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. */
2246interface MessagePort extends EventTarget {
2247 onmessage: ((this: MessagePort, ev: MessageEvent) => any) | null;
2248 onmessageerror: ((this: MessagePort, ev: MessageEvent) => any) | null;
2249 /** Disconnects the port, so that it is no longer active. */
2250 close(): void;
2251 /**
2252 * 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.
2253 *
2254 * Throws a "DataCloneError" DOMException if transfer contains duplicate objects or port, or if message could not be cloned.
2255 */
2256 postMessage(message: any, transfer: Transferable[]): void;
2257 postMessage(message: any, options?: StructuredSerializeOptions): void;
2258 /** Begins dispatching messages received on the port. */
2259 start(): void;
2260 addEventListener<K extends keyof MessagePortEventMap>(type: K, listener: (this: MessagePort, ev: MessagePortEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
2261 addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
2262 removeEventListener<K extends keyof MessagePortEventMap>(type: K, listener: (this: MessagePort, ev: MessagePortEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
2263 removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
2264}
2265
2266declare var MessagePort: {
2267 prototype: MessagePort;
2268 new(): MessagePort;
2269};
2270
2271/** Available only in secure contexts. */
2272interface NavigationPreloadManager {
2273 disable(): Promise<void>;
2274 enable(): Promise<void>;
2275 getState(): Promise<NavigationPreloadState>;
2276 setHeaderValue(value: string): Promise<void>;
2277}
2278
2279declare var NavigationPreloadManager: {
2280 prototype: NavigationPreloadManager;
2281 new(): NavigationPreloadManager;
2282};
2283
2284interface NavigatorConcurrentHardware {
2285 readonly hardwareConcurrency: number;
2286}
2287
2288interface NavigatorID {
2289 /** @deprecated */
2290 readonly appCodeName: string;
2291 /** @deprecated */
2292 readonly appName: string;
2293 /** @deprecated */
2294 readonly appVersion: string;
2295 readonly platform: string;
2296 /** @deprecated */
2297 readonly product: string;
2298 readonly userAgent: string;
2299}
2300
2301interface NavigatorLanguage {
2302 readonly language: string;
2303 readonly languages: ReadonlyArray<string>;
2304}
2305
2306/** Available only in secure contexts. */
2307interface NavigatorLocks {
2308 readonly locks: LockManager;
2309}
2310
2311interface NavigatorOnLine {
2312 readonly onLine: boolean;
2313}
2314
2315/** Available only in secure contexts. */
2316interface NavigatorStorage {
2317 readonly storage: StorageManager;
2318}
2319
2320interface NotificationEventMap {
2321 "click": Event;
2322 "close": Event;
2323 "error": Event;
2324 "show": Event;
2325}
2326
2327/** This Notifications API interface is used to configure and display desktop notifications to the user. */
2328interface Notification extends EventTarget {
2329 readonly body: string;
2330 readonly data: any;
2331 readonly dir: NotificationDirection;
2332 readonly icon: string;
2333 readonly lang: string;
2334 onclick: ((this: Notification, ev: Event) => any) | null;
2335 onclose: ((this: Notification, ev: Event) => any) | null;
2336 onerror: ((this: Notification, ev: Event) => any) | null;
2337 onshow: ((this: Notification, ev: Event) => any) | null;
2338 readonly tag: string;
2339 readonly title: string;
2340 close(): void;
2341 addEventListener<K extends keyof NotificationEventMap>(type: K, listener: (this: Notification, ev: NotificationEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
2342 addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
2343 removeEventListener<K extends keyof NotificationEventMap>(type: K, listener: (this: Notification, ev: NotificationEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
2344 removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
2345}
2346
2347declare var Notification: {
2348 prototype: Notification;
2349 new(title: string, options?: NotificationOptions): Notification;
2350 readonly permission: NotificationPermission;
2351};
2352
2353/** The parameter passed into the onnotificationclick handler, the NotificationEvent interface represents a notification click event that is dispatched on the ServiceWorkerGlobalScope of a ServiceWorker. */
2354interface NotificationEvent extends ExtendableEvent {
2355 readonly action: string;
2356 readonly notification: Notification;
2357}
2358
2359declare var NotificationEvent: {
2360 prototype: NotificationEvent;
2361 new(type: string, eventInitDict: NotificationEventInit): NotificationEvent;
2362};
2363
2364/** The OES_element_index_uint extension is part of the WebGL API and adds support for gl.UNSIGNED_INT types to WebGLRenderingContext.drawElements(). */
2365interface OES_element_index_uint {
2366}
2367
2368interface OES_fbo_render_mipmap {
2369}
2370
2371/** The OES_standard_derivatives extension is part of the WebGL API and adds the GLSL derivative functions dFdx, dFdy, and fwidth. */
2372interface OES_standard_derivatives {
2373 readonly FRAGMENT_SHADER_DERIVATIVE_HINT_OES: GLenum;
2374}
2375
2376/** The OES_texture_float extension is part of the WebGL API and exposes floating-point pixel types for textures. */
2377interface OES_texture_float {
2378}
2379
2380/** The OES_texture_float_linear extension is part of the WebGL API and allows linear filtering with floating-point pixel types for textures. */
2381interface OES_texture_float_linear {
2382}
2383
2384/** 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. */
2385interface OES_texture_half_float {
2386 readonly HALF_FLOAT_OES: GLenum;
2387}
2388
2389/** 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. */
2390interface OES_texture_half_float_linear {
2391}
2392
2393interface OES_vertex_array_object {
2394 bindVertexArrayOES(arrayObject: WebGLVertexArrayObjectOES | null): void;
2395 createVertexArrayOES(): WebGLVertexArrayObjectOES | null;
2396 deleteVertexArrayOES(arrayObject: WebGLVertexArrayObjectOES | null): void;
2397 isVertexArrayOES(arrayObject: WebGLVertexArrayObjectOES | null): GLboolean;
2398 readonly VERTEX_ARRAY_BINDING_OES: GLenum;
2399}
2400
2401interface OVR_multiview2 {
2402 framebufferTextureMultiviewOVR(target: GLenum, attachment: GLenum, texture: WebGLTexture | null, level: GLint, baseViewIndex: GLint, numViews: GLsizei): void;
2403 readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_BASE_VIEW_INDEX_OVR: GLenum;
2404 readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_NUM_VIEWS_OVR: GLenum;
2405 readonly FRAMEBUFFER_INCOMPLETE_VIEW_TARGETS_OVR: GLenum;
2406 readonly MAX_VIEWS_OVR: GLenum;
2407}
2408
2409/** @deprecated this is not available in most browsers */
2410interface OffscreenCanvas extends EventTarget {
2411}
2412
2413/** 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. */
2414interface Path2D extends CanvasPath {
2415 /** Adds to the path the path given by the argument. */
2416 addPath(path: Path2D, transform?: DOMMatrix2DInit): void;
2417}
2418
2419declare var Path2D: {
2420 prototype: Path2D;
2421 new(path?: Path2D | string): Path2D;
2422};
2423
2424interface PerformanceEventMap {
2425 "resourcetimingbufferfull": Event;
2426}
2427
2428/** 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. */
2429interface Performance extends EventTarget {
2430 onresourcetimingbufferfull: ((this: Performance, ev: Event) => any) | null;
2431 readonly timeOrigin: DOMHighResTimeStamp;
2432 clearMarks(markName?: string): void;
2433 clearMeasures(measureName?: string): void;
2434 clearResourceTimings(): void;
2435 getEntries(): PerformanceEntryList;
2436 getEntriesByName(name: string, type?: string): PerformanceEntryList;
2437 getEntriesByType(type: string): PerformanceEntryList;
2438 mark(markName: string, markOptions?: PerformanceMarkOptions): PerformanceMark;
2439 measure(measureName: string, startOrMeasureOptions?: string | PerformanceMeasureOptions, endMark?: string): PerformanceMeasure;
2440 now(): DOMHighResTimeStamp;
2441 setResourceTimingBufferSize(maxSize: number): void;
2442 toJSON(): any;
2443 addEventListener<K extends keyof PerformanceEventMap>(type: K, listener: (this: Performance, ev: PerformanceEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
2444 addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
2445 removeEventListener<K extends keyof PerformanceEventMap>(type: K, listener: (this: Performance, ev: PerformanceEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
2446 removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
2447}
2448
2449declare var Performance: {
2450 prototype: Performance;
2451 new(): Performance;
2452};
2453
2454/** 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). */
2455interface PerformanceEntry {
2456 readonly duration: DOMHighResTimeStamp;
2457 readonly entryType: string;
2458 readonly name: string;
2459 readonly startTime: DOMHighResTimeStamp;
2460 toJSON(): any;
2461}
2462
2463declare var PerformanceEntry: {
2464 prototype: PerformanceEntry;
2465 new(): PerformanceEntry;
2466};
2467
2468/** 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. */
2469interface PerformanceMark extends PerformanceEntry {
2470 readonly detail: any;
2471}
2472
2473declare var PerformanceMark: {
2474 prototype: PerformanceMark;
2475 new(markName: string, markOptions?: PerformanceMarkOptions): PerformanceMark;
2476};
2477
2478/** 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. */
2479interface PerformanceMeasure extends PerformanceEntry {
2480 readonly detail: any;
2481}
2482
2483declare var PerformanceMeasure: {
2484 prototype: PerformanceMeasure;
2485 new(): PerformanceMeasure;
2486};
2487
2488interface PerformanceObserver {
2489 disconnect(): void;
2490 observe(options?: PerformanceObserverInit): void;
2491 takeRecords(): PerformanceEntryList;
2492}
2493
2494declare var PerformanceObserver: {
2495 prototype: PerformanceObserver;
2496 new(callback: PerformanceObserverCallback): PerformanceObserver;
2497 readonly supportedEntryTypes: ReadonlyArray<string>;
2498};
2499
2500interface PerformanceObserverEntryList {
2501 getEntries(): PerformanceEntryList;
2502 getEntriesByName(name: string, type?: string): PerformanceEntryList;
2503 getEntriesByType(type: string): PerformanceEntryList;
2504}
2505
2506declare var PerformanceObserverEntryList: {
2507 prototype: PerformanceObserverEntryList;
2508 new(): PerformanceObserverEntryList;
2509};
2510
2511/** 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. */
2512interface PerformanceResourceTiming extends PerformanceEntry {
2513 readonly connectEnd: DOMHighResTimeStamp;
2514 readonly connectStart: DOMHighResTimeStamp;
2515 readonly decodedBodySize: number;
2516 readonly domainLookupEnd: DOMHighResTimeStamp;
2517 readonly domainLookupStart: DOMHighResTimeStamp;
2518 readonly encodedBodySize: number;
2519 readonly fetchStart: DOMHighResTimeStamp;
2520 readonly initiatorType: string;
2521 readonly nextHopProtocol: string;
2522 readonly redirectEnd: DOMHighResTimeStamp;
2523 readonly redirectStart: DOMHighResTimeStamp;
2524 readonly requestStart: DOMHighResTimeStamp;
2525 readonly responseEnd: DOMHighResTimeStamp;
2526 readonly responseStart: DOMHighResTimeStamp;
2527 readonly secureConnectionStart: DOMHighResTimeStamp;
2528 readonly serverTiming: ReadonlyArray<PerformanceServerTiming>;
2529 readonly transferSize: number;
2530 readonly workerStart: DOMHighResTimeStamp;
2531 toJSON(): any;
2532}
2533
2534declare var PerformanceResourceTiming: {
2535 prototype: PerformanceResourceTiming;
2536 new(): PerformanceResourceTiming;
2537};
2538
2539interface PerformanceServerTiming {
2540 readonly description: string;
2541 readonly duration: DOMHighResTimeStamp;
2542 readonly name: string;
2543 toJSON(): any;
2544}
2545
2546declare var PerformanceServerTiming: {
2547 prototype: PerformanceServerTiming;
2548 new(): PerformanceServerTiming;
2549};
2550
2551interface PermissionStatusEventMap {
2552 "change": Event;
2553}
2554
2555interface PermissionStatus extends EventTarget {
2556 onchange: ((this: PermissionStatus, ev: Event) => any) | null;
2557 readonly state: PermissionState;
2558 addEventListener<K extends keyof PermissionStatusEventMap>(type: K, listener: (this: PermissionStatus, ev: PermissionStatusEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
2559 addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
2560 removeEventListener<K extends keyof PermissionStatusEventMap>(type: K, listener: (this: PermissionStatus, ev: PermissionStatusEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
2561 removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
2562}
2563
2564declare var PermissionStatus: {
2565 prototype: PermissionStatus;
2566 new(): PermissionStatus;
2567};
2568
2569interface Permissions {
2570 query(permissionDesc: PermissionDescriptor): Promise<PermissionStatus>;
2571}
2572
2573declare var Permissions: {
2574 prototype: Permissions;
2575 new(): Permissions;
2576};
2577
2578/** 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>). */
2579interface ProgressEvent<T extends EventTarget = EventTarget> extends Event {
2580 readonly lengthComputable: boolean;
2581 readonly loaded: number;
2582 readonly target: T | null;
2583 readonly total: number;
2584}
2585
2586declare var ProgressEvent: {
2587 prototype: ProgressEvent;
2588 new(type: string, eventInitDict?: ProgressEventInit): ProgressEvent;
2589};
2590
2591interface PromiseRejectionEvent extends Event {
2592 readonly promise: Promise<any>;
2593 readonly reason: any;
2594}
2595
2596declare var PromiseRejectionEvent: {
2597 prototype: PromiseRejectionEvent;
2598 new(type: string, eventInitDict: PromiseRejectionEventInit): PromiseRejectionEvent;
2599};
2600
2601/**
2602 * 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.
2603 * Available only in secure contexts.
2604 */
2605interface PushEvent extends ExtendableEvent {
2606 readonly data: PushMessageData | null;
2607}
2608
2609declare var PushEvent: {
2610 prototype: PushEvent;
2611 new(type: string, eventInitDict?: PushEventInit): PushEvent;
2612};
2613
2614/**
2615 * This Push API interface provides a way to receive notifications from third-party servers as well as request URLs for push notifications.
2616 * Available only in secure contexts.
2617 */
2618interface PushManager {
2619 getSubscription(): Promise<PushSubscription | null>;
2620 permissionState(options?: PushSubscriptionOptionsInit): Promise<PermissionState>;
2621 subscribe(options?: PushSubscriptionOptionsInit): Promise<PushSubscription>;
2622}
2623
2624declare var PushManager: {
2625 prototype: PushManager;
2626 new(): PushManager;
2627 readonly supportedContentEncodings: ReadonlyArray<string>;
2628};
2629
2630/**
2631 * This Push API interface provides methods which let you retrieve the push data sent by a server in various formats.
2632 * Available only in secure contexts.
2633 */
2634interface PushMessageData {
2635 arrayBuffer(): ArrayBuffer;
2636 blob(): Blob;
2637 json(): any;
2638 text(): string;
2639}
2640
2641declare var PushMessageData: {
2642 prototype: PushMessageData;
2643 new(): PushMessageData;
2644};
2645
2646/**
2647 * This Push API interface provides a subcription's URL endpoint and allows unsubscription from a push service.
2648 * Available only in secure contexts.
2649 */
2650interface PushSubscription {
2651 readonly endpoint: string;
2652 readonly expirationTime: EpochTimeStamp | null;
2653 readonly options: PushSubscriptionOptions;
2654 getKey(name: PushEncryptionKeyName): ArrayBuffer | null;
2655 toJSON(): PushSubscriptionJSON;
2656 unsubscribe(): Promise<boolean>;
2657}
2658
2659declare var PushSubscription: {
2660 prototype: PushSubscription;
2661 new(): PushSubscription;
2662};
2663
2664/** Available only in secure contexts. */
2665interface PushSubscriptionOptions {
2666 readonly applicationServerKey: ArrayBuffer | null;
2667}
2668
2669declare var PushSubscriptionOptions: {
2670 prototype: PushSubscriptionOptions;
2671 new(): PushSubscriptionOptions;
2672};
2673
2674interface RTCEncodedAudioFrame {
2675 data: ArrayBuffer;
2676 readonly timestamp: number;
2677 getMetadata(): RTCEncodedAudioFrameMetadata;
2678}
2679
2680declare var RTCEncodedAudioFrame: {
2681 prototype: RTCEncodedAudioFrame;
2682 new(): RTCEncodedAudioFrame;
2683};
2684
2685interface RTCEncodedVideoFrame {
2686 data: ArrayBuffer;
2687 readonly timestamp: number;
2688 readonly type: RTCEncodedVideoFrameType;
2689 getMetadata(): RTCEncodedVideoFrameMetadata;
2690}
2691
2692declare var RTCEncodedVideoFrame: {
2693 prototype: RTCEncodedVideoFrame;
2694 new(): RTCEncodedVideoFrame;
2695};
2696
2697interface ReadableByteStreamController {
2698 readonly byobRequest: ReadableStreamBYOBRequest | null;
2699 readonly desiredSize: number | null;
2700 close(): void;
2701 enqueue(chunk: ArrayBufferView): void;
2702 error(e?: any): void;
2703}
2704
2705declare var ReadableByteStreamController: {
2706 prototype: ReadableByteStreamController;
2707 new(): ReadableByteStreamController;
2708};
2709
2710/** 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. */
2711interface ReadableStream<R = any> {
2712 readonly locked: boolean;
2713 cancel(reason?: any): Promise<void>;
2714 getReader(): ReadableStreamDefaultReader<R>;
2715 pipeThrough<T>(transform: ReadableWritablePair<T, R>, options?: StreamPipeOptions): ReadableStream<T>;
2716 pipeTo(destination: WritableStream<R>, options?: StreamPipeOptions): Promise<void>;
2717 tee(): [ReadableStream<R>, ReadableStream<R>];
2718}
2719
2720declare var ReadableStream: {
2721 prototype: ReadableStream;
2722 new<R = any>(underlyingSource?: UnderlyingSource<R>, strategy?: QueuingStrategy<R>): ReadableStream<R>;
2723};
2724
2725interface ReadableStreamBYOBReader extends ReadableStreamGenericReader {
2726 read(view: ArrayBufferView): Promise<ReadableStreamReadResult<ArrayBufferView>>;
2727 releaseLock(): void;
2728}
2729
2730declare var ReadableStreamBYOBReader: {
2731 prototype: ReadableStreamBYOBReader;
2732 new(stream: ReadableStream): ReadableStreamBYOBReader;
2733};
2734
2735interface ReadableStreamBYOBRequest {
2736 readonly view: ArrayBufferView | null;
2737 respond(bytesWritten: number): void;
2738 respondWithNewView(view: ArrayBufferView): void;
2739}
2740
2741declare var ReadableStreamBYOBRequest: {
2742 prototype: ReadableStreamBYOBRequest;
2743 new(): ReadableStreamBYOBRequest;
2744};
2745
2746interface ReadableStreamDefaultController<R = any> {
2747 readonly desiredSize: number | null;
2748 close(): void;
2749 enqueue(chunk?: R): void;
2750 error(e?: any): void;
2751}
2752
2753declare var ReadableStreamDefaultController: {
2754 prototype: ReadableStreamDefaultController;
2755 new(): ReadableStreamDefaultController;
2756};
2757
2758interface ReadableStreamDefaultReader<R = any> extends ReadableStreamGenericReader {
2759 read(): Promise<ReadableStreamReadResult<R>>;
2760 releaseLock(): void;
2761}
2762
2763declare var ReadableStreamDefaultReader: {
2764 prototype: ReadableStreamDefaultReader;
2765 new<R = any>(stream: ReadableStream<R>): ReadableStreamDefaultReader<R>;
2766};
2767
2768interface ReadableStreamGenericReader {
2769 readonly closed: Promise<undefined>;
2770 cancel(reason?: any): Promise<void>;
2771}
2772
2773/** This Fetch API interface represents a resource request. */
2774interface Request extends Body {
2775 /** Returns the cache mode associated with request, which is a string indicating how the request will interact with the browser's cache when fetching. */
2776 readonly cache: RequestCache;
2777 /** 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. */
2778 readonly credentials: RequestCredentials;
2779 /** Returns the kind of resource requested by request, e.g., "document" or "script". */
2780 readonly destination: RequestDestination;
2781 /** 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. */
2782 readonly headers: Headers;
2783 /** 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] */
2784 readonly integrity: string;
2785 /** Returns a boolean indicating whether or not request can outlive the global in which it was created. */
2786 readonly keepalive: boolean;
2787 /** Returns request's HTTP method, which is "GET" by default. */
2788 readonly method: string;
2789 /** 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. */
2790 readonly mode: RequestMode;
2791 /** 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. */
2792 readonly redirect: RequestRedirect;
2793 /** 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. */
2794 readonly referrer: string;
2795 /** Returns the referrer policy associated with request. This is used during fetching to compute the value of the request's referrer. */
2796 readonly referrerPolicy: ReferrerPolicy;
2797 /** Returns the signal associated with request, which is an AbortSignal object indicating whether or not request has been aborted, and its abort event handler. */
2798 readonly signal: AbortSignal;
2799 /** Returns the URL of request as a string. */
2800 readonly url: string;
2801 clone(): Request;
2802}
2803
2804declare var Request: {
2805 prototype: Request;
2806 new(input: RequestInfo | URL, init?: RequestInit): Request;
2807};
2808
2809/** This Fetch API interface represents the response to a request. */
2810interface Response extends Body {
2811 readonly headers: Headers;
2812 readonly ok: boolean;
2813 readonly redirected: boolean;
2814 readonly status: number;
2815 readonly statusText: string;
2816 readonly type: ResponseType;
2817 readonly url: string;
2818 clone(): Response;
2819}
2820
2821declare var Response: {
2822 prototype: Response;
2823 new(body?: BodyInit | null, init?: ResponseInit): Response;
2824 error(): Response;
2825 redirect(url: string | URL, status?: number): Response;
2826};
2827
2828/** Inherits from Event, and represents the event object of an event sent on a document or worker when its content security policy is violated. */
2829interface SecurityPolicyViolationEvent extends Event {
2830 readonly blockedURI: string;
2831 readonly columnNumber: number;
2832 readonly disposition: SecurityPolicyViolationEventDisposition;
2833 readonly documentURI: string;
2834 readonly effectiveDirective: string;
2835 readonly lineNumber: number;
2836 readonly originalPolicy: string;
2837 readonly referrer: string;
2838 readonly sample: string;
2839 readonly sourceFile: string;
2840 readonly statusCode: number;
2841 readonly violatedDirective: string;
2842}
2843
2844declare var SecurityPolicyViolationEvent: {
2845 prototype: SecurityPolicyViolationEvent;
2846 new(type: string, eventInitDict?: SecurityPolicyViolationEventInit): SecurityPolicyViolationEvent;
2847};
2848
2849interface ServiceWorkerEventMap extends AbstractWorkerEventMap {
2850 "statechange": Event;
2851}
2852
2853/**
2854 * 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.
2855 * Available only in secure contexts.
2856 */
2857interface ServiceWorker extends EventTarget, AbstractWorker {
2858 onstatechange: ((this: ServiceWorker, ev: Event) => any) | null;
2859 readonly scriptURL: string;
2860 readonly state: ServiceWorkerState;
2861 postMessage(message: any, transfer: Transferable[]): void;
2862 postMessage(message: any, options?: StructuredSerializeOptions): void;
2863 addEventListener<K extends keyof ServiceWorkerEventMap>(type: K, listener: (this: ServiceWorker, ev: ServiceWorkerEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
2864 addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
2865 removeEventListener<K extends keyof ServiceWorkerEventMap>(type: K, listener: (this: ServiceWorker, ev: ServiceWorkerEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
2866 removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
2867}
2868
2869declare var ServiceWorker: {
2870 prototype: ServiceWorker;
2871 new(): ServiceWorker;
2872};
2873
2874interface ServiceWorkerContainerEventMap {
2875 "controllerchange": Event;
2876 "message": MessageEvent;
2877 "messageerror": MessageEvent;
2878}
2879
2880/**
2881 * 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.
2882 * Available only in secure contexts.
2883 */
2884interface ServiceWorkerContainer extends EventTarget {
2885 readonly controller: ServiceWorker | null;
2886 oncontrollerchange: ((this: ServiceWorkerContainer, ev: Event) => any) | null;
2887 onmessage: ((this: ServiceWorkerContainer, ev: MessageEvent) => any) | null;
2888 onmessageerror: ((this: ServiceWorkerContainer, ev: MessageEvent) => any) | null;
2889 readonly ready: Promise<ServiceWorkerRegistration>;
2890 getRegistration(clientURL?: string | URL): Promise<ServiceWorkerRegistration | undefined>;
2891 getRegistrations(): Promise<ReadonlyArray<ServiceWorkerRegistration>>;
2892 register(scriptURL: string | URL, options?: RegistrationOptions): Promise<ServiceWorkerRegistration>;
2893 startMessages(): void;
2894 addEventListener<K extends keyof ServiceWorkerContainerEventMap>(type: K, listener: (this: ServiceWorkerContainer, ev: ServiceWorkerContainerEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
2895 addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
2896 removeEventListener<K extends keyof ServiceWorkerContainerEventMap>(type: K, listener: (this: ServiceWorkerContainer, ev: ServiceWorkerContainerEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
2897 removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
2898}
2899
2900declare var ServiceWorkerContainer: {
2901 prototype: ServiceWorkerContainer;
2902 new(): ServiceWorkerContainer;
2903};
2904
2905interface ServiceWorkerGlobalScopeEventMap extends WorkerGlobalScopeEventMap {
2906 "activate": ExtendableEvent;
2907 "fetch": FetchEvent;
2908 "install": ExtendableEvent;
2909 "message": ExtendableMessageEvent;
2910 "messageerror": MessageEvent;
2911 "notificationclick": NotificationEvent;
2912 "notificationclose": NotificationEvent;
2913 "push": PushEvent;
2914}
2915
2916/** This ServiceWorker API interface represents the global execution context of a service worker. */
2917interface ServiceWorkerGlobalScope extends WorkerGlobalScope {
2918 readonly clients: Clients;
2919 onactivate: ((this: ServiceWorkerGlobalScope, ev: ExtendableEvent) => any) | null;
2920 onfetch: ((this: ServiceWorkerGlobalScope, ev: FetchEvent) => any) | null;
2921 oninstall: ((this: ServiceWorkerGlobalScope, ev: ExtendableEvent) => any) | null;
2922 onmessage: ((this: ServiceWorkerGlobalScope, ev: ExtendableMessageEvent) => any) | null;
2923 onmessageerror: ((this: ServiceWorkerGlobalScope, ev: MessageEvent) => any) | null;
2924 onnotificationclick: ((this: ServiceWorkerGlobalScope, ev: NotificationEvent) => any) | null;
2925 onnotificationclose: ((this: ServiceWorkerGlobalScope, ev: NotificationEvent) => any) | null;
2926 onpush: ((this: ServiceWorkerGlobalScope, ev: PushEvent) => any) | null;
2927 readonly registration: ServiceWorkerRegistration;
2928 readonly serviceWorker: ServiceWorker;
2929 skipWaiting(): Promise<void>;
2930 addEventListener<K extends keyof ServiceWorkerGlobalScopeEventMap>(type: K, listener: (this: ServiceWorkerGlobalScope, ev: ServiceWorkerGlobalScopeEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
2931 addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
2932 removeEventListener<K extends keyof ServiceWorkerGlobalScopeEventMap>(type: K, listener: (this: ServiceWorkerGlobalScope, ev: ServiceWorkerGlobalScopeEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
2933 removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
2934}
2935
2936declare var ServiceWorkerGlobalScope: {
2937 prototype: ServiceWorkerGlobalScope;
2938 new(): ServiceWorkerGlobalScope;
2939};
2940
2941interface ServiceWorkerRegistrationEventMap {
2942 "updatefound": Event;
2943}
2944
2945/**
2946 * 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.
2947 * Available only in secure contexts.
2948 */
2949interface ServiceWorkerRegistration extends EventTarget {
2950 readonly active: ServiceWorker | null;
2951 readonly installing: ServiceWorker | null;
2952 readonly navigationPreload: NavigationPreloadManager;
2953 onupdatefound: ((this: ServiceWorkerRegistration, ev: Event) => any) | null;
2954 readonly pushManager: PushManager;
2955 readonly scope: string;
2956 readonly updateViaCache: ServiceWorkerUpdateViaCache;
2957 readonly waiting: ServiceWorker | null;
2958 getNotifications(filter?: GetNotificationOptions): Promise<Notification[]>;
2959 showNotification(title: string, options?: NotificationOptions): Promise<void>;
2960 unregister(): Promise<boolean>;
2961 update(): Promise<void>;
2962 addEventListener<K extends keyof ServiceWorkerRegistrationEventMap>(type: K, listener: (this: ServiceWorkerRegistration, ev: ServiceWorkerRegistrationEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
2963 addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
2964 removeEventListener<K extends keyof ServiceWorkerRegistrationEventMap>(type: K, listener: (this: ServiceWorkerRegistration, ev: ServiceWorkerRegistrationEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
2965 removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
2966}
2967
2968declare var ServiceWorkerRegistration: {
2969 prototype: ServiceWorkerRegistration;
2970 new(): ServiceWorkerRegistration;
2971};
2972
2973interface SharedWorkerGlobalScopeEventMap extends WorkerGlobalScopeEventMap {
2974 "connect": MessageEvent;
2975}
2976
2977interface SharedWorkerGlobalScope extends WorkerGlobalScope {
2978 /** 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. */
2979 readonly name: string;
2980 onconnect: ((this: SharedWorkerGlobalScope, ev: MessageEvent) => any) | null;
2981 /** Aborts sharedWorkerGlobal. */
2982 close(): void;
2983 addEventListener<K extends keyof SharedWorkerGlobalScopeEventMap>(type: K, listener: (this: SharedWorkerGlobalScope, ev: SharedWorkerGlobalScopeEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
2984 addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
2985 removeEventListener<K extends keyof SharedWorkerGlobalScopeEventMap>(type: K, listener: (this: SharedWorkerGlobalScope, ev: SharedWorkerGlobalScopeEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
2986 removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
2987}
2988
2989declare var SharedWorkerGlobalScope: {
2990 prototype: SharedWorkerGlobalScope;
2991 new(): SharedWorkerGlobalScope;
2992};
2993
2994/** Available only in secure contexts. */
2995interface StorageManager {
2996 estimate(): Promise<StorageEstimate>;
2997 getDirectory(): Promise<FileSystemDirectoryHandle>;
2998 persisted(): Promise<boolean>;
2999}
3000
3001declare var StorageManager: {
3002 prototype: StorageManager;
3003 new(): StorageManager;
3004};
3005
3006/**
3007 * 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).
3008 * Available only in secure contexts.
3009 */
3010interface SubtleCrypto {
3011 decrypt(algorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams, key: CryptoKey, data: BufferSource): Promise<ArrayBuffer>;
3012 deriveBits(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, length: number): Promise<ArrayBuffer>;
3013 deriveKey(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, derivedKeyType: AlgorithmIdentifier | AesDerivedKeyParams | HmacImportParams | HkdfParams | Pbkdf2Params, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey>;
3014 digest(algorithm: AlgorithmIdentifier, data: BufferSource): Promise<ArrayBuffer>;
3015 encrypt(algorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams, key: CryptoKey, data: BufferSource): Promise<ArrayBuffer>;
3016 exportKey(format: "jwk", key: CryptoKey): Promise<JsonWebKey>;
3017 exportKey(format: Exclude<KeyFormat, "jwk">, key: CryptoKey): Promise<ArrayBuffer>;
3018 generateKey(algorithm: RsaHashedKeyGenParams | EcKeyGenParams, extractable: boolean, keyUsages: ReadonlyArray<KeyUsage>): Promise<CryptoKeyPair>;
3019 generateKey(algorithm: AesKeyGenParams | HmacKeyGenParams | Pbkdf2Params, extractable: boolean, keyUsages: ReadonlyArray<KeyUsage>): Promise<CryptoKey>;
3020 generateKey(algorithm: AlgorithmIdentifier, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKeyPair | CryptoKey>;
3021 importKey(format: "jwk", keyData: JsonWebKey, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: ReadonlyArray<KeyUsage>): Promise<CryptoKey>;
3022 importKey(format: Exclude<KeyFormat, "jwk">, keyData: BufferSource, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey>;
3023 sign(algorithm: AlgorithmIdentifier | RsaPssParams | EcdsaParams, key: CryptoKey, data: BufferSource): Promise<ArrayBuffer>;
3024 unwrapKey(format: KeyFormat, wrappedKey: BufferSource, unwrappingKey: CryptoKey, unwrapAlgorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams, unwrappedKeyAlgorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey>;
3025 verify(algorithm: AlgorithmIdentifier | RsaPssParams | EcdsaParams, key: CryptoKey, signature: BufferSource, data: BufferSource): Promise<boolean>;
3026 wrapKey(format: KeyFormat, key: CryptoKey, wrappingKey: CryptoKey, wrapAlgorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams): Promise<ArrayBuffer>;
3027}
3028
3029declare var SubtleCrypto: {
3030 prototype: SubtleCrypto;
3031 new(): SubtleCrypto;
3032};
3033
3034/** A decoder for a specific method, that is a specific character encoding, like utf-8, iso-8859-2, koi8, cp1261, gbk, etcA decoder takes a stream of bytes as input and emits a stream of code points. For a more scalable, non-native library, see StringViewa C-like representation of strings based on typed arrays. */
3035interface TextDecoder extends TextDecoderCommon {
3036 /**
3037 * 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.
3038 *
3039 * ```
3040 * var string = "", decoder = new TextDecoder(encoding), buffer;
3041 * while(buffer = next_chunk()) {
3042 * string += decoder.decode(buffer, {stream:true});
3043 * }
3044 * string += decoder.decode(); // end-of-queue
3045 * ```
3046 *
3047 * If the error mode is "fatal" and encoding's decoder returns error, throws a TypeError.
3048 */
3049 decode(input?: BufferSource, options?: TextDecodeOptions): string;
3050}
3051
3052declare var TextDecoder: {
3053 prototype: TextDecoder;
3054 new(label?: string, options?: TextDecoderOptions): TextDecoder;
3055};
3056
3057interface TextDecoderCommon {
3058 /** Returns encoding's name, lowercased. */
3059 readonly encoding: string;
3060 /** Returns true if error mode is "fatal", otherwise false. */
3061 readonly fatal: boolean;
3062 /** Returns the value of ignore BOM. */
3063 readonly ignoreBOM: boolean;
3064}
3065
3066interface TextDecoderStream extends GenericTransformStream, TextDecoderCommon {
3067 readonly readable: ReadableStream<string>;
3068 readonly writable: WritableStream<BufferSource>;
3069}
3070
3071declare var TextDecoderStream: {
3072 prototype: TextDecoderStream;
3073 new(label?: string, options?: TextDecoderOptions): TextDecoderStream;
3074};
3075
3076/** TextEncoder takes a stream of code points as input and emits a stream of bytes. For a more scalable, non-native library, see StringViewa C-like representation of strings based on typed arrays. */
3077interface TextEncoder extends TextEncoderCommon {
3078 /** Returns the result of running UTF-8's encoder. */
3079 encode(input?: string): Uint8Array;
3080 /** 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. */
3081 encodeInto(source: string, destination: Uint8Array): TextEncoderEncodeIntoResult;
3082}
3083
3084declare var TextEncoder: {
3085 prototype: TextEncoder;
3086 new(): TextEncoder;
3087};
3088
3089interface TextEncoderCommon {
3090 /** Returns "utf-8". */
3091 readonly encoding: string;
3092}
3093
3094interface TextEncoderStream extends GenericTransformStream, TextEncoderCommon {
3095 readonly readable: ReadableStream<Uint8Array>;
3096 readonly writable: WritableStream<string>;
3097}
3098
3099declare var TextEncoderStream: {
3100 prototype: TextEncoderStream;
3101 new(): TextEncoderStream;
3102};
3103
3104/** The dimensions of a piece of text in the canvas, as created by the CanvasRenderingContext2D.measureText() method. */
3105interface TextMetrics {
3106 /** Returns the measurement described below. */
3107 readonly actualBoundingBoxAscent: number;
3108 /** Returns the measurement described below. */
3109 readonly actualBoundingBoxDescent: number;
3110 /** Returns the measurement described below. */
3111 readonly actualBoundingBoxLeft: number;
3112 /** Returns the measurement described below. */
3113 readonly actualBoundingBoxRight: number;
3114 /** Returns the measurement described below. */
3115 readonly fontBoundingBoxAscent: number;
3116 /** Returns the measurement described below. */
3117 readonly fontBoundingBoxDescent: number;
3118 /** Returns the measurement described below. */
3119 readonly width: number;
3120}
3121
3122declare var TextMetrics: {
3123 prototype: TextMetrics;
3124 new(): TextMetrics;
3125};
3126
3127interface TransformStream<I = any, O = any> {
3128 readonly readable: ReadableStream<O>;
3129 readonly writable: WritableStream<I>;
3130}
3131
3132declare var TransformStream: {
3133 prototype: TransformStream;
3134 new<I = any, O = any>(transformer?: Transformer<I, O>, writableStrategy?: QueuingStrategy<I>, readableStrategy?: QueuingStrategy<O>): TransformStream<I, O>;
3135};
3136
3137interface TransformStreamDefaultController<O = any> {
3138 readonly desiredSize: number | null;
3139 enqueue(chunk?: O): void;
3140 error(reason?: any): void;
3141 terminate(): void;
3142}
3143
3144declare var TransformStreamDefaultController: {
3145 prototype: TransformStreamDefaultController;
3146 new(): TransformStreamDefaultController;
3147};
3148
3149/** The URL interface represents an object providing static methods used for creating object URLs. */
3150interface URL {
3151 hash: string;
3152 host: string;
3153 hostname: string;
3154 href: string;
3155 toString(): string;
3156 readonly origin: string;
3157 password: string;
3158 pathname: string;
3159 port: string;
3160 protocol: string;
3161 search: string;
3162 readonly searchParams: URLSearchParams;
3163 username: string;
3164 toJSON(): string;
3165}
3166
3167declare var URL: {
3168 prototype: URL;
3169 new(url: string | URL, base?: string | URL): URL;
3170 createObjectURL(obj: Blob): string;
3171 revokeObjectURL(url: string): void;
3172};
3173
3174interface URLSearchParams {
3175 /** Appends a specified key/value pair as a new search parameter. */
3176 append(name: string, value: string): void;
3177 /** Deletes the given search parameter, and its associated value, from the list of all search parameters. */
3178 delete(name: string): void;
3179 /** Returns the first value associated to the given search parameter. */
3180 get(name: string): string | null;
3181 /** Returns all the values association with a given search parameter. */
3182 getAll(name: string): string[];
3183 /** Returns a Boolean indicating if such a search parameter exists. */
3184 has(name: string): boolean;
3185 /** Sets the value associated to a given search parameter to the given value. If there were several values, delete the others. */
3186 set(name: string, value: string): void;
3187 sort(): void;
3188 /** Returns a string containing a query string suitable for use in a URL. Does not include the question mark. */
3189 toString(): string;
3190 forEach(callbackfn: (value: string, key: string, parent: URLSearchParams) => void, thisArg?: any): void;
3191}
3192
3193declare var URLSearchParams: {
3194 prototype: URLSearchParams;
3195 new(init?: string[][] | Record<string, string> | string | URLSearchParams): URLSearchParams;
3196 toString(): string;
3197};
3198
3199interface VideoColorSpace {
3200 readonly fullRange: boolean | null;
3201 readonly matrix: VideoMatrixCoefficients | null;
3202 readonly primaries: VideoColorPrimaries | null;
3203 readonly transfer: VideoTransferCharacteristics | null;
3204 toJSON(): VideoColorSpaceInit;
3205}
3206
3207declare var VideoColorSpace: {
3208 prototype: VideoColorSpace;
3209 new(init?: VideoColorSpaceInit): VideoColorSpace;
3210};
3211
3212interface WEBGL_color_buffer_float {
3213 readonly FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT: GLenum;
3214 readonly RGBA32F_EXT: GLenum;
3215 readonly UNSIGNED_NORMALIZED_EXT: GLenum;
3216}
3217
3218interface WEBGL_compressed_texture_astc {
3219 getSupportedProfiles(): string[];
3220 readonly COMPRESSED_RGBA_ASTC_10x10_KHR: GLenum;
3221 readonly COMPRESSED_RGBA_ASTC_10x5_KHR: GLenum;
3222 readonly COMPRESSED_RGBA_ASTC_10x6_KHR: GLenum;
3223 readonly COMPRESSED_RGBA_ASTC_10x8_KHR: GLenum;
3224 readonly COMPRESSED_RGBA_ASTC_12x10_KHR: GLenum;
3225 readonly COMPRESSED_RGBA_ASTC_12x12_KHR: GLenum;
3226 readonly COMPRESSED_RGBA_ASTC_4x4_KHR: GLenum;
3227 readonly COMPRESSED_RGBA_ASTC_5x4_KHR: GLenum;
3228 readonly COMPRESSED_RGBA_ASTC_5x5_KHR: GLenum;
3229 readonly COMPRESSED_RGBA_ASTC_6x5_KHR: GLenum;
3230 readonly COMPRESSED_RGBA_ASTC_6x6_KHR: GLenum;
3231 readonly COMPRESSED_RGBA_ASTC_8x5_KHR: GLenum;
3232 readonly COMPRESSED_RGBA_ASTC_8x6_KHR: GLenum;
3233 readonly COMPRESSED_RGBA_ASTC_8x8_KHR: GLenum;
3234 readonly COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR: GLenum;
3235 readonly COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR: GLenum;
3236 readonly COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR: GLenum;
3237 readonly COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR: GLenum;
3238 readonly COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR: GLenum;
3239 readonly COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR: GLenum;
3240 readonly COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR: GLenum;
3241 readonly COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR: GLenum;
3242 readonly COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR: GLenum;
3243 readonly COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR: GLenum;
3244 readonly COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR: GLenum;
3245 readonly COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR: GLenum;
3246 readonly COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR: GLenum;
3247 readonly COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR: GLenum;
3248}
3249
3250interface WEBGL_compressed_texture_etc {
3251 readonly COMPRESSED_R11_EAC: GLenum;
3252 readonly COMPRESSED_RG11_EAC: GLenum;
3253 readonly COMPRESSED_RGB8_ETC2: GLenum;
3254 readonly COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2: GLenum;
3255 readonly COMPRESSED_RGBA8_ETC2_EAC: GLenum;
3256 readonly COMPRESSED_SIGNED_R11_EAC: GLenum;
3257 readonly COMPRESSED_SIGNED_RG11_EAC: GLenum;
3258 readonly COMPRESSED_SRGB8_ALPHA8_ETC2_EAC: GLenum;
3259 readonly COMPRESSED_SRGB8_ETC2: GLenum;
3260 readonly COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2: GLenum;
3261}
3262
3263interface WEBGL_compressed_texture_etc1 {
3264 readonly COMPRESSED_RGB_ETC1_WEBGL: GLenum;
3265}
3266
3267/** The WEBGL_compressed_texture_s3tc extension is part of the WebGL API and exposes four S3TC compressed texture formats. */
3268interface WEBGL_compressed_texture_s3tc {
3269 readonly COMPRESSED_RGBA_S3TC_DXT1_EXT: GLenum;
3270 readonly COMPRESSED_RGBA_S3TC_DXT3_EXT: GLenum;
3271 readonly COMPRESSED_RGBA_S3TC_DXT5_EXT: GLenum;
3272 readonly COMPRESSED_RGB_S3TC_DXT1_EXT: GLenum;
3273}
3274
3275interface WEBGL_compressed_texture_s3tc_srgb {
3276 readonly COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT: GLenum;
3277 readonly COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT: GLenum;
3278 readonly COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT: GLenum;
3279 readonly COMPRESSED_SRGB_S3TC_DXT1_EXT: GLenum;
3280}
3281
3282/** 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. */
3283interface WEBGL_debug_renderer_info {
3284 readonly UNMASKED_RENDERER_WEBGL: GLenum;
3285 readonly UNMASKED_VENDOR_WEBGL: GLenum;
3286}
3287
3288interface WEBGL_debug_shaders {
3289 getTranslatedShaderSource(shader: WebGLShader): string;
3290}
3291
3292/** The WEBGL_depth_texture extension is part of the WebGL API and defines 2D depth and depth-stencil textures. */
3293interface WEBGL_depth_texture {
3294 readonly UNSIGNED_INT_24_8_WEBGL: GLenum;
3295}
3296
3297interface WEBGL_draw_buffers {
3298 drawBuffersWEBGL(buffers: GLenum[]): void;
3299 readonly COLOR_ATTACHMENT0_WEBGL: GLenum;
3300 readonly COLOR_ATTACHMENT10_WEBGL: GLenum;
3301 readonly COLOR_ATTACHMENT11_WEBGL: GLenum;
3302 readonly COLOR_ATTACHMENT12_WEBGL: GLenum;
3303 readonly COLOR_ATTACHMENT13_WEBGL: GLenum;
3304 readonly COLOR_ATTACHMENT14_WEBGL: GLenum;
3305 readonly COLOR_ATTACHMENT15_WEBGL: GLenum;
3306 readonly COLOR_ATTACHMENT1_WEBGL: GLenum;
3307 readonly COLOR_ATTACHMENT2_WEBGL: GLenum;
3308 readonly COLOR_ATTACHMENT3_WEBGL: GLenum;
3309 readonly COLOR_ATTACHMENT4_WEBGL: GLenum;
3310 readonly COLOR_ATTACHMENT5_WEBGL: GLenum;
3311 readonly COLOR_ATTACHMENT6_WEBGL: GLenum;
3312 readonly COLOR_ATTACHMENT7_WEBGL: GLenum;
3313 readonly COLOR_ATTACHMENT8_WEBGL: GLenum;
3314 readonly COLOR_ATTACHMENT9_WEBGL: GLenum;
3315 readonly DRAW_BUFFER0_WEBGL: GLenum;
3316 readonly DRAW_BUFFER10_WEBGL: GLenum;
3317 readonly DRAW_BUFFER11_WEBGL: GLenum;
3318 readonly DRAW_BUFFER12_WEBGL: GLenum;
3319 readonly DRAW_BUFFER13_WEBGL: GLenum;
3320 readonly DRAW_BUFFER14_WEBGL: GLenum;
3321 readonly DRAW_BUFFER15_WEBGL: GLenum;
3322 readonly DRAW_BUFFER1_WEBGL: GLenum;
3323 readonly DRAW_BUFFER2_WEBGL: GLenum;
3324 readonly DRAW_BUFFER3_WEBGL: GLenum;
3325 readonly DRAW_BUFFER4_WEBGL: GLenum;
3326 readonly DRAW_BUFFER5_WEBGL: GLenum;
3327 readonly DRAW_BUFFER6_WEBGL: GLenum;
3328 readonly DRAW_BUFFER7_WEBGL: GLenum;
3329 readonly DRAW_BUFFER8_WEBGL: GLenum;
3330 readonly DRAW_BUFFER9_WEBGL: GLenum;
3331 readonly MAX_COLOR_ATTACHMENTS_WEBGL: GLenum;
3332 readonly MAX_DRAW_BUFFERS_WEBGL: GLenum;
3333}
3334
3335interface WEBGL_lose_context {
3336 loseContext(): void;
3337 restoreContext(): void;
3338}
3339
3340interface WEBGL_multi_draw {
3341 multiDrawArraysInstancedWEBGL(mode: GLenum, firstsList: Int32Array | GLint[], firstsOffset: GLuint, countsList: Int32Array | GLsizei[], countsOffset: GLuint, instanceCountsList: Int32Array | GLsizei[], instanceCountsOffset: GLuint, drawcount: GLsizei): void;
3342 multiDrawArraysWEBGL(mode: GLenum, firstsList: Int32Array | GLint[], firstsOffset: GLuint, countsList: Int32Array | GLsizei[], countsOffset: GLuint, drawcount: GLsizei): void;
3343 multiDrawElementsInstancedWEBGL(mode: GLenum, countsList: Int32Array | GLint[], countsOffset: GLuint, type: GLenum, offsetsList: Int32Array | GLsizei[], offsetsOffset: GLuint, instanceCountsList: Int32Array | GLsizei[], instanceCountsOffset: GLuint, drawcount: GLsizei): void;
3344 multiDrawElementsWEBGL(mode: GLenum, countsList: Int32Array | GLint[], countsOffset: GLuint, type: GLenum, offsetsList: Int32Array | GLsizei[], offsetsOffset: GLuint, drawcount: GLsizei): void;
3345}
3346
3347interface WebGL2RenderingContext extends WebGL2RenderingContextBase, WebGL2RenderingContextOverloads, WebGLRenderingContextBase {
3348}
3349
3350declare var WebGL2RenderingContext: {
3351 prototype: WebGL2RenderingContext;
3352 new(): WebGL2RenderingContext;
3353 readonly ACTIVE_UNIFORM_BLOCKS: GLenum;
3354 readonly ALREADY_SIGNALED: GLenum;
3355 readonly ANY_SAMPLES_PASSED: GLenum;
3356 readonly ANY_SAMPLES_PASSED_CONSERVATIVE: GLenum;
3357 readonly COLOR: GLenum;
3358 readonly COLOR_ATTACHMENT1: GLenum;
3359 readonly COLOR_ATTACHMENT10: GLenum;
3360 readonly COLOR_ATTACHMENT11: GLenum;
3361 readonly COLOR_ATTACHMENT12: GLenum;
3362 readonly COLOR_ATTACHMENT13: GLenum;
3363 readonly COLOR_ATTACHMENT14: GLenum;
3364 readonly COLOR_ATTACHMENT15: GLenum;
3365 readonly COLOR_ATTACHMENT2: GLenum;
3366 readonly COLOR_ATTACHMENT3: GLenum;
3367 readonly COLOR_ATTACHMENT4: GLenum;
3368 readonly COLOR_ATTACHMENT5: GLenum;
3369 readonly COLOR_ATTACHMENT6: GLenum;
3370 readonly COLOR_ATTACHMENT7: GLenum;
3371 readonly COLOR_ATTACHMENT8: GLenum;
3372 readonly COLOR_ATTACHMENT9: GLenum;
3373 readonly COMPARE_REF_TO_TEXTURE: GLenum;
3374 readonly CONDITION_SATISFIED: GLenum;
3375 readonly COPY_READ_BUFFER: GLenum;
3376 readonly COPY_READ_BUFFER_BINDING: GLenum;
3377 readonly COPY_WRITE_BUFFER: GLenum;
3378 readonly COPY_WRITE_BUFFER_BINDING: GLenum;
3379 readonly CURRENT_QUERY: GLenum;
3380 readonly DEPTH: GLenum;
3381 readonly DEPTH24_STENCIL8: GLenum;
3382 readonly DEPTH32F_STENCIL8: GLenum;
3383 readonly DEPTH_COMPONENT24: GLenum;
3384 readonly DEPTH_COMPONENT32F: GLenum;
3385 readonly DRAW_BUFFER0: GLenum;
3386 readonly DRAW_BUFFER1: GLenum;
3387 readonly DRAW_BUFFER10: GLenum;
3388 readonly DRAW_BUFFER11: GLenum;
3389 readonly DRAW_BUFFER12: GLenum;
3390 readonly DRAW_BUFFER13: GLenum;
3391 readonly DRAW_BUFFER14: GLenum;
3392 readonly DRAW_BUFFER15: GLenum;
3393 readonly DRAW_BUFFER2: GLenum;
3394 readonly DRAW_BUFFER3: GLenum;
3395 readonly DRAW_BUFFER4: GLenum;
3396 readonly DRAW_BUFFER5: GLenum;
3397 readonly DRAW_BUFFER6: GLenum;
3398 readonly DRAW_BUFFER7: GLenum;
3399 readonly DRAW_BUFFER8: GLenum;
3400 readonly DRAW_BUFFER9: GLenum;
3401 readonly DRAW_FRAMEBUFFER: GLenum;
3402 readonly DRAW_FRAMEBUFFER_BINDING: GLenum;
3403 readonly DYNAMIC_COPY: GLenum;
3404 readonly DYNAMIC_READ: GLenum;
3405 readonly FLOAT_32_UNSIGNED_INT_24_8_REV: GLenum;
3406 readonly FLOAT_MAT2x3: GLenum;
3407 readonly FLOAT_MAT2x4: GLenum;
3408 readonly FLOAT_MAT3x2: GLenum;
3409 readonly FLOAT_MAT3x4: GLenum;
3410 readonly FLOAT_MAT4x2: GLenum;
3411 readonly FLOAT_MAT4x3: GLenum;
3412 readonly FRAGMENT_SHADER_DERIVATIVE_HINT: GLenum;
3413 readonly FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE: GLenum;
3414 readonly FRAMEBUFFER_ATTACHMENT_BLUE_SIZE: GLenum;
3415 readonly FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING: GLenum;
3416 readonly FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE: GLenum;
3417 readonly FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE: GLenum;
3418 readonly FRAMEBUFFER_ATTACHMENT_GREEN_SIZE: GLenum;
3419 readonly FRAMEBUFFER_ATTACHMENT_RED_SIZE: GLenum;
3420 readonly FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE: GLenum;
3421 readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER: GLenum;
3422 readonly FRAMEBUFFER_DEFAULT: GLenum;
3423 readonly FRAMEBUFFER_INCOMPLETE_MULTISAMPLE: GLenum;
3424 readonly HALF_FLOAT: GLenum;
3425 readonly INTERLEAVED_ATTRIBS: GLenum;
3426 readonly INT_2_10_10_10_REV: GLenum;
3427 readonly INT_SAMPLER_2D: GLenum;
3428 readonly INT_SAMPLER_2D_ARRAY: GLenum;
3429 readonly INT_SAMPLER_3D: GLenum;
3430 readonly INT_SAMPLER_CUBE: GLenum;
3431 readonly INVALID_INDEX: GLenum;
3432 readonly MAX: GLenum;
3433 readonly MAX_3D_TEXTURE_SIZE: GLenum;
3434 readonly MAX_ARRAY_TEXTURE_LAYERS: GLenum;
3435 readonly MAX_CLIENT_WAIT_TIMEOUT_WEBGL: GLenum;
3436 readonly MAX_COLOR_ATTACHMENTS: GLenum;
3437 readonly MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS: GLenum;
3438 readonly MAX_COMBINED_UNIFORM_BLOCKS: GLenum;
3439 readonly MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS: GLenum;
3440 readonly MAX_DRAW_BUFFERS: GLenum;
3441 readonly MAX_ELEMENTS_INDICES: GLenum;
3442 readonly MAX_ELEMENTS_VERTICES: GLenum;
3443 readonly MAX_ELEMENT_INDEX: GLenum;
3444 readonly MAX_FRAGMENT_INPUT_COMPONENTS: GLenum;
3445 readonly MAX_FRAGMENT_UNIFORM_BLOCKS: GLenum;
3446 readonly MAX_FRAGMENT_UNIFORM_COMPONENTS: GLenum;
3447 readonly MAX_PROGRAM_TEXEL_OFFSET: GLenum;
3448 readonly MAX_SAMPLES: GLenum;
3449 readonly MAX_SERVER_WAIT_TIMEOUT: GLenum;
3450 readonly MAX_TEXTURE_LOD_BIAS: GLenum;
3451 readonly MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS: GLenum;
3452 readonly MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS: GLenum;
3453 readonly MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS: GLenum;
3454 readonly MAX_UNIFORM_BLOCK_SIZE: GLenum;
3455 readonly MAX_UNIFORM_BUFFER_BINDINGS: GLenum;
3456 readonly MAX_VARYING_COMPONENTS: GLenum;
3457 readonly MAX_VERTEX_OUTPUT_COMPONENTS: GLenum;
3458 readonly MAX_VERTEX_UNIFORM_BLOCKS: GLenum;
3459 readonly MAX_VERTEX_UNIFORM_COMPONENTS: GLenum;
3460 readonly MIN: GLenum;
3461 readonly MIN_PROGRAM_TEXEL_OFFSET: GLenum;
3462 readonly OBJECT_TYPE: GLenum;
3463 readonly PACK_ROW_LENGTH: GLenum;
3464 readonly PACK_SKIP_PIXELS: GLenum;
3465 readonly PACK_SKIP_ROWS: GLenum;
3466 readonly PIXEL_PACK_BUFFER: GLenum;
3467 readonly PIXEL_PACK_BUFFER_BINDING: GLenum;
3468 readonly PIXEL_UNPACK_BUFFER: GLenum;
3469 readonly PIXEL_UNPACK_BUFFER_BINDING: GLenum;
3470 readonly QUERY_RESULT: GLenum;
3471 readonly QUERY_RESULT_AVAILABLE: GLenum;
3472 readonly R11F_G11F_B10F: GLenum;
3473 readonly R16F: GLenum;
3474 readonly R16I: GLenum;
3475 readonly R16UI: GLenum;
3476 readonly R32F: GLenum;
3477 readonly R32I: GLenum;
3478 readonly R32UI: GLenum;
3479 readonly R8: GLenum;
3480 readonly R8I: GLenum;
3481 readonly R8UI: GLenum;
3482 readonly R8_SNORM: GLenum;
3483 readonly RASTERIZER_DISCARD: GLenum;
3484 readonly READ_BUFFER: GLenum;
3485 readonly READ_FRAMEBUFFER: GLenum;
3486 readonly READ_FRAMEBUFFER_BINDING: GLenum;
3487 readonly RED: GLenum;
3488 readonly RED_INTEGER: GLenum;
3489 readonly RENDERBUFFER_SAMPLES: GLenum;
3490 readonly RG: GLenum;
3491 readonly RG16F: GLenum;
3492 readonly RG16I: GLenum;
3493 readonly RG16UI: GLenum;
3494 readonly RG32F: GLenum;
3495 readonly RG32I: GLenum;
3496 readonly RG32UI: GLenum;
3497 readonly RG8: GLenum;
3498 readonly RG8I: GLenum;
3499 readonly RG8UI: GLenum;
3500 readonly RG8_SNORM: GLenum;
3501 readonly RGB10_A2: GLenum;
3502 readonly RGB10_A2UI: GLenum;
3503 readonly RGB16F: GLenum;
3504 readonly RGB16I: GLenum;
3505 readonly RGB16UI: GLenum;
3506 readonly RGB32F: GLenum;
3507 readonly RGB32I: GLenum;
3508 readonly RGB32UI: GLenum;
3509 readonly RGB8: GLenum;
3510 readonly RGB8I: GLenum;
3511 readonly RGB8UI: GLenum;
3512 readonly RGB8_SNORM: GLenum;
3513 readonly RGB9_E5: GLenum;
3514 readonly RGBA16F: GLenum;
3515 readonly RGBA16I: GLenum;
3516 readonly RGBA16UI: GLenum;
3517 readonly RGBA32F: GLenum;
3518 readonly RGBA32I: GLenum;
3519 readonly RGBA32UI: GLenum;
3520 readonly RGBA8: GLenum;
3521 readonly RGBA8I: GLenum;
3522 readonly RGBA8UI: GLenum;
3523 readonly RGBA8_SNORM: GLenum;
3524 readonly RGBA_INTEGER: GLenum;
3525 readonly RGB_INTEGER: GLenum;
3526 readonly RG_INTEGER: GLenum;
3527 readonly SAMPLER_2D_ARRAY: GLenum;
3528 readonly SAMPLER_2D_ARRAY_SHADOW: GLenum;
3529 readonly SAMPLER_2D_SHADOW: GLenum;
3530 readonly SAMPLER_3D: GLenum;
3531 readonly SAMPLER_BINDING: GLenum;
3532 readonly SAMPLER_CUBE_SHADOW: GLenum;
3533 readonly SEPARATE_ATTRIBS: GLenum;
3534 readonly SIGNALED: GLenum;
3535 readonly SIGNED_NORMALIZED: GLenum;
3536 readonly SRGB: GLenum;
3537 readonly SRGB8: GLenum;
3538 readonly SRGB8_ALPHA8: GLenum;
3539 readonly STATIC_COPY: GLenum;
3540 readonly STATIC_READ: GLenum;
3541 readonly STENCIL: GLenum;
3542 readonly STREAM_COPY: GLenum;
3543 readonly STREAM_READ: GLenum;
3544 readonly SYNC_CONDITION: GLenum;
3545 readonly SYNC_FENCE: GLenum;
3546 readonly SYNC_FLAGS: GLenum;
3547 readonly SYNC_FLUSH_COMMANDS_BIT: GLenum;
3548 readonly SYNC_GPU_COMMANDS_COMPLETE: GLenum;
3549 readonly SYNC_STATUS: GLenum;
3550 readonly TEXTURE_2D_ARRAY: GLenum;
3551 readonly TEXTURE_3D: GLenum;
3552 readonly TEXTURE_BASE_LEVEL: GLenum;
3553 readonly TEXTURE_BINDING_2D_ARRAY: GLenum;
3554 readonly TEXTURE_BINDING_3D: GLenum;
3555 readonly TEXTURE_COMPARE_FUNC: GLenum;
3556 readonly TEXTURE_COMPARE_MODE: GLenum;
3557 readonly TEXTURE_IMMUTABLE_FORMAT: GLenum;
3558 readonly TEXTURE_IMMUTABLE_LEVELS: GLenum;
3559 readonly TEXTURE_MAX_LEVEL: GLenum;
3560 readonly TEXTURE_MAX_LOD: GLenum;
3561 readonly TEXTURE_MIN_LOD: GLenum;
3562 readonly TEXTURE_WRAP_R: GLenum;
3563 readonly TIMEOUT_EXPIRED: GLenum;
3564 readonly TIMEOUT_IGNORED: GLint64;
3565 readonly TRANSFORM_FEEDBACK: GLenum;
3566 readonly TRANSFORM_FEEDBACK_ACTIVE: GLenum;
3567 readonly TRANSFORM_FEEDBACK_BINDING: GLenum;
3568 readonly TRANSFORM_FEEDBACK_BUFFER: GLenum;
3569 readonly TRANSFORM_FEEDBACK_BUFFER_BINDING: GLenum;
3570 readonly TRANSFORM_FEEDBACK_BUFFER_MODE: GLenum;
3571 readonly TRANSFORM_FEEDBACK_BUFFER_SIZE: GLenum;
3572 readonly TRANSFORM_FEEDBACK_BUFFER_START: GLenum;
3573 readonly TRANSFORM_FEEDBACK_PAUSED: GLenum;
3574 readonly TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN: GLenum;
3575 readonly TRANSFORM_FEEDBACK_VARYINGS: GLenum;
3576 readonly UNIFORM_ARRAY_STRIDE: GLenum;
3577 readonly UNIFORM_BLOCK_ACTIVE_UNIFORMS: GLenum;
3578 readonly UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES: GLenum;
3579 readonly UNIFORM_BLOCK_BINDING: GLenum;
3580 readonly UNIFORM_BLOCK_DATA_SIZE: GLenum;
3581 readonly UNIFORM_BLOCK_INDEX: GLenum;
3582 readonly UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER: GLenum;
3583 readonly UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER: GLenum;
3584 readonly UNIFORM_BUFFER: GLenum;
3585 readonly UNIFORM_BUFFER_BINDING: GLenum;
3586 readonly UNIFORM_BUFFER_OFFSET_ALIGNMENT: GLenum;
3587 readonly UNIFORM_BUFFER_SIZE: GLenum;
3588 readonly UNIFORM_BUFFER_START: GLenum;
3589 readonly UNIFORM_IS_ROW_MAJOR: GLenum;
3590 readonly UNIFORM_MATRIX_STRIDE: GLenum;
3591 readonly UNIFORM_OFFSET: GLenum;
3592 readonly UNIFORM_SIZE: GLenum;
3593 readonly UNIFORM_TYPE: GLenum;
3594 readonly UNPACK_IMAGE_HEIGHT: GLenum;
3595 readonly UNPACK_ROW_LENGTH: GLenum;
3596 readonly UNPACK_SKIP_IMAGES: GLenum;
3597 readonly UNPACK_SKIP_PIXELS: GLenum;
3598 readonly UNPACK_SKIP_ROWS: GLenum;
3599 readonly UNSIGNALED: GLenum;
3600 readonly UNSIGNED_INT_10F_11F_11F_REV: GLenum;
3601 readonly UNSIGNED_INT_24_8: GLenum;
3602 readonly UNSIGNED_INT_2_10_10_10_REV: GLenum;
3603 readonly UNSIGNED_INT_5_9_9_9_REV: GLenum;
3604 readonly UNSIGNED_INT_SAMPLER_2D: GLenum;
3605 readonly UNSIGNED_INT_SAMPLER_2D_ARRAY: GLenum;
3606 readonly UNSIGNED_INT_SAMPLER_3D: GLenum;
3607 readonly UNSIGNED_INT_SAMPLER_CUBE: GLenum;
3608 readonly UNSIGNED_INT_VEC2: GLenum;
3609 readonly UNSIGNED_INT_VEC3: GLenum;
3610 readonly UNSIGNED_INT_VEC4: GLenum;
3611 readonly UNSIGNED_NORMALIZED: GLenum;
3612 readonly VERTEX_ARRAY_BINDING: GLenum;
3613 readonly VERTEX_ATTRIB_ARRAY_DIVISOR: GLenum;
3614 readonly VERTEX_ATTRIB_ARRAY_INTEGER: GLenum;
3615 readonly WAIT_FAILED: GLenum;
3616 readonly ACTIVE_ATTRIBUTES: GLenum;
3617 readonly ACTIVE_TEXTURE: GLenum;
3618 readonly ACTIVE_UNIFORMS: GLenum;
3619 readonly ALIASED_LINE_WIDTH_RANGE: GLenum;
3620 readonly ALIASED_POINT_SIZE_RANGE: GLenum;
3621 readonly ALPHA: GLenum;
3622 readonly ALPHA_BITS: GLenum;
3623 readonly ALWAYS: GLenum;
3624 readonly ARRAY_BUFFER: GLenum;
3625 readonly ARRAY_BUFFER_BINDING: GLenum;
3626 readonly ATTACHED_SHADERS: GLenum;
3627 readonly BACK: GLenum;
3628 readonly BLEND: GLenum;
3629 readonly BLEND_COLOR: GLenum;
3630 readonly BLEND_DST_ALPHA: GLenum;
3631 readonly BLEND_DST_RGB: GLenum;
3632 readonly BLEND_EQUATION: GLenum;
3633 readonly BLEND_EQUATION_ALPHA: GLenum;
3634 readonly BLEND_EQUATION_RGB: GLenum;
3635 readonly BLEND_SRC_ALPHA: GLenum;
3636 readonly BLEND_SRC_RGB: GLenum;
3637 readonly BLUE_BITS: GLenum;
3638 readonly BOOL: GLenum;
3639 readonly BOOL_VEC2: GLenum;
3640 readonly BOOL_VEC3: GLenum;
3641 readonly BOOL_VEC4: GLenum;
3642 readonly BROWSER_DEFAULT_WEBGL: GLenum;
3643 readonly BUFFER_SIZE: GLenum;
3644 readonly BUFFER_USAGE: GLenum;
3645 readonly BYTE: GLenum;
3646 readonly CCW: GLenum;
3647 readonly CLAMP_TO_EDGE: GLenum;
3648 readonly COLOR_ATTACHMENT0: GLenum;
3649 readonly COLOR_BUFFER_BIT: GLenum;
3650 readonly COLOR_CLEAR_VALUE: GLenum;
3651 readonly COLOR_WRITEMASK: GLenum;
3652 readonly COMPILE_STATUS: GLenum;
3653 readonly COMPRESSED_TEXTURE_FORMATS: GLenum;
3654 readonly CONSTANT_ALPHA: GLenum;
3655 readonly CONSTANT_COLOR: GLenum;
3656 readonly CONTEXT_LOST_WEBGL: GLenum;
3657 readonly CULL_FACE: GLenum;
3658 readonly CULL_FACE_MODE: GLenum;
3659 readonly CURRENT_PROGRAM: GLenum;
3660 readonly CURRENT_VERTEX_ATTRIB: GLenum;
3661 readonly CW: GLenum;
3662 readonly DECR: GLenum;
3663 readonly DECR_WRAP: GLenum;
3664 readonly DELETE_STATUS: GLenum;
3665 readonly DEPTH_ATTACHMENT: GLenum;
3666 readonly DEPTH_BITS: GLenum;
3667 readonly DEPTH_BUFFER_BIT: GLenum;
3668 readonly DEPTH_CLEAR_VALUE: GLenum;
3669 readonly DEPTH_COMPONENT: GLenum;
3670 readonly DEPTH_COMPONENT16: GLenum;
3671 readonly DEPTH_FUNC: GLenum;
3672 readonly DEPTH_RANGE: GLenum;
3673 readonly DEPTH_STENCIL: GLenum;
3674 readonly DEPTH_STENCIL_ATTACHMENT: GLenum;
3675 readonly DEPTH_TEST: GLenum;
3676 readonly DEPTH_WRITEMASK: GLenum;
3677 readonly DITHER: GLenum;
3678 readonly DONT_CARE: GLenum;
3679 readonly DST_ALPHA: GLenum;
3680 readonly DST_COLOR: GLenum;
3681 readonly DYNAMIC_DRAW: GLenum;
3682 readonly ELEMENT_ARRAY_BUFFER: GLenum;
3683 readonly ELEMENT_ARRAY_BUFFER_BINDING: GLenum;
3684 readonly EQUAL: GLenum;
3685 readonly FASTEST: GLenum;
3686 readonly FLOAT: GLenum;
3687 readonly FLOAT_MAT2: GLenum;
3688 readonly FLOAT_MAT3: GLenum;
3689 readonly FLOAT_MAT4: GLenum;
3690 readonly FLOAT_VEC2: GLenum;
3691 readonly FLOAT_VEC3: GLenum;
3692 readonly FLOAT_VEC4: GLenum;
3693 readonly FRAGMENT_SHADER: GLenum;
3694 readonly FRAMEBUFFER: GLenum;
3695 readonly FRAMEBUFFER_ATTACHMENT_OBJECT_NAME: GLenum;
3696 readonly FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE: GLenum;
3697 readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE: GLenum;
3698 readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL: GLenum;
3699 readonly FRAMEBUFFER_BINDING: GLenum;
3700 readonly FRAMEBUFFER_COMPLETE: GLenum;
3701 readonly FRAMEBUFFER_INCOMPLETE_ATTACHMENT: GLenum;
3702 readonly FRAMEBUFFER_INCOMPLETE_DIMENSIONS: GLenum;
3703 readonly FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT: GLenum;
3704 readonly FRAMEBUFFER_UNSUPPORTED: GLenum;
3705 readonly FRONT: GLenum;
3706 readonly FRONT_AND_BACK: GLenum;
3707 readonly FRONT_FACE: GLenum;
3708 readonly FUNC_ADD: GLenum;
3709 readonly FUNC_REVERSE_SUBTRACT: GLenum;
3710 readonly FUNC_SUBTRACT: GLenum;
3711 readonly GENERATE_MIPMAP_HINT: GLenum;
3712 readonly GEQUAL: GLenum;
3713 readonly GREATER: GLenum;
3714 readonly GREEN_BITS: GLenum;
3715 readonly HIGH_FLOAT: GLenum;
3716 readonly HIGH_INT: GLenum;
3717 readonly IMPLEMENTATION_COLOR_READ_FORMAT: GLenum;
3718 readonly IMPLEMENTATION_COLOR_READ_TYPE: GLenum;
3719 readonly INCR: GLenum;
3720 readonly INCR_WRAP: GLenum;
3721 readonly INT: GLenum;
3722 readonly INT_VEC2: GLenum;
3723 readonly INT_VEC3: GLenum;
3724 readonly INT_VEC4: GLenum;
3725 readonly INVALID_ENUM: GLenum;
3726 readonly INVALID_FRAMEBUFFER_OPERATION: GLenum;
3727 readonly INVALID_OPERATION: GLenum;
3728 readonly INVALID_VALUE: GLenum;
3729 readonly INVERT: GLenum;
3730 readonly KEEP: GLenum;
3731 readonly LEQUAL: GLenum;
3732 readonly LESS: GLenum;
3733 readonly LINEAR: GLenum;
3734 readonly LINEAR_MIPMAP_LINEAR: GLenum;
3735 readonly LINEAR_MIPMAP_NEAREST: GLenum;
3736 readonly LINES: GLenum;
3737 readonly LINE_LOOP: GLenum;
3738 readonly LINE_STRIP: GLenum;
3739 readonly LINE_WIDTH: GLenum;
3740 readonly LINK_STATUS: GLenum;
3741 readonly LOW_FLOAT: GLenum;
3742 readonly LOW_INT: GLenum;
3743 readonly LUMINANCE: GLenum;
3744 readonly LUMINANCE_ALPHA: GLenum;
3745 readonly MAX_COMBINED_TEXTURE_IMAGE_UNITS: GLenum;
3746 readonly MAX_CUBE_MAP_TEXTURE_SIZE: GLenum;
3747 readonly MAX_FRAGMENT_UNIFORM_VECTORS: GLenum;
3748 readonly MAX_RENDERBUFFER_SIZE: GLenum;
3749 readonly MAX_TEXTURE_IMAGE_UNITS: GLenum;
3750 readonly MAX_TEXTURE_SIZE: GLenum;
3751 readonly MAX_VARYING_VECTORS: GLenum;
3752 readonly MAX_VERTEX_ATTRIBS: GLenum;
3753 readonly MAX_VERTEX_TEXTURE_IMAGE_UNITS: GLenum;
3754 readonly MAX_VERTEX_UNIFORM_VECTORS: GLenum;
3755 readonly MAX_VIEWPORT_DIMS: GLenum;
3756 readonly MEDIUM_FLOAT: GLenum;
3757 readonly MEDIUM_INT: GLenum;
3758 readonly MIRRORED_REPEAT: GLenum;
3759 readonly NEAREST: GLenum;
3760 readonly NEAREST_MIPMAP_LINEAR: GLenum;
3761 readonly NEAREST_MIPMAP_NEAREST: GLenum;
3762 readonly NEVER: GLenum;
3763 readonly NICEST: GLenum;
3764 readonly NONE: GLenum;
3765 readonly NOTEQUAL: GLenum;
3766 readonly NO_ERROR: GLenum;
3767 readonly ONE: GLenum;
3768 readonly ONE_MINUS_CONSTANT_ALPHA: GLenum;
3769 readonly ONE_MINUS_CONSTANT_COLOR: GLenum;
3770 readonly ONE_MINUS_DST_ALPHA: GLenum;
3771 readonly ONE_MINUS_DST_COLOR: GLenum;
3772 readonly ONE_MINUS_SRC_ALPHA: GLenum;
3773 readonly ONE_MINUS_SRC_COLOR: GLenum;
3774 readonly OUT_OF_MEMORY: GLenum;
3775 readonly PACK_ALIGNMENT: GLenum;
3776 readonly POINTS: GLenum;
3777 readonly POLYGON_OFFSET_FACTOR: GLenum;
3778 readonly POLYGON_OFFSET_FILL: GLenum;
3779 readonly POLYGON_OFFSET_UNITS: GLenum;
3780 readonly RED_BITS: GLenum;
3781 readonly RENDERBUFFER: GLenum;
3782 readonly RENDERBUFFER_ALPHA_SIZE: GLenum;
3783 readonly RENDERBUFFER_BINDING: GLenum;
3784 readonly RENDERBUFFER_BLUE_SIZE: GLenum;
3785 readonly RENDERBUFFER_DEPTH_SIZE: GLenum;
3786 readonly RENDERBUFFER_GREEN_SIZE: GLenum;
3787 readonly RENDERBUFFER_HEIGHT: GLenum;
3788 readonly RENDERBUFFER_INTERNAL_FORMAT: GLenum;
3789 readonly RENDERBUFFER_RED_SIZE: GLenum;
3790 readonly RENDERBUFFER_STENCIL_SIZE: GLenum;
3791 readonly RENDERBUFFER_WIDTH: GLenum;
3792 readonly RENDERER: GLenum;
3793 readonly REPEAT: GLenum;
3794 readonly REPLACE: GLenum;
3795 readonly RGB: GLenum;
3796 readonly RGB565: GLenum;
3797 readonly RGB5_A1: GLenum;
3798 readonly RGBA: GLenum;
3799 readonly RGBA4: GLenum;
3800 readonly SAMPLER_2D: GLenum;
3801 readonly SAMPLER_CUBE: GLenum;
3802 readonly SAMPLES: GLenum;
3803 readonly SAMPLE_ALPHA_TO_COVERAGE: GLenum;
3804 readonly SAMPLE_BUFFERS: GLenum;
3805 readonly SAMPLE_COVERAGE: GLenum;
3806 readonly SAMPLE_COVERAGE_INVERT: GLenum;
3807 readonly SAMPLE_COVERAGE_VALUE: GLenum;
3808 readonly SCISSOR_BOX: GLenum;
3809 readonly SCISSOR_TEST: GLenum;
3810 readonly SHADER_TYPE: GLenum;
3811 readonly SHADING_LANGUAGE_VERSION: GLenum;
3812 readonly SHORT: GLenum;
3813 readonly SRC_ALPHA: GLenum;
3814 readonly SRC_ALPHA_SATURATE: GLenum;
3815 readonly SRC_COLOR: GLenum;
3816 readonly STATIC_DRAW: GLenum;
3817 readonly STENCIL_ATTACHMENT: GLenum;
3818 readonly STENCIL_BACK_FAIL: GLenum;
3819 readonly STENCIL_BACK_FUNC: GLenum;
3820 readonly STENCIL_BACK_PASS_DEPTH_FAIL: GLenum;
3821 readonly STENCIL_BACK_PASS_DEPTH_PASS: GLenum;
3822 readonly STENCIL_BACK_REF: GLenum;
3823 readonly STENCIL_BACK_VALUE_MASK: GLenum;
3824 readonly STENCIL_BACK_WRITEMASK: GLenum;
3825 readonly STENCIL_BITS: GLenum;
3826 readonly STENCIL_BUFFER_BIT: GLenum;
3827 readonly STENCIL_CLEAR_VALUE: GLenum;
3828 readonly STENCIL_FAIL: GLenum;
3829 readonly STENCIL_FUNC: GLenum;
3830 readonly STENCIL_INDEX8: GLenum;
3831 readonly STENCIL_PASS_DEPTH_FAIL: GLenum;
3832 readonly STENCIL_PASS_DEPTH_PASS: GLenum;
3833 readonly STENCIL_REF: GLenum;
3834 readonly STENCIL_TEST: GLenum;
3835 readonly STENCIL_VALUE_MASK: GLenum;
3836 readonly STENCIL_WRITEMASK: GLenum;
3837 readonly STREAM_DRAW: GLenum;
3838 readonly SUBPIXEL_BITS: GLenum;
3839 readonly TEXTURE: GLenum;
3840 readonly TEXTURE0: GLenum;
3841 readonly TEXTURE1: GLenum;
3842 readonly TEXTURE10: GLenum;
3843 readonly TEXTURE11: GLenum;
3844 readonly TEXTURE12: GLenum;
3845 readonly TEXTURE13: GLenum;
3846 readonly TEXTURE14: GLenum;
3847 readonly TEXTURE15: GLenum;
3848 readonly TEXTURE16: GLenum;
3849 readonly TEXTURE17: GLenum;
3850 readonly TEXTURE18: GLenum;
3851 readonly TEXTURE19: GLenum;
3852 readonly TEXTURE2: GLenum;
3853 readonly TEXTURE20: GLenum;
3854 readonly TEXTURE21: GLenum;
3855 readonly TEXTURE22: GLenum;
3856 readonly TEXTURE23: GLenum;
3857 readonly TEXTURE24: GLenum;
3858 readonly TEXTURE25: GLenum;
3859 readonly TEXTURE26: GLenum;
3860 readonly TEXTURE27: GLenum;
3861 readonly TEXTURE28: GLenum;
3862 readonly TEXTURE29: GLenum;
3863 readonly TEXTURE3: GLenum;
3864 readonly TEXTURE30: GLenum;
3865 readonly TEXTURE31: GLenum;
3866 readonly TEXTURE4: GLenum;
3867 readonly TEXTURE5: GLenum;
3868 readonly TEXTURE6: GLenum;
3869 readonly TEXTURE7: GLenum;
3870 readonly TEXTURE8: GLenum;
3871 readonly TEXTURE9: GLenum;
3872 readonly TEXTURE_2D: GLenum;
3873 readonly TEXTURE_BINDING_2D: GLenum;
3874 readonly TEXTURE_BINDING_CUBE_MAP: GLenum;
3875 readonly TEXTURE_CUBE_MAP: GLenum;
3876 readonly TEXTURE_CUBE_MAP_NEGATIVE_X: GLenum;
3877 readonly TEXTURE_CUBE_MAP_NEGATIVE_Y: GLenum;
3878 readonly TEXTURE_CUBE_MAP_NEGATIVE_Z: GLenum;
3879 readonly TEXTURE_CUBE_MAP_POSITIVE_X: GLenum;
3880 readonly TEXTURE_CUBE_MAP_POSITIVE_Y: GLenum;
3881 readonly TEXTURE_CUBE_MAP_POSITIVE_Z: GLenum;
3882 readonly TEXTURE_MAG_FILTER: GLenum;
3883 readonly TEXTURE_MIN_FILTER: GLenum;
3884 readonly TEXTURE_WRAP_S: GLenum;
3885 readonly TEXTURE_WRAP_T: GLenum;
3886 readonly TRIANGLES: GLenum;
3887 readonly TRIANGLE_FAN: GLenum;
3888 readonly TRIANGLE_STRIP: GLenum;
3889 readonly UNPACK_ALIGNMENT: GLenum;
3890 readonly UNPACK_COLORSPACE_CONVERSION_WEBGL: GLenum;
3891 readonly UNPACK_FLIP_Y_WEBGL: GLenum;
3892 readonly UNPACK_PREMULTIPLY_ALPHA_WEBGL: GLenum;
3893 readonly UNSIGNED_BYTE: GLenum;
3894 readonly UNSIGNED_INT: GLenum;
3895 readonly UNSIGNED_SHORT: GLenum;
3896 readonly UNSIGNED_SHORT_4_4_4_4: GLenum;
3897 readonly UNSIGNED_SHORT_5_5_5_1: GLenum;
3898 readonly UNSIGNED_SHORT_5_6_5: GLenum;
3899 readonly VALIDATE_STATUS: GLenum;
3900 readonly VENDOR: GLenum;
3901 readonly VERSION: GLenum;
3902 readonly VERTEX_ATTRIB_ARRAY_BUFFER_BINDING: GLenum;
3903 readonly VERTEX_ATTRIB_ARRAY_ENABLED: GLenum;
3904 readonly VERTEX_ATTRIB_ARRAY_NORMALIZED: GLenum;
3905 readonly VERTEX_ATTRIB_ARRAY_POINTER: GLenum;
3906 readonly VERTEX_ATTRIB_ARRAY_SIZE: GLenum;
3907 readonly VERTEX_ATTRIB_ARRAY_STRIDE: GLenum;
3908 readonly VERTEX_ATTRIB_ARRAY_TYPE: GLenum;
3909 readonly VERTEX_SHADER: GLenum;
3910 readonly VIEWPORT: GLenum;
3911 readonly ZERO: GLenum;
3912};
3913
3914interface WebGL2RenderingContextBase {
3915 beginQuery(target: GLenum, query: WebGLQuery): void;
3916 beginTransformFeedback(primitiveMode: GLenum): void;
3917 bindBufferBase(target: GLenum, index: GLuint, buffer: WebGLBuffer | null): void;
3918 bindBufferRange(target: GLenum, index: GLuint, buffer: WebGLBuffer | null, offset: GLintptr, size: GLsizeiptr): void;
3919 bindSampler(unit: GLuint, sampler: WebGLSampler | null): void;
3920 bindTransformFeedback(target: GLenum, tf: WebGLTransformFeedback | null): void;
3921 bindVertexArray(array: WebGLVertexArrayObject | null): void;
3922 blitFramebuffer(srcX0: GLint, srcY0: GLint, srcX1: GLint, srcY1: GLint, dstX0: GLint, dstY0: GLint, dstX1: GLint, dstY1: GLint, mask: GLbitfield, filter: GLenum): void;
3923 clearBufferfi(buffer: GLenum, drawbuffer: GLint, depth: GLfloat, stencil: GLint): void;
3924 clearBufferfv(buffer: GLenum, drawbuffer: GLint, values: Float32List, srcOffset?: GLuint): void;
3925 clearBufferiv(buffer: GLenum, drawbuffer: GLint, values: Int32List, srcOffset?: GLuint): void;
3926 clearBufferuiv(buffer: GLenum, drawbuffer: GLint, values: Uint32List, srcOffset?: GLuint): void;
3927 clientWaitSync(sync: WebGLSync, flags: GLbitfield, timeout: GLuint64): GLenum;
3928 compressedTexImage3D(target: GLenum, level: GLint, internalformat: GLenum, width: GLsizei, height: GLsizei, depth: GLsizei, border: GLint, imageSize: GLsizei, offset: GLintptr): void;
3929 compressedTexImage3D(target: GLenum, level: GLint, internalformat: GLenum, width: GLsizei, height: GLsizei, depth: GLsizei, border: GLint, srcData: ArrayBufferView, srcOffset?: GLuint, srcLengthOverride?: GLuint): void;
3930 compressedTexSubImage3D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, format: GLenum, imageSize: GLsizei, offset: GLintptr): void;
3931 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;
3932 copyBufferSubData(readTarget: GLenum, writeTarget: GLenum, readOffset: GLintptr, writeOffset: GLintptr, size: GLsizeiptr): void;
3933 copyTexSubImage3D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, x: GLint, y: GLint, width: GLsizei, height: GLsizei): void;
3934 createQuery(): WebGLQuery | null;
3935 createSampler(): WebGLSampler | null;
3936 createTransformFeedback(): WebGLTransformFeedback | null;
3937 createVertexArray(): WebGLVertexArrayObject | null;
3938 deleteQuery(query: WebGLQuery | null): void;
3939 deleteSampler(sampler: WebGLSampler | null): void;
3940 deleteSync(sync: WebGLSync | null): void;
3941 deleteTransformFeedback(tf: WebGLTransformFeedback | null): void;
3942 deleteVertexArray(vertexArray: WebGLVertexArrayObject | null): void;
3943 drawArraysInstanced(mode: GLenum, first: GLint, count: GLsizei, instanceCount: GLsizei): void;
3944 drawBuffers(buffers: GLenum[]): void;
3945 drawElementsInstanced(mode: GLenum, count: GLsizei, type: GLenum, offset: GLintptr, instanceCount: GLsizei): void;
3946 drawRangeElements(mode: GLenum, start: GLuint, end: GLuint, count: GLsizei, type: GLenum, offset: GLintptr): void;
3947 endQuery(target: GLenum): void;
3948 endTransformFeedback(): void;
3949 fenceSync(condition: GLenum, flags: GLbitfield): WebGLSync | null;
3950 framebufferTextureLayer(target: GLenum, attachment: GLenum, texture: WebGLTexture | null, level: GLint, layer: GLint): void;
3951 getActiveUniformBlockName(program: WebGLProgram, uniformBlockIndex: GLuint): string | null;
3952 getActiveUniformBlockParameter(program: WebGLProgram, uniformBlockIndex: GLuint, pname: GLenum): any;
3953 getActiveUniforms(program: WebGLProgram, uniformIndices: GLuint[], pname: GLenum): any;
3954 getBufferSubData(target: GLenum, srcByteOffset: GLintptr, dstBuffer: ArrayBufferView, dstOffset?: GLuint, length?: GLuint): void;
3955 getFragDataLocation(program: WebGLProgram, name: string): GLint;
3956 getIndexedParameter(target: GLenum, index: GLuint): any;
3957 getInternalformatParameter(target: GLenum, internalformat: GLenum, pname: GLenum): any;
3958 getQuery(target: GLenum, pname: GLenum): WebGLQuery | null;
3959 getQueryParameter(query: WebGLQuery, pname: GLenum): any;
3960 getSamplerParameter(sampler: WebGLSampler, pname: GLenum): any;
3961 getSyncParameter(sync: WebGLSync, pname: GLenum): any;
3962 getTransformFeedbackVarying(program: WebGLProgram, index: GLuint): WebGLActiveInfo | null;
3963 getUniformBlockIndex(program: WebGLProgram, uniformBlockName: string): GLuint;
3964 getUniformIndices(program: WebGLProgram, uniformNames: string[]): GLuint[] | null;
3965 invalidateFramebuffer(target: GLenum, attachments: GLenum[]): void;
3966 invalidateSubFramebuffer(target: GLenum, attachments: GLenum[], x: GLint, y: GLint, width: GLsizei, height: GLsizei): void;
3967 isQuery(query: WebGLQuery | null): GLboolean;
3968 isSampler(sampler: WebGLSampler | null): GLboolean;
3969 isSync(sync: WebGLSync | null): GLboolean;
3970 isTransformFeedback(tf: WebGLTransformFeedback | null): GLboolean;
3971 isVertexArray(vertexArray: WebGLVertexArrayObject | null): GLboolean;
3972 pauseTransformFeedback(): void;
3973 readBuffer(src: GLenum): void;
3974 renderbufferStorageMultisample(target: GLenum, samples: GLsizei, internalformat: GLenum, width: GLsizei, height: GLsizei): void;
3975 resumeTransformFeedback(): void;
3976 samplerParameterf(sampler: WebGLSampler, pname: GLenum, param: GLfloat): void;
3977 samplerParameteri(sampler: WebGLSampler, pname: GLenum, param: GLint): void;
3978 texImage3D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, border: GLint, format: GLenum, type: GLenum, pboOffset: GLintptr): void;
3979 texImage3D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, border: GLint, format: GLenum, type: GLenum, source: TexImageSource): void;
3980 texImage3D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, border: GLint, format: GLenum, type: GLenum, srcData: ArrayBufferView | null): void;
3981 texImage3D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, border: GLint, format: GLenum, type: GLenum, srcData: ArrayBufferView, srcOffset: GLuint): void;
3982 texStorage2D(target: GLenum, levels: GLsizei, internalformat: GLenum, width: GLsizei, height: GLsizei): void;
3983 texStorage3D(target: GLenum, levels: GLsizei, internalformat: GLenum, width: GLsizei, height: GLsizei, depth: GLsizei): void;
3984 texSubImage3D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, format: GLenum, type: GLenum, pboOffset: GLintptr): void;
3985 texSubImage3D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, format: GLenum, type: GLenum, source: TexImageSource): void;
3986 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;
3987 transformFeedbackVaryings(program: WebGLProgram, varyings: string[], bufferMode: GLenum): void;
3988 uniform1ui(location: WebGLUniformLocation | null, v0: GLuint): void;
3989 uniform1uiv(location: WebGLUniformLocation | null, data: Uint32List, srcOffset?: GLuint, srcLength?: GLuint): void;
3990 uniform2ui(location: WebGLUniformLocation | null, v0: GLuint, v1: GLuint): void;
3991 uniform2uiv(location: WebGLUniformLocation | null, data: Uint32List, srcOffset?: GLuint, srcLength?: GLuint): void;
3992 uniform3ui(location: WebGLUniformLocation | null, v0: GLuint, v1: GLuint, v2: GLuint): void;
3993 uniform3uiv(location: WebGLUniformLocation | null, data: Uint32List, srcOffset?: GLuint, srcLength?: GLuint): void;
3994 uniform4ui(location: WebGLUniformLocation | null, v0: GLuint, v1: GLuint, v2: GLuint, v3: GLuint): void;
3995 uniform4uiv(location: WebGLUniformLocation | null, data: Uint32List, srcOffset?: GLuint, srcLength?: GLuint): void;
3996 uniformBlockBinding(program: WebGLProgram, uniformBlockIndex: GLuint, uniformBlockBinding: GLuint): void;
3997 uniformMatrix2x3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void;
3998 uniformMatrix2x4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void;
3999 uniformMatrix3x2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void;
4000 uniformMatrix3x4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void;
4001 uniformMatrix4x2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void;
4002 uniformMatrix4x3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void;
4003 vertexAttribDivisor(index: GLuint, divisor: GLuint): void;
4004 vertexAttribI4i(index: GLuint, x: GLint, y: GLint, z: GLint, w: GLint): void;
4005 vertexAttribI4iv(index: GLuint, values: Int32List): void;
4006 vertexAttribI4ui(index: GLuint, x: GLuint, y: GLuint, z: GLuint, w: GLuint): void;
4007 vertexAttribI4uiv(index: GLuint, values: Uint32List): void;
4008 vertexAttribIPointer(index: GLuint, size: GLint, type: GLenum, stride: GLsizei, offset: GLintptr): void;
4009 waitSync(sync: WebGLSync, flags: GLbitfield, timeout: GLint64): void;
4010 readonly ACTIVE_UNIFORM_BLOCKS: GLenum;
4011 readonly ALREADY_SIGNALED: GLenum;
4012 readonly ANY_SAMPLES_PASSED: GLenum;
4013 readonly ANY_SAMPLES_PASSED_CONSERVATIVE: GLenum;
4014 readonly COLOR: GLenum;
4015 readonly COLOR_ATTACHMENT1: GLenum;
4016 readonly COLOR_ATTACHMENT10: GLenum;
4017 readonly COLOR_ATTACHMENT11: GLenum;
4018 readonly COLOR_ATTACHMENT12: GLenum;
4019 readonly COLOR_ATTACHMENT13: GLenum;
4020 readonly COLOR_ATTACHMENT14: GLenum;
4021 readonly COLOR_ATTACHMENT15: GLenum;
4022 readonly COLOR_ATTACHMENT2: GLenum;
4023 readonly COLOR_ATTACHMENT3: GLenum;
4024 readonly COLOR_ATTACHMENT4: GLenum;
4025 readonly COLOR_ATTACHMENT5: GLenum;
4026 readonly COLOR_ATTACHMENT6: GLenum;
4027 readonly COLOR_ATTACHMENT7: GLenum;
4028 readonly COLOR_ATTACHMENT8: GLenum;
4029 readonly COLOR_ATTACHMENT9: GLenum;
4030 readonly COMPARE_REF_TO_TEXTURE: GLenum;
4031 readonly CONDITION_SATISFIED: GLenum;
4032 readonly COPY_READ_BUFFER: GLenum;
4033 readonly COPY_READ_BUFFER_BINDING: GLenum;
4034 readonly COPY_WRITE_BUFFER: GLenum;
4035 readonly COPY_WRITE_BUFFER_BINDING: GLenum;
4036 readonly CURRENT_QUERY: GLenum;
4037 readonly DEPTH: GLenum;
4038 readonly DEPTH24_STENCIL8: GLenum;
4039 readonly DEPTH32F_STENCIL8: GLenum;
4040 readonly DEPTH_COMPONENT24: GLenum;
4041 readonly DEPTH_COMPONENT32F: GLenum;
4042 readonly DRAW_BUFFER0: GLenum;
4043 readonly DRAW_BUFFER1: GLenum;
4044 readonly DRAW_BUFFER10: GLenum;
4045 readonly DRAW_BUFFER11: GLenum;
4046 readonly DRAW_BUFFER12: GLenum;
4047 readonly DRAW_BUFFER13: GLenum;
4048 readonly DRAW_BUFFER14: GLenum;
4049 readonly DRAW_BUFFER15: GLenum;
4050 readonly DRAW_BUFFER2: GLenum;
4051 readonly DRAW_BUFFER3: GLenum;
4052 readonly DRAW_BUFFER4: GLenum;
4053 readonly DRAW_BUFFER5: GLenum;
4054 readonly DRAW_BUFFER6: GLenum;
4055 readonly DRAW_BUFFER7: GLenum;
4056 readonly DRAW_BUFFER8: GLenum;
4057 readonly DRAW_BUFFER9: GLenum;
4058 readonly DRAW_FRAMEBUFFER: GLenum;
4059 readonly DRAW_FRAMEBUFFER_BINDING: GLenum;
4060 readonly DYNAMIC_COPY: GLenum;
4061 readonly DYNAMIC_READ: GLenum;
4062 readonly FLOAT_32_UNSIGNED_INT_24_8_REV: GLenum;
4063 readonly FLOAT_MAT2x3: GLenum;
4064 readonly FLOAT_MAT2x4: GLenum;
4065 readonly FLOAT_MAT3x2: GLenum;
4066 readonly FLOAT_MAT3x4: GLenum;
4067 readonly FLOAT_MAT4x2: GLenum;
4068 readonly FLOAT_MAT4x3: GLenum;
4069 readonly FRAGMENT_SHADER_DERIVATIVE_HINT: GLenum;
4070 readonly FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE: GLenum;
4071 readonly FRAMEBUFFER_ATTACHMENT_BLUE_SIZE: GLenum;
4072 readonly FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING: GLenum;
4073 readonly FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE: GLenum;
4074 readonly FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE: GLenum;
4075 readonly FRAMEBUFFER_ATTACHMENT_GREEN_SIZE: GLenum;
4076 readonly FRAMEBUFFER_ATTACHMENT_RED_SIZE: GLenum;
4077 readonly FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE: GLenum;
4078 readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER: GLenum;
4079 readonly FRAMEBUFFER_DEFAULT: GLenum;
4080 readonly FRAMEBUFFER_INCOMPLETE_MULTISAMPLE: GLenum;
4081 readonly HALF_FLOAT: GLenum;
4082 readonly INTERLEAVED_ATTRIBS: GLenum;
4083 readonly INT_2_10_10_10_REV: GLenum;
4084 readonly INT_SAMPLER_2D: GLenum;
4085 readonly INT_SAMPLER_2D_ARRAY: GLenum;
4086 readonly INT_SAMPLER_3D: GLenum;
4087 readonly INT_SAMPLER_CUBE: GLenum;
4088 readonly INVALID_INDEX: GLenum;
4089 readonly MAX: GLenum;
4090 readonly MAX_3D_TEXTURE_SIZE: GLenum;
4091 readonly MAX_ARRAY_TEXTURE_LAYERS: GLenum;
4092 readonly MAX_CLIENT_WAIT_TIMEOUT_WEBGL: GLenum;
4093 readonly MAX_COLOR_ATTACHMENTS: GLenum;
4094 readonly MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS: GLenum;
4095 readonly MAX_COMBINED_UNIFORM_BLOCKS: GLenum;
4096 readonly MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS: GLenum;
4097 readonly MAX_DRAW_BUFFERS: GLenum;
4098 readonly MAX_ELEMENTS_INDICES: GLenum;
4099 readonly MAX_ELEMENTS_VERTICES: GLenum;
4100 readonly MAX_ELEMENT_INDEX: GLenum;
4101 readonly MAX_FRAGMENT_INPUT_COMPONENTS: GLenum;
4102 readonly MAX_FRAGMENT_UNIFORM_BLOCKS: GLenum;
4103 readonly MAX_FRAGMENT_UNIFORM_COMPONENTS: GLenum;
4104 readonly MAX_PROGRAM_TEXEL_OFFSET: GLenum;
4105 readonly MAX_SAMPLES: GLenum;
4106 readonly MAX_SERVER_WAIT_TIMEOUT: GLenum;
4107 readonly MAX_TEXTURE_LOD_BIAS: GLenum;
4108 readonly MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS: GLenum;
4109 readonly MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS: GLenum;
4110 readonly MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS: GLenum;
4111 readonly MAX_UNIFORM_BLOCK_SIZE: GLenum;
4112 readonly MAX_UNIFORM_BUFFER_BINDINGS: GLenum;
4113 readonly MAX_VARYING_COMPONENTS: GLenum;
4114 readonly MAX_VERTEX_OUTPUT_COMPONENTS: GLenum;
4115 readonly MAX_VERTEX_UNIFORM_BLOCKS: GLenum;
4116 readonly MAX_VERTEX_UNIFORM_COMPONENTS: GLenum;
4117 readonly MIN: GLenum;
4118 readonly MIN_PROGRAM_TEXEL_OFFSET: GLenum;
4119 readonly OBJECT_TYPE: GLenum;
4120 readonly PACK_ROW_LENGTH: GLenum;
4121 readonly PACK_SKIP_PIXELS: GLenum;
4122 readonly PACK_SKIP_ROWS: GLenum;
4123 readonly PIXEL_PACK_BUFFER: GLenum;
4124 readonly PIXEL_PACK_BUFFER_BINDING: GLenum;
4125 readonly PIXEL_UNPACK_BUFFER: GLenum;
4126 readonly PIXEL_UNPACK_BUFFER_BINDING: GLenum;
4127 readonly QUERY_RESULT: GLenum;
4128 readonly QUERY_RESULT_AVAILABLE: GLenum;
4129 readonly R11F_G11F_B10F: GLenum;
4130 readonly R16F: GLenum;
4131 readonly R16I: GLenum;
4132 readonly R16UI: GLenum;
4133 readonly R32F: GLenum;
4134 readonly R32I: GLenum;
4135 readonly R32UI: GLenum;
4136 readonly R8: GLenum;
4137 readonly R8I: GLenum;
4138 readonly R8UI: GLenum;
4139 readonly R8_SNORM: GLenum;
4140 readonly RASTERIZER_DISCARD: GLenum;
4141 readonly READ_BUFFER: GLenum;
4142 readonly READ_FRAMEBUFFER: GLenum;
4143 readonly READ_FRAMEBUFFER_BINDING: GLenum;
4144 readonly RED: GLenum;
4145 readonly RED_INTEGER: GLenum;
4146 readonly RENDERBUFFER_SAMPLES: GLenum;
4147 readonly RG: GLenum;
4148 readonly RG16F: GLenum;
4149 readonly RG16I: GLenum;
4150 readonly RG16UI: GLenum;
4151 readonly RG32F: GLenum;
4152 readonly RG32I: GLenum;
4153 readonly RG32UI: GLenum;
4154 readonly RG8: GLenum;
4155 readonly RG8I: GLenum;
4156 readonly RG8UI: GLenum;
4157 readonly RG8_SNORM: GLenum;
4158 readonly RGB10_A2: GLenum;
4159 readonly RGB10_A2UI: GLenum;
4160 readonly RGB16F: GLenum;
4161 readonly RGB16I: GLenum;
4162 readonly RGB16UI: GLenum;
4163 readonly RGB32F: GLenum;
4164 readonly RGB32I: GLenum;
4165 readonly RGB32UI: GLenum;
4166 readonly RGB8: GLenum;
4167 readonly RGB8I: GLenum;
4168 readonly RGB8UI: GLenum;
4169 readonly RGB8_SNORM: GLenum;
4170 readonly RGB9_E5: GLenum;
4171 readonly RGBA16F: GLenum;
4172 readonly RGBA16I: GLenum;
4173 readonly RGBA16UI: GLenum;
4174 readonly RGBA32F: GLenum;
4175 readonly RGBA32I: GLenum;
4176 readonly RGBA32UI: GLenum;
4177 readonly RGBA8: GLenum;
4178 readonly RGBA8I: GLenum;
4179 readonly RGBA8UI: GLenum;
4180 readonly RGBA8_SNORM: GLenum;
4181 readonly RGBA_INTEGER: GLenum;
4182 readonly RGB_INTEGER: GLenum;
4183 readonly RG_INTEGER: GLenum;
4184 readonly SAMPLER_2D_ARRAY: GLenum;
4185 readonly SAMPLER_2D_ARRAY_SHADOW: GLenum;
4186 readonly SAMPLER_2D_SHADOW: GLenum;
4187 readonly SAMPLER_3D: GLenum;
4188 readonly SAMPLER_BINDING: GLenum;
4189 readonly SAMPLER_CUBE_SHADOW: GLenum;
4190 readonly SEPARATE_ATTRIBS: GLenum;
4191 readonly SIGNALED: GLenum;
4192 readonly SIGNED_NORMALIZED: GLenum;
4193 readonly SRGB: GLenum;
4194 readonly SRGB8: GLenum;
4195 readonly SRGB8_ALPHA8: GLenum;
4196 readonly STATIC_COPY: GLenum;
4197 readonly STATIC_READ: GLenum;
4198 readonly STENCIL: GLenum;
4199 readonly STREAM_COPY: GLenum;
4200 readonly STREAM_READ: GLenum;
4201 readonly SYNC_CONDITION: GLenum;
4202 readonly SYNC_FENCE: GLenum;
4203 readonly SYNC_FLAGS: GLenum;
4204 readonly SYNC_FLUSH_COMMANDS_BIT: GLenum;
4205 readonly SYNC_GPU_COMMANDS_COMPLETE: GLenum;
4206 readonly SYNC_STATUS: GLenum;
4207 readonly TEXTURE_2D_ARRAY: GLenum;
4208 readonly TEXTURE_3D: GLenum;
4209 readonly TEXTURE_BASE_LEVEL: GLenum;
4210 readonly TEXTURE_BINDING_2D_ARRAY: GLenum;
4211 readonly TEXTURE_BINDING_3D: GLenum;
4212 readonly TEXTURE_COMPARE_FUNC: GLenum;
4213 readonly TEXTURE_COMPARE_MODE: GLenum;
4214 readonly TEXTURE_IMMUTABLE_FORMAT: GLenum;
4215 readonly TEXTURE_IMMUTABLE_LEVELS: GLenum;
4216 readonly TEXTURE_MAX_LEVEL: GLenum;
4217 readonly TEXTURE_MAX_LOD: GLenum;
4218 readonly TEXTURE_MIN_LOD: GLenum;
4219 readonly TEXTURE_WRAP_R: GLenum;
4220 readonly TIMEOUT_EXPIRED: GLenum;
4221 readonly TIMEOUT_IGNORED: GLint64;
4222 readonly TRANSFORM_FEEDBACK: GLenum;
4223 readonly TRANSFORM_FEEDBACK_ACTIVE: GLenum;
4224 readonly TRANSFORM_FEEDBACK_BINDING: GLenum;
4225 readonly TRANSFORM_FEEDBACK_BUFFER: GLenum;
4226 readonly TRANSFORM_FEEDBACK_BUFFER_BINDING: GLenum;
4227 readonly TRANSFORM_FEEDBACK_BUFFER_MODE: GLenum;
4228 readonly TRANSFORM_FEEDBACK_BUFFER_SIZE: GLenum;
4229 readonly TRANSFORM_FEEDBACK_BUFFER_START: GLenum;
4230 readonly TRANSFORM_FEEDBACK_PAUSED: GLenum;
4231 readonly TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN: GLenum;
4232 readonly TRANSFORM_FEEDBACK_VARYINGS: GLenum;
4233 readonly UNIFORM_ARRAY_STRIDE: GLenum;
4234 readonly UNIFORM_BLOCK_ACTIVE_UNIFORMS: GLenum;
4235 readonly UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES: GLenum;
4236 readonly UNIFORM_BLOCK_BINDING: GLenum;
4237 readonly UNIFORM_BLOCK_DATA_SIZE: GLenum;
4238 readonly UNIFORM_BLOCK_INDEX: GLenum;
4239 readonly UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER: GLenum;
4240 readonly UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER: GLenum;
4241 readonly UNIFORM_BUFFER: GLenum;
4242 readonly UNIFORM_BUFFER_BINDING: GLenum;
4243 readonly UNIFORM_BUFFER_OFFSET_ALIGNMENT: GLenum;
4244 readonly UNIFORM_BUFFER_SIZE: GLenum;
4245 readonly UNIFORM_BUFFER_START: GLenum;
4246 readonly UNIFORM_IS_ROW_MAJOR: GLenum;
4247 readonly UNIFORM_MATRIX_STRIDE: GLenum;
4248 readonly UNIFORM_OFFSET: GLenum;
4249 readonly UNIFORM_SIZE: GLenum;
4250 readonly UNIFORM_TYPE: GLenum;
4251 readonly UNPACK_IMAGE_HEIGHT: GLenum;
4252 readonly UNPACK_ROW_LENGTH: GLenum;
4253 readonly UNPACK_SKIP_IMAGES: GLenum;
4254 readonly UNPACK_SKIP_PIXELS: GLenum;
4255 readonly UNPACK_SKIP_ROWS: GLenum;
4256 readonly UNSIGNALED: GLenum;
4257 readonly UNSIGNED_INT_10F_11F_11F_REV: GLenum;
4258 readonly UNSIGNED_INT_24_8: GLenum;
4259 readonly UNSIGNED_INT_2_10_10_10_REV: GLenum;
4260 readonly UNSIGNED_INT_5_9_9_9_REV: GLenum;
4261 readonly UNSIGNED_INT_SAMPLER_2D: GLenum;
4262 readonly UNSIGNED_INT_SAMPLER_2D_ARRAY: GLenum;
4263 readonly UNSIGNED_INT_SAMPLER_3D: GLenum;
4264 readonly UNSIGNED_INT_SAMPLER_CUBE: GLenum;
4265 readonly UNSIGNED_INT_VEC2: GLenum;
4266 readonly UNSIGNED_INT_VEC3: GLenum;
4267 readonly UNSIGNED_INT_VEC4: GLenum;
4268 readonly UNSIGNED_NORMALIZED: GLenum;
4269 readonly VERTEX_ARRAY_BINDING: GLenum;
4270 readonly VERTEX_ATTRIB_ARRAY_DIVISOR: GLenum;
4271 readonly VERTEX_ATTRIB_ARRAY_INTEGER: GLenum;
4272 readonly WAIT_FAILED: GLenum;
4273}
4274
4275interface WebGL2RenderingContextOverloads {
4276 bufferData(target: GLenum, size: GLsizeiptr, usage: GLenum): void;
4277 bufferData(target: GLenum, srcData: BufferSource | null, usage: GLenum): void;
4278 bufferData(target: GLenum, srcData: ArrayBufferView, usage: GLenum, srcOffset: GLuint, length?: GLuint): void;
4279 bufferSubData(target: GLenum, dstByteOffset: GLintptr, srcData: BufferSource): void;
4280 bufferSubData(target: GLenum, dstByteOffset: GLintptr, srcData: ArrayBufferView, srcOffset: GLuint, length?: GLuint): void;
4281 compressedTexImage2D(target: GLenum, level: GLint, internalformat: GLenum, width: GLsizei, height: GLsizei, border: GLint, imageSize: GLsizei, offset: GLintptr): void;
4282 compressedTexImage2D(target: GLenum, level: GLint, internalformat: GLenum, width: GLsizei, height: GLsizei, border: GLint, srcData: ArrayBufferView, srcOffset?: GLuint, srcLengthOverride?: GLuint): void;
4283 compressedTexSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, imageSize: GLsizei, offset: GLintptr): void;
4284 compressedTexSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, srcData: ArrayBufferView, srcOffset?: GLuint, srcLengthOverride?: GLuint): void;
4285 readPixels(x: GLint, y: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, dstData: ArrayBufferView | null): void;
4286 readPixels(x: GLint, y: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, offset: GLintptr): void;
4287 readPixels(x: GLint, y: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, dstData: ArrayBufferView, dstOffset: GLuint): void;
4288 texImage2D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, border: GLint, format: GLenum, type: GLenum, pixels: ArrayBufferView | null): void;
4289 texImage2D(target: GLenum, level: GLint, internalformat: GLint, format: GLenum, type: GLenum, source: TexImageSource): void;
4290 texImage2D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, border: GLint, format: GLenum, type: GLenum, pboOffset: GLintptr): void;
4291 texImage2D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, border: GLint, format: GLenum, type: GLenum, source: TexImageSource): void;
4292 texImage2D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, border: GLint, format: GLenum, type: GLenum, srcData: ArrayBufferView, srcOffset: GLuint): void;
4293 texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, pixels: ArrayBufferView | null): void;
4294 texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, format: GLenum, type: GLenum, source: TexImageSource): void;
4295 texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, pboOffset: GLintptr): void;
4296 texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, source: TexImageSource): void;
4297 texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, srcData: ArrayBufferView, srcOffset: GLuint): void;
4298 uniform1fv(location: WebGLUniformLocation | null, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void;
4299 uniform1iv(location: WebGLUniformLocation | null, data: Int32List, srcOffset?: GLuint, srcLength?: GLuint): void;
4300 uniform2fv(location: WebGLUniformLocation | null, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void;
4301 uniform2iv(location: WebGLUniformLocation | null, data: Int32List, srcOffset?: GLuint, srcLength?: GLuint): void;
4302 uniform3fv(location: WebGLUniformLocation | null, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void;
4303 uniform3iv(location: WebGLUniformLocation | null, data: Int32List, srcOffset?: GLuint, srcLength?: GLuint): void;
4304 uniform4fv(location: WebGLUniformLocation | null, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void;
4305 uniform4iv(location: WebGLUniformLocation | null, data: Int32List, srcOffset?: GLuint, srcLength?: GLuint): void;
4306 uniformMatrix2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void;
4307 uniformMatrix3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void;
4308 uniformMatrix4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint): void;
4309}
4310
4311/** Part of the WebGL API and represents the information returned by calling the WebGLRenderingContext.getActiveAttrib() and WebGLRenderingContext.getActiveUniform() methods. */
4312interface WebGLActiveInfo {
4313 readonly name: string;
4314 readonly size: GLint;
4315 readonly type: GLenum;
4316}
4317
4318declare var WebGLActiveInfo: {
4319 prototype: WebGLActiveInfo;
4320 new(): WebGLActiveInfo;
4321};
4322
4323/** Part of the WebGL API and represents an opaque buffer object storing data such as vertices or colors. */
4324interface WebGLBuffer {
4325}
4326
4327declare var WebGLBuffer: {
4328 prototype: WebGLBuffer;
4329 new(): WebGLBuffer;
4330};
4331
4332/** 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. */
4333interface WebGLContextEvent extends Event {
4334 readonly statusMessage: string;
4335}
4336
4337declare var WebGLContextEvent: {
4338 prototype: WebGLContextEvent;
4339 new(type: string, eventInit?: WebGLContextEventInit): WebGLContextEvent;
4340};
4341
4342/** Part of the WebGL API and represents a collection of buffers that serve as a rendering destination. */
4343interface WebGLFramebuffer {
4344}
4345
4346declare var WebGLFramebuffer: {
4347 prototype: WebGLFramebuffer;
4348 new(): WebGLFramebuffer;
4349};
4350
4351/** 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). */
4352interface WebGLProgram {
4353}
4354
4355declare var WebGLProgram: {
4356 prototype: WebGLProgram;
4357 new(): WebGLProgram;
4358};
4359
4360interface WebGLQuery {
4361}
4362
4363declare var WebGLQuery: {
4364 prototype: WebGLQuery;
4365 new(): WebGLQuery;
4366};
4367
4368/** Part of the WebGL API and represents a buffer that can contain an image, or can be source or target of an rendering operation. */
4369interface WebGLRenderbuffer {
4370}
4371
4372declare var WebGLRenderbuffer: {
4373 prototype: WebGLRenderbuffer;
4374 new(): WebGLRenderbuffer;
4375};
4376
4377/** Provides an interface to the OpenGL ES 2.0 graphics rendering context for the drawing surface of an HTML <canvas> element. */
4378interface WebGLRenderingContext extends WebGLRenderingContextBase, WebGLRenderingContextOverloads {
4379}
4380
4381declare var WebGLRenderingContext: {
4382 prototype: WebGLRenderingContext;
4383 new(): WebGLRenderingContext;
4384 readonly ACTIVE_ATTRIBUTES: GLenum;
4385 readonly ACTIVE_TEXTURE: GLenum;
4386 readonly ACTIVE_UNIFORMS: GLenum;
4387 readonly ALIASED_LINE_WIDTH_RANGE: GLenum;
4388 readonly ALIASED_POINT_SIZE_RANGE: GLenum;
4389 readonly ALPHA: GLenum;
4390 readonly ALPHA_BITS: GLenum;
4391 readonly ALWAYS: GLenum;
4392 readonly ARRAY_BUFFER: GLenum;
4393 readonly ARRAY_BUFFER_BINDING: GLenum;
4394 readonly ATTACHED_SHADERS: GLenum;
4395 readonly BACK: GLenum;
4396 readonly BLEND: GLenum;
4397 readonly BLEND_COLOR: GLenum;
4398 readonly BLEND_DST_ALPHA: GLenum;
4399 readonly BLEND_DST_RGB: GLenum;
4400 readonly BLEND_EQUATION: GLenum;
4401 readonly BLEND_EQUATION_ALPHA: GLenum;
4402 readonly BLEND_EQUATION_RGB: GLenum;
4403 readonly BLEND_SRC_ALPHA: GLenum;
4404 readonly BLEND_SRC_RGB: GLenum;
4405 readonly BLUE_BITS: GLenum;
4406 readonly BOOL: GLenum;
4407 readonly BOOL_VEC2: GLenum;
4408 readonly BOOL_VEC3: GLenum;
4409 readonly BOOL_VEC4: GLenum;
4410 readonly BROWSER_DEFAULT_WEBGL: GLenum;
4411 readonly BUFFER_SIZE: GLenum;
4412 readonly BUFFER_USAGE: GLenum;
4413 readonly BYTE: GLenum;
4414 readonly CCW: GLenum;
4415 readonly CLAMP_TO_EDGE: GLenum;
4416 readonly COLOR_ATTACHMENT0: GLenum;
4417 readonly COLOR_BUFFER_BIT: GLenum;
4418 readonly COLOR_CLEAR_VALUE: GLenum;
4419 readonly COLOR_WRITEMASK: GLenum;
4420 readonly COMPILE_STATUS: GLenum;
4421 readonly COMPRESSED_TEXTURE_FORMATS: GLenum;
4422 readonly CONSTANT_ALPHA: GLenum;
4423 readonly CONSTANT_COLOR: GLenum;
4424 readonly CONTEXT_LOST_WEBGL: GLenum;
4425 readonly CULL_FACE: GLenum;
4426 readonly CULL_FACE_MODE: GLenum;
4427 readonly CURRENT_PROGRAM: GLenum;
4428 readonly CURRENT_VERTEX_ATTRIB: GLenum;
4429 readonly CW: GLenum;
4430 readonly DECR: GLenum;
4431 readonly DECR_WRAP: GLenum;
4432 readonly DELETE_STATUS: GLenum;
4433 readonly DEPTH_ATTACHMENT: GLenum;
4434 readonly DEPTH_BITS: GLenum;
4435 readonly DEPTH_BUFFER_BIT: GLenum;
4436 readonly DEPTH_CLEAR_VALUE: GLenum;
4437 readonly DEPTH_COMPONENT: GLenum;
4438 readonly DEPTH_COMPONENT16: GLenum;
4439 readonly DEPTH_FUNC: GLenum;
4440 readonly DEPTH_RANGE: GLenum;
4441 readonly DEPTH_STENCIL: GLenum;
4442 readonly DEPTH_STENCIL_ATTACHMENT: GLenum;
4443 readonly DEPTH_TEST: GLenum;
4444 readonly DEPTH_WRITEMASK: GLenum;
4445 readonly DITHER: GLenum;
4446 readonly DONT_CARE: GLenum;
4447 readonly DST_ALPHA: GLenum;
4448 readonly DST_COLOR: GLenum;
4449 readonly DYNAMIC_DRAW: GLenum;
4450 readonly ELEMENT_ARRAY_BUFFER: GLenum;
4451 readonly ELEMENT_ARRAY_BUFFER_BINDING: GLenum;
4452 readonly EQUAL: GLenum;
4453 readonly FASTEST: GLenum;
4454 readonly FLOAT: GLenum;
4455 readonly FLOAT_MAT2: GLenum;
4456 readonly FLOAT_MAT3: GLenum;
4457 readonly FLOAT_MAT4: GLenum;
4458 readonly FLOAT_VEC2: GLenum;
4459 readonly FLOAT_VEC3: GLenum;
4460 readonly FLOAT_VEC4: GLenum;
4461 readonly FRAGMENT_SHADER: GLenum;
4462 readonly FRAMEBUFFER: GLenum;
4463 readonly FRAMEBUFFER_ATTACHMENT_OBJECT_NAME: GLenum;
4464 readonly FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE: GLenum;
4465 readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE: GLenum;
4466 readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL: GLenum;
4467 readonly FRAMEBUFFER_BINDING: GLenum;
4468 readonly FRAMEBUFFER_COMPLETE: GLenum;
4469 readonly FRAMEBUFFER_INCOMPLETE_ATTACHMENT: GLenum;
4470 readonly FRAMEBUFFER_INCOMPLETE_DIMENSIONS: GLenum;
4471 readonly FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT: GLenum;
4472 readonly FRAMEBUFFER_UNSUPPORTED: GLenum;
4473 readonly FRONT: GLenum;
4474 readonly FRONT_AND_BACK: GLenum;
4475 readonly FRONT_FACE: GLenum;
4476 readonly FUNC_ADD: GLenum;
4477 readonly FUNC_REVERSE_SUBTRACT: GLenum;
4478 readonly FUNC_SUBTRACT: GLenum;
4479 readonly GENERATE_MIPMAP_HINT: GLenum;
4480 readonly GEQUAL: GLenum;
4481 readonly GREATER: GLenum;
4482 readonly GREEN_BITS: GLenum;
4483 readonly HIGH_FLOAT: GLenum;
4484 readonly HIGH_INT: GLenum;
4485 readonly IMPLEMENTATION_COLOR_READ_FORMAT: GLenum;
4486 readonly IMPLEMENTATION_COLOR_READ_TYPE: GLenum;
4487 readonly INCR: GLenum;
4488 readonly INCR_WRAP: GLenum;
4489 readonly INT: GLenum;
4490 readonly INT_VEC2: GLenum;
4491 readonly INT_VEC3: GLenum;
4492 readonly INT_VEC4: GLenum;
4493 readonly INVALID_ENUM: GLenum;
4494 readonly INVALID_FRAMEBUFFER_OPERATION: GLenum;
4495 readonly INVALID_OPERATION: GLenum;
4496 readonly INVALID_VALUE: GLenum;
4497 readonly INVERT: GLenum;
4498 readonly KEEP: GLenum;
4499 readonly LEQUAL: GLenum;
4500 readonly LESS: GLenum;
4501 readonly LINEAR: GLenum;
4502 readonly LINEAR_MIPMAP_LINEAR: GLenum;
4503 readonly LINEAR_MIPMAP_NEAREST: GLenum;
4504 readonly LINES: GLenum;
4505 readonly LINE_LOOP: GLenum;
4506 readonly LINE_STRIP: GLenum;
4507 readonly LINE_WIDTH: GLenum;
4508 readonly LINK_STATUS: GLenum;
4509 readonly LOW_FLOAT: GLenum;
4510 readonly LOW_INT: GLenum;
4511 readonly LUMINANCE: GLenum;
4512 readonly LUMINANCE_ALPHA: GLenum;
4513 readonly MAX_COMBINED_TEXTURE_IMAGE_UNITS: GLenum;
4514 readonly MAX_CUBE_MAP_TEXTURE_SIZE: GLenum;
4515 readonly MAX_FRAGMENT_UNIFORM_VECTORS: GLenum;
4516 readonly MAX_RENDERBUFFER_SIZE: GLenum;
4517 readonly MAX_TEXTURE_IMAGE_UNITS: GLenum;
4518 readonly MAX_TEXTURE_SIZE: GLenum;
4519 readonly MAX_VARYING_VECTORS: GLenum;
4520 readonly MAX_VERTEX_ATTRIBS: GLenum;
4521 readonly MAX_VERTEX_TEXTURE_IMAGE_UNITS: GLenum;
4522 readonly MAX_VERTEX_UNIFORM_VECTORS: GLenum;
4523 readonly MAX_VIEWPORT_DIMS: GLenum;
4524 readonly MEDIUM_FLOAT: GLenum;
4525 readonly MEDIUM_INT: GLenum;
4526 readonly MIRRORED_REPEAT: GLenum;
4527 readonly NEAREST: GLenum;
4528 readonly NEAREST_MIPMAP_LINEAR: GLenum;
4529 readonly NEAREST_MIPMAP_NEAREST: GLenum;
4530 readonly NEVER: GLenum;
4531 readonly NICEST: GLenum;
4532 readonly NONE: GLenum;
4533 readonly NOTEQUAL: GLenum;
4534 readonly NO_ERROR: GLenum;
4535 readonly ONE: GLenum;
4536 readonly ONE_MINUS_CONSTANT_ALPHA: GLenum;
4537 readonly ONE_MINUS_CONSTANT_COLOR: GLenum;
4538 readonly ONE_MINUS_DST_ALPHA: GLenum;
4539 readonly ONE_MINUS_DST_COLOR: GLenum;
4540 readonly ONE_MINUS_SRC_ALPHA: GLenum;
4541 readonly ONE_MINUS_SRC_COLOR: GLenum;
4542 readonly OUT_OF_MEMORY: GLenum;
4543 readonly PACK_ALIGNMENT: GLenum;
4544 readonly POINTS: GLenum;
4545 readonly POLYGON_OFFSET_FACTOR: GLenum;
4546 readonly POLYGON_OFFSET_FILL: GLenum;
4547 readonly POLYGON_OFFSET_UNITS: GLenum;
4548 readonly RED_BITS: GLenum;
4549 readonly RENDERBUFFER: GLenum;
4550 readonly RENDERBUFFER_ALPHA_SIZE: GLenum;
4551 readonly RENDERBUFFER_BINDING: GLenum;
4552 readonly RENDERBUFFER_BLUE_SIZE: GLenum;
4553 readonly RENDERBUFFER_DEPTH_SIZE: GLenum;
4554 readonly RENDERBUFFER_GREEN_SIZE: GLenum;
4555 readonly RENDERBUFFER_HEIGHT: GLenum;
4556 readonly RENDERBUFFER_INTERNAL_FORMAT: GLenum;
4557 readonly RENDERBUFFER_RED_SIZE: GLenum;
4558 readonly RENDERBUFFER_STENCIL_SIZE: GLenum;
4559 readonly RENDERBUFFER_WIDTH: GLenum;
4560 readonly RENDERER: GLenum;
4561 readonly REPEAT: GLenum;
4562 readonly REPLACE: GLenum;
4563 readonly RGB: GLenum;
4564 readonly RGB565: GLenum;
4565 readonly RGB5_A1: GLenum;
4566 readonly RGBA: GLenum;
4567 readonly RGBA4: GLenum;
4568 readonly SAMPLER_2D: GLenum;
4569 readonly SAMPLER_CUBE: GLenum;
4570 readonly SAMPLES: GLenum;
4571 readonly SAMPLE_ALPHA_TO_COVERAGE: GLenum;
4572 readonly SAMPLE_BUFFERS: GLenum;
4573 readonly SAMPLE_COVERAGE: GLenum;
4574 readonly SAMPLE_COVERAGE_INVERT: GLenum;
4575 readonly SAMPLE_COVERAGE_VALUE: GLenum;
4576 readonly SCISSOR_BOX: GLenum;
4577 readonly SCISSOR_TEST: GLenum;
4578 readonly SHADER_TYPE: GLenum;
4579 readonly SHADING_LANGUAGE_VERSION: GLenum;
4580 readonly SHORT: GLenum;
4581 readonly SRC_ALPHA: GLenum;
4582 readonly SRC_ALPHA_SATURATE: GLenum;
4583 readonly SRC_COLOR: GLenum;
4584 readonly STATIC_DRAW: GLenum;
4585 readonly STENCIL_ATTACHMENT: GLenum;
4586 readonly STENCIL_BACK_FAIL: GLenum;
4587 readonly STENCIL_BACK_FUNC: GLenum;
4588 readonly STENCIL_BACK_PASS_DEPTH_FAIL: GLenum;
4589 readonly STENCIL_BACK_PASS_DEPTH_PASS: GLenum;
4590 readonly STENCIL_BACK_REF: GLenum;
4591 readonly STENCIL_BACK_VALUE_MASK: GLenum;
4592 readonly STENCIL_BACK_WRITEMASK: GLenum;
4593 readonly STENCIL_BITS: GLenum;
4594 readonly STENCIL_BUFFER_BIT: GLenum;
4595 readonly STENCIL_CLEAR_VALUE: GLenum;
4596 readonly STENCIL_FAIL: GLenum;
4597 readonly STENCIL_FUNC: GLenum;
4598 readonly STENCIL_INDEX8: GLenum;
4599 readonly STENCIL_PASS_DEPTH_FAIL: GLenum;
4600 readonly STENCIL_PASS_DEPTH_PASS: GLenum;
4601 readonly STENCIL_REF: GLenum;
4602 readonly STENCIL_TEST: GLenum;
4603 readonly STENCIL_VALUE_MASK: GLenum;
4604 readonly STENCIL_WRITEMASK: GLenum;
4605 readonly STREAM_DRAW: GLenum;
4606 readonly SUBPIXEL_BITS: GLenum;
4607 readonly TEXTURE: GLenum;
4608 readonly TEXTURE0: GLenum;
4609 readonly TEXTURE1: GLenum;
4610 readonly TEXTURE10: GLenum;
4611 readonly TEXTURE11: GLenum;
4612 readonly TEXTURE12: GLenum;
4613 readonly TEXTURE13: GLenum;
4614 readonly TEXTURE14: GLenum;
4615 readonly TEXTURE15: GLenum;
4616 readonly TEXTURE16: GLenum;
4617 readonly TEXTURE17: GLenum;
4618 readonly TEXTURE18: GLenum;
4619 readonly TEXTURE19: GLenum;
4620 readonly TEXTURE2: GLenum;
4621 readonly TEXTURE20: GLenum;
4622 readonly TEXTURE21: GLenum;
4623 readonly TEXTURE22: GLenum;
4624 readonly TEXTURE23: GLenum;
4625 readonly TEXTURE24: GLenum;
4626 readonly TEXTURE25: GLenum;
4627 readonly TEXTURE26: GLenum;
4628 readonly TEXTURE27: GLenum;
4629 readonly TEXTURE28: GLenum;
4630 readonly TEXTURE29: GLenum;
4631 readonly TEXTURE3: GLenum;
4632 readonly TEXTURE30: GLenum;
4633 readonly TEXTURE31: GLenum;
4634 readonly TEXTURE4: GLenum;
4635 readonly TEXTURE5: GLenum;
4636 readonly TEXTURE6: GLenum;
4637 readonly TEXTURE7: GLenum;
4638 readonly TEXTURE8: GLenum;
4639 readonly TEXTURE9: GLenum;
4640 readonly TEXTURE_2D: GLenum;
4641 readonly TEXTURE_BINDING_2D: GLenum;
4642 readonly TEXTURE_BINDING_CUBE_MAP: GLenum;
4643 readonly TEXTURE_CUBE_MAP: GLenum;
4644 readonly TEXTURE_CUBE_MAP_NEGATIVE_X: GLenum;
4645 readonly TEXTURE_CUBE_MAP_NEGATIVE_Y: GLenum;
4646 readonly TEXTURE_CUBE_MAP_NEGATIVE_Z: GLenum;
4647 readonly TEXTURE_CUBE_MAP_POSITIVE_X: GLenum;
4648 readonly TEXTURE_CUBE_MAP_POSITIVE_Y: GLenum;
4649 readonly TEXTURE_CUBE_MAP_POSITIVE_Z: GLenum;
4650 readonly TEXTURE_MAG_FILTER: GLenum;
4651 readonly TEXTURE_MIN_FILTER: GLenum;
4652 readonly TEXTURE_WRAP_S: GLenum;
4653 readonly TEXTURE_WRAP_T: GLenum;
4654 readonly TRIANGLES: GLenum;
4655 readonly TRIANGLE_FAN: GLenum;
4656 readonly TRIANGLE_STRIP: GLenum;
4657 readonly UNPACK_ALIGNMENT: GLenum;
4658 readonly UNPACK_COLORSPACE_CONVERSION_WEBGL: GLenum;
4659 readonly UNPACK_FLIP_Y_WEBGL: GLenum;
4660 readonly UNPACK_PREMULTIPLY_ALPHA_WEBGL: GLenum;
4661 readonly UNSIGNED_BYTE: GLenum;
4662 readonly UNSIGNED_INT: GLenum;
4663 readonly UNSIGNED_SHORT: GLenum;
4664 readonly UNSIGNED_SHORT_4_4_4_4: GLenum;
4665 readonly UNSIGNED_SHORT_5_5_5_1: GLenum;
4666 readonly UNSIGNED_SHORT_5_6_5: GLenum;
4667 readonly VALIDATE_STATUS: GLenum;
4668 readonly VENDOR: GLenum;
4669 readonly VERSION: GLenum;
4670 readonly VERTEX_ATTRIB_ARRAY_BUFFER_BINDING: GLenum;
4671 readonly VERTEX_ATTRIB_ARRAY_ENABLED: GLenum;
4672 readonly VERTEX_ATTRIB_ARRAY_NORMALIZED: GLenum;
4673 readonly VERTEX_ATTRIB_ARRAY_POINTER: GLenum;
4674 readonly VERTEX_ATTRIB_ARRAY_SIZE: GLenum;
4675 readonly VERTEX_ATTRIB_ARRAY_STRIDE: GLenum;
4676 readonly VERTEX_ATTRIB_ARRAY_TYPE: GLenum;
4677 readonly VERTEX_SHADER: GLenum;
4678 readonly VIEWPORT: GLenum;
4679 readonly ZERO: GLenum;
4680};
4681
4682interface WebGLRenderingContextBase {
4683 readonly drawingBufferHeight: GLsizei;
4684 readonly drawingBufferWidth: GLsizei;
4685 activeTexture(texture: GLenum): void;
4686 attachShader(program: WebGLProgram, shader: WebGLShader): void;
4687 bindAttribLocation(program: WebGLProgram, index: GLuint, name: string): void;
4688 bindBuffer(target: GLenum, buffer: WebGLBuffer | null): void;
4689 bindFramebuffer(target: GLenum, framebuffer: WebGLFramebuffer | null): void;
4690 bindRenderbuffer(target: GLenum, renderbuffer: WebGLRenderbuffer | null): void;
4691 bindTexture(target: GLenum, texture: WebGLTexture | null): void;
4692 blendColor(red: GLclampf, green: GLclampf, blue: GLclampf, alpha: GLclampf): void;
4693 blendEquation(mode: GLenum): void;
4694 blendEquationSeparate(modeRGB: GLenum, modeAlpha: GLenum): void;
4695 blendFunc(sfactor: GLenum, dfactor: GLenum): void;
4696 blendFuncSeparate(srcRGB: GLenum, dstRGB: GLenum, srcAlpha: GLenum, dstAlpha: GLenum): void;
4697 checkFramebufferStatus(target: GLenum): GLenum;
4698 clear(mask: GLbitfield): void;
4699 clearColor(red: GLclampf, green: GLclampf, blue: GLclampf, alpha: GLclampf): void;
4700 clearDepth(depth: GLclampf): void;
4701 clearStencil(s: GLint): void;
4702 colorMask(red: GLboolean, green: GLboolean, blue: GLboolean, alpha: GLboolean): void;
4703 compileShader(shader: WebGLShader): void;
4704 copyTexImage2D(target: GLenum, level: GLint, internalformat: GLenum, x: GLint, y: GLint, width: GLsizei, height: GLsizei, border: GLint): void;
4705 copyTexSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, x: GLint, y: GLint, width: GLsizei, height: GLsizei): void;
4706 createBuffer(): WebGLBuffer | null;
4707 createFramebuffer(): WebGLFramebuffer | null;
4708 createProgram(): WebGLProgram | null;
4709 createRenderbuffer(): WebGLRenderbuffer | null;
4710 createShader(type: GLenum): WebGLShader | null;
4711 createTexture(): WebGLTexture | null;
4712 cullFace(mode: GLenum): void;
4713 deleteBuffer(buffer: WebGLBuffer | null): void;
4714 deleteFramebuffer(framebuffer: WebGLFramebuffer | null): void;
4715 deleteProgram(program: WebGLProgram | null): void;
4716 deleteRenderbuffer(renderbuffer: WebGLRenderbuffer | null): void;
4717 deleteShader(shader: WebGLShader | null): void;
4718 deleteTexture(texture: WebGLTexture | null): void;
4719 depthFunc(func: GLenum): void;
4720 depthMask(flag: GLboolean): void;
4721 depthRange(zNear: GLclampf, zFar: GLclampf): void;
4722 detachShader(program: WebGLProgram, shader: WebGLShader): void;
4723 disable(cap: GLenum): void;
4724 disableVertexAttribArray(index: GLuint): void;
4725 drawArrays(mode: GLenum, first: GLint, count: GLsizei): void;
4726 drawElements(mode: GLenum, count: GLsizei, type: GLenum, offset: GLintptr): void;
4727 enable(cap: GLenum): void;
4728 enableVertexAttribArray(index: GLuint): void;
4729 finish(): void;
4730 flush(): void;
4731 framebufferRenderbuffer(target: GLenum, attachment: GLenum, renderbuffertarget: GLenum, renderbuffer: WebGLRenderbuffer | null): void;
4732 framebufferTexture2D(target: GLenum, attachment: GLenum, textarget: GLenum, texture: WebGLTexture | null, level: GLint): void;
4733 frontFace(mode: GLenum): void;
4734 generateMipmap(target: GLenum): void;
4735 getActiveAttrib(program: WebGLProgram, index: GLuint): WebGLActiveInfo | null;
4736 getActiveUniform(program: WebGLProgram, index: GLuint): WebGLActiveInfo | null;
4737 getAttachedShaders(program: WebGLProgram): WebGLShader[] | null;
4738 getAttribLocation(program: WebGLProgram, name: string): GLint;
4739 getBufferParameter(target: GLenum, pname: GLenum): any;
4740 getContextAttributes(): WebGLContextAttributes | null;
4741 getError(): GLenum;
4742 getExtension(extensionName: "EXT_blend_minmax"): EXT_blend_minmax | null;
4743 getExtension(extensionName: "EXT_color_buffer_float"): EXT_color_buffer_float | null;
4744 getExtension(extensionName: "EXT_color_buffer_half_float"): EXT_color_buffer_half_float | null;
4745 getExtension(extensionName: "EXT_float_blend"): EXT_float_blend | null;
4746 getExtension(extensionName: "EXT_texture_filter_anisotropic"): EXT_texture_filter_anisotropic | null;
4747 getExtension(extensionName: "EXT_frag_depth"): EXT_frag_depth | null;
4748 getExtension(extensionName: "EXT_shader_texture_lod"): EXT_shader_texture_lod | null;
4749 getExtension(extensionName: "EXT_sRGB"): EXT_sRGB | null;
4750 getExtension(extensionName: "KHR_parallel_shader_compile"): KHR_parallel_shader_compile | null;
4751 getExtension(extensionName: "OES_vertex_array_object"): OES_vertex_array_object | null;
4752 getExtension(extensionName: "OVR_multiview2"): OVR_multiview2 | null;
4753 getExtension(extensionName: "WEBGL_color_buffer_float"): WEBGL_color_buffer_float | null;
4754 getExtension(extensionName: "WEBGL_compressed_texture_astc"): WEBGL_compressed_texture_astc | null;
4755 getExtension(extensionName: "WEBGL_compressed_texture_etc"): WEBGL_compressed_texture_etc | null;
4756 getExtension(extensionName: "WEBGL_compressed_texture_etc1"): WEBGL_compressed_texture_etc1 | null;
4757 getExtension(extensionName: "WEBGL_compressed_texture_s3tc_srgb"): WEBGL_compressed_texture_s3tc_srgb | null;
4758 getExtension(extensionName: "WEBGL_debug_shaders"): WEBGL_debug_shaders | null;
4759 getExtension(extensionName: "WEBGL_draw_buffers"): WEBGL_draw_buffers | null;
4760 getExtension(extensionName: "WEBGL_lose_context"): WEBGL_lose_context | null;
4761 getExtension(extensionName: "WEBGL_depth_texture"): WEBGL_depth_texture | null;
4762 getExtension(extensionName: "WEBGL_debug_renderer_info"): WEBGL_debug_renderer_info | null;
4763 getExtension(extensionName: "WEBGL_compressed_texture_s3tc"): WEBGL_compressed_texture_s3tc | null;
4764 getExtension(extensionName: "OES_texture_half_float_linear"): OES_texture_half_float_linear | null;
4765 getExtension(extensionName: "OES_texture_half_float"): OES_texture_half_float | null;
4766 getExtension(extensionName: "OES_texture_float_linear"): OES_texture_float_linear | null;
4767 getExtension(extensionName: "OES_texture_float"): OES_texture_float | null;
4768 getExtension(extensionName: "OES_standard_derivatives"): OES_standard_derivatives | null;
4769 getExtension(extensionName: "OES_element_index_uint"): OES_element_index_uint | null;
4770 getExtension(extensionName: "ANGLE_instanced_arrays"): ANGLE_instanced_arrays | null;
4771 getExtension(name: string): any;
4772 getFramebufferAttachmentParameter(target: GLenum, attachment: GLenum, pname: GLenum): any;
4773 getParameter(pname: GLenum): any;
4774 getProgramInfoLog(program: WebGLProgram): string | null;
4775 getProgramParameter(program: WebGLProgram, pname: GLenum): any;
4776 getRenderbufferParameter(target: GLenum, pname: GLenum): any;
4777 getShaderInfoLog(shader: WebGLShader): string | null;
4778 getShaderParameter(shader: WebGLShader, pname: GLenum): any;
4779 getShaderPrecisionFormat(shadertype: GLenum, precisiontype: GLenum): WebGLShaderPrecisionFormat | null;
4780 getShaderSource(shader: WebGLShader): string | null;
4781 getSupportedExtensions(): string[] | null;
4782 getTexParameter(target: GLenum, pname: GLenum): any;
4783 getUniform(program: WebGLProgram, location: WebGLUniformLocation): any;
4784 getUniformLocation(program: WebGLProgram, name: string): WebGLUniformLocation | null;
4785 getVertexAttrib(index: GLuint, pname: GLenum): any;
4786 getVertexAttribOffset(index: GLuint, pname: GLenum): GLintptr;
4787 hint(target: GLenum, mode: GLenum): void;
4788 isBuffer(buffer: WebGLBuffer | null): GLboolean;
4789 isContextLost(): boolean;
4790 isEnabled(cap: GLenum): GLboolean;
4791 isFramebuffer(framebuffer: WebGLFramebuffer | null): GLboolean;
4792 isProgram(program: WebGLProgram | null): GLboolean;
4793 isRenderbuffer(renderbuffer: WebGLRenderbuffer | null): GLboolean;
4794 isShader(shader: WebGLShader | null): GLboolean;
4795 isTexture(texture: WebGLTexture | null): GLboolean;
4796 lineWidth(width: GLfloat): void;
4797 linkProgram(program: WebGLProgram): void;
4798 pixelStorei(pname: GLenum, param: GLint | GLboolean): void;
4799 polygonOffset(factor: GLfloat, units: GLfloat): void;
4800 renderbufferStorage(target: GLenum, internalformat: GLenum, width: GLsizei, height: GLsizei): void;
4801 sampleCoverage(value: GLclampf, invert: GLboolean): void;
4802 scissor(x: GLint, y: GLint, width: GLsizei, height: GLsizei): void;
4803 shaderSource(shader: WebGLShader, source: string): void;
4804 stencilFunc(func: GLenum, ref: GLint, mask: GLuint): void;
4805 stencilFuncSeparate(face: GLenum, func: GLenum, ref: GLint, mask: GLuint): void;
4806 stencilMask(mask: GLuint): void;
4807 stencilMaskSeparate(face: GLenum, mask: GLuint): void;
4808 stencilOp(fail: GLenum, zfail: GLenum, zpass: GLenum): void;
4809 stencilOpSeparate(face: GLenum, fail: GLenum, zfail: GLenum, zpass: GLenum): void;
4810 texParameterf(target: GLenum, pname: GLenum, param: GLfloat): void;
4811 texParameteri(target: GLenum, pname: GLenum, param: GLint): void;
4812 uniform1f(location: WebGLUniformLocation | null, x: GLfloat): void;
4813 uniform1i(location: WebGLUniformLocation | null, x: GLint): void;
4814 uniform2f(location: WebGLUniformLocation | null, x: GLfloat, y: GLfloat): void;
4815 uniform2i(location: WebGLUniformLocation | null, x: GLint, y: GLint): void;
4816 uniform3f(location: WebGLUniformLocation | null, x: GLfloat, y: GLfloat, z: GLfloat): void;
4817 uniform3i(location: WebGLUniformLocation | null, x: GLint, y: GLint, z: GLint): void;
4818 uniform4f(location: WebGLUniformLocation | null, x: GLfloat, y: GLfloat, z: GLfloat, w: GLfloat): void;
4819 uniform4i(location: WebGLUniformLocation | null, x: GLint, y: GLint, z: GLint, w: GLint): void;
4820 useProgram(program: WebGLProgram | null): void;
4821 validateProgram(program: WebGLProgram): void;
4822 vertexAttrib1f(index: GLuint, x: GLfloat): void;
4823 vertexAttrib1fv(index: GLuint, values: Float32List): void;
4824 vertexAttrib2f(index: GLuint, x: GLfloat, y: GLfloat): void;
4825 vertexAttrib2fv(index: GLuint, values: Float32List): void;
4826 vertexAttrib3f(index: GLuint, x: GLfloat, y: GLfloat, z: GLfloat): void;
4827 vertexAttrib3fv(index: GLuint, values: Float32List): void;
4828 vertexAttrib4f(index: GLuint, x: GLfloat, y: GLfloat, z: GLfloat, w: GLfloat): void;
4829 vertexAttrib4fv(index: GLuint, values: Float32List): void;
4830 vertexAttribPointer(index: GLuint, size: GLint, type: GLenum, normalized: GLboolean, stride: GLsizei, offset: GLintptr): void;
4831 viewport(x: GLint, y: GLint, width: GLsizei, height: GLsizei): void;
4832 readonly ACTIVE_ATTRIBUTES: GLenum;
4833 readonly ACTIVE_TEXTURE: GLenum;
4834 readonly ACTIVE_UNIFORMS: GLenum;
4835 readonly ALIASED_LINE_WIDTH_RANGE: GLenum;
4836 readonly ALIASED_POINT_SIZE_RANGE: GLenum;
4837 readonly ALPHA: GLenum;
4838 readonly ALPHA_BITS: GLenum;
4839 readonly ALWAYS: GLenum;
4840 readonly ARRAY_BUFFER: GLenum;
4841 readonly ARRAY_BUFFER_BINDING: GLenum;
4842 readonly ATTACHED_SHADERS: GLenum;
4843 readonly BACK: GLenum;
4844 readonly BLEND: GLenum;
4845 readonly BLEND_COLOR: GLenum;
4846 readonly BLEND_DST_ALPHA: GLenum;
4847 readonly BLEND_DST_RGB: GLenum;
4848 readonly BLEND_EQUATION: GLenum;
4849 readonly BLEND_EQUATION_ALPHA: GLenum;
4850 readonly BLEND_EQUATION_RGB: GLenum;
4851 readonly BLEND_SRC_ALPHA: GLenum;
4852 readonly BLEND_SRC_RGB: GLenum;
4853 readonly BLUE_BITS: GLenum;
4854 readonly BOOL: GLenum;
4855 readonly BOOL_VEC2: GLenum;
4856 readonly BOOL_VEC3: GLenum;
4857 readonly BOOL_VEC4: GLenum;
4858 readonly BROWSER_DEFAULT_WEBGL: GLenum;
4859 readonly BUFFER_SIZE: GLenum;
4860 readonly BUFFER_USAGE: GLenum;
4861 readonly BYTE: GLenum;
4862 readonly CCW: GLenum;
4863 readonly CLAMP_TO_EDGE: GLenum;
4864 readonly COLOR_ATTACHMENT0: GLenum;
4865 readonly COLOR_BUFFER_BIT: GLenum;
4866 readonly COLOR_CLEAR_VALUE: GLenum;
4867 readonly COLOR_WRITEMASK: GLenum;
4868 readonly COMPILE_STATUS: GLenum;
4869 readonly COMPRESSED_TEXTURE_FORMATS: GLenum;
4870 readonly CONSTANT_ALPHA: GLenum;
4871 readonly CONSTANT_COLOR: GLenum;
4872 readonly CONTEXT_LOST_WEBGL: GLenum;
4873 readonly CULL_FACE: GLenum;
4874 readonly CULL_FACE_MODE: GLenum;
4875 readonly CURRENT_PROGRAM: GLenum;
4876 readonly CURRENT_VERTEX_ATTRIB: GLenum;
4877 readonly CW: GLenum;
4878 readonly DECR: GLenum;
4879 readonly DECR_WRAP: GLenum;
4880 readonly DELETE_STATUS: GLenum;
4881 readonly DEPTH_ATTACHMENT: GLenum;
4882 readonly DEPTH_BITS: GLenum;
4883 readonly DEPTH_BUFFER_BIT: GLenum;
4884 readonly DEPTH_CLEAR_VALUE: GLenum;
4885 readonly DEPTH_COMPONENT: GLenum;
4886 readonly DEPTH_COMPONENT16: GLenum;
4887 readonly DEPTH_FUNC: GLenum;
4888 readonly DEPTH_RANGE: GLenum;
4889 readonly DEPTH_STENCIL: GLenum;
4890 readonly DEPTH_STENCIL_ATTACHMENT: GLenum;
4891 readonly DEPTH_TEST: GLenum;
4892 readonly DEPTH_WRITEMASK: GLenum;
4893 readonly DITHER: GLenum;
4894 readonly DONT_CARE: GLenum;
4895 readonly DST_ALPHA: GLenum;
4896 readonly DST_COLOR: GLenum;
4897 readonly DYNAMIC_DRAW: GLenum;
4898 readonly ELEMENT_ARRAY_BUFFER: GLenum;
4899 readonly ELEMENT_ARRAY_BUFFER_BINDING: GLenum;
4900 readonly EQUAL: GLenum;
4901 readonly FASTEST: GLenum;
4902 readonly FLOAT: GLenum;
4903 readonly FLOAT_MAT2: GLenum;
4904 readonly FLOAT_MAT3: GLenum;
4905 readonly FLOAT_MAT4: GLenum;
4906 readonly FLOAT_VEC2: GLenum;
4907 readonly FLOAT_VEC3: GLenum;
4908 readonly FLOAT_VEC4: GLenum;
4909 readonly FRAGMENT_SHADER: GLenum;
4910 readonly FRAMEBUFFER: GLenum;
4911 readonly FRAMEBUFFER_ATTACHMENT_OBJECT_NAME: GLenum;
4912 readonly FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE: GLenum;
4913 readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE: GLenum;
4914 readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL: GLenum;
4915 readonly FRAMEBUFFER_BINDING: GLenum;
4916 readonly FRAMEBUFFER_COMPLETE: GLenum;
4917 readonly FRAMEBUFFER_INCOMPLETE_ATTACHMENT: GLenum;
4918 readonly FRAMEBUFFER_INCOMPLETE_DIMENSIONS: GLenum;
4919 readonly FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT: GLenum;
4920 readonly FRAMEBUFFER_UNSUPPORTED: GLenum;
4921 readonly FRONT: GLenum;
4922 readonly FRONT_AND_BACK: GLenum;
4923 readonly FRONT_FACE: GLenum;
4924 readonly FUNC_ADD: GLenum;
4925 readonly FUNC_REVERSE_SUBTRACT: GLenum;
4926 readonly FUNC_SUBTRACT: GLenum;
4927 readonly GENERATE_MIPMAP_HINT: GLenum;
4928 readonly GEQUAL: GLenum;
4929 readonly GREATER: GLenum;
4930 readonly GREEN_BITS: GLenum;
4931 readonly HIGH_FLOAT: GLenum;
4932 readonly HIGH_INT: GLenum;
4933 readonly IMPLEMENTATION_COLOR_READ_FORMAT: GLenum;
4934 readonly IMPLEMENTATION_COLOR_READ_TYPE: GLenum;
4935 readonly INCR: GLenum;
4936 readonly INCR_WRAP: GLenum;
4937 readonly INT: GLenum;
4938 readonly INT_VEC2: GLenum;
4939 readonly INT_VEC3: GLenum;
4940 readonly INT_VEC4: GLenum;
4941 readonly INVALID_ENUM: GLenum;
4942 readonly INVALID_FRAMEBUFFER_OPERATION: GLenum;
4943 readonly INVALID_OPERATION: GLenum;
4944 readonly INVALID_VALUE: GLenum;
4945 readonly INVERT: GLenum;
4946 readonly KEEP: GLenum;
4947 readonly LEQUAL: GLenum;
4948 readonly LESS: GLenum;
4949 readonly LINEAR: GLenum;
4950 readonly LINEAR_MIPMAP_LINEAR: GLenum;
4951 readonly LINEAR_MIPMAP_NEAREST: GLenum;
4952 readonly LINES: GLenum;
4953 readonly LINE_LOOP: GLenum;
4954 readonly LINE_STRIP: GLenum;
4955 readonly LINE_WIDTH: GLenum;
4956 readonly LINK_STATUS: GLenum;
4957 readonly LOW_FLOAT: GLenum;
4958 readonly LOW_INT: GLenum;
4959 readonly LUMINANCE: GLenum;
4960 readonly LUMINANCE_ALPHA: GLenum;
4961 readonly MAX_COMBINED_TEXTURE_IMAGE_UNITS: GLenum;
4962 readonly MAX_CUBE_MAP_TEXTURE_SIZE: GLenum;
4963 readonly MAX_FRAGMENT_UNIFORM_VECTORS: GLenum;
4964 readonly MAX_RENDERBUFFER_SIZE: GLenum;
4965 readonly MAX_TEXTURE_IMAGE_UNITS: GLenum;
4966 readonly MAX_TEXTURE_SIZE: GLenum;
4967 readonly MAX_VARYING_VECTORS: GLenum;
4968 readonly MAX_VERTEX_ATTRIBS: GLenum;
4969 readonly MAX_VERTEX_TEXTURE_IMAGE_UNITS: GLenum;
4970 readonly MAX_VERTEX_UNIFORM_VECTORS: GLenum;
4971 readonly MAX_VIEWPORT_DIMS: GLenum;
4972 readonly MEDIUM_FLOAT: GLenum;
4973 readonly MEDIUM_INT: GLenum;
4974 readonly MIRRORED_REPEAT: GLenum;
4975 readonly NEAREST: GLenum;
4976 readonly NEAREST_MIPMAP_LINEAR: GLenum;
4977 readonly NEAREST_MIPMAP_NEAREST: GLenum;
4978 readonly NEVER: GLenum;
4979 readonly NICEST: GLenum;
4980 readonly NONE: GLenum;
4981 readonly NOTEQUAL: GLenum;
4982 readonly NO_ERROR: GLenum;
4983 readonly ONE: GLenum;
4984 readonly ONE_MINUS_CONSTANT_ALPHA: GLenum;
4985 readonly ONE_MINUS_CONSTANT_COLOR: GLenum;
4986 readonly ONE_MINUS_DST_ALPHA: GLenum;
4987 readonly ONE_MINUS_DST_COLOR: GLenum;
4988 readonly ONE_MINUS_SRC_ALPHA: GLenum;
4989 readonly ONE_MINUS_SRC_COLOR: GLenum;
4990 readonly OUT_OF_MEMORY: GLenum;
4991 readonly PACK_ALIGNMENT: GLenum;
4992 readonly POINTS: GLenum;
4993 readonly POLYGON_OFFSET_FACTOR: GLenum;
4994 readonly POLYGON_OFFSET_FILL: GLenum;
4995 readonly POLYGON_OFFSET_UNITS: GLenum;
4996 readonly RED_BITS: GLenum;
4997 readonly RENDERBUFFER: GLenum;
4998 readonly RENDERBUFFER_ALPHA_SIZE: GLenum;
4999 readonly RENDERBUFFER_BINDING: GLenum;
5000 readonly RENDERBUFFER_BLUE_SIZE: GLenum;
5001 readonly RENDERBUFFER_DEPTH_SIZE: GLenum;
5002 readonly RENDERBUFFER_GREEN_SIZE: GLenum;
5003 readonly RENDERBUFFER_HEIGHT: GLenum;
5004 readonly RENDERBUFFER_INTERNAL_FORMAT: GLenum;
5005 readonly RENDERBUFFER_RED_SIZE: GLenum;
5006 readonly RENDERBUFFER_STENCIL_SIZE: GLenum;
5007 readonly RENDERBUFFER_WIDTH: GLenum;
5008 readonly RENDERER: GLenum;
5009 readonly REPEAT: GLenum;
5010 readonly REPLACE: GLenum;
5011 readonly RGB: GLenum;
5012 readonly RGB565: GLenum;
5013 readonly RGB5_A1: GLenum;
5014 readonly RGBA: GLenum;
5015 readonly RGBA4: GLenum;
5016 readonly SAMPLER_2D: GLenum;
5017 readonly SAMPLER_CUBE: GLenum;
5018 readonly SAMPLES: GLenum;
5019 readonly SAMPLE_ALPHA_TO_COVERAGE: GLenum;
5020 readonly SAMPLE_BUFFERS: GLenum;
5021 readonly SAMPLE_COVERAGE: GLenum;
5022 readonly SAMPLE_COVERAGE_INVERT: GLenum;
5023 readonly SAMPLE_COVERAGE_VALUE: GLenum;
5024 readonly SCISSOR_BOX: GLenum;
5025 readonly SCISSOR_TEST: GLenum;
5026 readonly SHADER_TYPE: GLenum;
5027 readonly SHADING_LANGUAGE_VERSION: GLenum;
5028 readonly SHORT: GLenum;
5029 readonly SRC_ALPHA: GLenum;
5030 readonly SRC_ALPHA_SATURATE: GLenum;
5031 readonly SRC_COLOR: GLenum;
5032 readonly STATIC_DRAW: GLenum;
5033 readonly STENCIL_ATTACHMENT: GLenum;
5034 readonly STENCIL_BACK_FAIL: GLenum;
5035 readonly STENCIL_BACK_FUNC: GLenum;
5036 readonly STENCIL_BACK_PASS_DEPTH_FAIL: GLenum;
5037 readonly STENCIL_BACK_PASS_DEPTH_PASS: GLenum;
5038 readonly STENCIL_BACK_REF: GLenum;
5039 readonly STENCIL_BACK_VALUE_MASK: GLenum;
5040 readonly STENCIL_BACK_WRITEMASK: GLenum;
5041 readonly STENCIL_BITS: GLenum;
5042 readonly STENCIL_BUFFER_BIT: GLenum;
5043 readonly STENCIL_CLEAR_VALUE: GLenum;
5044 readonly STENCIL_FAIL: GLenum;
5045 readonly STENCIL_FUNC: GLenum;
5046 readonly STENCIL_INDEX8: GLenum;
5047 readonly STENCIL_PASS_DEPTH_FAIL: GLenum;
5048 readonly STENCIL_PASS_DEPTH_PASS: GLenum;
5049 readonly STENCIL_REF: GLenum;
5050 readonly STENCIL_TEST: GLenum;
5051 readonly STENCIL_VALUE_MASK: GLenum;
5052 readonly STENCIL_WRITEMASK: GLenum;
5053 readonly STREAM_DRAW: GLenum;
5054 readonly SUBPIXEL_BITS: GLenum;
5055 readonly TEXTURE: GLenum;
5056 readonly TEXTURE0: GLenum;
5057 readonly TEXTURE1: GLenum;
5058 readonly TEXTURE10: GLenum;
5059 readonly TEXTURE11: GLenum;
5060 readonly TEXTURE12: GLenum;
5061 readonly TEXTURE13: GLenum;
5062 readonly TEXTURE14: GLenum;
5063 readonly TEXTURE15: GLenum;
5064 readonly TEXTURE16: GLenum;
5065 readonly TEXTURE17: GLenum;
5066 readonly TEXTURE18: GLenum;
5067 readonly TEXTURE19: GLenum;
5068 readonly TEXTURE2: GLenum;
5069 readonly TEXTURE20: GLenum;
5070 readonly TEXTURE21: GLenum;
5071 readonly TEXTURE22: GLenum;
5072 readonly TEXTURE23: GLenum;
5073 readonly TEXTURE24: GLenum;
5074 readonly TEXTURE25: GLenum;
5075 readonly TEXTURE26: GLenum;
5076 readonly TEXTURE27: GLenum;
5077 readonly TEXTURE28: GLenum;
5078 readonly TEXTURE29: GLenum;
5079 readonly TEXTURE3: GLenum;
5080 readonly TEXTURE30: GLenum;
5081 readonly TEXTURE31: GLenum;
5082 readonly TEXTURE4: GLenum;
5083 readonly TEXTURE5: GLenum;
5084 readonly TEXTURE6: GLenum;
5085 readonly TEXTURE7: GLenum;
5086 readonly TEXTURE8: GLenum;
5087 readonly TEXTURE9: GLenum;
5088 readonly TEXTURE_2D: GLenum;
5089 readonly TEXTURE_BINDING_2D: GLenum;
5090 readonly TEXTURE_BINDING_CUBE_MAP: GLenum;
5091 readonly TEXTURE_CUBE_MAP: GLenum;
5092 readonly TEXTURE_CUBE_MAP_NEGATIVE_X: GLenum;
5093 readonly TEXTURE_CUBE_MAP_NEGATIVE_Y: GLenum;
5094 readonly TEXTURE_CUBE_MAP_NEGATIVE_Z: GLenum;
5095 readonly TEXTURE_CUBE_MAP_POSITIVE_X: GLenum;
5096 readonly TEXTURE_CUBE_MAP_POSITIVE_Y: GLenum;
5097 readonly TEXTURE_CUBE_MAP_POSITIVE_Z: GLenum;
5098 readonly TEXTURE_MAG_FILTER: GLenum;
5099 readonly TEXTURE_MIN_FILTER: GLenum;
5100 readonly TEXTURE_WRAP_S: GLenum;
5101 readonly TEXTURE_WRAP_T: GLenum;
5102 readonly TRIANGLES: GLenum;
5103 readonly TRIANGLE_FAN: GLenum;
5104 readonly TRIANGLE_STRIP: GLenum;
5105 readonly UNPACK_ALIGNMENT: GLenum;
5106 readonly UNPACK_COLORSPACE_CONVERSION_WEBGL: GLenum;
5107 readonly UNPACK_FLIP_Y_WEBGL: GLenum;
5108 readonly UNPACK_PREMULTIPLY_ALPHA_WEBGL: GLenum;
5109 readonly UNSIGNED_BYTE: GLenum;
5110 readonly UNSIGNED_INT: GLenum;
5111 readonly UNSIGNED_SHORT: GLenum;
5112 readonly UNSIGNED_SHORT_4_4_4_4: GLenum;
5113 readonly UNSIGNED_SHORT_5_5_5_1: GLenum;
5114 readonly UNSIGNED_SHORT_5_6_5: GLenum;
5115 readonly VALIDATE_STATUS: GLenum;
5116 readonly VENDOR: GLenum;
5117 readonly VERSION: GLenum;
5118 readonly VERTEX_ATTRIB_ARRAY_BUFFER_BINDING: GLenum;
5119 readonly VERTEX_ATTRIB_ARRAY_ENABLED: GLenum;
5120 readonly VERTEX_ATTRIB_ARRAY_NORMALIZED: GLenum;
5121 readonly VERTEX_ATTRIB_ARRAY_POINTER: GLenum;
5122 readonly VERTEX_ATTRIB_ARRAY_SIZE: GLenum;
5123 readonly VERTEX_ATTRIB_ARRAY_STRIDE: GLenum;
5124 readonly VERTEX_ATTRIB_ARRAY_TYPE: GLenum;
5125 readonly VERTEX_SHADER: GLenum;
5126 readonly VIEWPORT: GLenum;
5127 readonly ZERO: GLenum;
5128}
5129
5130interface WebGLRenderingContextOverloads {
5131 bufferData(target: GLenum, size: GLsizeiptr, usage: GLenum): void;
5132 bufferData(target: GLenum, data: BufferSource | null, usage: GLenum): void;
5133 bufferSubData(target: GLenum, offset: GLintptr, data: BufferSource): void;
5134 compressedTexImage2D(target: GLenum, level: GLint, internalformat: GLenum, width: GLsizei, height: GLsizei, border: GLint, data: ArrayBufferView): void;
5135 compressedTexSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, data: ArrayBufferView): void;
5136 readPixels(x: GLint, y: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, pixels: ArrayBufferView | null): void;
5137 texImage2D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, border: GLint, format: GLenum, type: GLenum, pixels: ArrayBufferView | null): void;
5138 texImage2D(target: GLenum, level: GLint, internalformat: GLint, format: GLenum, type: GLenum, source: TexImageSource): void;
5139 texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, pixels: ArrayBufferView | null): void;
5140 texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, format: GLenum, type: GLenum, source: TexImageSource): void;
5141 uniform1fv(location: WebGLUniformLocation | null, v: Float32List): void;
5142 uniform1iv(location: WebGLUniformLocation | null, v: Int32List): void;
5143 uniform2fv(location: WebGLUniformLocation | null, v: Float32List): void;
5144 uniform2iv(location: WebGLUniformLocation | null, v: Int32List): void;
5145 uniform3fv(location: WebGLUniformLocation | null, v: Float32List): void;
5146 uniform3iv(location: WebGLUniformLocation | null, v: Int32List): void;
5147 uniform4fv(location: WebGLUniformLocation | null, v: Float32List): void;
5148 uniform4iv(location: WebGLUniformLocation | null, v: Int32List): void;
5149 uniformMatrix2fv(location: WebGLUniformLocation | null, transpose: GLboolean, value: Float32List): void;
5150 uniformMatrix3fv(location: WebGLUniformLocation | null, transpose: GLboolean, value: Float32List): void;
5151 uniformMatrix4fv(location: WebGLUniformLocation | null, transpose: GLboolean, value: Float32List): void;
5152}
5153
5154interface WebGLSampler {
5155}
5156
5157declare var WebGLSampler: {
5158 prototype: WebGLSampler;
5159 new(): WebGLSampler;
5160};
5161
5162/** 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. */
5163interface WebGLShader {
5164}
5165
5166declare var WebGLShader: {
5167 prototype: WebGLShader;
5168 new(): WebGLShader;
5169};
5170
5171/** Part of the WebGL API and represents the information returned by calling the WebGLRenderingContext.getShaderPrecisionFormat() method. */
5172interface WebGLShaderPrecisionFormat {
5173 readonly precision: GLint;
5174 readonly rangeMax: GLint;
5175 readonly rangeMin: GLint;
5176}
5177
5178declare var WebGLShaderPrecisionFormat: {
5179 prototype: WebGLShaderPrecisionFormat;
5180 new(): WebGLShaderPrecisionFormat;
5181};
5182
5183interface WebGLSync {
5184}
5185
5186declare var WebGLSync: {
5187 prototype: WebGLSync;
5188 new(): WebGLSync;
5189};
5190
5191/** Part of the WebGL API and represents an opaque texture object providing storage and state for texturing operations. */
5192interface WebGLTexture {
5193}
5194
5195declare var WebGLTexture: {
5196 prototype: WebGLTexture;
5197 new(): WebGLTexture;
5198};
5199
5200interface WebGLTransformFeedback {
5201}
5202
5203declare var WebGLTransformFeedback: {
5204 prototype: WebGLTransformFeedback;
5205 new(): WebGLTransformFeedback;
5206};
5207
5208/** Part of the WebGL API and represents the location of a uniform variable in a shader program. */
5209interface WebGLUniformLocation {
5210}
5211
5212declare var WebGLUniformLocation: {
5213 prototype: WebGLUniformLocation;
5214 new(): WebGLUniformLocation;
5215};
5216
5217interface WebGLVertexArrayObject {
5218}
5219
5220declare var WebGLVertexArrayObject: {
5221 prototype: WebGLVertexArrayObject;
5222 new(): WebGLVertexArrayObject;
5223};
5224
5225interface WebGLVertexArrayObjectOES {
5226}
5227
5228interface WebSocketEventMap {
5229 "close": CloseEvent;
5230 "error": Event;
5231 "message": MessageEvent;
5232 "open": Event;
5233}
5234
5235/** Provides the API for creating and managing a WebSocket connection to a server, as well as for sending and receiving data on the connection. */
5236interface WebSocket extends EventTarget {
5237 /**
5238 * Returns a string that indicates how binary data from the WebSocket object is exposed to scripts:
5239 *
5240 * Can be set, to change how binary data is returned. The default is "blob".
5241 */
5242 binaryType: BinaryType;
5243 /**
5244 * 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.
5245 *
5246 * 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.)
5247 */
5248 readonly bufferedAmount: number;
5249 /** Returns the extensions selected by the server, if any. */
5250 readonly extensions: string;
5251 onclose: ((this: WebSocket, ev: CloseEvent) => any) | null;
5252 onerror: ((this: WebSocket, ev: Event) => any) | null;
5253 onmessage: ((this: WebSocket, ev: MessageEvent) => any) | null;
5254 onopen: ((this: WebSocket, ev: Event) => any) | null;
5255 /** 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. */
5256 readonly protocol: string;
5257 /** Returns the state of the WebSocket object's connection. It can have the values described below. */
5258 readonly readyState: number;
5259 /** Returns the URL that was used to establish the WebSocket connection. */
5260 readonly url: string;
5261 /** Closes the WebSocket connection, optionally using code as the the WebSocket connection close code and reason as the the WebSocket connection close reason. */
5262 close(code?: number, reason?: string): void;
5263 /** Transmits data using the WebSocket connection. data can be a string, a Blob, an ArrayBuffer, or an ArrayBufferView. */
5264 send(data: string | ArrayBufferLike | Blob | ArrayBufferView): void;
5265 readonly CLOSED: number;
5266 readonly CLOSING: number;
5267 readonly CONNECTING: number;
5268 readonly OPEN: number;
5269 addEventListener<K extends keyof WebSocketEventMap>(type: K, listener: (this: WebSocket, ev: WebSocketEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
5270 addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
5271 removeEventListener<K extends keyof WebSocketEventMap>(type: K, listener: (this: WebSocket, ev: WebSocketEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
5272 removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
5273}
5274
5275declare var WebSocket: {
5276 prototype: WebSocket;
5277 new(url: string | URL, protocols?: string | string[]): WebSocket;
5278 readonly CLOSED: number;
5279 readonly CLOSING: number;
5280 readonly CONNECTING: number;
5281 readonly OPEN: number;
5282};
5283
5284/** 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. */
5285interface WindowClient extends Client {
5286 readonly focused: boolean;
5287 readonly visibilityState: DocumentVisibilityState;
5288 focus(): Promise<WindowClient>;
5289 navigate(url: string | URL): Promise<WindowClient | null>;
5290}
5291
5292declare var WindowClient: {
5293 prototype: WindowClient;
5294 new(): WindowClient;
5295};
5296
5297interface WindowOrWorkerGlobalScope {
5298 /** Available only in secure contexts. */
5299 readonly caches: CacheStorage;
5300 readonly crossOriginIsolated: boolean;
5301 readonly crypto: Crypto;
5302 readonly indexedDB: IDBFactory;
5303 readonly isSecureContext: boolean;
5304 readonly origin: string;
5305 readonly performance: Performance;
5306 atob(data: string): string;
5307 btoa(data: string): string;
5308 clearInterval(id: number | undefined): void;
5309 clearTimeout(id: number | undefined): void;
5310 createImageBitmap(image: ImageBitmapSource, options?: ImageBitmapOptions): Promise<ImageBitmap>;
5311 createImageBitmap(image: ImageBitmapSource, sx: number, sy: number, sw: number, sh: number, options?: ImageBitmapOptions): Promise<ImageBitmap>;
5312 fetch(input: RequestInfo | URL, init?: RequestInit): Promise<Response>;
5313 queueMicrotask(callback: VoidFunction): void;
5314 reportError(e: any): void;
5315 setInterval(handler: TimerHandler, timeout?: number, ...arguments: any[]): number;
5316 setTimeout(handler: TimerHandler, timeout?: number, ...arguments: any[]): number;
5317 structuredClone(value: any, options?: StructuredSerializeOptions): any;
5318}
5319
5320interface WorkerEventMap extends AbstractWorkerEventMap {
5321 "message": MessageEvent;
5322 "messageerror": MessageEvent;
5323}
5324
5325/** 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. */
5326interface Worker extends EventTarget, AbstractWorker {
5327 onmessage: ((this: Worker, ev: MessageEvent) => any) | null;
5328 onmessageerror: ((this: Worker, ev: MessageEvent) => any) | null;
5329 /** 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. */
5330 postMessage(message: any, transfer: Transferable[]): void;
5331 postMessage(message: any, options?: StructuredSerializeOptions): void;
5332 /** Aborts worker's associated global environment. */
5333 terminate(): void;
5334 addEventListener<K extends keyof WorkerEventMap>(type: K, listener: (this: Worker, ev: WorkerEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
5335 addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
5336 removeEventListener<K extends keyof WorkerEventMap>(type: K, listener: (this: Worker, ev: WorkerEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
5337 removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
5338}
5339
5340declare var Worker: {
5341 prototype: Worker;
5342 new(scriptURL: string | URL, options?: WorkerOptions): Worker;
5343};
5344
5345interface WorkerGlobalScopeEventMap {
5346 "error": ErrorEvent;
5347 "languagechange": Event;
5348 "offline": Event;
5349 "online": Event;
5350 "rejectionhandled": PromiseRejectionEvent;
5351 "unhandledrejection": PromiseRejectionEvent;
5352}
5353
5354/** 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 objectsin this case event handlers, the console or the associated WorkerNavigator object. Each WorkerGlobalScope has its own event loop. */
5355interface WorkerGlobalScope extends EventTarget, FontFaceSource, WindowOrWorkerGlobalScope {
5356 /** Returns workerGlobal's WorkerLocation object. */
5357 readonly location: WorkerLocation;
5358 /** Returns workerGlobal's WorkerNavigator object. */
5359 readonly navigator: WorkerNavigator;
5360 onerror: ((this: WorkerGlobalScope, ev: ErrorEvent) => any) | null;
5361 onlanguagechange: ((this: WorkerGlobalScope, ev: Event) => any) | null;
5362 onoffline: ((this: WorkerGlobalScope, ev: Event) => any) | null;
5363 ononline: ((this: WorkerGlobalScope, ev: Event) => any) | null;
5364 onrejectionhandled: ((this: WorkerGlobalScope, ev: PromiseRejectionEvent) => any) | null;
5365 onunhandledrejection: ((this: WorkerGlobalScope, ev: PromiseRejectionEvent) => any) | null;
5366 /** Returns workerGlobal. */
5367 readonly self: WorkerGlobalScope & typeof globalThis;
5368 /** 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). */
5369 importScripts(...urls: (string | URL)[]): void;
5370 addEventListener<K extends keyof WorkerGlobalScopeEventMap>(type: K, listener: (this: WorkerGlobalScope, ev: WorkerGlobalScopeEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
5371 addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
5372 removeEventListener<K extends keyof WorkerGlobalScopeEventMap>(type: K, listener: (this: WorkerGlobalScope, ev: WorkerGlobalScopeEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
5373 removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
5374}
5375
5376declare var WorkerGlobalScope: {
5377 prototype: WorkerGlobalScope;
5378 new(): WorkerGlobalScope;
5379};
5380
5381/** 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. */
5382interface WorkerLocation {
5383 readonly hash: string;
5384 readonly host: string;
5385 readonly hostname: string;
5386 readonly href: string;
5387 toString(): string;
5388 readonly origin: string;
5389 readonly pathname: string;
5390 readonly port: string;
5391 readonly protocol: string;
5392 readonly search: string;
5393}
5394
5395declare var WorkerLocation: {
5396 prototype: WorkerLocation;
5397 new(): WorkerLocation;
5398};
5399
5400/** 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. */
5401interface WorkerNavigator extends NavigatorConcurrentHardware, NavigatorID, NavigatorLanguage, NavigatorLocks, NavigatorOnLine, NavigatorStorage {
5402 readonly mediaCapabilities: MediaCapabilities;
5403}
5404
5405declare var WorkerNavigator: {
5406 prototype: WorkerNavigator;
5407 new(): WorkerNavigator;
5408};
5409
5410/** 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. */
5411interface WritableStream<W = any> {
5412 readonly locked: boolean;
5413 abort(reason?: any): Promise<void>;
5414 close(): Promise<void>;
5415 getWriter(): WritableStreamDefaultWriter<W>;
5416}
5417
5418declare var WritableStream: {
5419 prototype: WritableStream;
5420 new<W = any>(underlyingSink?: UnderlyingSink<W>, strategy?: QueuingStrategy<W>): WritableStream<W>;
5421};
5422
5423/** 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. */
5424interface WritableStreamDefaultController {
5425 readonly signal: AbortSignal;
5426 error(e?: any): void;
5427}
5428
5429declare var WritableStreamDefaultController: {
5430 prototype: WritableStreamDefaultController;
5431 new(): WritableStreamDefaultController;
5432};
5433
5434/** 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. */
5435interface WritableStreamDefaultWriter<W = any> {
5436 readonly closed: Promise<undefined>;
5437 readonly desiredSize: number | null;
5438 readonly ready: Promise<undefined>;
5439 abort(reason?: any): Promise<void>;
5440 close(): Promise<void>;
5441 releaseLock(): void;
5442 write(chunk?: W): Promise<void>;
5443}
5444
5445declare var WritableStreamDefaultWriter: {
5446 prototype: WritableStreamDefaultWriter;
5447 new<W = any>(stream: WritableStream<W>): WritableStreamDefaultWriter<W>;
5448};
5449
5450interface XMLHttpRequestEventMap extends XMLHttpRequestEventTargetEventMap {
5451 "readystatechange": Event;
5452}
5453
5454/** 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. */
5455interface XMLHttpRequest extends XMLHttpRequestEventTarget {
5456 onreadystatechange: ((this: XMLHttpRequest, ev: Event) => any) | null;
5457 /** Returns client's state. */
5458 readonly readyState: number;
5459 /** Returns the response body. */
5460 readonly response: any;
5461 /**
5462 * Returns response as text.
5463 *
5464 * Throws an "InvalidStateError" DOMException if responseType is not the empty string or "text".
5465 */
5466 readonly responseText: string;
5467 /**
5468 * Returns the response type.
5469 *
5470 * Can be set to change the response type. Values are: the empty string (default), "arraybuffer", "blob", "document", "json", and "text".
5471 *
5472 * When set: setting to "document" is ignored if current global object is not a Window object.
5473 *
5474 * When set: throws an "InvalidStateError" DOMException if state is loading or done.
5475 *
5476 * When set: throws an "InvalidAccessError" DOMException if the synchronous flag is set and current global object is a Window object.
5477 */
5478 responseType: XMLHttpRequestResponseType;
5479 readonly responseURL: string;
5480 readonly status: number;
5481 readonly statusText: string;
5482 /**
5483 * Can be set to a time in milliseconds. When set to a non-zero value will cause fetching to terminate after the given time has passed. When the time has passed, the request has not yet completed, and this's synchronous flag is unset, a timeout event will then be dispatched, or a "TimeoutError" DOMException will be thrown otherwise (for the send() method).
5484 *
5485 * When set: throws an "InvalidAccessError" DOMException if the synchronous flag is set and current global object is a Window object.
5486 */
5487 timeout: number;
5488 /** Returns the associated XMLHttpRequestUpload object. It can be used to gather transmission information when data is transferred to a server. */
5489 readonly upload: XMLHttpRequestUpload;
5490 /**
5491 * 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.
5492 *
5493 * When set: throws an "InvalidStateError" DOMException if state is not unsent or opened, or if the send() flag is set.
5494 */
5495 withCredentials: boolean;
5496 /** Cancels any network activity. */
5497 abort(): void;
5498 getAllResponseHeaders(): string;
5499 getResponseHeader(name: string): string | null;
5500 /**
5501 * Sets the request method, request URL, and synchronous flag.
5502 *
5503 * Throws a "SyntaxError" DOMException if either method is not a valid method or url cannot be parsed.
5504 *
5505 * Throws a "SecurityError" DOMException if method is a case-insensitive match for `CONNECT`, `TRACE`, or `TRACK`.
5506 *
5507 * 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.
5508 */
5509 open(method: string, url: string | URL): void;
5510 open(method: string, url: string | URL, async: boolean, username?: string | null, password?: string | null): void;
5511 /**
5512 * Acts as if the `Content-Type` header value for a response is mime. (It does not change the header.)
5513 *
5514 * Throws an "InvalidStateError" DOMException if state is loading or done.
5515 */
5516 overrideMimeType(mime: string): void;
5517 /**
5518 * Initiates the request. The body argument provides the request body, if any, and is ignored if the request method is GET or HEAD.
5519 *
5520 * Throws an "InvalidStateError" DOMException if either state is not opened or the send() flag is set.
5521 */
5522 send(body?: XMLHttpRequestBodyInit | null): void;
5523 /**
5524 * Combines a header in author request headers.
5525 *
5526 * Throws an "InvalidStateError" DOMException if either state is not opened or the send() flag is set.
5527 *
5528 * Throws a "SyntaxError" DOMException if name is not a header name or if value is not a header value.
5529 */
5530 setRequestHeader(name: string, value: string): void;
5531 readonly DONE: number;
5532 readonly HEADERS_RECEIVED: number;
5533 readonly LOADING: number;
5534 readonly OPENED: number;
5535 readonly UNSENT: number;
5536 addEventListener<K extends keyof XMLHttpRequestEventMap>(type: K, listener: (this: XMLHttpRequest, ev: XMLHttpRequestEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
5537 addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
5538 removeEventListener<K extends keyof XMLHttpRequestEventMap>(type: K, listener: (this: XMLHttpRequest, ev: XMLHttpRequestEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
5539 removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
5540}
5541
5542declare var XMLHttpRequest: {
5543 prototype: XMLHttpRequest;
5544 new(): XMLHttpRequest;
5545 readonly DONE: number;
5546 readonly HEADERS_RECEIVED: number;
5547 readonly LOADING: number;
5548 readonly OPENED: number;
5549 readonly UNSENT: number;
5550};
5551
5552interface XMLHttpRequestEventTargetEventMap {
5553 "abort": ProgressEvent<XMLHttpRequestEventTarget>;
5554 "error": ProgressEvent<XMLHttpRequestEventTarget>;
5555 "load": ProgressEvent<XMLHttpRequestEventTarget>;
5556 "loadend": ProgressEvent<XMLHttpRequestEventTarget>;
5557 "loadstart": ProgressEvent<XMLHttpRequestEventTarget>;
5558 "progress": ProgressEvent<XMLHttpRequestEventTarget>;
5559 "timeout": ProgressEvent<XMLHttpRequestEventTarget>;
5560}
5561
5562interface XMLHttpRequestEventTarget extends EventTarget {
5563 onabort: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null;
5564 onerror: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null;
5565 onload: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null;
5566 onloadend: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null;
5567 onloadstart: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null;
5568 onprogress: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null;
5569 ontimeout: ((this: XMLHttpRequest, ev: ProgressEvent) => any) | null;
5570 addEventListener<K extends keyof XMLHttpRequestEventTargetEventMap>(type: K, listener: (this: XMLHttpRequestEventTarget, ev: XMLHttpRequestEventTargetEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
5571 addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
5572 removeEventListener<K extends keyof XMLHttpRequestEventTargetEventMap>(type: K, listener: (this: XMLHttpRequestEventTarget, ev: XMLHttpRequestEventTargetEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
5573 removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
5574}
5575
5576declare var XMLHttpRequestEventTarget: {
5577 prototype: XMLHttpRequestEventTarget;
5578 new(): XMLHttpRequestEventTarget;
5579};
5580
5581interface XMLHttpRequestUpload extends XMLHttpRequestEventTarget {
5582 addEventListener<K extends keyof XMLHttpRequestEventTargetEventMap>(type: K, listener: (this: XMLHttpRequestUpload, ev: XMLHttpRequestEventTargetEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
5583 addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
5584 removeEventListener<K extends keyof XMLHttpRequestEventTargetEventMap>(type: K, listener: (this: XMLHttpRequestUpload, ev: XMLHttpRequestEventTargetEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
5585 removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
5586}
5587
5588declare var XMLHttpRequestUpload: {
5589 prototype: XMLHttpRequestUpload;
5590 new(): XMLHttpRequestUpload;
5591};
5592
5593interface Console {
5594 assert(condition?: boolean, ...data: any[]): void;
5595 clear(): void;
5596 count(label?: string): void;
5597 countReset(label?: string): void;
5598 debug(...data: any[]): void;
5599 dir(item?: any, options?: any): void;
5600 dirxml(...data: any[]): void;
5601 error(...data: any[]): void;
5602 group(...data: any[]): void;
5603 groupCollapsed(...data: any[]): void;
5604 groupEnd(): void;
5605 info(...data: any[]): void;
5606 log(...data: any[]): void;
5607 table(tabularData?: any, properties?: string[]): void;
5608 time(label?: string): void;
5609 timeEnd(label?: string): void;
5610 timeLog(label?: string, ...data: any[]): void;
5611 timeStamp(label?: string): void;
5612 trace(...data: any[]): void;
5613 warn(...data: any[]): void;
5614}
5615
5616declare var console: Console;
5617
5618declare namespace WebAssembly {
5619 interface CompileError extends Error {
5620 }
5621
5622 var CompileError: {
5623 prototype: CompileError;
5624 new(message?: string): CompileError;
5625 (message?: string): CompileError;
5626 };
5627
5628 interface Global {
5629 value: any;
5630 valueOf(): any;
5631 }
5632
5633 var Global: {
5634 prototype: Global;
5635 new(descriptor: GlobalDescriptor, v?: any): Global;
5636 };
5637
5638 interface Instance {
5639 readonly exports: Exports;
5640 }
5641
5642 var Instance: {
5643 prototype: Instance;
5644 new(module: Module, importObject?: Imports): Instance;
5645 };
5646
5647 interface LinkError extends Error {
5648 }
5649
5650 var LinkError: {
5651 prototype: LinkError;
5652 new(message?: string): LinkError;
5653 (message?: string): LinkError;
5654 };
5655
5656 interface Memory {
5657 readonly buffer: ArrayBuffer;
5658 grow(delta: number): number;
5659 }
5660
5661 var Memory: {
5662 prototype: Memory;
5663 new(descriptor: MemoryDescriptor): Memory;
5664 };
5665
5666 interface Module {
5667 }
5668
5669 var Module: {
5670 prototype: Module;
5671 new(bytes: BufferSource): Module;
5672 customSections(moduleObject: Module, sectionName: string): ArrayBuffer[];
5673 exports(moduleObject: Module): ModuleExportDescriptor[];
5674 imports(moduleObject: Module): ModuleImportDescriptor[];
5675 };
5676
5677 interface RuntimeError extends Error {
5678 }
5679
5680 var RuntimeError: {
5681 prototype: RuntimeError;
5682 new(message?: string): RuntimeError;
5683 (message?: string): RuntimeError;
5684 };
5685
5686 interface Table {
5687 readonly length: number;
5688 get(index: number): any;
5689 grow(delta: number, value?: any): number;
5690 set(index: number, value?: any): void;
5691 }
5692
5693 var Table: {
5694 prototype: Table;
5695 new(descriptor: TableDescriptor, value?: any): Table;
5696 };
5697
5698 interface GlobalDescriptor {
5699 mutable?: boolean;
5700 value: ValueType;
5701 }
5702
5703 interface MemoryDescriptor {
5704 initial: number;
5705 maximum?: number;
5706 shared?: boolean;
5707 }
5708
5709 interface ModuleExportDescriptor {
5710 kind: ImportExportKind;
5711 name: string;
5712 }
5713
5714 interface ModuleImportDescriptor {
5715 kind: ImportExportKind;
5716 module: string;
5717 name: string;
5718 }
5719
5720 interface TableDescriptor {
5721 element: TableKind;
5722 initial: number;
5723 maximum?: number;
5724 }
5725
5726 interface WebAssemblyInstantiatedSource {
5727 instance: Instance;
5728 module: Module;
5729 }
5730
5731 type ImportExportKind = "function" | "global" | "memory" | "table";
5732 type TableKind = "anyfunc" | "externref";
5733 type ValueType = "anyfunc" | "externref" | "f32" | "f64" | "i32" | "i64" | "v128";
5734 type ExportValue = Function | Global | Memory | Table;
5735 type Exports = Record<string, ExportValue>;
5736 type ImportValue = ExportValue | number;
5737 type Imports = Record<string, ModuleImports>;
5738 type ModuleImports = Record<string, ImportValue>;
5739 function compile(bytes: BufferSource): Promise<Module>;
5740 function compileStreaming(source: Response | PromiseLike<Response>): Promise<Module>;
5741 function instantiate(bytes: BufferSource, importObject?: Imports): Promise<WebAssemblyInstantiatedSource>;
5742 function instantiate(moduleObject: Module, importObject?: Imports): Promise<Instance>;
5743 function instantiateStreaming(source: Response | PromiseLike<Response>, importObject?: Imports): Promise<WebAssemblyInstantiatedSource>;
5744 function validate(bytes: BufferSource): boolean;
5745}
5746
5747interface FrameRequestCallback {
5748 (time: DOMHighResTimeStamp): void;
5749}
5750
5751interface LockGrantedCallback {
5752 (lock: Lock | null): any;
5753}
5754
5755interface OnErrorEventHandlerNonNull {
5756 (event: Event | string, source?: string, lineno?: number, colno?: number, error?: Error): any;
5757}
5758
5759interface PerformanceObserverCallback {
5760 (entries: PerformanceObserverEntryList, observer: PerformanceObserver): void;
5761}
5762
5763interface QueuingStrategySize<T = any> {
5764 (chunk: T): number;
5765}
5766
5767interface TransformerFlushCallback<O> {
5768 (controller: TransformStreamDefaultController<O>): void | PromiseLike<void>;
5769}
5770
5771interface TransformerStartCallback<O> {
5772 (controller: TransformStreamDefaultController<O>): any;
5773}
5774
5775interface TransformerTransformCallback<I, O> {
5776 (chunk: I, controller: TransformStreamDefaultController<O>): void | PromiseLike<void>;
5777}
5778
5779interface UnderlyingSinkAbortCallback {
5780 (reason?: any): void | PromiseLike<void>;
5781}
5782
5783interface UnderlyingSinkCloseCallback {
5784 (): void | PromiseLike<void>;
5785}
5786
5787interface UnderlyingSinkStartCallback {
5788 (controller: WritableStreamDefaultController): any;
5789}
5790
5791interface UnderlyingSinkWriteCallback<W> {
5792 (chunk: W, controller: WritableStreamDefaultController): void | PromiseLike<void>;
5793}
5794
5795interface UnderlyingSourceCancelCallback {
5796 (reason?: any): void | PromiseLike<void>;
5797}
5798
5799interface UnderlyingSourcePullCallback<R> {
5800 (controller: ReadableStreamController<R>): void | PromiseLike<void>;
5801}
5802
5803interface UnderlyingSourceStartCallback<R> {
5804 (controller: ReadableStreamController<R>): any;
5805}
5806
5807interface VoidFunction {
5808 (): void;
5809}
5810
5811/** Returns dedicatedWorkerGlobal's name, i.e. the value given to the Worker constructor. Primarily useful for debugging. */
5812declare var name: string;
5813declare var onmessage: ((this: DedicatedWorkerGlobalScope, ev: MessageEvent) => any) | null;
5814declare var onmessageerror: ((this: DedicatedWorkerGlobalScope, ev: MessageEvent) => any) | null;
5815/** Aborts dedicatedWorkerGlobal. */
5816declare function close(): void;
5817/** 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. */
5818declare function postMessage(message: any, transfer: Transferable[]): void;
5819declare function postMessage(message: any, options?: StructuredSerializeOptions): void;
5820/** 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. */
5821declare function dispatchEvent(event: Event): boolean;
5822/** Returns workerGlobal's WorkerLocation object. */
5823declare var location: WorkerLocation;
5824/** Returns workerGlobal's WorkerNavigator object. */
5825declare var navigator: WorkerNavigator;
5826declare var onerror: ((this: DedicatedWorkerGlobalScope, ev: ErrorEvent) => any) | null;
5827declare var onlanguagechange: ((this: DedicatedWorkerGlobalScope, ev: Event) => any) | null;
5828declare var onoffline: ((this: DedicatedWorkerGlobalScope, ev: Event) => any) | null;
5829declare var ononline: ((this: DedicatedWorkerGlobalScope, ev: Event) => any) | null;
5830declare var onrejectionhandled: ((this: DedicatedWorkerGlobalScope, ev: PromiseRejectionEvent) => any) | null;
5831declare var onunhandledrejection: ((this: DedicatedWorkerGlobalScope, ev: PromiseRejectionEvent) => any) | null;
5832/** Returns workerGlobal. */
5833declare var self: WorkerGlobalScope & typeof globalThis;
5834/** 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). */
5835declare function importScripts(...urls: (string | URL)[]): void;
5836/** 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. */
5837declare function dispatchEvent(event: Event): boolean;
5838declare var fonts: FontFaceSet;
5839/** Available only in secure contexts. */
5840declare var caches: CacheStorage;
5841declare var crossOriginIsolated: boolean;
5842declare var crypto: Crypto;
5843declare var indexedDB: IDBFactory;
5844declare var isSecureContext: boolean;
5845declare var origin: string;
5846declare var performance: Performance;
5847declare function atob(data: string): string;
5848declare function btoa(data: string): string;
5849declare function clearInterval(id: number | undefined): void;
5850declare function clearTimeout(id: number | undefined): void;
5851declare function createImageBitmap(image: ImageBitmapSource, options?: ImageBitmapOptions): Promise<ImageBitmap>;
5852declare function createImageBitmap(image: ImageBitmapSource, sx: number, sy: number, sw: number, sh: number, options?: ImageBitmapOptions): Promise<ImageBitmap>;
5853declare function fetch(input: RequestInfo | URL, init?: RequestInit): Promise<Response>;
5854declare function queueMicrotask(callback: VoidFunction): void;
5855declare function reportError(e: any): void;
5856declare function setInterval(handler: TimerHandler, timeout?: number, ...arguments: any[]): number;
5857declare function setTimeout(handler: TimerHandler, timeout?: number, ...arguments: any[]): number;
5858declare function structuredClone(value: any, options?: StructuredSerializeOptions): any;
5859declare function cancelAnimationFrame(handle: number): void;
5860declare function requestAnimationFrame(callback: FrameRequestCallback): number;
5861declare function addEventListener<K extends keyof DedicatedWorkerGlobalScopeEventMap>(type: K, listener: (this: DedicatedWorkerGlobalScope, ev: DedicatedWorkerGlobalScopeEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
5862declare function addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
5863declare function removeEventListener<K extends keyof DedicatedWorkerGlobalScopeEventMap>(type: K, listener: (this: DedicatedWorkerGlobalScope, ev: DedicatedWorkerGlobalScopeEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
5864declare function removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
5865type AlgorithmIdentifier = Algorithm | string;
5866type BigInteger = Uint8Array;
5867type BinaryData = ArrayBuffer | ArrayBufferView;
5868type BlobPart = BufferSource | Blob | string;
5869type BodyInit = ReadableStream | XMLHttpRequestBodyInit;
5870type BufferSource = ArrayBufferView | ArrayBuffer;
5871type CanvasImageSource = ImageBitmap | OffscreenCanvas;
5872type DOMHighResTimeStamp = number;
5873type EpochTimeStamp = number;
5874type EventListenerOrEventListenerObject = EventListener | EventListenerObject;
5875type Float32List = Float32Array | GLfloat[];
5876type FormDataEntryValue = File | string;
5877type GLbitfield = number;
5878type GLboolean = boolean;
5879type GLclampf = number;
5880type GLenum = number;
5881type GLfloat = number;
5882type GLint = number;
5883type GLint64 = number;
5884type GLintptr = number;
5885type GLsizei = number;
5886type GLsizeiptr = number;
5887type GLuint = number;
5888type GLuint64 = number;
5889type HashAlgorithmIdentifier = AlgorithmIdentifier;
5890type HeadersInit = [string, string][] | Record<string, string> | Headers;
5891type IDBValidKey = number | string | Date | BufferSource | IDBValidKey[];
5892type ImageBitmapSource = CanvasImageSource | Blob | ImageData;
5893type Int32List = Int32Array | GLint[];
5894type MessageEventSource = MessagePort | ServiceWorker;
5895type NamedCurve = string;
5896type OnErrorEventHandler = OnErrorEventHandlerNonNull | null;
5897type PerformanceEntryList = PerformanceEntry[];
5898type PushMessageDataInit = BufferSource | string;
5899type ReadableStreamController<T> = ReadableStreamDefaultController<T>;
5900type ReadableStreamReadResult<T> = ReadableStreamReadValueResult<T> | ReadableStreamReadDoneResult;
5901type ReadableStreamReader<T> = ReadableStreamDefaultReader<T>;
5902type RequestInfo = Request | string;
5903type TexImageSource = ImageBitmap | ImageData | OffscreenCanvas;
5904type TimerHandler = string | Function;
5905type Transferable = ArrayBuffer | MessagePort | ImageBitmap;
5906type Uint32List = Uint32Array | GLuint[];
5907type VibratePattern = number | number[];
5908type XMLHttpRequestBodyInit = Blob | BufferSource | FormData | URLSearchParams | string;
5909type BinaryType = "arraybuffer" | "blob";
5910type ClientTypes = "all" | "sharedworker" | "window" | "worker";
5911type ColorGamut = "p3" | "rec2020" | "srgb";
5912type ColorSpaceConversion = "default" | "none";
5913type DocumentVisibilityState = "hidden" | "visible";
5914type EndingType = "native" | "transparent";
5915type FileSystemHandleKind = "directory" | "file";
5916type FontFaceLoadStatus = "error" | "loaded" | "loading" | "unloaded";
5917type FontFaceSetLoadStatus = "loaded" | "loading";
5918type FrameType = "auxiliary" | "nested" | "none" | "top-level";
5919type HdrMetadataType = "smpteSt2086" | "smpteSt2094-10" | "smpteSt2094-40";
5920type IDBCursorDirection = "next" | "nextunique" | "prev" | "prevunique";
5921type IDBRequestReadyState = "done" | "pending";
5922type IDBTransactionDurability = "default" | "relaxed" | "strict";
5923type IDBTransactionMode = "readonly" | "readwrite" | "versionchange";
5924type ImageOrientation = "flipY" | "none";
5925type KeyFormat = "jwk" | "pkcs8" | "raw" | "spki";
5926type KeyType = "private" | "public" | "secret";
5927type KeyUsage = "decrypt" | "deriveBits" | "deriveKey" | "encrypt" | "sign" | "unwrapKey" | "verify" | "wrapKey";
5928type LockMode = "exclusive" | "shared";
5929type MediaDecodingType = "file" | "media-source" | "webrtc";
5930type MediaEncodingType = "record" | "webrtc";
5931type NotificationDirection = "auto" | "ltr" | "rtl";
5932type NotificationPermission = "default" | "denied" | "granted";
5933type PermissionName = "geolocation" | "notifications" | "persistent-storage" | "push" | "screen-wake-lock" | "xr-spatial-tracking";
5934type PermissionState = "denied" | "granted" | "prompt";
5935type PredefinedColorSpace = "display-p3" | "srgb";
5936type PremultiplyAlpha = "default" | "none" | "premultiply";
5937type PushEncryptionKeyName = "auth" | "p256dh";
5938type RTCEncodedVideoFrameType = "delta" | "empty" | "key";
5939type ReferrerPolicy = "" | "no-referrer" | "no-referrer-when-downgrade" | "origin" | "origin-when-cross-origin" | "same-origin" | "strict-origin" | "strict-origin-when-cross-origin" | "unsafe-url";
5940type RequestCache = "default" | "force-cache" | "no-cache" | "no-store" | "only-if-cached" | "reload";
5941type RequestCredentials = "include" | "omit" | "same-origin";
5942type RequestDestination = "" | "audio" | "audioworklet" | "document" | "embed" | "font" | "frame" | "iframe" | "image" | "manifest" | "object" | "paintworklet" | "report" | "script" | "sharedworker" | "style" | "track" | "video" | "worker" | "xslt";
5943type RequestMode = "cors" | "navigate" | "no-cors" | "same-origin";
5944type RequestRedirect = "error" | "follow" | "manual";
5945type ResizeQuality = "high" | "low" | "medium" | "pixelated";
5946type ResponseType = "basic" | "cors" | "default" | "error" | "opaque" | "opaqueredirect";
5947type SecurityPolicyViolationEventDisposition = "enforce" | "report";
5948type ServiceWorkerState = "activated" | "activating" | "installed" | "installing" | "parsed" | "redundant";
5949type ServiceWorkerUpdateViaCache = "all" | "imports" | "none";
5950type TransferFunction = "hlg" | "pq" | "srgb";
5951type VideoColorPrimaries = "bt470bg" | "bt709" | "smpte170m";
5952type VideoMatrixCoefficients = "bt470bg" | "bt709" | "rgb" | "smpte170m";
5953type VideoTransferCharacteristics = "bt709" | "iec61966-2-1" | "smpte170m";
5954type WebGLPowerPreference = "default" | "high-performance" | "low-power";
5955type WorkerType = "classic" | "module";
5956type XMLHttpRequestResponseType = "" | "arraybuffer" | "blob" | "document" | "json" | "text";
5957
\No newline at end of file