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