source: trip-planner-front/node_modules/typescript/lib/lib.webworker.d.ts@ 188ee53

Last change on this file since 188ee53 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

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