2020-07-22 12:03:46 -04:00
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Copyright ( c ) Microsoft Corporation . All rights reserved .
Licensed under the Apache License , Version 2.0 ( the "License" ) ; you may not use
this file except in compliance with the License . You may obtain a copy of the
License at http : //www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN * AS IS * BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND , EITHER EXPRESS OR IMPLIED , INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE , FITNESS FOR A PARTICULAR PURPOSE ,
MERCHANTABLITY OR NON - INFRINGEMENT .
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License .
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/// <reference no-default-lib="true"/>
/////////////////////////////
/// Worker APIs
/////////////////////////////
interface AddEventListenerOptions extends EventListenerOptions {
once? : boolean ;
passive? : boolean ;
2021-08-26 20:12:59 -04:00
signal? : AbortSignal ;
2020-07-22 12:03:46 -04:00
}
interface AesCbcParams extends Algorithm {
2021-08-26 20:12:59 -04:00
iv : BufferSource ;
2020-07-22 12:03:46 -04:00
}
interface AesCtrParams extends Algorithm {
2021-08-26 20:12:59 -04:00
counter : BufferSource ;
2020-07-22 12:03:46 -04:00
length : number ;
}
interface AesDerivedKeyParams extends Algorithm {
length : number ;
}
interface AesGcmParams extends Algorithm {
2021-08-26 20:12:59 -04:00
additionalData? : BufferSource ;
iv : BufferSource ;
2020-07-22 12:03:46 -04:00
tagLength? : number ;
}
interface AesKeyAlgorithm extends KeyAlgorithm {
length : number ;
}
interface AesKeyGenParams extends Algorithm {
length : number ;
}
interface Algorithm {
name : string ;
}
2021-08-26 20:12:59 -04:00
interface AudioConfiguration {
bitrate? : number ;
channels? : string ;
contentType : string ;
samplerate? : number ;
spatialRendering? : boolean ;
}
2023-07-03 18:36:35 -04:00
interface AvcEncoderConfig {
format? : AvcBitstreamFormat ;
}
2020-07-22 12:03:46 -04:00
interface BlobPropertyBag {
endings? : EndingType ;
type ? : string ;
}
2023-07-03 18:36:35 -04:00
interface CSSMatrixComponentOptions {
is2D? : boolean ;
}
interface CSSNumericType {
angle? : number ;
flex? : number ;
frequency? : number ;
length? : number ;
percent? : number ;
percentHint? : CSSNumericBaseType ;
resolution? : number ;
time? : number ;
}
2020-07-22 12:03:46 -04:00
interface CacheQueryOptions {
ignoreMethod? : boolean ;
ignoreSearch? : boolean ;
ignoreVary? : boolean ;
}
interface ClientQueryOptions {
includeUncontrolled? : boolean ;
type ? : ClientTypes ;
}
interface CloseEventInit extends EventInit {
code? : number ;
reason? : string ;
wasClean? : boolean ;
}
interface CryptoKeyPair {
2022-03-01 15:44:43 -05:00
privateKey : CryptoKey ;
publicKey : CryptoKey ;
2020-07-22 12:03:46 -04:00
}
interface CustomEventInit < T = any > extends EventInit {
detail? : T ;
}
interface DOMMatrix2DInit {
a? : number ;
b? : number ;
c? : number ;
d? : number ;
e? : number ;
f? : number ;
m11? : number ;
m12? : number ;
m21? : number ;
m22? : number ;
m41? : number ;
m42? : number ;
}
interface DOMMatrixInit extends DOMMatrix2DInit {
is2D? : boolean ;
m13? : number ;
m14? : number ;
m23? : number ;
m24? : number ;
m31? : number ;
m32? : number ;
m33? : number ;
m34? : number ;
m43? : number ;
m44? : number ;
}
interface DOMPointInit {
w? : number ;
x? : number ;
y? : number ;
z? : number ;
}
interface DOMQuadInit {
p1? : DOMPointInit ;
p2? : DOMPointInit ;
p3? : DOMPointInit ;
p4? : DOMPointInit ;
}
interface DOMRectInit {
height? : number ;
width? : number ;
x? : number ;
y? : number ;
}
interface EcKeyGenParams extends Algorithm {
namedCurve : NamedCurve ;
}
interface EcKeyImportParams extends Algorithm {
namedCurve : NamedCurve ;
}
interface EcdhKeyDeriveParams extends Algorithm {
public : CryptoKey ;
}
interface EcdsaParams extends Algorithm {
hash : HashAlgorithmIdentifier ;
}
2023-07-03 18:36:35 -04:00
interface EncodedVideoChunkInit {
2024-03-26 18:52:57 -04:00
data : AllowSharedBufferSource ;
2023-07-03 18:36:35 -04:00
duration? : number ;
timestamp : number ;
type : EncodedVideoChunkType ;
}
interface EncodedVideoChunkMetadata {
decoderConfig? : VideoDecoderConfig ;
}
2020-07-22 12:03:46 -04:00
interface ErrorEventInit extends EventInit {
colno? : number ;
error? : any ;
filename? : string ;
lineno? : number ;
message? : string ;
}
interface EventInit {
bubbles? : boolean ;
cancelable? : boolean ;
composed? : boolean ;
}
interface EventListenerOptions {
capture? : boolean ;
}
interface EventSourceInit {
withCredentials? : boolean ;
}
interface ExtendableEventInit extends EventInit {
}
interface ExtendableMessageEventInit extends ExtendableEventInit {
data? : any ;
lastEventId? : string ;
origin? : string ;
ports? : MessagePort [ ] ;
source? : Client | ServiceWorker | MessagePort | null ;
}
interface FetchEventInit extends ExtendableEventInit {
clientId? : string ;
2021-08-26 20:12:59 -04:00
handled? : Promise < undefined > ;
2020-07-22 12:03:46 -04:00
preloadResponse? : Promise < any > ;
replacesClientId? : string ;
request : Request ;
resultingClientId? : string ;
}
interface FilePropertyBag extends BlobPropertyBag {
lastModified? : number ;
}
2023-07-03 18:36:35 -04:00
interface FileSystemCreateWritableOptions {
keepExistingData? : boolean ;
}
2022-03-01 15:44:43 -05:00
interface FileSystemGetDirectoryOptions {
create? : boolean ;
}
interface FileSystemGetFileOptions {
create? : boolean ;
}
2023-03-21 11:46:40 -04:00
interface FileSystemReadWriteOptions {
at? : number ;
}
2022-03-01 15:44:43 -05:00
interface FileSystemRemoveOptions {
recursive? : boolean ;
}
2021-08-26 20:12:59 -04:00
interface FontFaceDescriptors {
2023-03-21 11:46:40 -04:00
ascentOverride? : string ;
descentOverride? : string ;
display? : FontDisplay ;
2021-08-26 20:12:59 -04:00
featureSettings? : string ;
2023-03-21 11:46:40 -04:00
lineGapOverride? : string ;
2021-08-26 20:12:59 -04:00
stretch? : string ;
style? : string ;
unicodeRange? : string ;
weight? : string ;
}
interface FontFaceSetLoadEventInit extends EventInit {
fontfaces? : FontFace [ ] ;
}
2020-07-22 12:03:46 -04:00
interface GetNotificationOptions {
tag? : string ;
}
2020-11-23 17:31:10 -05:00
interface HkdfParams extends Algorithm {
hash : HashAlgorithmIdentifier ;
2021-08-26 20:12:59 -04:00
info : BufferSource ;
salt : BufferSource ;
2020-11-23 17:31:10 -05:00
}
2020-07-22 12:03:46 -04:00
interface HmacImportParams extends Algorithm {
hash : HashAlgorithmIdentifier ;
length? : number ;
}
interface HmacKeyGenParams extends Algorithm {
hash : HashAlgorithmIdentifier ;
length? : number ;
}
2021-08-26 20:12:59 -04:00
interface IDBDatabaseInfo {
name? : string ;
version? : number ;
}
2020-07-22 12:03:46 -04:00
interface IDBIndexParameters {
multiEntry? : boolean ;
unique ? : boolean ;
}
interface IDBObjectStoreParameters {
autoIncrement? : boolean ;
keyPath? : string | string [ ] | null ;
}
2022-09-19 17:00:01 -04:00
interface IDBTransactionOptions {
durability? : IDBTransactionDurability ;
}
2020-07-22 12:03:46 -04:00
interface IDBVersionChangeEventInit extends EventInit {
newVersion? : number | null ;
oldVersion? : number ;
}
interface ImageBitmapOptions {
colorSpaceConversion? : ColorSpaceConversion ;
imageOrientation? : ImageOrientation ;
premultiplyAlpha? : PremultiplyAlpha ;
resizeHeight? : number ;
resizeQuality? : ResizeQuality ;
resizeWidth? : number ;
}
interface ImageBitmapRenderingContextSettings {
alpha? : boolean ;
}
2021-08-26 20:12:59 -04:00
interface ImageDataSettings {
colorSpace? : PredefinedColorSpace ;
2020-07-22 12:03:46 -04:00
}
2023-03-21 11:46:40 -04:00
interface ImageEncodeOptions {
quality? : number ;
type ? : string ;
}
2021-02-24 23:16:19 -05:00
interface ImportMeta {
url : string ;
}
2020-07-22 12:03:46 -04:00
interface JsonWebKey {
alg? : string ;
crv? : string ;
d? : string ;
dp? : string ;
dq? : string ;
e? : string ;
ext? : boolean ;
k? : string ;
key_ops? : string [ ] ;
kty? : string ;
n? : string ;
oth? : RsaOtherPrimesInfo [ ] ;
p? : string ;
q? : string ;
qi? : string ;
use? : string ;
x? : string ;
y? : string ;
}
interface KeyAlgorithm {
name : string ;
}
2022-03-01 15:44:43 -05:00
interface LockInfo {
clientId? : string ;
mode? : LockMode ;
name? : string ;
}
interface LockManagerSnapshot {
held? : LockInfo [ ] ;
pending? : LockInfo [ ] ;
}
interface LockOptions {
ifAvailable? : boolean ;
mode? : LockMode ;
signal? : AbortSignal ;
steal? : boolean ;
}
2021-08-26 20:12:59 -04:00
interface MediaCapabilitiesDecodingInfo extends MediaCapabilitiesInfo {
configuration? : MediaDecodingConfiguration ;
}
interface MediaCapabilitiesEncodingInfo extends MediaCapabilitiesInfo {
configuration? : MediaEncodingConfiguration ;
}
interface MediaCapabilitiesInfo {
powerEfficient : boolean ;
smooth : boolean ;
supported : boolean ;
}
interface MediaConfiguration {
audio? : AudioConfiguration ;
video? : VideoConfiguration ;
}
interface MediaDecodingConfiguration extends MediaConfiguration {
type : MediaDecodingType ;
}
interface MediaEncodingConfiguration extends MediaConfiguration {
type : MediaEncodingType ;
}
2020-08-24 19:43:54 -04:00
interface MessageEventInit < T = any > extends EventInit {
data? : T ;
2020-07-22 12:03:46 -04:00
lastEventId? : string ;
origin? : string ;
ports? : MessagePort [ ] ;
source? : MessageEventSource | null ;
}
interface MultiCacheQueryOptions extends CacheQueryOptions {
cacheName? : string ;
}
2022-05-31 20:19:18 -04:00
interface NavigationPreloadState {
enabled? : boolean ;
headerValue? : string ;
}
2020-07-22 12:03:46 -04:00
interface NotificationEventInit extends ExtendableEventInit {
action? : string ;
notification : Notification ;
}
interface NotificationOptions {
badge? : string ;
body? : string ;
data? : any ;
dir? : NotificationDirection ;
icon? : string ;
lang? : string ;
requireInteraction? : boolean ;
2023-09-09 15:03:21 -04:00
silent? : boolean | null ;
2020-07-22 12:03:46 -04:00
tag? : string ;
}
interface Pbkdf2Params extends Algorithm {
hash : HashAlgorithmIdentifier ;
iterations : number ;
2021-08-26 20:12:59 -04:00
salt : BufferSource ;
}
interface PerformanceMarkOptions {
detail? : any ;
startTime? : DOMHighResTimeStamp ;
}
interface PerformanceMeasureOptions {
detail? : any ;
duration? : DOMHighResTimeStamp ;
end? : string | DOMHighResTimeStamp ;
start? : string | DOMHighResTimeStamp ;
2020-07-22 12:03:46 -04:00
}
interface PerformanceObserverInit {
buffered? : boolean ;
entryTypes? : string [ ] ;
type ? : string ;
}
interface PermissionDescriptor {
name : PermissionName ;
}
2023-07-03 18:36:35 -04:00
interface PlaneLayout {
offset : number ;
stride : number ;
}
2020-07-22 12:03:46 -04:00
interface ProgressEventInit extends EventInit {
lengthComputable? : boolean ;
loaded? : number ;
total? : number ;
}
interface PromiseRejectionEventInit extends EventInit {
promise : Promise < any > ;
reason? : any ;
}
interface PushEventInit extends ExtendableEventInit {
data? : PushMessageDataInit ;
}
interface PushSubscriptionJSON {
endpoint? : string ;
2022-03-01 15:44:43 -05:00
expirationTime? : EpochTimeStamp | null ;
2020-07-22 12:03:46 -04:00
keys? : Record < string , string > ;
}
interface PushSubscriptionOptionsInit {
applicationServerKey? : BufferSource | string | null ;
userVisibleOnly? : boolean ;
}
interface QueuingStrategy < T = any > {
highWaterMark? : number ;
2021-02-24 23:16:19 -05:00
size? : QueuingStrategySize < T > ;
}
interface QueuingStrategyInit {
/ * *
* Creates a new ByteLengthQueuingStrategy with the provided high water mark .
2021-05-27 19:33:11 -04:00
*
2021-02-24 23:16:19 -05:00
* 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 .
* /
highWaterMark : number ;
2020-07-22 12:03:46 -04:00
}
2022-05-31 20:19:18 -04:00
interface RTCEncodedAudioFrameMetadata {
contributingSources? : number [ ] ;
2024-03-26 18:52:57 -04:00
payloadType? : number ;
sequenceNumber? : number ;
2022-05-31 20:19:18 -04:00
synchronizationSource? : number ;
}
interface RTCEncodedVideoFrameMetadata {
2024-03-26 18:52:57 -04:00
contributingSources? : number [ ] ;
2022-05-31 20:19:18 -04:00
dependencies? : number [ ] ;
frameId? : number ;
height? : number ;
2024-03-26 18:52:57 -04:00
payloadType? : number ;
2022-05-31 20:19:18 -04:00
spatialIndex? : number ;
synchronizationSource? : number ;
temporalIndex? : number ;
2024-03-26 18:52:57 -04:00
timestamp? : number ;
2022-05-31 20:19:18 -04:00
width? : number ;
}
2022-12-07 12:59:59 -05:00
interface ReadableStreamGetReaderOptions {
/ * *
* Creates a ReadableStreamBYOBReader and locks the stream to the new reader .
*
* 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 .
* /
mode? : ReadableStreamReaderMode ;
}
interface ReadableStreamReadDoneResult < T > {
2020-07-22 12:03:46 -04:00
done : true ;
2022-12-07 12:59:59 -05:00
value? : T ;
2020-07-22 12:03:46 -04:00
}
2022-09-19 17:00:01 -04:00
interface ReadableStreamReadValueResult < T > {
2020-07-22 12:03:46 -04:00
done : false ;
value : T ;
}
2021-02-24 23:16:19 -05:00
interface ReadableWritablePair < R = any , W = any > {
readable : ReadableStream < R > ;
/ * *
* 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 .
2021-05-27 19:33:11 -04:00
*
2021-02-24 23:16:19 -05:00
* Piping a stream will lock it for the duration of the pipe , preventing any other consumer from acquiring a reader .
* /
writable : WritableStream < W > ;
}
2020-07-22 12:03:46 -04:00
interface RegistrationOptions {
scope? : string ;
type ? : WorkerType ;
updateViaCache? : ServiceWorkerUpdateViaCache ;
}
2023-07-03 18:36:35 -04:00
interface ReportingObserverOptions {
buffered? : boolean ;
types? : string [ ] ;
}
2020-07-22 12:03:46 -04:00
interface RequestInit {
2021-12-09 17:12:21 -05:00
/** A BodyInit object or null to set request's body. */
2020-07-22 12:03:46 -04:00
body? : BodyInit | null ;
2021-12-09 17:12:21 -05:00
/** A string indicating how the request will interact with the browser's cache to set request's cache. */
2020-07-22 12:03:46 -04:00
cache? : RequestCache ;
2021-12-09 17:12:21 -05:00
/** 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. */
2020-07-22 12:03:46 -04:00
credentials? : RequestCredentials ;
2021-12-09 17:12:21 -05:00
/** A Headers object, an object literal, or an array of two-item arrays to set request's headers. */
2020-07-22 12:03:46 -04:00
headers? : HeadersInit ;
2021-12-09 17:12:21 -05:00
/** A cryptographic hash of the resource to be fetched by request. Sets request's integrity. */
2020-07-22 12:03:46 -04:00
integrity? : string ;
2021-12-09 17:12:21 -05:00
/** A boolean to set request's keepalive. */
2020-07-22 12:03:46 -04:00
keepalive? : boolean ;
2021-12-09 17:12:21 -05:00
/** A string to set request's method. */
2020-07-22 12:03:46 -04:00
method? : string ;
2021-12-09 17:12:21 -05:00
/** A string to indicate whether the request will use CORS, or will be restricted to same-origin URLs. Sets request's mode. */
2020-07-22 12:03:46 -04:00
mode? : RequestMode ;
2024-03-26 18:52:57 -04:00
priority? : RequestPriority ;
2021-12-09 17:12:21 -05:00
/** 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. */
2020-07-22 12:03:46 -04:00
redirect? : RequestRedirect ;
2021-12-09 17:12:21 -05:00
/** A string whose value is a same-origin URL, "about:client", or the empty string, to set request's referrer. */
2020-07-22 12:03:46 -04:00
referrer? : string ;
2021-12-09 17:12:21 -05:00
/** A referrer policy to set request's referrerPolicy. */
2020-07-22 12:03:46 -04:00
referrerPolicy? : ReferrerPolicy ;
2021-12-09 17:12:21 -05:00
/** An AbortSignal to set request's signal. */
2020-07-22 12:03:46 -04:00
signal? : AbortSignal | null ;
2021-12-09 17:12:21 -05:00
/** Can only be null. Used to disassociate request from any Window. */
window ? : null ;
2020-07-22 12:03:46 -04:00
}
interface ResponseInit {
headers? : HeadersInit ;
status? : number ;
statusText? : string ;
}
interface RsaHashedImportParams extends Algorithm {
hash : HashAlgorithmIdentifier ;
}
interface RsaHashedKeyGenParams extends RsaKeyGenParams {
hash : HashAlgorithmIdentifier ;
}
interface RsaKeyGenParams extends Algorithm {
modulusLength : number ;
publicExponent : BigInteger ;
}
interface RsaOaepParams extends Algorithm {
2021-08-26 20:12:59 -04:00
label? : BufferSource ;
2020-07-22 12:03:46 -04:00
}
interface RsaOtherPrimesInfo {
d? : string ;
r? : string ;
t? : string ;
}
interface RsaPssParams extends Algorithm {
saltLength : number ;
}
2021-08-26 20:12:59 -04:00
interface SecurityPolicyViolationEventInit extends EventInit {
blockedURI? : string ;
columnNumber? : number ;
disposition : SecurityPolicyViolationEventDisposition ;
documentURI : string ;
effectiveDirective : string ;
lineNumber? : number ;
originalPolicy : string ;
referrer? : string ;
sample? : string ;
sourceFile? : string ;
statusCode : number ;
violatedDirective : string ;
}
2020-07-22 12:03:46 -04:00
interface StorageEstimate {
quota? : number ;
usage? : number ;
}
2021-02-24 23:16:19 -05:00
interface StreamPipeOptions {
preventAbort? : boolean ;
preventCancel? : boolean ;
/ * *
* 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 .
2021-05-27 19:33:11 -04:00
*
2021-02-24 23:16:19 -05:00
* Piping a stream will lock it for the duration of the pipe , preventing any other consumer from acquiring a reader .
2021-05-27 19:33:11 -04:00
*
2021-02-24 23:16:19 -05:00
* Errors and closures of the source and destination streams propagate as follows :
2021-05-27 19:33:11 -04:00
*
2021-02-24 23:16:19 -05:00
* 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 .
2021-05-27 19:33:11 -04:00
*
2021-02-24 23:16:19 -05:00
* 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 .
2021-05-27 19:33:11 -04:00
*
2021-02-24 23:16:19 -05:00
* 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 .
2021-05-27 19:33:11 -04:00
*
2021-02-24 23:16:19 -05:00
* 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 .
2021-05-27 19:33:11 -04:00
*
2021-02-24 23:16:19 -05:00
* 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 .
* /
preventClose? : boolean ;
signal? : AbortSignal ;
}
2021-12-09 17:12:21 -05:00
interface StructuredSerializeOptions {
2022-03-01 15:44:43 -05:00
transfer? : Transferable [ ] ;
2021-12-09 17:12:21 -05:00
}
2020-07-22 12:03:46 -04:00
interface TextDecodeOptions {
stream? : boolean ;
}
interface TextDecoderOptions {
fatal? : boolean ;
ignoreBOM? : boolean ;
}
interface TextEncoderEncodeIntoResult {
2023-09-09 15:03:21 -04:00
read : number ;
written : number ;
2020-07-22 12:03:46 -04:00
}
interface Transformer < I = any , O = any > {
2021-02-24 23:16:19 -05:00
flush? : TransformerFlushCallback < O > ;
2020-07-22 12:03:46 -04:00
readableType? : undefined ;
2021-02-24 23:16:19 -05:00
start? : TransformerStartCallback < O > ;
transform? : TransformerTransformCallback < I , O > ;
2020-07-22 12:03:46 -04:00
writableType? : undefined ;
}
2022-12-07 12:59:59 -05:00
interface UnderlyingByteSource {
autoAllocateChunkSize? : number ;
cancel? : UnderlyingSourceCancelCallback ;
pull ? : ( controller : ReadableByteStreamController ) = > void | PromiseLike < void > ;
start ? : ( controller : ReadableByteStreamController ) = > any ;
type : "bytes" ;
}
interface UnderlyingDefaultSource < R = any > {
cancel? : UnderlyingSourceCancelCallback ;
pull ? : ( controller : ReadableStreamDefaultController < R > ) = > void | PromiseLike < void > ;
start ? : ( controller : ReadableStreamDefaultController < R > ) = > any ;
type ? : undefined ;
}
2020-07-22 12:03:46 -04:00
interface UnderlyingSink < W = any > {
2021-02-24 23:16:19 -05:00
abort? : UnderlyingSinkAbortCallback ;
close? : UnderlyingSinkCloseCallback ;
start? : UnderlyingSinkStartCallback ;
2020-07-22 12:03:46 -04:00
type ? : undefined ;
2021-02-24 23:16:19 -05:00
write? : UnderlyingSinkWriteCallback < W > ;
2020-07-22 12:03:46 -04:00
}
interface UnderlyingSource < R = any > {
2022-12-07 12:59:59 -05:00
autoAllocateChunkSize? : number ;
2021-02-24 23:16:19 -05:00
cancel? : UnderlyingSourceCancelCallback ;
pull? : UnderlyingSourcePullCallback < R > ;
start? : UnderlyingSourceStartCallback < R > ;
2022-12-07 12:59:59 -05:00
type ? : ReadableStreamType ;
2020-07-22 12:03:46 -04:00
}
2022-05-31 20:19:18 -04:00
interface VideoColorSpaceInit {
2022-12-07 12:59:59 -05:00
fullRange? : boolean | null ;
matrix? : VideoMatrixCoefficients | null ;
primaries? : VideoColorPrimaries | null ;
transfer? : VideoTransferCharacteristics | null ;
2022-05-31 20:19:18 -04:00
}
2021-08-26 20:12:59 -04:00
interface VideoConfiguration {
bitrate : number ;
colorGamut? : ColorGamut ;
contentType : string ;
framerate : number ;
hdrMetadataType? : HdrMetadataType ;
height : number ;
scalabilityMode? : string ;
transferFunction? : TransferFunction ;
width : number ;
}
2023-07-03 18:36:35 -04:00
interface VideoDecoderConfig {
codec : string ;
codedHeight? : number ;
codedWidth? : number ;
colorSpace? : VideoColorSpaceInit ;
2024-03-26 18:52:57 -04:00
description? : AllowSharedBufferSource ;
2023-07-03 18:36:35 -04:00
displayAspectHeight? : number ;
displayAspectWidth? : number ;
hardwareAcceleration? : HardwareAcceleration ;
optimizeForLatency? : boolean ;
}
interface VideoDecoderInit {
error : WebCodecsErrorCallback ;
output : VideoFrameOutputCallback ;
}
interface VideoDecoderSupport {
config? : VideoDecoderConfig ;
supported? : boolean ;
}
interface VideoEncoderConfig {
alpha? : AlphaOption ;
avc? : AvcEncoderConfig ;
bitrate? : number ;
bitrateMode? : VideoEncoderBitrateMode ;
codec : string ;
displayHeight? : number ;
displayWidth? : number ;
framerate? : number ;
hardwareAcceleration? : HardwareAcceleration ;
height : number ;
latencyMode? : LatencyMode ;
scalabilityMode? : string ;
width : number ;
}
interface VideoEncoderEncodeOptions {
keyFrame? : boolean ;
}
interface VideoEncoderInit {
error : WebCodecsErrorCallback ;
output : EncodedVideoChunkOutputCallback ;
}
interface VideoEncoderSupport {
config? : VideoEncoderConfig ;
supported? : boolean ;
}
interface VideoFrameBufferInit {
codedHeight : number ;
codedWidth : number ;
colorSpace? : VideoColorSpaceInit ;
displayHeight? : number ;
displayWidth? : number ;
duration? : number ;
format : VideoPixelFormat ;
layout? : PlaneLayout [ ] ;
timestamp : number ;
visibleRect? : DOMRectInit ;
}
interface VideoFrameCopyToOptions {
layout? : PlaneLayout [ ] ;
rect? : DOMRectInit ;
}
interface VideoFrameInit {
alpha? : AlphaOption ;
displayHeight? : number ;
displayWidth? : number ;
duration? : number ;
timestamp? : number ;
visibleRect? : DOMRectInit ;
}
2020-07-22 12:03:46 -04:00
interface WebGLContextAttributes {
alpha? : boolean ;
antialias? : boolean ;
depth? : boolean ;
desynchronized? : boolean ;
failIfMajorPerformanceCaveat? : boolean ;
powerPreference? : WebGLPowerPreference ;
premultipliedAlpha? : boolean ;
preserveDrawingBuffer? : boolean ;
stencil? : boolean ;
}
interface WebGLContextEventInit extends EventInit {
statusMessage? : string ;
}
2023-09-09 15:03:21 -04:00
interface WebTransportCloseInfo {
closeCode? : number ;
reason? : string ;
}
interface WebTransportErrorOptions {
source? : WebTransportErrorSource ;
streamErrorCode? : number | null ;
}
interface WebTransportHash {
algorithm? : string ;
value? : BufferSource ;
}
interface WebTransportOptions {
allowPooling? : boolean ;
congestionControl? : WebTransportCongestionControl ;
requireUnreliable? : boolean ;
serverCertificateHashes? : WebTransportHash [ ] ;
}
interface WebTransportSendStreamOptions {
2024-03-26 18:52:57 -04:00
sendOrder? : number ;
2023-09-09 15:03:21 -04:00
}
2020-07-22 12:03:46 -04:00
interface WorkerOptions {
credentials? : RequestCredentials ;
name? : string ;
type ? : WorkerType ;
}
2023-07-03 18:36:35 -04:00
interface WriteParams {
data? : BufferSource | Blob | string | null ;
position? : number | null ;
size? : number | null ;
type : WriteCommandType ;
}
/ * *
* 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 .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/ANGLE_instanced_arrays)
* /
2020-07-22 12:03:46 -04:00
interface ANGLE_instanced_arrays {
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ANGLE_instanced_arrays/drawArraysInstancedANGLE) */
2020-07-22 12:03:46 -04:00
drawArraysInstancedANGLE ( mode : GLenum , first : GLint , count : GLsizei , primcount : GLsizei ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ANGLE_instanced_arrays/drawElementsInstancedANGLE) */
2020-07-22 12:03:46 -04:00
drawElementsInstancedANGLE ( mode : GLenum , count : GLsizei , type : GLenum , offset : GLintptr , primcount : GLsizei ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ANGLE_instanced_arrays/vertexAttribDivisorANGLE) */
2020-07-22 12:03:46 -04:00
vertexAttribDivisorANGLE ( index : GLuint , divisor : GLuint ) : void ;
2023-03-21 11:46:40 -04:00
readonly VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE : 0x88FE ;
2020-07-22 12:03:46 -04:00
}
2023-07-03 18:36:35 -04:00
/ * *
* A controller object that allows you to abort one or more DOM requests as and when desired .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/AbortController)
* /
2020-07-22 12:03:46 -04:00
interface AbortController {
2023-07-03 18:36:35 -04:00
/ * *
* Returns the AbortSignal object associated with this object .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/AbortController/signal)
* /
2020-07-22 12:03:46 -04:00
readonly signal : AbortSignal ;
2023-07-03 18:36:35 -04:00
/ * *
* 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 .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/AbortController/abort)
* /
2022-12-07 12:59:59 -05:00
abort ( reason? : any ) : void ;
2020-07-22 12:03:46 -04:00
}
declare var AbortController : {
prototype : AbortController ;
new ( ) : AbortController ;
} ;
interface AbortSignalEventMap {
"abort" : Event ;
}
2023-07-03 18:36:35 -04:00
/ * *
* 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 .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/AbortSignal)
* /
2020-07-22 12:03:46 -04:00
interface AbortSignal extends EventTarget {
2023-07-03 18:36:35 -04:00
/ * *
* Returns true if this AbortSignal ' s AbortController has signaled to abort , and false otherwise .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/AbortSignal/aborted)
* /
2020-07-22 12:03:46 -04:00
readonly aborted : boolean ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/abort_event) */
2020-07-22 12:03:46 -04:00
onabort : ( ( this : AbortSignal , ev : Event ) = > any ) | null ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/reason) */
2022-05-31 20:19:18 -04:00
readonly reason : any ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/throwIfAborted) */
2022-05-31 20:19:18 -04:00
throwIfAborted ( ) : void ;
2020-07-22 12:03:46 -04:00
addEventListener < K extends keyof AbortSignalEventMap > ( type : K , listener : ( this : AbortSignal , ev : AbortSignalEventMap [ K ] ) = > any , options? : boolean | AddEventListenerOptions ) : void ;
addEventListener ( type : string , listener : EventListenerOrEventListenerObject , options? : boolean | AddEventListenerOptions ) : void ;
removeEventListener < K extends keyof AbortSignalEventMap > ( type : K , listener : ( this : AbortSignal , ev : AbortSignalEventMap [ K ] ) = > any , options? : boolean | EventListenerOptions ) : void ;
removeEventListener ( type : string , listener : EventListenerOrEventListenerObject , options? : boolean | EventListenerOptions ) : void ;
}
declare var AbortSignal : {
prototype : AbortSignal ;
new ( ) : AbortSignal ;
2023-09-09 15:03:21 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/abort_static) */
2022-05-31 20:19:18 -04:00
abort ( reason? : any ) : AbortSignal ;
2023-09-09 15:03:21 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/timeout_static) */
2022-12-07 12:59:59 -05:00
timeout ( milliseconds : number ) : AbortSignal ;
2020-07-22 12:03:46 -04:00
} ;
interface AbstractWorkerEventMap {
"error" : ErrorEvent ;
}
interface AbstractWorker {
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorker/error_event) */
2020-07-22 12:03:46 -04:00
onerror : ( ( this : AbstractWorker , ev : ErrorEvent ) = > any ) | null ;
addEventListener < K extends keyof AbstractWorkerEventMap > ( type : K , listener : ( this : AbstractWorker , ev : AbstractWorkerEventMap [ K ] ) = > any , options? : boolean | AddEventListenerOptions ) : void ;
addEventListener ( type : string , listener : EventListenerOrEventListenerObject , options? : boolean | AddEventListenerOptions ) : void ;
removeEventListener < K extends keyof AbstractWorkerEventMap > ( type : K , listener : ( this : AbstractWorker , ev : AbstractWorkerEventMap [ K ] ) = > any , options? : boolean | EventListenerOptions ) : void ;
removeEventListener ( type : string , listener : EventListenerOrEventListenerObject , options? : boolean | EventListenerOptions ) : void ;
}
interface AnimationFrameProvider {
2024-03-26 18:52:57 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DedicatedWorkerGlobalScope/cancelAnimationFrame) */
2020-07-22 12:03:46 -04:00
cancelAnimationFrame ( handle : number ) : void ;
2024-03-26 18:52:57 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DedicatedWorkerGlobalScope/requestAnimationFrame) */
2020-07-22 12:03:46 -04:00
requestAnimationFrame ( callback : FrameRequestCallback ) : number ;
}
2023-07-03 18:36:35 -04:00
/ * *
* 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 .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/Blob)
* /
2020-07-22 12:03:46 -04:00
interface Blob {
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/size) */
2020-07-22 12:03:46 -04:00
readonly size : number ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/type) */
2020-07-22 12:03:46 -04:00
readonly type : string ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/arrayBuffer) */
2020-07-22 12:03:46 -04:00
arrayBuffer ( ) : Promise < ArrayBuffer > ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/slice) */
2020-07-22 12:03:46 -04:00
slice ( start? : number , end? : number , contentType? : string ) : Blob ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/stream) */
2022-05-31 20:19:18 -04:00
stream ( ) : ReadableStream < Uint8Array > ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/text) */
2020-07-22 12:03:46 -04:00
text ( ) : Promise < string > ;
}
declare var Blob : {
prototype : Blob ;
new ( blobParts? : BlobPart [ ] , options? : BlobPropertyBag ) : Blob ;
} ;
interface Body {
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/body) */
2020-07-22 12:03:46 -04:00
readonly body : ReadableStream < Uint8Array > | null ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/bodyUsed) */
2020-07-22 12:03:46 -04:00
readonly bodyUsed : boolean ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/arrayBuffer) */
2020-07-22 12:03:46 -04:00
arrayBuffer ( ) : Promise < ArrayBuffer > ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/blob) */
2020-07-22 12:03:46 -04:00
blob ( ) : Promise < Blob > ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/formData) */
2020-07-22 12:03:46 -04:00
formData ( ) : Promise < FormData > ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/json) */
2020-07-22 12:03:46 -04:00
json ( ) : Promise < any > ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/text) */
2020-07-22 12:03:46 -04:00
text ( ) : Promise < string > ;
}
interface BroadcastChannelEventMap {
"message" : MessageEvent ;
"messageerror" : MessageEvent ;
}
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/BroadcastChannel) */
2020-07-22 12:03:46 -04:00
interface BroadcastChannel extends EventTarget {
2023-07-03 18:36:35 -04:00
/ * *
* Returns the channel name ( as passed to the constructor ) .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/BroadcastChannel/name)
* /
2020-07-22 12:03:46 -04:00
readonly name : string ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/BroadcastChannel/message_event) */
2020-07-22 12:03:46 -04:00
onmessage : ( ( this : BroadcastChannel , ev : MessageEvent ) = > any ) | null ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/BroadcastChannel/messageerror_event) */
2020-07-22 12:03:46 -04:00
onmessageerror : ( ( this : BroadcastChannel , ev : MessageEvent ) = > any ) | null ;
2023-07-03 18:36:35 -04:00
/ * *
* Closes the BroadcastChannel object , opening it up to garbage collection .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/BroadcastChannel/close)
* /
2020-07-22 12:03:46 -04:00
close ( ) : void ;
2023-07-03 18:36:35 -04:00
/ * *
* Sends the given message to other BroadcastChannel objects set up for this channel . Messages can be structured objects , e . g . nested objects and arrays .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/BroadcastChannel/postMessage)
* /
2020-07-22 12:03:46 -04:00
postMessage ( message : any ) : void ;
addEventListener < K extends keyof BroadcastChannelEventMap > ( type : K , listener : ( this : BroadcastChannel , ev : BroadcastChannelEventMap [ K ] ) = > any , options? : boolean | AddEventListenerOptions ) : void ;
addEventListener ( type : string , listener : EventListenerOrEventListenerObject , options? : boolean | AddEventListenerOptions ) : void ;
removeEventListener < K extends keyof BroadcastChannelEventMap > ( type : K , listener : ( this : BroadcastChannel , ev : BroadcastChannelEventMap [ K ] ) = > any , options? : boolean | EventListenerOptions ) : void ;
removeEventListener ( type : string , listener : EventListenerOrEventListenerObject , options? : boolean | EventListenerOptions ) : void ;
}
declare var BroadcastChannel : {
prototype : BroadcastChannel ;
new ( name : string ) : BroadcastChannel ;
} ;
2023-07-03 18:36:35 -04:00
/ * *
* This Streams API interface provides a built - in byte length queuing strategy that can be used when constructing streams .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/ByteLengthQueuingStrategy)
* /
2020-07-22 12:03:46 -04:00
interface ByteLengthQueuingStrategy extends QueuingStrategy < ArrayBufferView > {
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ByteLengthQueuingStrategy/highWaterMark) */
2021-02-24 23:16:19 -05:00
readonly highWaterMark : number ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ByteLengthQueuingStrategy/size) */
2021-02-24 23:16:19 -05:00
readonly size : QueuingStrategySize < ArrayBufferView > ;
2020-07-22 12:03:46 -04:00
}
declare var ByteLengthQueuingStrategy : {
prototype : ByteLengthQueuingStrategy ;
2021-02-24 23:16:19 -05:00
new ( init : QueuingStrategyInit ) : ByteLengthQueuingStrategy ;
2020-07-22 12:03:46 -04:00
} ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSImageValue) */
interface CSSImageValue extends CSSStyleValue {
}
declare var CSSImageValue : {
prototype : CSSImageValue ;
new ( ) : CSSImageValue ;
} ;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSKeywordValue) */
interface CSSKeywordValue extends CSSStyleValue {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSKeywordValue/value) */
value : string ;
}
declare var CSSKeywordValue : {
prototype : CSSKeywordValue ;
new ( value : string ) : CSSKeywordValue ;
} ;
interface CSSMathClamp extends CSSMathValue {
readonly lower : CSSNumericValue ;
readonly upper : CSSNumericValue ;
readonly value : CSSNumericValue ;
}
declare var CSSMathClamp : {
prototype : CSSMathClamp ;
new ( lower : CSSNumberish , value : CSSNumberish , upper : CSSNumberish ) : CSSMathClamp ;
} ;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSMathInvert) */
interface CSSMathInvert extends CSSMathValue {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSMathInvert/value) */
readonly value : CSSNumericValue ;
}
declare var CSSMathInvert : {
prototype : CSSMathInvert ;
new ( arg : CSSNumberish ) : CSSMathInvert ;
} ;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSMathMax) */
interface CSSMathMax extends CSSMathValue {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSMathMax/values) */
readonly values : CSSNumericArray ;
}
declare var CSSMathMax : {
prototype : CSSMathMax ;
new ( . . . args : CSSNumberish [ ] ) : CSSMathMax ;
} ;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSMathMin) */
interface CSSMathMin extends CSSMathValue {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSMathMin/values) */
readonly values : CSSNumericArray ;
}
declare var CSSMathMin : {
prototype : CSSMathMin ;
new ( . . . args : CSSNumberish [ ] ) : CSSMathMin ;
} ;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSMathNegate) */
interface CSSMathNegate extends CSSMathValue {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSMathNegate/value) */
readonly value : CSSNumericValue ;
}
declare var CSSMathNegate : {
prototype : CSSMathNegate ;
new ( arg : CSSNumberish ) : CSSMathNegate ;
} ;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSMathProduct) */
interface CSSMathProduct extends CSSMathValue {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSMathProduct/values) */
readonly values : CSSNumericArray ;
}
declare var CSSMathProduct : {
prototype : CSSMathProduct ;
new ( . . . args : CSSNumberish [ ] ) : CSSMathProduct ;
} ;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSMathSum) */
interface CSSMathSum extends CSSMathValue {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSMathSum/values) */
readonly values : CSSNumericArray ;
}
declare var CSSMathSum : {
prototype : CSSMathSum ;
new ( . . . args : CSSNumberish [ ] ) : CSSMathSum ;
} ;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSMathValue) */
interface CSSMathValue extends CSSNumericValue {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSMathValue/operator) */
readonly operator : CSSMathOperator ;
}
declare var CSSMathValue : {
prototype : CSSMathValue ;
new ( ) : CSSMathValue ;
} ;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSMatrixComponent) */
interface CSSMatrixComponent extends CSSTransformComponent {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSMatrixComponent/matrix) */
matrix : DOMMatrix ;
}
declare var CSSMatrixComponent : {
prototype : CSSMatrixComponent ;
new ( matrix : DOMMatrixReadOnly , options? : CSSMatrixComponentOptions ) : CSSMatrixComponent ;
} ;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSNumericArray) */
interface CSSNumericArray {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSNumericArray/length) */
readonly length : number ;
forEach ( callbackfn : ( value : CSSNumericValue , key : number , parent : CSSNumericArray ) = > void , thisArg? : any ) : void ;
[ index : number ] : CSSNumericValue ;
}
declare var CSSNumericArray : {
prototype : CSSNumericArray ;
new ( ) : CSSNumericArray ;
} ;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSNumericValue) */
interface CSSNumericValue extends CSSStyleValue {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSNumericValue/add) */
add ( . . . values : CSSNumberish [ ] ) : CSSNumericValue ;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSNumericValue/div) */
div ( . . . values : CSSNumberish [ ] ) : CSSNumericValue ;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSNumericValue/equals) */
equals ( . . . value : CSSNumberish [ ] ) : boolean ;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSNumericValue/max) */
max ( . . . values : CSSNumberish [ ] ) : CSSNumericValue ;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSNumericValue/min) */
min ( . . . values : CSSNumberish [ ] ) : CSSNumericValue ;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSNumericValue/mul) */
mul ( . . . values : CSSNumberish [ ] ) : CSSNumericValue ;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSNumericValue/sub) */
sub ( . . . values : CSSNumberish [ ] ) : CSSNumericValue ;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSNumericValue/to) */
to ( unit : string ) : CSSUnitValue ;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSNumericValue/toSum) */
toSum ( . . . units : string [ ] ) : CSSMathSum ;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSNumericValue/type) */
type ( ) : CSSNumericType ;
}
declare var CSSNumericValue : {
prototype : CSSNumericValue ;
new ( ) : CSSNumericValue ;
} ;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSPerspective) */
interface CSSPerspective extends CSSTransformComponent {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSPerspective/length) */
length : CSSPerspectiveValue ;
}
declare var CSSPerspective : {
prototype : CSSPerspective ;
new ( length : CSSPerspectiveValue ) : CSSPerspective ;
} ;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSRotate) */
interface CSSRotate extends CSSTransformComponent {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSRotate/angle) */
angle : CSSNumericValue ;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSRotate/x) */
x : CSSNumberish ;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSRotate/y) */
y : CSSNumberish ;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSRotate/z) */
z : CSSNumberish ;
}
declare var CSSRotate : {
prototype : CSSRotate ;
new ( angle : CSSNumericValue ) : CSSRotate ;
new ( x : CSSNumberish , y : CSSNumberish , z : CSSNumberish , angle : CSSNumericValue ) : CSSRotate ;
} ;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSScale) */
interface CSSScale extends CSSTransformComponent {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSScale/x) */
x : CSSNumberish ;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSScale/y) */
y : CSSNumberish ;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSScale/z) */
z : CSSNumberish ;
}
declare var CSSScale : {
prototype : CSSScale ;
new ( x : CSSNumberish , y : CSSNumberish , z? : CSSNumberish ) : CSSScale ;
} ;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSSkew) */
interface CSSSkew extends CSSTransformComponent {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSSkew/ax) */
ax : CSSNumericValue ;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSSkew/ay) */
ay : CSSNumericValue ;
}
declare var CSSSkew : {
prototype : CSSSkew ;
new ( ax : CSSNumericValue , ay : CSSNumericValue ) : CSSSkew ;
} ;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSSkewX) */
interface CSSSkewX extends CSSTransformComponent {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSSkewX/ax) */
ax : CSSNumericValue ;
}
declare var CSSSkewX : {
prototype : CSSSkewX ;
new ( ax : CSSNumericValue ) : CSSSkewX ;
} ;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSSkewY) */
interface CSSSkewY extends CSSTransformComponent {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSSkewY/ay) */
ay : CSSNumericValue ;
}
declare var CSSSkewY : {
prototype : CSSSkewY ;
new ( ay : CSSNumericValue ) : CSSSkewY ;
} ;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSStyleValue) */
interface CSSStyleValue {
toString ( ) : string ;
}
declare var CSSStyleValue : {
prototype : CSSStyleValue ;
new ( ) : CSSStyleValue ;
} ;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSTransformComponent) */
interface CSSTransformComponent {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSTransformComponent/is2D) */
is2D : boolean ;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSTransformComponent/toMatrix) */
toMatrix ( ) : DOMMatrix ;
toString ( ) : string ;
}
declare var CSSTransformComponent : {
prototype : CSSTransformComponent ;
new ( ) : CSSTransformComponent ;
} ;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSTransformValue) */
interface CSSTransformValue extends CSSStyleValue {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSTransformValue/is2D) */
readonly is2D : boolean ;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSTransformValue/length) */
readonly length : number ;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSTransformValue/toMatrix) */
toMatrix ( ) : DOMMatrix ;
forEach ( callbackfn : ( value : CSSTransformComponent , key : number , parent : CSSTransformValue ) = > void , thisArg? : any ) : void ;
[ index : number ] : CSSTransformComponent ;
}
declare var CSSTransformValue : {
prototype : CSSTransformValue ;
new ( transforms : CSSTransformComponent [ ] ) : CSSTransformValue ;
} ;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSTranslate) */
interface CSSTranslate extends CSSTransformComponent {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSTranslate/x) */
x : CSSNumericValue ;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSTranslate/y) */
y : CSSNumericValue ;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSTranslate/z) */
z : CSSNumericValue ;
}
declare var CSSTranslate : {
prototype : CSSTranslate ;
new ( x : CSSNumericValue , y : CSSNumericValue , z? : CSSNumericValue ) : CSSTranslate ;
} ;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSUnitValue) */
interface CSSUnitValue extends CSSNumericValue {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSUnitValue/unit) */
readonly unit : string ;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSUnitValue/value) */
value : number ;
}
declare var CSSUnitValue : {
prototype : CSSUnitValue ;
new ( value : number , unit : string ) : CSSUnitValue ;
} ;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSUnparsedValue) */
interface CSSUnparsedValue extends CSSStyleValue {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSUnparsedValue/length) */
readonly length : number ;
forEach ( callbackfn : ( value : CSSUnparsedSegment , key : number , parent : CSSUnparsedValue ) = > void , thisArg? : any ) : void ;
[ index : number ] : CSSUnparsedSegment ;
}
declare var CSSUnparsedValue : {
prototype : CSSUnparsedValue ;
new ( members : CSSUnparsedSegment [ ] ) : CSSUnparsedValue ;
} ;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSVariableReferenceValue) */
interface CSSVariableReferenceValue {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSVariableReferenceValue/fallback) */
readonly fallback : CSSUnparsedValue | null ;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSVariableReferenceValue/variable) */
variable : string ;
}
declare var CSSVariableReferenceValue : {
prototype : CSSVariableReferenceValue ;
new ( variable : string , fallback? : CSSUnparsedValue | null ) : CSSVariableReferenceValue ;
} ;
2021-12-09 17:12:21 -05:00
/ * *
* 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 .
* Available only in secure contexts .
2023-07-03 18:36:35 -04:00
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/Cache)
2021-12-09 17:12:21 -05:00
* /
2020-07-22 12:03:46 -04:00
interface Cache {
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Cache/add) */
2022-05-31 20:19:18 -04:00
add ( request : RequestInfo | URL ) : Promise < void > ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Cache/addAll) */
2020-07-22 12:03:46 -04:00
addAll ( requests : RequestInfo [ ] ) : Promise < void > ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Cache/delete) */
2022-05-31 20:19:18 -04:00
delete ( request : RequestInfo | URL , options? : CacheQueryOptions ) : Promise < boolean > ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Cache/keys) */
2022-05-31 20:19:18 -04:00
keys ( request? : RequestInfo | URL , options? : CacheQueryOptions ) : Promise < ReadonlyArray < Request > > ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Cache/match) */
2022-05-31 20:19:18 -04:00
match ( request : RequestInfo | URL , options? : CacheQueryOptions ) : Promise < Response | undefined > ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Cache/matchAll) */
2022-05-31 20:19:18 -04:00
matchAll ( request? : RequestInfo | URL , options? : CacheQueryOptions ) : Promise < ReadonlyArray < Response > > ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Cache/put) */
2022-05-31 20:19:18 -04:00
put ( request : RequestInfo | URL , response : Response ) : Promise < void > ;
2020-07-22 12:03:46 -04:00
}
declare var Cache : {
prototype : Cache ;
new ( ) : Cache ;
} ;
2021-12-09 17:12:21 -05:00
/ * *
* The storage for Cache objects .
* Available only in secure contexts .
2023-07-03 18:36:35 -04:00
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/CacheStorage)
2021-12-09 17:12:21 -05:00
* /
2020-07-22 12:03:46 -04:00
interface CacheStorage {
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CacheStorage/delete) */
2020-07-22 12:03:46 -04:00
delete ( cacheName : string ) : Promise < boolean > ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CacheStorage/has) */
2020-07-22 12:03:46 -04:00
has ( cacheName : string ) : Promise < boolean > ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CacheStorage/keys) */
2020-07-22 12:03:46 -04:00
keys ( ) : Promise < string [ ] > ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CacheStorage/match) */
2022-05-31 20:19:18 -04:00
match ( request : RequestInfo | URL , options? : MultiCacheQueryOptions ) : Promise < Response | undefined > ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CacheStorage/open) */
2020-07-22 12:03:46 -04:00
open ( cacheName : string ) : Promise < Cache > ;
}
declare var CacheStorage : {
prototype : CacheStorage ;
new ( ) : CacheStorage ;
} ;
2022-12-07 12:59:59 -05:00
interface CanvasCompositing {
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/globalAlpha) */
2022-12-07 12:59:59 -05:00
globalAlpha : number ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/globalCompositeOperation) */
2022-12-07 12:59:59 -05:00
globalCompositeOperation : GlobalCompositeOperation ;
}
interface CanvasDrawImage {
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/drawImage) */
2022-12-07 12:59:59 -05:00
drawImage ( image : CanvasImageSource , dx : number , dy : number ) : void ;
drawImage ( image : CanvasImageSource , dx : number , dy : number , dw : number , dh : number ) : void ;
drawImage ( image : CanvasImageSource , sx : number , sy : number , sw : number , sh : number , dx : number , dy : number , dw : number , dh : number ) : void ;
}
interface CanvasDrawPath {
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/beginPath) */
2022-12-07 12:59:59 -05:00
beginPath ( ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/clip) */
2022-12-07 12:59:59 -05:00
clip ( fillRule? : CanvasFillRule ) : void ;
clip ( path : Path2D , fillRule? : CanvasFillRule ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/fill) */
2022-12-07 12:59:59 -05:00
fill ( fillRule? : CanvasFillRule ) : void ;
fill ( path : Path2D , fillRule? : CanvasFillRule ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/isPointInPath) */
2022-12-07 12:59:59 -05:00
isPointInPath ( x : number , y : number , fillRule? : CanvasFillRule ) : boolean ;
isPointInPath ( path : Path2D , x : number , y : number , fillRule? : CanvasFillRule ) : boolean ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/isPointInStroke) */
2022-12-07 12:59:59 -05:00
isPointInStroke ( x : number , y : number ) : boolean ;
isPointInStroke ( path : Path2D , x : number , y : number ) : boolean ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/stroke) */
2022-12-07 12:59:59 -05:00
stroke ( ) : void ;
stroke ( path : Path2D ) : void ;
}
interface CanvasFillStrokeStyles {
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/fillStyle) */
2022-12-07 12:59:59 -05:00
fillStyle : string | CanvasGradient | CanvasPattern ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/strokeStyle) */
2022-12-07 12:59:59 -05:00
strokeStyle : string | CanvasGradient | CanvasPattern ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/createConicGradient) */
2022-12-07 12:59:59 -05:00
createConicGradient ( startAngle : number , x : number , y : number ) : CanvasGradient ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/createLinearGradient) */
2022-12-07 12:59:59 -05:00
createLinearGradient ( x0 : number , y0 : number , x1 : number , y1 : number ) : CanvasGradient ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/createPattern) */
2022-12-07 12:59:59 -05:00
createPattern ( image : CanvasImageSource , repetition : string | null ) : CanvasPattern | null ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/createRadialGradient) */
2022-12-07 12:59:59 -05:00
createRadialGradient ( x0 : number , y0 : number , r0 : number , x1 : number , y1 : number , r1 : number ) : CanvasGradient ;
}
interface CanvasFilters {
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/filter) */
2022-12-07 12:59:59 -05:00
filter : string ;
}
2023-07-03 18:36:35 -04:00
/ * *
* An opaque object describing a gradient . It is returned by the methods CanvasRenderingContext2D . createLinearGradient ( ) or CanvasRenderingContext2D . createRadialGradient ( ) .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/CanvasGradient)
* /
2020-07-22 12:03:46 -04:00
interface CanvasGradient {
/ * *
* 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 .
2021-05-27 19:33:11 -04:00
*
2020-07-22 12:03:46 -04:00
* Throws an "IndexSizeError" DOMException if the offset is out of range . Throws a "SyntaxError" DOMException if the color cannot be parsed .
2023-07-03 18:36:35 -04:00
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/CanvasGradient/addColorStop)
2020-07-22 12:03:46 -04:00
* /
addColorStop ( offset : number , color : string ) : void ;
}
declare var CanvasGradient : {
prototype : CanvasGradient ;
new ( ) : CanvasGradient ;
} ;
2022-12-07 12:59:59 -05:00
interface CanvasImageData {
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/createImageData) */
2022-12-07 12:59:59 -05:00
createImageData ( sw : number , sh : number , settings? : ImageDataSettings ) : ImageData ;
createImageData ( imagedata : ImageData ) : ImageData ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/getImageData) */
2022-12-07 12:59:59 -05:00
getImageData ( sx : number , sy : number , sw : number , sh : number , settings? : ImageDataSettings ) : ImageData ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/putImageData) */
2022-12-07 12:59:59 -05:00
putImageData ( imagedata : ImageData , dx : number , dy : number ) : void ;
putImageData ( imagedata : ImageData , dx : number , dy : number , dirtyX : number , dirtyY : number , dirtyWidth : number , dirtyHeight : number ) : void ;
}
interface CanvasImageSmoothing {
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/imageSmoothingEnabled) */
2022-12-07 12:59:59 -05:00
imageSmoothingEnabled : boolean ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/imageSmoothingQuality) */
2022-12-07 12:59:59 -05:00
imageSmoothingQuality : ImageSmoothingQuality ;
}
2020-07-22 12:03:46 -04:00
interface CanvasPath {
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/arc) */
2021-08-26 20:12:59 -04:00
arc ( x : number , y : number , radius : number , startAngle : number , endAngle : number , counterclockwise? : boolean ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/arcTo) */
2020-07-22 12:03:46 -04:00
arcTo ( x1 : number , y1 : number , x2 : number , y2 : number , radius : number ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/bezierCurveTo) */
2020-07-22 12:03:46 -04:00
bezierCurveTo ( cp1x : number , cp1y : number , cp2x : number , cp2y : number , x : number , y : number ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/closePath) */
2020-07-22 12:03:46 -04:00
closePath ( ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/ellipse) */
2021-08-26 20:12:59 -04:00
ellipse ( x : number , y : number , radiusX : number , radiusY : number , rotation : number , startAngle : number , endAngle : number , counterclockwise? : boolean ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/lineTo) */
2020-07-22 12:03:46 -04:00
lineTo ( x : number , y : number ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/moveTo) */
2020-07-22 12:03:46 -04:00
moveTo ( x : number , y : number ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/quadraticCurveTo) */
2020-07-22 12:03:46 -04:00
quadraticCurveTo ( cpx : number , cpy : number , x : number , y : number ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/rect) */
2020-07-22 12:03:46 -04:00
rect ( x : number , y : number , w : number , h : number ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/roundRect) */
2022-12-07 12:59:59 -05:00
roundRect ( x : number , y : number , w : number , h : number , radii? : number | DOMPointInit | ( number | DOMPointInit ) [ ] ) : void ;
}
interface CanvasPathDrawingStyles {
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/lineCap) */
2022-12-07 12:59:59 -05:00
lineCap : CanvasLineCap ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/lineDashOffset) */
2022-12-07 12:59:59 -05:00
lineDashOffset : number ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/lineJoin) */
2022-12-07 12:59:59 -05:00
lineJoin : CanvasLineJoin ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/lineWidth) */
2022-12-07 12:59:59 -05:00
lineWidth : number ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/miterLimit) */
2022-12-07 12:59:59 -05:00
miterLimit : number ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/getLineDash) */
2022-12-07 12:59:59 -05:00
getLineDash ( ) : number [ ] ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/setLineDash) */
2022-12-07 12:59:59 -05:00
setLineDash ( segments : number [ ] ) : void ;
2020-07-22 12:03:46 -04:00
}
2023-07-03 18:36:35 -04:00
/ * *
* An opaque object describing a pattern , based on an image , a canvas , or a video , created by the CanvasRenderingContext2D . createPattern ( ) method .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/CanvasPattern)
* /
2020-07-22 12:03:46 -04:00
interface CanvasPattern {
2023-07-03 18:36:35 -04:00
/ * *
* Sets the transformation matrix that will be used when rendering the pattern during a fill or stroke painting operation .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/CanvasPattern/setTransform)
* /
2020-07-22 12:03:46 -04:00
setTransform ( transform? : DOMMatrix2DInit ) : void ;
}
declare var CanvasPattern : {
prototype : CanvasPattern ;
new ( ) : CanvasPattern ;
} ;
2022-12-07 12:59:59 -05:00
interface CanvasRect {
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/clearRect) */
2022-12-07 12:59:59 -05:00
clearRect ( x : number , y : number , w : number , h : number ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/fillRect) */
2022-12-07 12:59:59 -05:00
fillRect ( x : number , y : number , w : number , h : number ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/strokeRect) */
2022-12-07 12:59:59 -05:00
strokeRect ( x : number , y : number , w : number , h : number ) : void ;
}
interface CanvasShadowStyles {
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/shadowBlur) */
2022-12-07 12:59:59 -05:00
shadowBlur : number ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/shadowColor) */
2022-12-07 12:59:59 -05:00
shadowColor : string ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/shadowOffsetX) */
2022-12-07 12:59:59 -05:00
shadowOffsetX : number ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/shadowOffsetY) */
2022-12-07 12:59:59 -05:00
shadowOffsetY : number ;
}
interface CanvasState {
2023-09-09 15:03:21 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/reset) */
reset ( ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/restore) */
2022-12-07 12:59:59 -05:00
restore ( ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/save) */
2022-12-07 12:59:59 -05:00
save ( ) : void ;
}
interface CanvasText {
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/fillText) */
2022-12-07 12:59:59 -05:00
fillText ( text : string , x : number , y : number , maxWidth? : number ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/measureText) */
2022-12-07 12:59:59 -05:00
measureText ( text : string ) : TextMetrics ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/strokeText) */
2022-12-07 12:59:59 -05:00
strokeText ( text : string , x : number , y : number , maxWidth? : number ) : void ;
}
interface CanvasTextDrawingStyles {
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/direction) */
2022-12-07 12:59:59 -05:00
direction : CanvasDirection ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/font) */
2022-12-07 12:59:59 -05:00
font : string ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/fontKerning) */
2022-12-07 12:59:59 -05:00
fontKerning : CanvasFontKerning ;
2024-03-26 18:52:57 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/fontStretch) */
fontStretch : CanvasFontStretch ;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/fontVariantCaps) */
fontVariantCaps : CanvasFontVariantCaps ;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/letterSpacing) */
letterSpacing : string ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/textAlign) */
2022-12-07 12:59:59 -05:00
textAlign : CanvasTextAlign ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/textBaseline) */
2022-12-07 12:59:59 -05:00
textBaseline : CanvasTextBaseline ;
2024-03-26 18:52:57 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/textRendering) */
textRendering : CanvasTextRendering ;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/wordSpacing) */
wordSpacing : string ;
2022-12-07 12:59:59 -05:00
}
interface CanvasTransform {
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/getTransform) */
2022-12-07 12:59:59 -05:00
getTransform ( ) : DOMMatrix ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/resetTransform) */
2022-12-07 12:59:59 -05:00
resetTransform ( ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/rotate) */
2022-12-07 12:59:59 -05:00
rotate ( angle : number ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/scale) */
2022-12-07 12:59:59 -05:00
scale ( x : number , y : number ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/setTransform) */
2022-12-07 12:59:59 -05:00
setTransform ( a : number , b : number , c : number , d : number , e : number , f : number ) : void ;
setTransform ( transform? : DOMMatrix2DInit ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/transform) */
2022-12-07 12:59:59 -05:00
transform ( a : number , b : number , c : number , d : number , e : number , f : number ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/translate) */
2022-12-07 12:59:59 -05:00
translate ( x : number , y : number ) : void ;
}
2023-07-03 18:36:35 -04:00
/ * *
* 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 ( ) .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/Client)
* /
2020-07-22 12:03:46 -04:00
interface Client {
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Client/frameType) */
2020-07-22 12:03:46 -04:00
readonly frameType : FrameType ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Client/id) */
2020-07-22 12:03:46 -04:00
readonly id : string ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Client/type) */
2020-07-22 12:03:46 -04:00
readonly type : ClientTypes ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Client/url) */
2020-07-22 12:03:46 -04:00
readonly url : string ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Client/postMessage) */
2021-08-26 20:12:59 -04:00
postMessage ( message : any , transfer : Transferable [ ] ) : void ;
2021-12-09 17:12:21 -05:00
postMessage ( message : any , options? : StructuredSerializeOptions ) : void ;
2020-07-22 12:03:46 -04:00
}
declare var Client : {
prototype : Client ;
new ( ) : Client ;
} ;
2023-07-03 18:36:35 -04:00
/ * *
* Provides access to Client objects . Access it via self . clients within a service worker .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/Clients)
* /
2020-07-22 12:03:46 -04:00
interface Clients {
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Clients/claim) */
2020-07-22 12:03:46 -04:00
claim ( ) : Promise < void > ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Clients/get) */
2020-08-24 19:43:54 -04:00
get ( id : string ) : Promise < Client | undefined > ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Clients/matchAll) */
2021-02-24 23:16:19 -05:00
matchAll < T extends ClientQueryOptions > ( options? : T ) : Promise < ReadonlyArray < T [ " type " ] extends " window " ? WindowClient : Client > > ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Clients/openWindow) */
2021-08-26 20:12:59 -04:00
openWindow ( url : string | URL ) : Promise < WindowClient | null > ;
2020-07-22 12:03:46 -04:00
}
declare var Clients : {
prototype : Clients ;
new ( ) : Clients ;
} ;
2023-07-03 18:36:35 -04:00
/ * *
* 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 .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/CloseEvent)
* /
2020-07-22 12:03:46 -04:00
interface CloseEvent extends Event {
2023-07-03 18:36:35 -04:00
/ * *
* Returns the WebSocket connection close code provided by the server .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/CloseEvent/code)
* /
2020-07-22 12:03:46 -04:00
readonly code : number ;
2023-07-03 18:36:35 -04:00
/ * *
* Returns the WebSocket connection close reason provided by the server .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/CloseEvent/reason)
* /
2020-07-22 12:03:46 -04:00
readonly reason : string ;
2023-07-03 18:36:35 -04:00
/ * *
* Returns true if the connection closed cleanly ; false otherwise .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/CloseEvent/wasClean)
* /
2020-07-22 12:03:46 -04:00
readonly wasClean : boolean ;
}
declare var CloseEvent : {
prototype : CloseEvent ;
new ( type : string , eventInitDict? : CloseEventInit ) : CloseEvent ;
} ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CompressionStream) */
interface CompressionStream extends GenericTransformStream {
}
declare var CompressionStream : {
prototype : CompressionStream ;
new ( format : CompressionFormat ) : CompressionStream ;
} ;
/ * *
* This Streams API interface provides a built - in byte length queuing strategy that can be used when constructing streams .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/CountQueuingStrategy)
* /
2020-07-22 12:03:46 -04:00
interface CountQueuingStrategy extends QueuingStrategy {
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CountQueuingStrategy/highWaterMark) */
2021-02-24 23:16:19 -05:00
readonly highWaterMark : number ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CountQueuingStrategy/size) */
2021-02-24 23:16:19 -05:00
readonly size : QueuingStrategySize ;
2020-07-22 12:03:46 -04:00
}
declare var CountQueuingStrategy : {
prototype : CountQueuingStrategy ;
2021-02-24 23:16:19 -05:00
new ( init : QueuingStrategyInit ) : CountQueuingStrategy ;
2020-07-22 12:03:46 -04:00
} ;
2023-07-03 18:36:35 -04:00
/ * *
* Basic cryptography features available in the current context . It allows access to a cryptographically strong random number generator and to cryptographic primitives .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/Crypto)
* /
2020-07-22 12:03:46 -04:00
interface Crypto {
2023-07-03 18:36:35 -04:00
/ * *
* Available only in secure contexts .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/Crypto/subtle)
* /
2020-07-22 12:03:46 -04:00
readonly subtle : SubtleCrypto ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Crypto/getRandomValues) */
2021-08-26 20:12:59 -04:00
getRandomValues < T extends ArrayBufferView | null > ( array : T ) : T ;
2023-07-03 18:36:35 -04:00
/ * *
* Available only in secure contexts .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/Crypto/randomUUID)
* /
2023-03-21 11:46:40 -04:00
randomUUID ( ) : ` ${ string } - ${ string } - ${ string } - ${ string } - ${ string } ` ;
2020-07-22 12:03:46 -04:00
}
declare var Crypto : {
prototype : Crypto ;
new ( ) : Crypto ;
} ;
2021-12-09 17:12:21 -05:00
/ * *
* The CryptoKey dictionary of the Web Crypto API represents a cryptographic key .
* Available only in secure contexts .
2023-07-03 18:36:35 -04:00
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/CryptoKey)
2021-12-09 17:12:21 -05:00
* /
2020-07-22 12:03:46 -04:00
interface CryptoKey {
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/algorithm) */
2020-07-22 12:03:46 -04:00
readonly algorithm : KeyAlgorithm ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/extractable) */
2020-07-22 12:03:46 -04:00
readonly extractable : boolean ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/type) */
2020-07-22 12:03:46 -04:00
readonly type : KeyType ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/usages) */
2020-07-22 12:03:46 -04:00
readonly usages : KeyUsage [ ] ;
}
declare var CryptoKey : {
prototype : CryptoKey ;
new ( ) : CryptoKey ;
} ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CustomEvent) */
2020-07-22 12:03:46 -04:00
interface CustomEvent < T = any > extends Event {
2023-07-03 18:36:35 -04:00
/ * *
* Returns any custom data event was created with . Typically used for synthetic events .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/CustomEvent/detail)
* /
2020-07-22 12:03:46 -04:00
readonly detail : T ;
2023-07-03 18:36:35 -04:00
/ * *
* @deprecated
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/CustomEvent/initCustomEvent)
* /
2021-08-26 20:12:59 -04:00
initCustomEvent ( type : string , bubbles? : boolean , cancelable? : boolean , detail? : T ) : void ;
2020-07-22 12:03:46 -04:00
}
declare var CustomEvent : {
prototype : CustomEvent ;
2021-08-26 20:12:59 -04:00
new < T > ( type : string , eventInitDict? : CustomEventInit < T > ) : CustomEvent < T > ;
2020-07-22 12:03:46 -04:00
} ;
2023-07-03 18:36:35 -04:00
/ * *
* An abnormal event ( called an exception ) which occurs as a result of calling a method or accessing a property of a web API .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/DOMException)
* /
2021-12-09 17:12:21 -05:00
interface DOMException extends Error {
2023-07-03 18:36:35 -04:00
/ * *
* @deprecated
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/DOMException/code)
* /
2020-07-22 12:03:46 -04:00
readonly code : number ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMException/message) */
2020-07-22 12:03:46 -04:00
readonly message : string ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMException/name) */
2020-07-22 12:03:46 -04:00
readonly name : string ;
2023-03-21 11:46:40 -04:00
readonly INDEX_SIZE_ERR : 1 ;
readonly DOMSTRING_SIZE_ERR : 2 ;
readonly HIERARCHY_REQUEST_ERR : 3 ;
readonly WRONG_DOCUMENT_ERR : 4 ;
readonly INVALID_CHARACTER_ERR : 5 ;
readonly NO_DATA_ALLOWED_ERR : 6 ;
readonly NO_MODIFICATION_ALLOWED_ERR : 7 ;
readonly NOT_FOUND_ERR : 8 ;
readonly NOT_SUPPORTED_ERR : 9 ;
readonly INUSE_ATTRIBUTE_ERR : 10 ;
readonly INVALID_STATE_ERR : 11 ;
readonly SYNTAX_ERR : 12 ;
readonly INVALID_MODIFICATION_ERR : 13 ;
readonly NAMESPACE_ERR : 14 ;
readonly INVALID_ACCESS_ERR : 15 ;
readonly VALIDATION_ERR : 16 ;
readonly TYPE_MISMATCH_ERR : 17 ;
readonly SECURITY_ERR : 18 ;
readonly NETWORK_ERR : 19 ;
readonly ABORT_ERR : 20 ;
readonly URL_MISMATCH_ERR : 21 ;
readonly QUOTA_EXCEEDED_ERR : 22 ;
readonly TIMEOUT_ERR : 23 ;
readonly INVALID_NODE_TYPE_ERR : 24 ;
readonly DATA_CLONE_ERR : 25 ;
2020-07-22 12:03:46 -04:00
}
declare var DOMException : {
prototype : DOMException ;
new ( message? : string , name? : string ) : DOMException ;
2023-03-21 11:46:40 -04:00
readonly INDEX_SIZE_ERR : 1 ;
readonly DOMSTRING_SIZE_ERR : 2 ;
readonly HIERARCHY_REQUEST_ERR : 3 ;
readonly WRONG_DOCUMENT_ERR : 4 ;
readonly INVALID_CHARACTER_ERR : 5 ;
readonly NO_DATA_ALLOWED_ERR : 6 ;
readonly NO_MODIFICATION_ALLOWED_ERR : 7 ;
readonly NOT_FOUND_ERR : 8 ;
readonly NOT_SUPPORTED_ERR : 9 ;
readonly INUSE_ATTRIBUTE_ERR : 10 ;
readonly INVALID_STATE_ERR : 11 ;
readonly SYNTAX_ERR : 12 ;
readonly INVALID_MODIFICATION_ERR : 13 ;
readonly NAMESPACE_ERR : 14 ;
readonly INVALID_ACCESS_ERR : 15 ;
readonly VALIDATION_ERR : 16 ;
readonly TYPE_MISMATCH_ERR : 17 ;
readonly SECURITY_ERR : 18 ;
readonly NETWORK_ERR : 19 ;
readonly ABORT_ERR : 20 ;
readonly URL_MISMATCH_ERR : 21 ;
readonly QUOTA_EXCEEDED_ERR : 22 ;
readonly TIMEOUT_ERR : 23 ;
readonly INVALID_NODE_TYPE_ERR : 24 ;
readonly DATA_CLONE_ERR : 25 ;
2020-07-22 12:03:46 -04:00
} ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix) */
2020-07-22 12:03:46 -04:00
interface DOMMatrix extends DOMMatrixReadOnly {
a : number ;
b : number ;
c : number ;
d : number ;
e : number ;
f : number ;
m11 : number ;
m12 : number ;
m13 : number ;
m14 : number ;
m21 : number ;
m22 : number ;
m23 : number ;
m24 : number ;
m31 : number ;
m32 : number ;
m33 : number ;
m34 : number ;
m41 : number ;
m42 : number ;
m43 : number ;
m44 : number ;
invertSelf ( ) : DOMMatrix ;
multiplySelf ( other? : DOMMatrixInit ) : DOMMatrix ;
preMultiplySelf ( other? : DOMMatrixInit ) : DOMMatrix ;
rotateAxisAngleSelf ( x? : number , y? : number , z? : number , angle? : number ) : DOMMatrix ;
rotateFromVectorSelf ( x? : number , y? : number ) : DOMMatrix ;
rotateSelf ( rotX? : number , rotY? : number , rotZ? : number ) : DOMMatrix ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix/scale3dSelf) */
2020-07-22 12:03:46 -04:00
scale3dSelf ( scale? : number , originX? : number , originY? : number , originZ? : number ) : DOMMatrix ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix/scaleSelf) */
2020-07-22 12:03:46 -04:00
scaleSelf ( scaleX? : number , scaleY? : number , scaleZ? : number , originX? : number , originY? : number , originZ? : number ) : DOMMatrix ;
skewXSelf ( sx? : number ) : DOMMatrix ;
skewYSelf ( sy? : number ) : DOMMatrix ;
translateSelf ( tx? : number , ty? : number , tz? : number ) : DOMMatrix ;
}
declare var DOMMatrix : {
prototype : DOMMatrix ;
new ( init? : string | number [ ] ) : DOMMatrix ;
fromFloat32Array ( array32 : Float32Array ) : DOMMatrix ;
fromFloat64Array ( array64 : Float64Array ) : DOMMatrix ;
fromMatrix ( other? : DOMMatrixInit ) : DOMMatrix ;
} ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly) */
2020-07-22 12:03:46 -04:00
interface DOMMatrixReadOnly {
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/a) */
2020-07-22 12:03:46 -04:00
readonly a : number ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/b) */
2020-07-22 12:03:46 -04:00
readonly b : number ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/c) */
2020-07-22 12:03:46 -04:00
readonly c : number ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/d) */
2020-07-22 12:03:46 -04:00
readonly d : number ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/e) */
2020-07-22 12:03:46 -04:00
readonly e : number ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/f) */
2020-07-22 12:03:46 -04:00
readonly f : number ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/is2D) */
2020-07-22 12:03:46 -04:00
readonly is2D : boolean ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/isIdentity) */
2020-07-22 12:03:46 -04:00
readonly isIdentity : boolean ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/m11) */
2020-07-22 12:03:46 -04:00
readonly m11 : number ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/m12) */
2020-07-22 12:03:46 -04:00
readonly m12 : number ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/m13) */
2020-07-22 12:03:46 -04:00
readonly m13 : number ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/m14) */
2020-07-22 12:03:46 -04:00
readonly m14 : number ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/m21) */
2020-07-22 12:03:46 -04:00
readonly m21 : number ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/m22) */
2020-07-22 12:03:46 -04:00
readonly m22 : number ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/m23) */
2020-07-22 12:03:46 -04:00
readonly m23 : number ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/m24) */
2020-07-22 12:03:46 -04:00
readonly m24 : number ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/m31) */
2020-07-22 12:03:46 -04:00
readonly m31 : number ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/m32) */
2020-07-22 12:03:46 -04:00
readonly m32 : number ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/m33) */
2020-07-22 12:03:46 -04:00
readonly m33 : number ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/m34) */
2020-07-22 12:03:46 -04:00
readonly m34 : number ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/m41) */
2020-07-22 12:03:46 -04:00
readonly m41 : number ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/m42) */
2020-07-22 12:03:46 -04:00
readonly m42 : number ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/m43) */
2020-07-22 12:03:46 -04:00
readonly m43 : number ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/m44) */
2020-07-22 12:03:46 -04:00
readonly m44 : number ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/flipX) */
2020-07-22 12:03:46 -04:00
flipX ( ) : DOMMatrix ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/flipY) */
2020-07-22 12:03:46 -04:00
flipY ( ) : DOMMatrix ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/inverse) */
2020-07-22 12:03:46 -04:00
inverse ( ) : DOMMatrix ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/multiply) */
2020-07-22 12:03:46 -04:00
multiply ( other? : DOMMatrixInit ) : DOMMatrix ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/rotate) */
2020-07-22 12:03:46 -04:00
rotate ( rotX? : number , rotY? : number , rotZ? : number ) : DOMMatrix ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/rotateAxisAngle) */
2020-07-22 12:03:46 -04:00
rotateAxisAngle ( x? : number , y? : number , z? : number , angle? : number ) : DOMMatrix ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/rotateFromVector) */
2020-07-22 12:03:46 -04:00
rotateFromVector ( x? : number , y? : number ) : DOMMatrix ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/scale) */
2020-07-22 12:03:46 -04:00
scale ( scaleX? : number , scaleY? : number , scaleZ? : number , originX? : number , originY? : number , originZ? : number ) : DOMMatrix ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/scale3d) */
2020-07-22 12:03:46 -04:00
scale3d ( scale? : number , originX? : number , originY? : number , originZ? : number ) : DOMMatrix ;
2023-07-03 18:36:35 -04:00
/ * *
* @deprecated
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/scaleNonUniform)
* /
2020-07-22 12:03:46 -04:00
scaleNonUniform ( scaleX? : number , scaleY? : number ) : DOMMatrix ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/skewX) */
2020-07-22 12:03:46 -04:00
skewX ( sx? : number ) : DOMMatrix ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/skewY) */
2020-07-22 12:03:46 -04:00
skewY ( sy? : number ) : DOMMatrix ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/toFloat32Array) */
2020-07-22 12:03:46 -04:00
toFloat32Array ( ) : Float32Array ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/toFloat64Array) */
2020-07-22 12:03:46 -04:00
toFloat64Array ( ) : Float64Array ;
toJSON ( ) : any ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/transformPoint) */
2020-07-22 12:03:46 -04:00
transformPoint ( point? : DOMPointInit ) : DOMPoint ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly/translate) */
2020-07-22 12:03:46 -04:00
translate ( tx? : number , ty? : number , tz? : number ) : DOMMatrix ;
}
declare var DOMMatrixReadOnly : {
prototype : DOMMatrixReadOnly ;
new ( init? : string | number [ ] ) : DOMMatrixReadOnly ;
fromFloat32Array ( array32 : Float32Array ) : DOMMatrixReadOnly ;
fromFloat64Array ( array64 : Float64Array ) : DOMMatrixReadOnly ;
fromMatrix ( other? : DOMMatrixInit ) : DOMMatrixReadOnly ;
} ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMPoint) */
2020-07-22 12:03:46 -04:00
interface DOMPoint extends DOMPointReadOnly {
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMPoint/w) */
2020-07-22 12:03:46 -04:00
w : number ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMPoint/x) */
2020-07-22 12:03:46 -04:00
x : number ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMPoint/y) */
2020-07-22 12:03:46 -04:00
y : number ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMPoint/z) */
2020-07-22 12:03:46 -04:00
z : number ;
}
declare var DOMPoint : {
prototype : DOMPoint ;
new ( x? : number , y? : number , z? : number , w? : number ) : DOMPoint ;
2023-09-09 15:03:21 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMPoint/fromPoint_static) */
2020-07-22 12:03:46 -04:00
fromPoint ( other? : DOMPointInit ) : DOMPoint ;
} ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMPointReadOnly) */
2020-07-22 12:03:46 -04:00
interface DOMPointReadOnly {
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMPointReadOnly/w) */
2020-07-22 12:03:46 -04:00
readonly w : number ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMPointReadOnly/x) */
2020-07-22 12:03:46 -04:00
readonly x : number ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMPointReadOnly/y) */
2020-07-22 12:03:46 -04:00
readonly y : number ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMPointReadOnly/z) */
2020-07-22 12:03:46 -04:00
readonly z : number ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMPointReadOnly/matrixTransform) */
2020-07-22 12:03:46 -04:00
matrixTransform ( matrix? : DOMMatrixInit ) : DOMPoint ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMPointReadOnly/toJSON) */
2020-07-22 12:03:46 -04:00
toJSON ( ) : any ;
}
declare var DOMPointReadOnly : {
prototype : DOMPointReadOnly ;
new ( x? : number , y? : number , z? : number , w? : number ) : DOMPointReadOnly ;
2023-09-09 15:03:21 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMPointReadOnly/fromPoint_static) */
2020-07-22 12:03:46 -04:00
fromPoint ( other? : DOMPointInit ) : DOMPointReadOnly ;
} ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMQuad) */
2020-07-22 12:03:46 -04:00
interface DOMQuad {
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMQuad/p1) */
2020-07-22 12:03:46 -04:00
readonly p1 : DOMPoint ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMQuad/p2) */
2020-07-22 12:03:46 -04:00
readonly p2 : DOMPoint ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMQuad/p3) */
2020-07-22 12:03:46 -04:00
readonly p3 : DOMPoint ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMQuad/p4) */
2020-07-22 12:03:46 -04:00
readonly p4 : DOMPoint ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMQuad/getBounds) */
2020-07-22 12:03:46 -04:00
getBounds ( ) : DOMRect ;
toJSON ( ) : any ;
}
declare var DOMQuad : {
prototype : DOMQuad ;
new ( p1? : DOMPointInit , p2? : DOMPointInit , p3? : DOMPointInit , p4? : DOMPointInit ) : DOMQuad ;
fromQuad ( other? : DOMQuadInit ) : DOMQuad ;
fromRect ( other? : DOMRectInit ) : DOMQuad ;
} ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMRect) */
2020-07-22 12:03:46 -04:00
interface DOMRect extends DOMRectReadOnly {
height : number ;
width : number ;
x : number ;
y : number ;
}
declare var DOMRect : {
prototype : DOMRect ;
new ( x? : number , y? : number , width? : number , height? : number ) : DOMRect ;
fromRect ( other? : DOMRectInit ) : DOMRect ;
} ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMRectReadOnly) */
2020-07-22 12:03:46 -04:00
interface DOMRectReadOnly {
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMRectReadOnly/bottom) */
2020-07-22 12:03:46 -04:00
readonly bottom : number ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMRectReadOnly/height) */
2020-07-22 12:03:46 -04:00
readonly height : number ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMRectReadOnly/left) */
2020-07-22 12:03:46 -04:00
readonly left : number ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMRectReadOnly/right) */
2020-07-22 12:03:46 -04:00
readonly right : number ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMRectReadOnly/top) */
2020-07-22 12:03:46 -04:00
readonly top : number ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMRectReadOnly/width) */
2020-07-22 12:03:46 -04:00
readonly width : number ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMRectReadOnly/x) */
2020-07-22 12:03:46 -04:00
readonly x : number ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMRectReadOnly/y) */
2020-07-22 12:03:46 -04:00
readonly y : number ;
toJSON ( ) : any ;
}
declare var DOMRectReadOnly : {
prototype : DOMRectReadOnly ;
new ( x? : number , y? : number , width? : number , height? : number ) : DOMRectReadOnly ;
2023-09-09 15:03:21 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMRectReadOnly/fromRect_static) */
2020-07-22 12:03:46 -04:00
fromRect ( other? : DOMRectInit ) : DOMRectReadOnly ;
} ;
2023-07-03 18:36:35 -04:00
/ * *
* A type returned by some APIs which contains a list of DOMString ( strings ) .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/DOMStringList)
* /
2020-07-22 12:03:46 -04:00
interface DOMStringList {
2023-07-03 18:36:35 -04:00
/ * *
* Returns the number of strings in strings .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/DOMStringList/length)
* /
2020-07-22 12:03:46 -04:00
readonly length : number ;
2023-07-03 18:36:35 -04:00
/ * *
* Returns true if strings contains string , and false otherwise .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/DOMStringList/contains)
* /
2020-07-22 12:03:46 -04:00
contains ( string : string ) : boolean ;
2023-07-03 18:36:35 -04:00
/ * *
* Returns the string with index index from strings .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/DOMStringList/item)
* /
2020-07-22 12:03:46 -04:00
item ( index : number ) : string | null ;
[ index : number ] : string ;
}
declare var DOMStringList : {
prototype : DOMStringList ;
new ( ) : DOMStringList ;
} ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DecompressionStream) */
interface DecompressionStream extends GenericTransformStream {
}
declare var DecompressionStream : {
prototype : DecompressionStream ;
new ( format : CompressionFormat ) : DecompressionStream ;
} ;
2020-07-22 12:03:46 -04:00
interface DedicatedWorkerGlobalScopeEventMap extends WorkerGlobalScopeEventMap {
"message" : MessageEvent ;
"messageerror" : MessageEvent ;
2024-03-26 18:52:57 -04:00
"rtctransform" : Event ;
2020-07-22 12:03:46 -04:00
}
2023-07-03 18:36:35 -04:00
/ * *
* ( 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 .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/DedicatedWorkerGlobalScope)
* /
2020-07-22 12:03:46 -04:00
interface DedicatedWorkerGlobalScope extends WorkerGlobalScope , AnimationFrameProvider {
2023-07-03 18:36:35 -04:00
/ * *
* Returns dedicatedWorkerGlobal ' s name , i . e . the value given to the Worker constructor . Primarily useful for debugging .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/DedicatedWorkerGlobalScope/name)
* /
2020-07-22 12:03:46 -04:00
readonly name : string ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DedicatedWorkerGlobalScope/message_event) */
2020-07-22 12:03:46 -04:00
onmessage : ( ( this : DedicatedWorkerGlobalScope , ev : MessageEvent ) = > any ) | null ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DedicatedWorkerGlobalScope/messageerror_event) */
2020-07-22 12:03:46 -04:00
onmessageerror : ( ( this : DedicatedWorkerGlobalScope , ev : MessageEvent ) = > any ) | null ;
2024-03-26 18:52:57 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DedicatedWorkerGlobalScope/rtctransform_event) */
onrtctransform : ( ( this : DedicatedWorkerGlobalScope , ev : Event ) = > any ) | null ;
2023-07-03 18:36:35 -04:00
/ * *
* Aborts dedicatedWorkerGlobal .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/DedicatedWorkerGlobalScope/close)
* /
close ( ) : void ;
/ * *
* 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 .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/DedicatedWorkerGlobalScope/postMessage)
* /
postMessage ( message : any , transfer : Transferable [ ] ) : void ;
2021-12-09 17:12:21 -05:00
postMessage ( message : any , options? : StructuredSerializeOptions ) : void ;
2020-07-22 12:03:46 -04:00
addEventListener < K extends keyof DedicatedWorkerGlobalScopeEventMap > ( type : K , listener : ( this : DedicatedWorkerGlobalScope , ev : DedicatedWorkerGlobalScopeEventMap [ K ] ) = > any , options? : boolean | AddEventListenerOptions ) : void ;
addEventListener ( type : string , listener : EventListenerOrEventListenerObject , options? : boolean | AddEventListenerOptions ) : void ;
removeEventListener < K extends keyof DedicatedWorkerGlobalScopeEventMap > ( type : K , listener : ( this : DedicatedWorkerGlobalScope , ev : DedicatedWorkerGlobalScopeEventMap [ K ] ) = > any , options? : boolean | EventListenerOptions ) : void ;
removeEventListener ( type : string , listener : EventListenerOrEventListenerObject , options? : boolean | EventListenerOptions ) : void ;
}
declare var DedicatedWorkerGlobalScope : {
prototype : DedicatedWorkerGlobalScope ;
new ( ) : DedicatedWorkerGlobalScope ;
} ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EXT_blend_minmax) */
2021-08-26 20:12:59 -04:00
interface EXT_blend_minmax {
2023-03-21 11:46:40 -04:00
readonly MIN_EXT : 0x8007 ;
readonly MAX_EXT : 0x8008 ;
2020-07-22 12:03:46 -04:00
}
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EXT_color_buffer_float) */
2021-08-26 20:12:59 -04:00
interface EXT_color_buffer_float {
2020-07-22 12:03:46 -04:00
}
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EXT_color_buffer_half_float) */
2021-08-26 20:12:59 -04:00
interface EXT_color_buffer_half_float {
2023-03-21 11:46:40 -04:00
readonly RGBA16F_EXT : 0x881A ;
readonly RGB16F_EXT : 0x881B ;
readonly FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT : 0x8211 ;
readonly UNSIGNED_NORMALIZED_EXT : 0x8C17 ;
2020-07-22 12:03:46 -04:00
}
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EXT_float_blend) */
2021-08-26 20:12:59 -04:00
interface EXT_float_blend {
2020-07-22 12:03:46 -04:00
}
2023-07-03 18:36:35 -04:00
/ * *
* 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 .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/EXT_frag_depth)
* /
2020-07-22 12:03:46 -04:00
interface EXT_frag_depth {
}
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EXT_sRGB) */
2020-07-22 12:03:46 -04:00
interface EXT_sRGB {
2023-03-21 11:46:40 -04:00
readonly SRGB_EXT : 0x8C40 ;
readonly SRGB_ALPHA_EXT : 0x8C42 ;
readonly SRGB8_ALPHA8_EXT : 0x8C43 ;
readonly FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT : 0x8210 ;
2020-07-22 12:03:46 -04:00
}
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EXT_shader_texture_lod) */
2020-07-22 12:03:46 -04:00
interface EXT_shader_texture_lod {
}
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EXT_texture_compression_bptc) */
2022-12-07 12:59:59 -05:00
interface EXT_texture_compression_bptc {
2023-03-21 11:46:40 -04:00
readonly COMPRESSED_RGBA_BPTC_UNORM_EXT : 0x8E8C ;
readonly COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT : 0x8E8D ;
readonly COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT : 0x8E8E ;
readonly COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT : 0x8E8F ;
2022-12-07 12:59:59 -05:00
}
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EXT_texture_compression_rgtc) */
2021-08-26 20:12:59 -04:00
interface EXT_texture_compression_rgtc {
2023-03-21 11:46:40 -04:00
readonly COMPRESSED_RED_RGTC1_EXT : 0x8DBB ;
readonly COMPRESSED_SIGNED_RED_RGTC1_EXT : 0x8DBC ;
readonly COMPRESSED_RED_GREEN_RGTC2_EXT : 0x8DBD ;
readonly COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT : 0x8DBE ;
2021-08-26 20:12:59 -04:00
}
2023-07-03 18:36:35 -04:00
/ * *
* The EXT_texture_filter_anisotropic extension is part of the WebGL API and exposes two constants for anisotropic filtering ( AF ) .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/EXT_texture_filter_anisotropic)
* /
2020-07-22 12:03:46 -04:00
interface EXT_texture_filter_anisotropic {
2023-03-21 11:46:40 -04:00
readonly TEXTURE_MAX_ANISOTROPY_EXT : 0x84FE ;
readonly MAX_TEXTURE_MAX_ANISOTROPY_EXT : 0x84FF ;
2020-07-22 12:03:46 -04:00
}
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EXT_texture_norm16) */
2022-12-07 12:59:59 -05:00
interface EXT_texture_norm16 {
2023-03-21 11:46:40 -04:00
readonly R16_EXT : 0x822A ;
readonly RG16_EXT : 0x822C ;
readonly RGB16_EXT : 0x8054 ;
readonly RGBA16_EXT : 0x805B ;
readonly R16_SNORM_EXT : 0x8F98 ;
readonly RG16_SNORM_EXT : 0x8F99 ;
readonly RGB16_SNORM_EXT : 0x8F9A ;
readonly RGBA16_SNORM_EXT : 0x8F9B ;
2022-12-07 12:59:59 -05:00
}
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EncodedVideoChunk) */
interface EncodedVideoChunk {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EncodedVideoChunk/byteLength) */
readonly byteLength : number ;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EncodedVideoChunk/duration) */
readonly duration : number | null ;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EncodedVideoChunk/timestamp) */
readonly timestamp : number ;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EncodedVideoChunk/type) */
readonly type : EncodedVideoChunkType ;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EncodedVideoChunk/copyTo) */
2024-03-26 18:52:57 -04:00
copyTo ( destination : AllowSharedBufferSource ) : void ;
2023-07-03 18:36:35 -04:00
}
declare var EncodedVideoChunk : {
prototype : EncodedVideoChunk ;
new ( init : EncodedVideoChunkInit ) : EncodedVideoChunk ;
} ;
/ * *
* Events providing information related to errors in scripts or in files .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/ErrorEvent)
* /
2020-07-22 12:03:46 -04:00
interface ErrorEvent extends Event {
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/colno) */
2020-07-22 12:03:46 -04:00
readonly colno : number ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/error) */
2020-07-22 12:03:46 -04:00
readonly error : any ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/filename) */
2020-07-22 12:03:46 -04:00
readonly filename : string ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/lineno) */
2020-07-22 12:03:46 -04:00
readonly lineno : number ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/message) */
2020-07-22 12:03:46 -04:00
readonly message : string ;
}
declare var ErrorEvent : {
prototype : ErrorEvent ;
new ( type : string , eventInitDict? : ErrorEventInit ) : ErrorEvent ;
} ;
2023-07-03 18:36:35 -04:00
/ * *
* An event which takes place in the DOM .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/Event)
* /
2020-07-22 12:03:46 -04:00
interface Event {
2023-07-03 18:36:35 -04:00
/ * *
* 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 .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/Event/bubbles)
* /
2020-07-22 12:03:46 -04:00
readonly bubbles : boolean ;
2023-07-03 18:36:35 -04:00
/ * *
* @deprecated
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/Event/cancelBubble)
* /
2020-07-22 12:03:46 -04:00
cancelBubble : boolean ;
2023-07-03 18:36:35 -04:00
/ * *
* 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 .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/Event/cancelable)
* /
2020-07-22 12:03:46 -04:00
readonly cancelable : boolean ;
2023-07-03 18:36:35 -04:00
/ * *
* 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 .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/Event/composed)
* /
2020-07-22 12:03:46 -04:00
readonly composed : boolean ;
2023-07-03 18:36:35 -04:00
/ * *
* Returns the object whose event listener ' s callback is currently being invoked .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/Event/currentTarget)
* /
2020-07-22 12:03:46 -04:00
readonly currentTarget : EventTarget | null ;
2023-07-03 18:36:35 -04:00
/ * *
* Returns true if preventDefault ( ) was invoked successfully to indicate cancelation , and false otherwise .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/Event/defaultPrevented)
* /
2020-07-22 12:03:46 -04:00
readonly defaultPrevented : boolean ;
2023-07-03 18:36:35 -04:00
/ * *
* Returns the event ' s phase , which is one of NONE , CAPTURING_PHASE , AT_TARGET , and BUBBLING_PHASE .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/Event/eventPhase)
* /
2020-07-22 12:03:46 -04:00
readonly eventPhase : number ;
2023-07-03 18:36:35 -04:00
/ * *
* Returns true if event was dispatched by the user agent , and false otherwise .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/Event/isTrusted)
* /
2020-07-22 12:03:46 -04:00
readonly isTrusted : boolean ;
2023-07-03 18:36:35 -04:00
/ * *
* @deprecated
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/Event/returnValue)
* /
2020-07-22 12:03:46 -04:00
returnValue : boolean ;
2023-07-03 18:36:35 -04:00
/ * *
* @deprecated
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/Event/srcElement)
* /
2020-07-22 12:03:46 -04:00
readonly srcElement : EventTarget | null ;
2023-07-03 18:36:35 -04:00
/ * *
* Returns the object to which event is dispatched ( its target ) .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/Event/target)
* /
2020-07-22 12:03:46 -04:00
readonly target : EventTarget | null ;
2023-07-03 18:36:35 -04:00
/ * *
* Returns the event ' s timestamp as the number of milliseconds measured relative to the time origin .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/Event/timeStamp)
* /
2021-08-26 20:12:59 -04:00
readonly timeStamp : DOMHighResTimeStamp ;
2023-07-03 18:36:35 -04:00
/ * *
* Returns the type of event , e . g . "click" , "hashchange" , or "submit" .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/Event/type)
* /
2020-07-22 12:03:46 -04:00
readonly type : string ;
2023-07-03 18:36:35 -04:00
/ * *
* 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 .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/Event/composedPath)
* /
2020-07-22 12:03:46 -04:00
composedPath ( ) : EventTarget [ ] ;
2023-07-03 18:36:35 -04:00
/ * *
* @deprecated
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/Event/initEvent)
* /
2020-07-22 12:03:46 -04:00
initEvent ( type : string , bubbles? : boolean , cancelable? : boolean ) : void ;
2023-07-03 18:36:35 -04:00
/ * *
* 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 .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/Event/preventDefault)
* /
2020-07-22 12:03:46 -04:00
preventDefault ( ) : void ;
2023-07-03 18:36:35 -04:00
/ * *
* 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 .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/Event/stopImmediatePropagation)
* /
2020-07-22 12:03:46 -04:00
stopImmediatePropagation ( ) : void ;
2023-07-03 18:36:35 -04:00
/ * *
* When dispatched in a tree , invoking this method prevents event from reaching any objects other than the current object .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/Event/stopPropagation)
* /
2020-07-22 12:03:46 -04:00
stopPropagation ( ) : void ;
2023-03-21 11:46:40 -04:00
readonly NONE : 0 ;
readonly CAPTURING_PHASE : 1 ;
readonly AT_TARGET : 2 ;
readonly BUBBLING_PHASE : 3 ;
2020-07-22 12:03:46 -04:00
}
declare var Event : {
prototype : Event ;
new ( type : string , eventInitDict? : EventInit ) : Event ;
2023-03-21 11:46:40 -04:00
readonly NONE : 0 ;
readonly CAPTURING_PHASE : 1 ;
readonly AT_TARGET : 2 ;
readonly BUBBLING_PHASE : 3 ;
2020-07-22 12:03:46 -04:00
} ;
2021-08-26 20:12:59 -04:00
interface EventListener {
( evt : Event ) : void ;
}
2020-07-22 12:03:46 -04:00
interface EventListenerObject {
2021-08-26 20:12:59 -04:00
handleEvent ( object : Event ) : void ;
2020-07-22 12:03:46 -04:00
}
interface EventSourceEventMap {
"error" : Event ;
"message" : MessageEvent ;
"open" : Event ;
}
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource) */
2020-07-22 12:03:46 -04:00
interface EventSource extends EventTarget {
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/error_event) */
2020-07-22 12:03:46 -04:00
onerror : ( ( this : EventSource , ev : Event ) = > any ) | null ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/message_event) */
2020-07-22 12:03:46 -04:00
onmessage : ( ( this : EventSource , ev : MessageEvent ) = > any ) | null ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/open_event) */
2020-07-22 12:03:46 -04:00
onopen : ( ( this : EventSource , ev : Event ) = > any ) | null ;
2023-07-03 18:36:35 -04:00
/ * *
* Returns the state of this EventSource object ' s connection . It can have the values described below .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/EventSource/readyState)
* /
2020-07-22 12:03:46 -04:00
readonly readyState : number ;
2023-07-03 18:36:35 -04:00
/ * *
* Returns the URL providing the event stream .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/EventSource/url)
* /
2020-07-22 12:03:46 -04:00
readonly url : string ;
2023-07-03 18:36:35 -04:00
/ * *
* Returns true if the credentials mode for connection requests to the URL providing the event stream is set to "include" , and false otherwise .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/EventSource/withCredentials)
* /
2020-07-22 12:03:46 -04:00
readonly withCredentials : boolean ;
2023-07-03 18:36:35 -04:00
/ * *
* Aborts any instances of the fetch algorithm started for this EventSource object , and sets the readyState attribute to CLOSED .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/EventSource/close)
* /
2020-07-22 12:03:46 -04:00
close ( ) : void ;
2023-03-21 11:46:40 -04:00
readonly CONNECTING : 0 ;
readonly OPEN : 1 ;
readonly CLOSED : 2 ;
2020-07-22 12:03:46 -04:00
addEventListener < K extends keyof EventSourceEventMap > ( type : K , listener : ( this : EventSource , ev : EventSourceEventMap [ K ] ) = > any , options? : boolean | AddEventListenerOptions ) : void ;
2022-03-01 15:44:43 -05:00
addEventListener ( type : string , listener : ( this : EventSource , event : MessageEvent ) = > any , options? : boolean | AddEventListenerOptions ) : void ;
2020-07-22 12:03:46 -04:00
addEventListener ( type : string , listener : EventListenerOrEventListenerObject , options? : boolean | AddEventListenerOptions ) : void ;
removeEventListener < K extends keyof EventSourceEventMap > ( type : K , listener : ( this : EventSource , ev : EventSourceEventMap [ K ] ) = > any , options? : boolean | EventListenerOptions ) : void ;
2022-03-01 15:44:43 -05:00
removeEventListener ( type : string , listener : ( this : EventSource , event : MessageEvent ) = > any , options? : boolean | EventListenerOptions ) : void ;
2020-07-22 12:03:46 -04:00
removeEventListener ( type : string , listener : EventListenerOrEventListenerObject , options? : boolean | EventListenerOptions ) : void ;
}
declare var EventSource : {
prototype : EventSource ;
2021-08-26 20:12:59 -04:00
new ( url : string | URL , eventSourceInitDict? : EventSourceInit ) : EventSource ;
2023-03-21 11:46:40 -04:00
readonly CONNECTING : 0 ;
readonly OPEN : 1 ;
readonly CLOSED : 2 ;
2020-07-22 12:03:46 -04:00
} ;
2023-07-03 18:36:35 -04:00
/ * *
* EventTarget is a DOM interface implemented by objects that can receive events and may have listeners for them .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/EventTarget)
* /
2020-07-22 12:03:46 -04:00
interface EventTarget {
/ * *
* 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 .
2021-05-27 19:33:11 -04:00
*
2020-07-22 12:03:46 -04:00
* 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 .
2021-05-27 19:33:11 -04:00
*
2020-07-22 12:03:46 -04:00
* 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 .
2021-05-27 19:33:11 -04:00
*
2020-07-22 12:03:46 -04:00
* 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 .
2021-05-27 19:33:11 -04:00
*
2020-07-22 12:03:46 -04:00
* When set to true , options ' s once indicates that the callback will only be invoked once after which the event listener will be removed .
2021-05-27 19:33:11 -04:00
*
2021-08-26 20:12:59 -04:00
* If an AbortSignal is passed for options ' s signal , then the event listener will be removed when signal is aborted .
*
2020-07-22 12:03:46 -04:00
* The event listener is appended to target ' s event listener list and is not appended if it has the same type , callback , and capture .
2023-07-03 18:36:35 -04:00
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/EventTarget/addEventListener)
2020-07-22 12:03:46 -04:00
* /
2021-08-26 20:12:59 -04:00
addEventListener ( type : string , callback : EventListenerOrEventListenerObject | null , options? : AddEventListenerOptions | boolean ) : void ;
2023-07-03 18:36:35 -04:00
/ * *
2023-12-06 18:49:34 -05:00
* 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 .
2023-07-03 18:36:35 -04:00
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/EventTarget/dispatchEvent)
* /
2020-07-22 12:03:46 -04:00
dispatchEvent ( event : Event ) : boolean ;
2023-07-03 18:36:35 -04:00
/ * *
* Removes the event listener in target ' s event listener list with the same type , callback , and options .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/EventTarget/removeEventListener)
* /
2020-07-22 12:03:46 -04:00
removeEventListener ( type : string , callback : EventListenerOrEventListenerObject | null , options? : EventListenerOptions | boolean ) : void ;
}
declare var EventTarget : {
prototype : EventTarget ;
new ( ) : EventTarget ;
} ;
2023-07-03 18:36:35 -04:00
/ * *
* 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 .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/ExtendableEvent)
* /
2020-07-22 12:03:46 -04:00
interface ExtendableEvent extends Event {
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ExtendableEvent/waitUntil) */
2022-09-19 17:00:01 -04:00
waitUntil ( f : Promise < any > ) : void ;
2020-07-22 12:03:46 -04:00
}
declare var ExtendableEvent : {
prototype : ExtendableEvent ;
new ( type : string , eventInitDict? : ExtendableEventInit ) : ExtendableEvent ;
} ;
2023-07-03 18:36:35 -04:00
/ * *
* 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 .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/ExtendableMessageEvent)
* /
2020-07-22 12:03:46 -04:00
interface ExtendableMessageEvent extends ExtendableEvent {
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ExtendableMessageEvent/data) */
2020-07-22 12:03:46 -04:00
readonly data : any ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ExtendableMessageEvent/lastEventId) */
2020-07-22 12:03:46 -04:00
readonly lastEventId : string ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ExtendableMessageEvent/origin) */
2020-07-22 12:03:46 -04:00
readonly origin : string ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ExtendableMessageEvent/ports) */
2020-07-22 12:03:46 -04:00
readonly ports : ReadonlyArray < MessagePort > ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ExtendableMessageEvent/source) */
2020-07-22 12:03:46 -04:00
readonly source : Client | ServiceWorker | MessagePort | null ;
}
declare var ExtendableMessageEvent : {
prototype : ExtendableMessageEvent ;
new ( type : string , eventInitDict? : ExtendableMessageEventInit ) : ExtendableMessageEvent ;
} ;
2023-07-03 18:36:35 -04:00
/ * *
* 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 .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/FetchEvent)
* /
2020-07-22 12:03:46 -04:00
interface FetchEvent extends ExtendableEvent {
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FetchEvent/clientId) */
2020-07-22 12:03:46 -04:00
readonly clientId : string ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FetchEvent/handled) */
2021-08-26 20:12:59 -04:00
readonly handled : Promise < undefined > ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FetchEvent/preloadResponse) */
2022-05-31 20:19:18 -04:00
readonly preloadResponse : Promise < any > ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FetchEvent/request) */
2020-07-22 12:03:46 -04:00
readonly request : Request ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FetchEvent/resultingClientId) */
2020-07-22 12:03:46 -04:00
readonly resultingClientId : string ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FetchEvent/respondWith) */
2021-08-26 20:12:59 -04:00
respondWith ( r : Response | PromiseLike < Response > ) : void ;
2020-07-22 12:03:46 -04:00
}
declare var FetchEvent : {
prototype : FetchEvent ;
new ( type : string , eventInitDict : FetchEventInit ) : FetchEvent ;
} ;
2023-07-03 18:36:35 -04:00
/ * *
* Provides information about files and allows JavaScript in a web page to access their content .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/File)
* /
2020-07-22 12:03:46 -04:00
interface File extends Blob {
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/File/lastModified) */
2020-07-22 12:03:46 -04:00
readonly lastModified : number ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/File/name) */
2020-07-22 12:03:46 -04:00
readonly name : string ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/File/webkitRelativePath) */
2021-08-26 20:12:59 -04:00
readonly webkitRelativePath : string ;
2020-07-22 12:03:46 -04:00
}
declare var File : {
prototype : File ;
new ( fileBits : BlobPart [ ] , fileName : string , options? : FilePropertyBag ) : File ;
} ;
2023-07-03 18:36:35 -04:00
/ * *
* 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 .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/FileList)
* /
2020-07-22 12:03:46 -04:00
interface FileList {
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileList/length) */
2020-07-22 12:03:46 -04:00
readonly length : number ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileList/item) */
2020-07-22 12:03:46 -04:00
item ( index : number ) : File | null ;
[ index : number ] : File ;
}
declare var FileList : {
prototype : FileList ;
new ( ) : FileList ;
} ;
interface FileReaderEventMap {
"abort" : ProgressEvent < FileReader > ;
"error" : ProgressEvent < FileReader > ;
"load" : ProgressEvent < FileReader > ;
"loadend" : ProgressEvent < FileReader > ;
"loadstart" : ProgressEvent < FileReader > ;
"progress" : ProgressEvent < FileReader > ;
}
2023-07-03 18:36:35 -04:00
/ * *
* 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 .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/FileReader)
* /
2020-07-22 12:03:46 -04:00
interface FileReader extends EventTarget {
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileReader/error) */
2020-07-22 12:03:46 -04:00
readonly error : DOMException | null ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileReader/abort_event) */
2020-07-22 12:03:46 -04:00
onabort : ( ( this : FileReader , ev : ProgressEvent < FileReader > ) = > any ) | null ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileReader/error_event) */
2020-07-22 12:03:46 -04:00
onerror : ( ( this : FileReader , ev : ProgressEvent < FileReader > ) = > any ) | null ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileReader/load_event) */
2020-07-22 12:03:46 -04:00
onload : ( ( this : FileReader , ev : ProgressEvent < FileReader > ) = > any ) | null ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileReader/loadend_event) */
2020-07-22 12:03:46 -04:00
onloadend : ( ( this : FileReader , ev : ProgressEvent < FileReader > ) = > any ) | null ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileReader/loadstart_event) */
2020-07-22 12:03:46 -04:00
onloadstart : ( ( this : FileReader , ev : ProgressEvent < FileReader > ) = > any ) | null ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileReader/progress_event) */
2020-07-22 12:03:46 -04:00
onprogress : ( ( this : FileReader , ev : ProgressEvent < FileReader > ) = > any ) | null ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileReader/readyState) */
2023-03-21 11:46:40 -04:00
readonly readyState : typeof FileReader . EMPTY | typeof FileReader . LOADING | typeof FileReader . DONE ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileReader/result) */
2020-07-22 12:03:46 -04:00
readonly result : string | ArrayBuffer | null ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileReader/abort) */
2020-07-22 12:03:46 -04:00
abort ( ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileReader/readAsArrayBuffer) */
2020-07-22 12:03:46 -04:00
readAsArrayBuffer ( blob : Blob ) : void ;
2024-03-26 18:52:57 -04:00
/ * *
* @deprecated
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/FileReader/readAsBinaryString)
* /
2020-07-22 12:03:46 -04:00
readAsBinaryString ( blob : Blob ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileReader/readAsDataURL) */
2020-07-22 12:03:46 -04:00
readAsDataURL ( blob : Blob ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileReader/readAsText) */
2020-07-22 12:03:46 -04:00
readAsText ( blob : Blob , encoding? : string ) : void ;
2023-03-21 11:46:40 -04:00
readonly EMPTY : 0 ;
readonly LOADING : 1 ;
readonly DONE : 2 ;
2020-07-22 12:03:46 -04:00
addEventListener < K extends keyof FileReaderEventMap > ( type : K , listener : ( this : FileReader , ev : FileReaderEventMap [ K ] ) = > any , options? : boolean | AddEventListenerOptions ) : void ;
addEventListener ( type : string , listener : EventListenerOrEventListenerObject , options? : boolean | AddEventListenerOptions ) : void ;
removeEventListener < K extends keyof FileReaderEventMap > ( type : K , listener : ( this : FileReader , ev : FileReaderEventMap [ K ] ) = > any , options? : boolean | EventListenerOptions ) : void ;
removeEventListener ( type : string , listener : EventListenerOrEventListenerObject , options? : boolean | EventListenerOptions ) : void ;
}
declare var FileReader : {
prototype : FileReader ;
new ( ) : FileReader ;
2023-03-21 11:46:40 -04:00
readonly EMPTY : 0 ;
readonly LOADING : 1 ;
readonly DONE : 2 ;
2020-07-22 12:03:46 -04:00
} ;
2023-07-03 18:36:35 -04:00
/ * *
* Allows to read File or Blob objects in a synchronous way .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/FileReaderSync)
* /
2020-07-22 12:03:46 -04:00
interface FileReaderSync {
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileReaderSync/readAsArrayBuffer) */
2020-07-22 12:03:46 -04:00
readAsArrayBuffer ( blob : Blob ) : ArrayBuffer ;
2023-07-03 18:36:35 -04:00
/ * *
* @deprecated
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/FileReaderSync/readAsBinaryString)
* /
2020-07-22 12:03:46 -04:00
readAsBinaryString ( blob : Blob ) : string ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileReaderSync/readAsDataURL) */
2020-07-22 12:03:46 -04:00
readAsDataURL ( blob : Blob ) : string ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileReaderSync/readAsText) */
2020-07-22 12:03:46 -04:00
readAsText ( blob : Blob , encoding? : string ) : string ;
}
declare var FileReaderSync : {
prototype : FileReaderSync ;
new ( ) : FileReaderSync ;
} ;
2023-07-03 18:36:35 -04:00
/ * *
* Available only in secure contexts .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/FileSystemDirectoryHandle)
* /
2022-03-01 15:44:43 -05:00
interface FileSystemDirectoryHandle extends FileSystemHandle {
readonly kind : "directory" ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileSystemDirectoryHandle/getDirectoryHandle) */
2022-03-01 15:44:43 -05:00
getDirectoryHandle ( name : string , options? : FileSystemGetDirectoryOptions ) : Promise < FileSystemDirectoryHandle > ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileSystemDirectoryHandle/getFileHandle) */
2022-03-01 15:44:43 -05:00
getFileHandle ( name : string , options? : FileSystemGetFileOptions ) : Promise < FileSystemFileHandle > ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileSystemDirectoryHandle/removeEntry) */
2022-03-01 15:44:43 -05:00
removeEntry ( name : string , options? : FileSystemRemoveOptions ) : Promise < void > ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileSystemDirectoryHandle/resolve) */
2022-03-01 15:44:43 -05:00
resolve ( possibleDescendant : FileSystemHandle ) : Promise < string [ ] | null > ;
}
declare var FileSystemDirectoryHandle : {
prototype : FileSystemDirectoryHandle ;
new ( ) : FileSystemDirectoryHandle ;
} ;
2023-07-03 18:36:35 -04:00
/ * *
* Available only in secure contexts .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/FileSystemFileHandle)
* /
2022-03-01 15:44:43 -05:00
interface FileSystemFileHandle extends FileSystemHandle {
readonly kind : "file" ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileSystemFileHandle/createSyncAccessHandle) */
2023-03-21 11:46:40 -04:00
createSyncAccessHandle ( ) : Promise < FileSystemSyncAccessHandle > ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileSystemFileHandle/createWritable) */
createWritable ( options? : FileSystemCreateWritableOptions ) : Promise < FileSystemWritableFileStream > ;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileSystemFileHandle/getFile) */
2022-03-01 15:44:43 -05:00
getFile ( ) : Promise < File > ;
}
declare var FileSystemFileHandle : {
prototype : FileSystemFileHandle ;
new ( ) : FileSystemFileHandle ;
} ;
2023-07-03 18:36:35 -04:00
/ * *
* Available only in secure contexts .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/FileSystemHandle)
* /
2022-03-01 15:44:43 -05:00
interface FileSystemHandle {
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileSystemHandle/kind) */
2022-03-01 15:44:43 -05:00
readonly kind : FileSystemHandleKind ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileSystemHandle/name) */
2022-03-01 15:44:43 -05:00
readonly name : string ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileSystemHandle/isSameEntry) */
2022-03-01 15:44:43 -05:00
isSameEntry ( other : FileSystemHandle ) : Promise < boolean > ;
}
declare var FileSystemHandle : {
prototype : FileSystemHandle ;
new ( ) : FileSystemHandle ;
} ;
2023-07-03 18:36:35 -04:00
/ * *
* Available only in secure contexts .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/FileSystemSyncAccessHandle)
* /
2023-03-21 11:46:40 -04:00
interface FileSystemSyncAccessHandle {
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileSystemSyncAccessHandle/close) */
2023-03-21 11:46:40 -04:00
close ( ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileSystemSyncAccessHandle/flush) */
2023-03-21 11:46:40 -04:00
flush ( ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileSystemSyncAccessHandle/getSize) */
2023-03-21 11:46:40 -04:00
getSize ( ) : number ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileSystemSyncAccessHandle/read) */
2023-09-09 15:03:21 -04:00
read ( buffer : AllowSharedBufferSource , options? : FileSystemReadWriteOptions ) : number ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileSystemSyncAccessHandle/truncate) */
2023-03-21 11:46:40 -04:00
truncate ( newSize : number ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileSystemSyncAccessHandle/write) */
2023-09-09 15:03:21 -04:00
write ( buffer : AllowSharedBufferSource , options? : FileSystemReadWriteOptions ) : number ;
2023-03-21 11:46:40 -04:00
}
declare var FileSystemSyncAccessHandle : {
prototype : FileSystemSyncAccessHandle ;
new ( ) : FileSystemSyncAccessHandle ;
} ;
2023-07-03 18:36:35 -04:00
/ * *
* Available only in secure contexts .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/FileSystemWritableFileStream)
* /
interface FileSystemWritableFileStream extends WritableStream {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileSystemWritableFileStream/seek) */
seek ( position : number ) : Promise < void > ;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileSystemWritableFileStream/truncate) */
truncate ( size : number ) : Promise < void > ;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FileSystemWritableFileStream/write) */
write ( data : FileSystemWriteChunkType ) : Promise < void > ;
}
declare var FileSystemWritableFileStream : {
prototype : FileSystemWritableFileStream ;
new ( ) : FileSystemWritableFileStream ;
} ;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFace) */
2021-08-26 20:12:59 -04:00
interface FontFace {
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFace/ascentOverride) */
2021-08-26 20:12:59 -04:00
ascentOverride : string ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFace/descentOverride) */
2021-08-26 20:12:59 -04:00
descentOverride : string ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFace/display) */
2023-03-21 11:46:40 -04:00
display : FontDisplay ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFace/family) */
2021-08-26 20:12:59 -04:00
family : string ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFace/featureSettings) */
2021-08-26 20:12:59 -04:00
featureSettings : string ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFace/lineGapOverride) */
2021-08-26 20:12:59 -04:00
lineGapOverride : string ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFace/loaded) */
2021-08-26 20:12:59 -04:00
readonly loaded : Promise < FontFace > ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFace/status) */
2021-08-26 20:12:59 -04:00
readonly status : FontFaceLoadStatus ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFace/stretch) */
2021-08-26 20:12:59 -04:00
stretch : string ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFace/style) */
2021-08-26 20:12:59 -04:00
style : string ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFace/unicodeRange) */
2021-08-26 20:12:59 -04:00
unicodeRange : string ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFace/weight) */
2021-08-26 20:12:59 -04:00
weight : string ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFace/load) */
2021-08-26 20:12:59 -04:00
load ( ) : Promise < FontFace > ;
}
declare var FontFace : {
prototype : FontFace ;
new ( family : string , source : string | BinaryData , descriptors? : FontFaceDescriptors ) : FontFace ;
} ;
interface FontFaceSetEventMap {
"loading" : Event ;
"loadingdone" : Event ;
"loadingerror" : Event ;
}
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFaceSet) */
2021-08-26 20:12:59 -04:00
interface FontFaceSet extends EventTarget {
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFaceSet/loading_event) */
2021-08-26 20:12:59 -04:00
onloading : ( ( this : FontFaceSet , ev : Event ) = > any ) | null ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFaceSet/loadingdone_event) */
2021-08-26 20:12:59 -04:00
onloadingdone : ( ( this : FontFaceSet , ev : Event ) = > any ) | null ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFaceSet/loadingerror_event) */
2021-08-26 20:12:59 -04:00
onloadingerror : ( ( this : FontFaceSet , ev : Event ) = > any ) | null ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFaceSet/ready) */
2021-08-26 20:12:59 -04:00
readonly ready : Promise < FontFaceSet > ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFaceSet/status) */
2021-08-26 20:12:59 -04:00
readonly status : FontFaceSetLoadStatus ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFaceSet/check) */
2021-08-26 20:12:59 -04:00
check ( font : string , text? : string ) : boolean ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFaceSet/load) */
2021-08-26 20:12:59 -04:00
load ( font : string , text? : string ) : Promise < FontFace [ ] > ;
forEach ( callbackfn : ( value : FontFace , key : FontFace , parent : FontFaceSet ) = > void , thisArg? : any ) : void ;
addEventListener < K extends keyof FontFaceSetEventMap > ( type : K , listener : ( this : FontFaceSet , ev : FontFaceSetEventMap [ K ] ) = > any , options? : boolean | AddEventListenerOptions ) : void ;
addEventListener ( type : string , listener : EventListenerOrEventListenerObject , options? : boolean | AddEventListenerOptions ) : void ;
removeEventListener < K extends keyof FontFaceSetEventMap > ( type : K , listener : ( this : FontFaceSet , ev : FontFaceSetEventMap [ K ] ) = > any , options? : boolean | EventListenerOptions ) : void ;
removeEventListener ( type : string , listener : EventListenerOrEventListenerObject , options? : boolean | EventListenerOptions ) : void ;
}
declare var FontFaceSet : {
prototype : FontFaceSet ;
new ( initialFaces : FontFace [ ] ) : FontFaceSet ;
} ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFaceSetLoadEvent) */
2021-08-26 20:12:59 -04:00
interface FontFaceSetLoadEvent extends Event {
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFaceSetLoadEvent/fontfaces) */
2021-08-26 20:12:59 -04:00
readonly fontfaces : ReadonlyArray < FontFace > ;
}
declare var FontFaceSetLoadEvent : {
prototype : FontFaceSetLoadEvent ;
new ( type : string , eventInitDict? : FontFaceSetLoadEventInit ) : FontFaceSetLoadEvent ;
} ;
interface FontFaceSource {
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Document/fonts) */
2021-08-26 20:12:59 -04:00
readonly fonts : FontFaceSet ;
}
2023-07-03 18:36:35 -04:00
/ * *
* 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" .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/FormData)
* /
2020-07-22 12:03:46 -04:00
interface FormData {
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/append) */
append ( name : string , value : string | Blob ) : void ;
append ( name : string , value : string ) : void ;
append ( name : string , blobValue : Blob , filename? : string ) : void ;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/delete) */
2020-07-22 12:03:46 -04:00
delete ( name : string ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/get) */
2020-07-22 12:03:46 -04:00
get ( name : string ) : FormDataEntryValue | null ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/getAll) */
2020-07-22 12:03:46 -04:00
getAll ( name : string ) : FormDataEntryValue [ ] ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/has) */
2020-07-22 12:03:46 -04:00
has ( name : string ) : boolean ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/set) */
set ( name : string , value : string | Blob ) : void ;
set ( name : string , value : string ) : void ;
set ( name : string , blobValue : Blob , filename? : string ) : void ;
2020-07-22 12:03:46 -04:00
forEach ( callbackfn : ( value : FormDataEntryValue , key : string , parent : FormData ) = > void , thisArg? : any ) : void ;
}
declare var FormData : {
prototype : FormData ;
new ( ) : FormData ;
} ;
interface GenericTransformStream {
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CompressionStream/readable) */
2020-07-22 12:03:46 -04:00
readonly readable : ReadableStream ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CompressionStream/writable) */
2020-07-22 12:03:46 -04:00
readonly writable : WritableStream ;
}
2023-07-03 18:36:35 -04:00
/ * *
* 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 .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/Headers)
* /
2020-07-22 12:03:46 -04:00
interface Headers {
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/append) */
2020-07-22 12:03:46 -04:00
append ( name : string , value : string ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/delete) */
2020-07-22 12:03:46 -04:00
delete ( name : string ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/get) */
2020-07-22 12:03:46 -04:00
get ( name : string ) : string | null ;
2023-09-09 15:03:21 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/getSetCookie) */
getSetCookie ( ) : string [ ] ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/has) */
2020-07-22 12:03:46 -04:00
has ( name : string ) : boolean ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/set) */
2020-07-22 12:03:46 -04:00
set ( name : string , value : string ) : void ;
forEach ( callbackfn : ( value : string , key : string , parent : Headers ) = > void , thisArg? : any ) : void ;
}
declare var Headers : {
prototype : Headers ;
new ( init? : HeadersInit ) : Headers ;
} ;
2023-07-03 18:36:35 -04:00
/ * *
* This IndexedDB API interface represents a cursor for traversing or iterating over multiple records in a database .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/IDBCursor)
* /
2020-07-22 12:03:46 -04:00
interface IDBCursor {
2023-07-03 18:36:35 -04:00
/ * *
* Returns the direction ( "next" , "nextunique" , "prev" or "prevunique" ) of the cursor .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/IDBCursor/direction)
* /
2020-07-22 12:03:46 -04:00
readonly direction : IDBCursorDirection ;
2023-07-03 18:36:35 -04:00
/ * *
* Returns the key of the cursor . Throws a "InvalidStateError" DOMException if the cursor is advancing or is finished .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/IDBCursor/key)
* /
2020-07-22 12:03:46 -04:00
readonly key : IDBValidKey ;
2023-07-03 18:36:35 -04:00
/ * *
* Returns the effective key of the cursor . Throws a "InvalidStateError" DOMException if the cursor is advancing or is finished .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/IDBCursor/primaryKey)
* /
2020-07-22 12:03:46 -04:00
readonly primaryKey : IDBValidKey ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBCursor/request) */
2021-08-26 20:12:59 -04:00
readonly request : IDBRequest ;
2023-07-03 18:36:35 -04:00
/ * *
* Returns the IDBObjectStore or IDBIndex the cursor was opened from .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/IDBCursor/source)
* /
2020-07-22 12:03:46 -04:00
readonly source : IDBObjectStore | IDBIndex ;
2023-07-03 18:36:35 -04:00
/ * *
* Advances the cursor through the next count records in range .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/IDBCursor/advance)
* /
2020-07-22 12:03:46 -04:00
advance ( count : number ) : void ;
2023-07-03 18:36:35 -04:00
/ * *
* Advances the cursor to the next record in range .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/IDBCursor/continue)
* /
2020-07-22 12:03:46 -04:00
continue ( key? : IDBValidKey ) : void ;
2023-07-03 18:36:35 -04:00
/ * *
* 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 .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/IDBCursor/continuePrimaryKey)
* /
2020-07-22 12:03:46 -04:00
continuePrimaryKey ( key : IDBValidKey , primaryKey : IDBValidKey ) : void ;
/ * *
* Delete the record pointed at by the cursor with a new value .
2021-05-27 19:33:11 -04:00
*
2020-07-22 12:03:46 -04:00
* If successful , request ' s result will be undefined .
2023-07-03 18:36:35 -04:00
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/IDBCursor/delete)
2020-07-22 12:03:46 -04:00
* /
delete ( ) : IDBRequest < undefined > ;
/ * *
* Updated the record pointed at by the cursor with a new value .
2021-05-27 19:33:11 -04:00
*
2020-07-22 12:03:46 -04:00
* Throws a "DataError" DOMException if the effective object store uses in - line keys and the key would have changed .
2021-05-27 19:33:11 -04:00
*
2020-07-22 12:03:46 -04:00
* If successful , request 's result will be the record' s key .
2023-07-03 18:36:35 -04:00
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/IDBCursor/update)
2020-07-22 12:03:46 -04:00
* /
update ( value : any ) : IDBRequest < IDBValidKey > ;
}
declare var IDBCursor : {
prototype : IDBCursor ;
new ( ) : IDBCursor ;
} ;
2023-07-03 18:36:35 -04:00
/ * *
* 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 .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/IDBCursorWithValue)
* /
2020-07-22 12:03:46 -04:00
interface IDBCursorWithValue extends IDBCursor {
2023-07-03 18:36:35 -04:00
/ * *
* Returns the cursor ' s current value .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/IDBCursorWithValue/value)
* /
2020-07-22 12:03:46 -04:00
readonly value : any ;
}
declare var IDBCursorWithValue : {
prototype : IDBCursorWithValue ;
new ( ) : IDBCursorWithValue ;
} ;
interface IDBDatabaseEventMap {
"abort" : Event ;
"close" : Event ;
"error" : Event ;
"versionchange" : IDBVersionChangeEvent ;
}
2023-07-03 18:36:35 -04:00
/ * *
* 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 .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/IDBDatabase)
* /
2020-07-22 12:03:46 -04:00
interface IDBDatabase extends EventTarget {
2023-07-03 18:36:35 -04:00
/ * *
* Returns the name of the database .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/IDBDatabase/name)
* /
2020-07-22 12:03:46 -04:00
readonly name : string ;
2023-07-03 18:36:35 -04:00
/ * *
* Returns a list of the names of object stores in the database .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/IDBDatabase/objectStoreNames)
* /
2020-07-22 12:03:46 -04:00
readonly objectStoreNames : DOMStringList ;
onabort : ( ( this : IDBDatabase , ev : Event ) = > any ) | null ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBDatabase/close_event) */
2020-07-22 12:03:46 -04:00
onclose : ( ( this : IDBDatabase , ev : Event ) = > any ) | null ;
onerror : ( ( this : IDBDatabase , ev : Event ) = > any ) | null ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBDatabase/versionchange_event) */
2020-07-22 12:03:46 -04:00
onversionchange : ( ( this : IDBDatabase , ev : IDBVersionChangeEvent ) = > any ) | null ;
2023-07-03 18:36:35 -04:00
/ * *
* Returns the version of the database .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/IDBDatabase/version)
* /
2020-07-22 12:03:46 -04:00
readonly version : number ;
2023-07-03 18:36:35 -04:00
/ * *
* Closes the connection once all running transactions have finished .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/IDBDatabase/close)
* /
2020-07-22 12:03:46 -04:00
close ( ) : void ;
/ * *
* Creates a new object store with the given name and options and returns a new IDBObjectStore .
2021-05-27 19:33:11 -04:00
*
2020-07-22 12:03:46 -04:00
* Throws a "InvalidStateError" DOMException if not called within an upgrade transaction .
2023-07-03 18:36:35 -04:00
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/IDBDatabase/createObjectStore)
2020-07-22 12:03:46 -04:00
* /
2020-11-23 17:31:10 -05:00
createObjectStore ( name : string , options? : IDBObjectStoreParameters ) : IDBObjectStore ;
2020-07-22 12:03:46 -04:00
/ * *
* Deletes the object store with the given name .
2021-05-27 19:33:11 -04:00
*
2020-07-22 12:03:46 -04:00
* Throws a "InvalidStateError" DOMException if not called within an upgrade transaction .
2023-07-03 18:36:35 -04:00
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/IDBDatabase/deleteObjectStore)
2020-07-22 12:03:46 -04:00
* /
deleteObjectStore ( name : string ) : void ;
2023-07-03 18:36:35 -04:00
/ * *
* 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 .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/IDBDatabase/transaction)
* /
2022-09-19 17:00:01 -04:00
transaction ( storeNames : string | string [ ] , mode? : IDBTransactionMode , options? : IDBTransactionOptions ) : IDBTransaction ;
2020-07-22 12:03:46 -04:00
addEventListener < K extends keyof IDBDatabaseEventMap > ( type : K , listener : ( this : IDBDatabase , ev : IDBDatabaseEventMap [ K ] ) = > any , options? : boolean | AddEventListenerOptions ) : void ;
addEventListener ( type : string , listener : EventListenerOrEventListenerObject , options? : boolean | AddEventListenerOptions ) : void ;
removeEventListener < K extends keyof IDBDatabaseEventMap > ( type : K , listener : ( this : IDBDatabase , ev : IDBDatabaseEventMap [ K ] ) = > any , options? : boolean | EventListenerOptions ) : void ;
removeEventListener ( type : string , listener : EventListenerOrEventListenerObject , options? : boolean | EventListenerOptions ) : void ;
}
declare var IDBDatabase : {
prototype : IDBDatabase ;
new ( ) : IDBDatabase ;
} ;
2023-07-03 18:36:35 -04:00
/ * *
* 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 . )
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/IDBFactory)
* /
2020-07-22 12:03:46 -04:00
interface IDBFactory {
/ * *
* Compares two values as keys . Returns - 1 if key1 precedes key2 , 1 if key2 precedes key1 , and 0 if the keys are equal .
2021-05-27 19:33:11 -04:00
*
2020-07-22 12:03:46 -04:00
* Throws a "DataError" DOMException if either input is not a valid key .
2023-07-03 18:36:35 -04:00
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/IDBFactory/cmp)
2020-07-22 12:03:46 -04:00
* /
cmp ( first : any , second : any ) : number ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBFactory/databases) */
2021-08-26 20:12:59 -04:00
databases ( ) : Promise < IDBDatabaseInfo [ ] > ;
2023-07-03 18:36:35 -04:00
/ * *
* 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 .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/IDBFactory/deleteDatabase)
* /
2020-07-22 12:03:46 -04:00
deleteDatabase ( name : string ) : IDBOpenDBRequest ;
2023-07-03 18:36:35 -04:00
/ * *
* 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 .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/IDBFactory/open)
* /
2020-07-22 12:03:46 -04:00
open ( name : string , version? : number ) : IDBOpenDBRequest ;
}
declare var IDBFactory : {
prototype : IDBFactory ;
new ( ) : IDBFactory ;
} ;
2023-07-03 18:36:35 -04:00
/ * *
* 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 .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/IDBIndex)
* /
2020-07-22 12:03:46 -04:00
interface IDBIndex {
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBIndex/keyPath) */
2020-07-22 12:03:46 -04:00
readonly keyPath : string | string [ ] ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBIndex/multiEntry) */
2020-07-22 12:03:46 -04:00
readonly multiEntry : boolean ;
2023-07-03 18:36:35 -04:00
/ * *
* Returns the name of the index .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/IDBIndex/name)
* /
2020-07-22 12:03:46 -04:00
name : string ;
2023-07-03 18:36:35 -04:00
/ * *
* Returns the IDBObjectStore the index belongs to .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/IDBIndex/objectStore)
* /
2020-07-22 12:03:46 -04:00
readonly objectStore : IDBObjectStore ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBIndex/unique) */
2020-07-22 12:03:46 -04:00
readonly unique : boolean ;
/ * *
* Retrieves the number of records matching the given key or key range in query .
2021-05-27 19:33:11 -04:00
*
2020-07-22 12:03:46 -04:00
* If successful , request ' s result will be the count .
2023-07-03 18:36:35 -04:00
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/IDBIndex/count)
2020-07-22 12:03:46 -04:00
* /
2021-08-26 20:12:59 -04:00
count ( query? : IDBValidKey | IDBKeyRange ) : IDBRequest < number > ;
2020-07-22 12:03:46 -04:00
/ * *
* Retrieves the value of the first record matching the given key or key range in query .
2021-05-27 19:33:11 -04:00
*
2020-07-22 12:03:46 -04:00
* If successful , request ' s result will be the value , or undefined if there was no matching record .
2023-07-03 18:36:35 -04:00
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/IDBIndex/get)
2020-07-22 12:03:46 -04:00
* /
2021-08-26 20:12:59 -04:00
get ( query : IDBValidKey | IDBKeyRange ) : IDBRequest < any > ;
2020-07-22 12:03:46 -04:00
/ * *
* Retrieves the values of the records matching the given key or key range in query ( up to count if given ) .
2021-05-27 19:33:11 -04:00
*
2020-07-22 12:03:46 -04:00
* If successful , request ' s result will be an Array of the values .
2023-07-03 18:36:35 -04:00
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/IDBIndex/getAll)
2020-07-22 12:03:46 -04:00
* /
getAll ( query? : IDBValidKey | IDBKeyRange | null , count? : number ) : IDBRequest < any [ ] > ;
/ * *
* Retrieves the keys of records matching the given key or key range in query ( up to count if given ) .
2021-05-27 19:33:11 -04:00
*
2020-07-22 12:03:46 -04:00
* If successful , request ' s result will be an Array of the keys .
2023-07-03 18:36:35 -04:00
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/IDBIndex/getAllKeys)
2020-07-22 12:03:46 -04:00
* /
getAllKeys ( query? : IDBValidKey | IDBKeyRange | null , count? : number ) : IDBRequest < IDBValidKey [ ] > ;
/ * *
* Retrieves the key of the first record matching the given key or key range in query .
2021-05-27 19:33:11 -04:00
*
2020-07-22 12:03:46 -04:00
* If successful , request ' s result will be the key , or undefined if there was no matching record .
2023-07-03 18:36:35 -04:00
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/IDBIndex/getKey)
2020-07-22 12:03:46 -04:00
* /
2021-08-26 20:12:59 -04:00
getKey ( query : IDBValidKey | IDBKeyRange ) : IDBRequest < IDBValidKey | undefined > ;
2020-07-22 12:03:46 -04:00
/ * *
* Opens a cursor over the records matching query , ordered by direction . If query is null , all records in index are matched .
2021-05-27 19:33:11 -04:00
*
2020-07-22 12:03:46 -04:00
* If successful , request ' s result will be an IDBCursorWithValue , or null if there were no matching records .
2023-07-03 18:36:35 -04:00
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/IDBIndex/openCursor)
2020-07-22 12:03:46 -04:00
* /
openCursor ( query? : IDBValidKey | IDBKeyRange | null , direction? : IDBCursorDirection ) : IDBRequest < IDBCursorWithValue | null > ;
/ * *
* 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 .
2021-05-27 19:33:11 -04:00
*
2020-07-22 12:03:46 -04:00
* If successful , request ' s result will be an IDBCursor , or null if there were no matching records .
2023-07-03 18:36:35 -04:00
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/IDBIndex/openKeyCursor)
2020-07-22 12:03:46 -04:00
* /
openKeyCursor ( query? : IDBValidKey | IDBKeyRange | null , direction? : IDBCursorDirection ) : IDBRequest < IDBCursor | null > ;
}
declare var IDBIndex : {
prototype : IDBIndex ;
new ( ) : IDBIndex ;
} ;
2023-07-03 18:36:35 -04:00
/ * *
* 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 :
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/IDBKeyRange)
* /
2020-07-22 12:03:46 -04:00
interface IDBKeyRange {
2023-07-03 18:36:35 -04:00
/ * *
* Returns lower bound , or undefined if none .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/IDBKeyRange/lower)
* /
2020-07-22 12:03:46 -04:00
readonly lower : any ;
2023-07-03 18:36:35 -04:00
/ * *
* Returns true if the lower open flag is set , and false otherwise .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/IDBKeyRange/lowerOpen)
* /
2020-07-22 12:03:46 -04:00
readonly lowerOpen : boolean ;
2023-07-03 18:36:35 -04:00
/ * *
* Returns upper bound , or undefined if none .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/IDBKeyRange/upper)
* /
2020-07-22 12:03:46 -04:00
readonly upper : any ;
2023-07-03 18:36:35 -04:00
/ * *
* Returns true if the upper open flag is set , and false otherwise .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/IDBKeyRange/upperOpen)
* /
2020-07-22 12:03:46 -04:00
readonly upperOpen : boolean ;
2023-07-03 18:36:35 -04:00
/ * *
* Returns true if key is included in the range , and false otherwise .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/IDBKeyRange/includes)
* /
2020-07-22 12:03:46 -04:00
includes ( key : any ) : boolean ;
}
declare var IDBKeyRange : {
prototype : IDBKeyRange ;
new ( ) : IDBKeyRange ;
2023-07-03 18:36:35 -04:00
/ * *
* 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 .
*
2023-09-09 15:03:21 -04:00
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/IDBKeyRange/bound_static)
2023-07-03 18:36:35 -04:00
* /
2020-07-22 12:03:46 -04:00
bound ( lower : any , upper : any , lowerOpen? : boolean , upperOpen? : boolean ) : IDBKeyRange ;
2023-07-03 18:36:35 -04:00
/ * *
* Returns a new IDBKeyRange starting at key with no upper bound . If open is true , key is not included in the range .
*
2023-09-09 15:03:21 -04:00
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/IDBKeyRange/lowerBound_static)
2023-07-03 18:36:35 -04:00
* /
2020-07-22 12:03:46 -04:00
lowerBound ( lower : any , open? : boolean ) : IDBKeyRange ;
2023-07-03 18:36:35 -04:00
/ * *
* Returns a new IDBKeyRange spanning only key .
*
2023-09-09 15:03:21 -04:00
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/IDBKeyRange/only_static)
2023-07-03 18:36:35 -04:00
* /
2020-07-22 12:03:46 -04:00
only ( value : any ) : IDBKeyRange ;
2023-07-03 18:36:35 -04:00
/ * *
* Returns a new IDBKeyRange with no lower bound and ending at key . If open is true , key is not included in the range .
*
2023-09-09 15:03:21 -04:00
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/IDBKeyRange/upperBound_static)
2023-07-03 18:36:35 -04:00
* /
2020-07-22 12:03:46 -04:00
upperBound ( upper : any , open? : boolean ) : IDBKeyRange ;
} ;
2023-07-03 18:36:35 -04:00
/ * *
* 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 . )
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/IDBObjectStore)
* /
2020-07-22 12:03:46 -04:00
interface IDBObjectStore {
2023-07-03 18:36:35 -04:00
/ * *
* Returns true if the store has a key generator , and false otherwise .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/IDBObjectStore/autoIncrement)
* /
2020-07-22 12:03:46 -04:00
readonly autoIncrement : boolean ;
2023-07-03 18:36:35 -04:00
/ * *
* Returns a list of the names of indexes in the store .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/IDBObjectStore/indexNames)
* /
2020-07-22 12:03:46 -04:00
readonly indexNames : DOMStringList ;
2023-07-03 18:36:35 -04:00
/ * *
* Returns the key path of the store , or null if none .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/IDBObjectStore/keyPath)
* /
2020-07-22 12:03:46 -04:00
readonly keyPath : string | string [ ] ;
2023-07-03 18:36:35 -04:00
/ * *
* Returns the name of the store .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/IDBObjectStore/name)
* /
2020-07-22 12:03:46 -04:00
name : string ;
2023-07-03 18:36:35 -04:00
/ * *
* Returns the associated transaction .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/IDBObjectStore/transaction)
* /
2020-07-22 12:03:46 -04:00
readonly transaction : IDBTransaction ;
/ * *
* Adds or updates a record in store with the given value and key .
2021-05-27 19:33:11 -04:00
*
2020-07-22 12:03:46 -04:00
* If the store uses in - line keys and key is specified a "DataError" DOMException will be thrown .
2021-05-27 19:33:11 -04:00
*
2020-07-22 12:03:46 -04:00
* If put ( ) is used , any existing record with the key will be replaced . If add ( ) is used , and if a record with the key already exists the request will fail , with request ' s error set to a "ConstraintError" DOMException .
2021-05-27 19:33:11 -04:00
*
2020-07-22 12:03:46 -04:00
* If successful , request 's result will be the record' s key .
2023-07-03 18:36:35 -04:00
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/IDBObjectStore/add)
2020-07-22 12:03:46 -04:00
* /
add ( value : any , key? : IDBValidKey ) : IDBRequest < IDBValidKey > ;
/ * *
* Deletes all records in store .
2021-05-27 19:33:11 -04:00
*
2020-07-22 12:03:46 -04:00
* If successful , request ' s result will be undefined .
2023-07-03 18:36:35 -04:00
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/IDBObjectStore/clear)
2020-07-22 12:03:46 -04:00
* /
clear ( ) : IDBRequest < undefined > ;
/ * *
* Retrieves the number of records matching the given key or key range in query .
2021-05-27 19:33:11 -04:00
*
2020-07-22 12:03:46 -04:00
* If successful , request ' s result will be the count .
2023-07-03 18:36:35 -04:00
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/IDBObjectStore/count)
2020-07-22 12:03:46 -04:00
* /
2021-08-26 20:12:59 -04:00
count ( query? : IDBValidKey | IDBKeyRange ) : IDBRequest < number > ;
2020-07-22 12:03:46 -04:00
/ * *
* 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 .
2021-05-27 19:33:11 -04:00
*
2020-07-22 12:03:46 -04:00
* Throws an "InvalidStateError" DOMException if not called within an upgrade transaction .
2023-07-03 18:36:35 -04:00
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/IDBObjectStore/createIndex)
2020-07-22 12:03:46 -04:00
* /
createIndex ( name : string , keyPath : string | string [ ] , options? : IDBIndexParameters ) : IDBIndex ;
/ * *
* Deletes records in store with the given key or in the given key range in query .
2021-05-27 19:33:11 -04:00
*
2020-07-22 12:03:46 -04:00
* If successful , request ' s result will be undefined .
2023-07-03 18:36:35 -04:00
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/IDBObjectStore/delete)
2020-07-22 12:03:46 -04:00
* /
2021-08-26 20:12:59 -04:00
delete ( query : IDBValidKey | IDBKeyRange ) : IDBRequest < undefined > ;
2020-07-22 12:03:46 -04:00
/ * *
* Deletes the index in store with the given name .
2021-05-27 19:33:11 -04:00
*
2020-07-22 12:03:46 -04:00
* Throws an "InvalidStateError" DOMException if not called within an upgrade transaction .
2023-07-03 18:36:35 -04:00
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/IDBObjectStore/deleteIndex)
2020-07-22 12:03:46 -04:00
* /
deleteIndex ( name : string ) : void ;
/ * *
* Retrieves the value of the first record matching the given key or key range in query .
2021-05-27 19:33:11 -04:00
*
2020-07-22 12:03:46 -04:00
* If successful , request ' s result will be the value , or undefined if there was no matching record .
2023-07-03 18:36:35 -04:00
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/IDBObjectStore/get)
2020-07-22 12:03:46 -04:00
* /
2021-08-26 20:12:59 -04:00
get ( query : IDBValidKey | IDBKeyRange ) : IDBRequest < any > ;
2020-07-22 12:03:46 -04:00
/ * *
* Retrieves the values of the records matching the given key or key range in query ( up to count if given ) .
2021-05-27 19:33:11 -04:00
*
2020-07-22 12:03:46 -04:00
* If successful , request ' s result will be an Array of the values .
2023-07-03 18:36:35 -04:00
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/IDBObjectStore/getAll)
2020-07-22 12:03:46 -04:00
* /
getAll ( query? : IDBValidKey | IDBKeyRange | null , count? : number ) : IDBRequest < any [ ] > ;
/ * *
* Retrieves the keys of records matching the given key or key range in query ( up to count if given ) .
2021-05-27 19:33:11 -04:00
*
2020-07-22 12:03:46 -04:00
* If successful , request ' s result will be an Array of the keys .
2023-07-03 18:36:35 -04:00
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/IDBObjectStore/getAllKeys)
2020-07-22 12:03:46 -04:00
* /
getAllKeys ( query? : IDBValidKey | IDBKeyRange | null , count? : number ) : IDBRequest < IDBValidKey [ ] > ;
/ * *
* Retrieves the key of the first record matching the given key or key range in query .
2021-05-27 19:33:11 -04:00
*
2020-07-22 12:03:46 -04:00
* If successful , request ' s result will be the key , or undefined if there was no matching record .
2023-07-03 18:36:35 -04:00
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/IDBObjectStore/getKey)
2020-07-22 12:03:46 -04:00
* /
getKey ( query : IDBValidKey | IDBKeyRange ) : IDBRequest < IDBValidKey | undefined > ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBObjectStore/index) */
2020-07-22 12:03:46 -04:00
index ( name : string ) : IDBIndex ;
/ * *
* Opens a cursor over the records matching query , ordered by direction . If query is null , all records in store are matched .
2021-05-27 19:33:11 -04:00
*
2020-07-22 12:03:46 -04:00
* If successful , request ' s result will be an IDBCursorWithValue pointing at the first matching record , or null if there were no matching records .
2023-07-03 18:36:35 -04:00
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/IDBObjectStore/openCursor)
2020-07-22 12:03:46 -04:00
* /
openCursor ( query? : IDBValidKey | IDBKeyRange | null , direction? : IDBCursorDirection ) : IDBRequest < IDBCursorWithValue | null > ;
/ * *
* 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 .
2021-05-27 19:33:11 -04:00
*
2020-07-22 12:03:46 -04:00
* If successful , request ' s result will be an IDBCursor pointing at the first matching record , or null if there were no matching records .
2023-07-03 18:36:35 -04:00
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/IDBObjectStore/openKeyCursor)
2020-07-22 12:03:46 -04:00
* /
openKeyCursor ( query? : IDBValidKey | IDBKeyRange | null , direction? : IDBCursorDirection ) : IDBRequest < IDBCursor | null > ;
/ * *
* Adds or updates a record in store with the given value and key .
2021-05-27 19:33:11 -04:00
*
2020-07-22 12:03:46 -04:00
* If the store uses in - line keys and key is specified a "DataError" DOMException will be thrown .
2021-05-27 19:33:11 -04:00
*
2020-07-22 12:03:46 -04:00
* If put ( ) is used , any existing record with the key will be replaced . If add ( ) is used , and if a record with the key already exists the request will fail , with request ' s error set to a "ConstraintError" DOMException .
2021-05-27 19:33:11 -04:00
*
2020-07-22 12:03:46 -04:00
* If successful , request 's result will be the record' s key .
2023-07-03 18:36:35 -04:00
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/IDBObjectStore/put)
2020-07-22 12:03:46 -04:00
* /
put ( value : any , key? : IDBValidKey ) : IDBRequest < IDBValidKey > ;
}
declare var IDBObjectStore : {
prototype : IDBObjectStore ;
new ( ) : IDBObjectStore ;
} ;
interface IDBOpenDBRequestEventMap extends IDBRequestEventMap {
2022-12-07 12:59:59 -05:00
"blocked" : IDBVersionChangeEvent ;
2020-07-22 12:03:46 -04:00
"upgradeneeded" : IDBVersionChangeEvent ;
}
2023-07-03 18:36:35 -04:00
/ * *
* Also inherits methods from its parents IDBRequest and EventTarget .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/IDBOpenDBRequest)
* /
2020-07-22 12:03:46 -04:00
interface IDBOpenDBRequest extends IDBRequest < IDBDatabase > {
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBOpenDBRequest/blocked_event) */
2022-12-07 12:59:59 -05:00
onblocked : ( ( this : IDBOpenDBRequest , ev : IDBVersionChangeEvent ) = > any ) | null ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBOpenDBRequest/upgradeneeded_event) */
2020-07-22 12:03:46 -04:00
onupgradeneeded : ( ( this : IDBOpenDBRequest , ev : IDBVersionChangeEvent ) = > any ) | null ;
addEventListener < K extends keyof IDBOpenDBRequestEventMap > ( type : K , listener : ( this : IDBOpenDBRequest , ev : IDBOpenDBRequestEventMap [ K ] ) = > any , options? : boolean | AddEventListenerOptions ) : void ;
addEventListener ( type : string , listener : EventListenerOrEventListenerObject , options? : boolean | AddEventListenerOptions ) : void ;
removeEventListener < K extends keyof IDBOpenDBRequestEventMap > ( type : K , listener : ( this : IDBOpenDBRequest , ev : IDBOpenDBRequestEventMap [ K ] ) = > any , options? : boolean | EventListenerOptions ) : void ;
removeEventListener ( type : string , listener : EventListenerOrEventListenerObject , options? : boolean | EventListenerOptions ) : void ;
}
declare var IDBOpenDBRequest : {
prototype : IDBOpenDBRequest ;
new ( ) : IDBOpenDBRequest ;
} ;
interface IDBRequestEventMap {
"error" : Event ;
"success" : Event ;
}
2023-07-03 18:36:35 -04:00
/ * *
* 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 .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/IDBRequest)
* /
2020-07-22 12:03:46 -04:00
interface IDBRequest < T = any > extends EventTarget {
2023-07-03 18:36:35 -04:00
/ * *
* 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 .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/IDBRequest/error)
* /
2020-07-22 12:03:46 -04:00
readonly error : DOMException | null ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBRequest/error_event) */
2020-07-22 12:03:46 -04:00
onerror : ( ( this : IDBRequest < T > , ev : Event ) = > any ) | null ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBRequest/success_event) */
2020-07-22 12:03:46 -04:00
onsuccess : ( ( this : IDBRequest < T > , ev : Event ) = > any ) | null ;
2023-07-03 18:36:35 -04:00
/ * *
* Returns "pending" until a request is complete , then returns "done" .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/IDBRequest/readyState)
* /
2020-07-22 12:03:46 -04:00
readonly readyState : IDBRequestReadyState ;
2023-07-03 18:36:35 -04:00
/ * *
* When a request is completed , returns the result , or undefined if the request failed . Throws a "InvalidStateError" DOMException if the request is still pending .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/IDBRequest/result)
* /
2020-07-22 12:03:46 -04:00
readonly result : T ;
2023-07-03 18:36:35 -04:00
/ * *
* Returns the IDBObjectStore , IDBIndex , or IDBCursor the request was made against , or null if is was an open request .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/IDBRequest/source)
* /
2020-07-22 12:03:46 -04:00
readonly source : IDBObjectStore | IDBIndex | IDBCursor ;
2023-07-03 18:36:35 -04:00
/ * *
* 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 .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/IDBRequest/transaction)
* /
2020-07-22 12:03:46 -04:00
readonly transaction : IDBTransaction | null ;
addEventListener < K extends keyof IDBRequestEventMap > ( type : K , listener : ( this : IDBRequest < T > , ev : IDBRequestEventMap [ K ] ) = > any , options? : boolean | AddEventListenerOptions ) : void ;
addEventListener ( type : string , listener : EventListenerOrEventListenerObject , options? : boolean | AddEventListenerOptions ) : void ;
removeEventListener < K extends keyof IDBRequestEventMap > ( type : K , listener : ( this : IDBRequest < T > , ev : IDBRequestEventMap [ K ] ) = > any , options? : boolean | EventListenerOptions ) : void ;
removeEventListener ( type : string , listener : EventListenerOrEventListenerObject , options? : boolean | EventListenerOptions ) : void ;
}
declare var IDBRequest : {
prototype : IDBRequest ;
new ( ) : IDBRequest ;
} ;
interface IDBTransactionEventMap {
"abort" : Event ;
"complete" : Event ;
"error" : Event ;
}
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBTransaction) */
2020-07-22 12:03:46 -04:00
interface IDBTransaction extends EventTarget {
2023-07-03 18:36:35 -04:00
/ * *
* Returns the transaction ' s connection .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/IDBTransaction/db)
* /
2020-07-22 12:03:46 -04:00
readonly db : IDBDatabase ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBTransaction/durability) */
2022-03-01 15:44:43 -05:00
readonly durability : IDBTransactionDurability ;
2023-07-03 18:36:35 -04:00
/ * *
* If the transaction was aborted , returns the error ( a DOMException ) providing the reason .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/IDBTransaction/error)
* /
2021-08-26 20:12:59 -04:00
readonly error : DOMException | null ;
2023-07-03 18:36:35 -04:00
/ * *
* Returns the mode the transaction was created with ( "readonly" or "readwrite" ) , or "versionchange" for an upgrade transaction .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/IDBTransaction/mode)
* /
2020-07-22 12:03:46 -04:00
readonly mode : IDBTransactionMode ;
2023-07-03 18:36:35 -04:00
/ * *
* 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 .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/IDBTransaction/objectStoreNames)
* /
2020-07-22 12:03:46 -04:00
readonly objectStoreNames : DOMStringList ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBTransaction/abort_event) */
2020-07-22 12:03:46 -04:00
onabort : ( ( this : IDBTransaction , ev : Event ) = > any ) | null ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBTransaction/complete_event) */
2020-07-22 12:03:46 -04:00
oncomplete : ( ( this : IDBTransaction , ev : Event ) = > any ) | null ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBTransaction/error_event) */
2020-07-22 12:03:46 -04:00
onerror : ( ( this : IDBTransaction , ev : Event ) = > any ) | null ;
2023-07-03 18:36:35 -04:00
/ * *
* Aborts the transaction . All pending requests will fail with a "AbortError" DOMException and all changes made to the database will be reverted .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/IDBTransaction/abort)
* /
2020-07-22 12:03:46 -04:00
abort ( ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBTransaction/commit) */
2021-08-26 20:12:59 -04:00
commit ( ) : void ;
2023-07-03 18:36:35 -04:00
/ * *
* Returns an IDBObjectStore in the transaction ' s scope .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/IDBTransaction/objectStore)
* /
2020-07-22 12:03:46 -04:00
objectStore ( name : string ) : IDBObjectStore ;
addEventListener < K extends keyof IDBTransactionEventMap > ( type : K , listener : ( this : IDBTransaction , ev : IDBTransactionEventMap [ K ] ) = > any , options? : boolean | AddEventListenerOptions ) : void ;
addEventListener ( type : string , listener : EventListenerOrEventListenerObject , options? : boolean | AddEventListenerOptions ) : void ;
removeEventListener < K extends keyof IDBTransactionEventMap > ( type : K , listener : ( this : IDBTransaction , ev : IDBTransactionEventMap [ K ] ) = > any , options? : boolean | EventListenerOptions ) : void ;
removeEventListener ( type : string , listener : EventListenerOrEventListenerObject , options? : boolean | EventListenerOptions ) : void ;
}
declare var IDBTransaction : {
prototype : IDBTransaction ;
new ( ) : IDBTransaction ;
} ;
2023-07-03 18:36:35 -04:00
/ * *
* This IndexedDB API interface indicates that the version of the database has changed , as the result of an IDBOpenDBRequest . onupgradeneeded event handler function .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/IDBVersionChangeEvent)
* /
2020-07-22 12:03:46 -04:00
interface IDBVersionChangeEvent extends Event {
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBVersionChangeEvent/newVersion) */
2020-07-22 12:03:46 -04:00
readonly newVersion : number | null ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBVersionChangeEvent/oldVersion) */
2020-07-22 12:03:46 -04:00
readonly oldVersion : number ;
}
declare var IDBVersionChangeEvent : {
prototype : IDBVersionChangeEvent ;
new ( type : string , eventInitDict? : IDBVersionChangeEventInit ) : IDBVersionChangeEvent ;
} ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ImageBitmap) */
2020-07-22 12:03:46 -04:00
interface ImageBitmap {
2023-07-03 18:36:35 -04:00
/ * *
* Returns the intrinsic height of the image , in CSS pixels .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/ImageBitmap/height)
* /
2020-07-22 12:03:46 -04:00
readonly height : number ;
2023-07-03 18:36:35 -04:00
/ * *
* Returns the intrinsic width of the image , in CSS pixels .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/ImageBitmap/width)
* /
2020-07-22 12:03:46 -04:00
readonly width : number ;
2023-07-03 18:36:35 -04:00
/ * *
* Releases imageBitmap ' s underlying bitmap data .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/ImageBitmap/close)
* /
2020-07-22 12:03:46 -04:00
close ( ) : void ;
}
declare var ImageBitmap : {
prototype : ImageBitmap ;
new ( ) : ImageBitmap ;
} ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ImageBitmapRenderingContext) */
2020-07-22 12:03:46 -04:00
interface ImageBitmapRenderingContext {
2023-07-03 18:36:35 -04:00
/ * *
* Transfers the underlying bitmap data from imageBitmap to context , and the bitmap becomes the contents of the canvas element to which context is bound .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/ImageBitmapRenderingContext/transferFromImageBitmap)
* /
2020-07-22 12:03:46 -04:00
transferFromImageBitmap ( bitmap : ImageBitmap | null ) : void ;
}
declare var ImageBitmapRenderingContext : {
prototype : ImageBitmapRenderingContext ;
new ( ) : ImageBitmapRenderingContext ;
} ;
2023-07-03 18:36:35 -04:00
/ * *
* 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 ( ) .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/ImageData)
* /
2020-07-22 12:03:46 -04:00
interface ImageData {
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ImageData/colorSpace) */
2022-05-31 20:19:18 -04:00
readonly colorSpace : PredefinedColorSpace ;
2023-07-03 18:36:35 -04:00
/ * *
* Returns the one - dimensional array containing the data in RGBA order , as integers in the range 0 to 255 .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/ImageData/data)
* /
2020-07-22 12:03:46 -04:00
readonly data : Uint8ClampedArray ;
2023-07-03 18:36:35 -04:00
/ * *
* Returns the actual dimensions of the data in the ImageData object , in pixels .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/ImageData/height)
* /
2020-07-22 12:03:46 -04:00
readonly height : number ;
2023-07-03 18:36:35 -04:00
/ * *
* Returns the actual dimensions of the data in the ImageData object , in pixels .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/ImageData/width)
* /
2020-07-22 12:03:46 -04:00
readonly width : number ;
}
declare var ImageData : {
prototype : ImageData ;
2021-08-26 20:12:59 -04:00
new ( sw : number , sh : number , settings? : ImageDataSettings ) : ImageData ;
new ( data : Uint8ClampedArray , sw : number , sh? : number , settings? : ImageDataSettings ) : ImageData ;
} ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/KHR_parallel_shader_compile) */
2021-08-26 20:12:59 -04:00
interface KHR_parallel_shader_compile {
2023-03-21 11:46:40 -04:00
readonly COMPLETION_STATUS_KHR : 0x91B1 ;
2021-08-26 20:12:59 -04:00
}
2023-07-03 18:36:35 -04:00
/ * *
* Available only in secure contexts .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/Lock)
* /
2022-03-01 15:44:43 -05:00
interface Lock {
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Lock/mode) */
2022-03-01 15:44:43 -05:00
readonly mode : LockMode ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Lock/name) */
2022-03-01 15:44:43 -05:00
readonly name : string ;
}
declare var Lock : {
prototype : Lock ;
new ( ) : Lock ;
} ;
2023-07-03 18:36:35 -04:00
/ * *
* Available only in secure contexts .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/LockManager)
* /
2022-03-01 15:44:43 -05:00
interface LockManager {
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/LockManager/query) */
2022-03-01 15:44:43 -05:00
query ( ) : Promise < LockManagerSnapshot > ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/LockManager/request) */
2022-03-01 15:44:43 -05:00
request ( name : string , callback : LockGrantedCallback ) : Promise < any > ;
request ( name : string , options : LockOptions , callback : LockGrantedCallback ) : Promise < any > ;
}
declare var LockManager : {
prototype : LockManager ;
new ( ) : LockManager ;
} ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/MediaCapabilities) */
2021-08-26 20:12:59 -04:00
interface MediaCapabilities {
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/MediaCapabilities/decodingInfo) */
2021-08-26 20:12:59 -04:00
decodingInfo ( configuration : MediaDecodingConfiguration ) : Promise < MediaCapabilitiesDecodingInfo > ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/MediaCapabilities/encodingInfo) */
2021-08-26 20:12:59 -04:00
encodingInfo ( configuration : MediaEncodingConfiguration ) : Promise < MediaCapabilitiesEncodingInfo > ;
}
declare var MediaCapabilities : {
prototype : MediaCapabilities ;
new ( ) : MediaCapabilities ;
2020-07-22 12:03:46 -04:00
} ;
2023-07-03 18:36:35 -04:00
/ * *
* This Channel Messaging API interface allows us to create a new message channel and send data through it via its two MessagePort properties .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/MessageChannel)
* /
2020-07-22 12:03:46 -04:00
interface MessageChannel {
2023-07-03 18:36:35 -04:00
/ * *
* Returns the first MessagePort object .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/MessageChannel/port1)
* /
2020-07-22 12:03:46 -04:00
readonly port1 : MessagePort ;
2023-07-03 18:36:35 -04:00
/ * *
* Returns the second MessagePort object .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/MessageChannel/port2)
* /
2020-07-22 12:03:46 -04:00
readonly port2 : MessagePort ;
}
declare var MessageChannel : {
prototype : MessageChannel ;
new ( ) : MessageChannel ;
} ;
2023-07-03 18:36:35 -04:00
/ * *
* A message received by a target object .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/MessageEvent)
* /
2020-08-24 19:43:54 -04:00
interface MessageEvent < T = any > extends Event {
2023-07-03 18:36:35 -04:00
/ * *
* Returns the data of the message .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/MessageEvent/data)
* /
2020-08-24 19:43:54 -04:00
readonly data : T ;
2023-07-03 18:36:35 -04:00
/ * *
* Returns the last event ID string , for server - sent events .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/MessageEvent/lastEventId)
* /
2020-07-22 12:03:46 -04:00
readonly lastEventId : string ;
2023-07-03 18:36:35 -04:00
/ * *
* Returns the origin of the message , for server - sent events and cross - document messaging .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/MessageEvent/origin)
* /
2020-07-22 12:03:46 -04:00
readonly origin : string ;
2023-07-03 18:36:35 -04:00
/ * *
* Returns the MessagePort array sent with the message , for cross - document messaging and channel messaging .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/MessageEvent/ports)
* /
2020-07-22 12:03:46 -04:00
readonly ports : ReadonlyArray < MessagePort > ;
2023-07-03 18:36:35 -04:00
/ * *
* Returns the WindowProxy of the source window , for cross - document messaging , and the MessagePort being attached , in the connect event fired at SharedWorkerGlobalScope objects .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/MessageEvent/source)
* /
2020-07-22 12:03:46 -04:00
readonly source : MessageEventSource | null ;
2023-07-03 18:36:35 -04:00
/ * *
* @deprecated
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/MessageEvent/initMessageEvent)
* /
2021-08-26 20:12:59 -04:00
initMessageEvent ( type : string , bubbles? : boolean , cancelable? : boolean , data? : any , origin? : string , lastEventId? : string , source? : MessageEventSource | null , ports? : MessagePort [ ] ) : void ;
2020-07-22 12:03:46 -04:00
}
declare var MessageEvent : {
prototype : MessageEvent ;
2020-08-24 19:43:54 -04:00
new < T > ( type : string , eventInitDict? : MessageEventInit < T > ) : MessageEvent < T > ;
2020-07-22 12:03:46 -04:00
} ;
interface MessagePortEventMap {
"message" : MessageEvent ;
"messageerror" : MessageEvent ;
}
2023-07-03 18:36:35 -04:00
/ * *
* 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 .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/MessagePort)
* /
2020-07-22 12:03:46 -04:00
interface MessagePort extends EventTarget {
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessagePort/message_event) */
2020-07-22 12:03:46 -04:00
onmessage : ( ( this : MessagePort , ev : MessageEvent ) = > any ) | null ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessagePort/messageerror_event) */
2020-07-22 12:03:46 -04:00
onmessageerror : ( ( this : MessagePort , ev : MessageEvent ) = > any ) | null ;
2023-07-03 18:36:35 -04:00
/ * *
* Disconnects the port , so that it is no longer active .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/MessagePort/close)
* /
2020-07-22 12:03:46 -04:00
close ( ) : void ;
/ * *
* 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 .
2021-05-27 19:33:11 -04:00
*
2020-07-22 12:03:46 -04:00
* Throws a "DataCloneError" DOMException if transfer contains duplicate objects or port , or if message could not be cloned .
2023-07-03 18:36:35 -04:00
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/MessagePort/postMessage)
2020-07-22 12:03:46 -04:00
* /
postMessage ( message : any , transfer : Transferable [ ] ) : void ;
2021-12-09 17:12:21 -05:00
postMessage ( message : any , options? : StructuredSerializeOptions ) : void ;
2023-07-03 18:36:35 -04:00
/ * *
* Begins dispatching messages received on the port .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/MessagePort/start)
* /
2020-07-22 12:03:46 -04:00
start ( ) : void ;
addEventListener < K extends keyof MessagePortEventMap > ( type : K , listener : ( this : MessagePort , ev : MessagePortEventMap [ K ] ) = > any , options? : boolean | AddEventListenerOptions ) : void ;
addEventListener ( type : string , listener : EventListenerOrEventListenerObject , options? : boolean | AddEventListenerOptions ) : void ;
removeEventListener < K extends keyof MessagePortEventMap > ( type : K , listener : ( this : MessagePort , ev : MessagePortEventMap [ K ] ) = > any , options? : boolean | EventListenerOptions ) : void ;
removeEventListener ( type : string , listener : EventListenerOrEventListenerObject , options? : boolean | EventListenerOptions ) : void ;
}
declare var MessagePort : {
prototype : MessagePort ;
new ( ) : MessagePort ;
} ;
2023-07-03 18:36:35 -04:00
/ * *
* Available only in secure contexts .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/NavigationPreloadManager)
* /
2022-05-31 20:19:18 -04:00
interface NavigationPreloadManager {
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/NavigationPreloadManager/disable) */
2022-05-31 20:19:18 -04:00
disable ( ) : Promise < void > ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/NavigationPreloadManager/enable) */
2022-05-31 20:19:18 -04:00
enable ( ) : Promise < void > ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/NavigationPreloadManager/getState) */
2022-05-31 20:19:18 -04:00
getState ( ) : Promise < NavigationPreloadState > ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/NavigationPreloadManager/setHeaderValue) */
2022-05-31 20:19:18 -04:00
setHeaderValue ( value : string ) : Promise < void > ;
}
declare var NavigationPreloadManager : {
prototype : NavigationPreloadManager ;
new ( ) : NavigationPreloadManager ;
} ;
2023-07-03 18:36:35 -04:00
/** Available only in secure contexts. */
interface NavigatorBadge {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Navigator/clearAppBadge) */
clearAppBadge ( ) : Promise < void > ;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Navigator/setAppBadge) */
setAppBadge ( contents? : number ) : Promise < void > ;
}
2020-07-22 12:03:46 -04:00
interface NavigatorConcurrentHardware {
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Navigator/hardwareConcurrency) */
2020-07-22 12:03:46 -04:00
readonly hardwareConcurrency : number ;
}
interface NavigatorID {
2023-07-03 18:36:35 -04:00
/ * *
* @deprecated
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/Navigator/appCodeName)
* /
2020-07-22 12:03:46 -04:00
readonly appCodeName : string ;
2023-07-03 18:36:35 -04:00
/ * *
* @deprecated
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/Navigator/appName)
* /
2020-07-22 12:03:46 -04:00
readonly appName : string ;
2023-07-03 18:36:35 -04:00
/ * *
* @deprecated
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/Navigator/appVersion)
* /
2020-07-22 12:03:46 -04:00
readonly appVersion : string ;
2023-07-03 18:36:35 -04:00
/ * *
* @deprecated
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/Navigator/platform)
* /
2020-07-22 12:03:46 -04:00
readonly platform : string ;
2023-07-03 18:36:35 -04:00
/ * *
* @deprecated
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/Navigator/product)
* /
2020-07-22 12:03:46 -04:00
readonly product : string ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Navigator/userAgent) */
2020-07-22 12:03:46 -04:00
readonly userAgent : string ;
}
interface NavigatorLanguage {
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Navigator/language) */
2020-07-22 12:03:46 -04:00
readonly language : string ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Navigator/languages) */
2020-07-22 12:03:46 -04:00
readonly languages : ReadonlyArray < string > ;
}
2022-05-31 20:19:18 -04:00
/** Available only in secure contexts. */
interface NavigatorLocks {
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Navigator/locks) */
2022-05-31 20:19:18 -04:00
readonly locks : LockManager ;
}
2020-07-22 12:03:46 -04:00
interface NavigatorOnLine {
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Navigator/onLine) */
2020-07-22 12:03:46 -04:00
readonly onLine : boolean ;
}
2021-12-09 17:12:21 -05:00
/** Available only in secure contexts. */
2020-07-22 12:03:46 -04:00
interface NavigatorStorage {
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Navigator/storage) */
2020-07-22 12:03:46 -04:00
readonly storage : StorageManager ;
}
interface NotificationEventMap {
"click" : Event ;
"close" : Event ;
"error" : Event ;
"show" : Event ;
}
2023-07-03 18:36:35 -04:00
/ * *
* This Notifications API interface is used to configure and display desktop notifications to the user .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/Notification)
* /
2020-07-22 12:03:46 -04:00
interface Notification extends EventTarget {
2024-03-26 18:52:57 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Notification/badge) */
readonly badge : string ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Notification/body) */
2020-07-22 12:03:46 -04:00
readonly body : string ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Notification/data) */
2020-07-22 12:03:46 -04:00
readonly data : any ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Notification/dir) */
2020-07-22 12:03:46 -04:00
readonly dir : NotificationDirection ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Notification/icon) */
2020-07-22 12:03:46 -04:00
readonly icon : string ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Notification/lang) */
2020-07-22 12:03:46 -04:00
readonly lang : string ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Notification/click_event) */
2020-07-22 12:03:46 -04:00
onclick : ( ( this : Notification , ev : Event ) = > any ) | null ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Notification/close_event) */
2020-07-22 12:03:46 -04:00
onclose : ( ( this : Notification , ev : Event ) = > any ) | null ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Notification/error_event) */
2020-07-22 12:03:46 -04:00
onerror : ( ( this : Notification , ev : Event ) = > any ) | null ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Notification/show_event) */
2020-07-22 12:03:46 -04:00
onshow : ( ( this : Notification , ev : Event ) = > any ) | null ;
2024-03-26 18:52:57 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Notification/requireInteraction) */
readonly requireInteraction : boolean ;
2023-09-09 15:03:21 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Notification/silent) */
readonly silent : boolean | null ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Notification/tag) */
2020-07-22 12:03:46 -04:00
readonly tag : string ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Notification/title) */
2020-07-22 12:03:46 -04:00
readonly title : string ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Notification/close) */
2020-07-22 12:03:46 -04:00
close ( ) : void ;
addEventListener < K extends keyof NotificationEventMap > ( type : K , listener : ( this : Notification , ev : NotificationEventMap [ K ] ) = > any , options? : boolean | AddEventListenerOptions ) : void ;
addEventListener ( type : string , listener : EventListenerOrEventListenerObject , options? : boolean | AddEventListenerOptions ) : void ;
removeEventListener < K extends keyof NotificationEventMap > ( type : K , listener : ( this : Notification , ev : NotificationEventMap [ K ] ) = > any , options? : boolean | EventListenerOptions ) : void ;
removeEventListener ( type : string , listener : EventListenerOrEventListenerObject , options? : boolean | EventListenerOptions ) : void ;
}
declare var Notification : {
prototype : Notification ;
new ( title : string , options? : NotificationOptions ) : Notification ;
2023-09-09 15:03:21 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Notification/permission_static) */
2020-07-22 12:03:46 -04:00
readonly permission : NotificationPermission ;
} ;
2023-07-03 18:36:35 -04:00
/ * *
* The parameter passed into the onnotificationclick handler , the NotificationEvent interface represents a notification click event that is dispatched on the ServiceWorkerGlobalScope of a ServiceWorker .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/NotificationEvent)
* /
2020-07-22 12:03:46 -04:00
interface NotificationEvent extends ExtendableEvent {
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/NotificationEvent/action) */
2020-07-22 12:03:46 -04:00
readonly action : string ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/NotificationEvent/notification) */
2020-07-22 12:03:46 -04:00
readonly notification : Notification ;
}
declare var NotificationEvent : {
prototype : NotificationEvent ;
new ( type : string , eventInitDict : NotificationEventInit ) : NotificationEvent ;
} ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/OES_draw_buffers_indexed) */
2022-12-07 12:59:59 -05:00
interface OES_draw_buffers_indexed {
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/OES_draw_buffers_indexed/blendEquationSeparateiOES) */
2022-12-07 12:59:59 -05:00
blendEquationSeparateiOES ( buf : GLuint , modeRGB : GLenum , modeAlpha : GLenum ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/OES_draw_buffers_indexed/blendEquationiOES) */
2022-12-07 12:59:59 -05:00
blendEquationiOES ( buf : GLuint , mode : GLenum ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/OES_draw_buffers_indexed/blendFuncSeparateiOES) */
2022-12-07 12:59:59 -05:00
blendFuncSeparateiOES ( buf : GLuint , srcRGB : GLenum , dstRGB : GLenum , srcAlpha : GLenum , dstAlpha : GLenum ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/OES_draw_buffers_indexed/blendFunciOES) */
2022-12-07 12:59:59 -05:00
blendFunciOES ( buf : GLuint , src : GLenum , dst : GLenum ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/OES_draw_buffers_indexed/colorMaskiOES) */
2022-12-07 12:59:59 -05:00
colorMaskiOES ( buf : GLuint , r : GLboolean , g : GLboolean , b : GLboolean , a : GLboolean ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/OES_draw_buffers_indexed/disableiOES) */
2022-12-07 12:59:59 -05:00
disableiOES ( target : GLenum , index : GLuint ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/OES_draw_buffers_indexed/enableiOES) */
2022-12-07 12:59:59 -05:00
enableiOES ( target : GLenum , index : GLuint ) : void ;
}
2023-07-03 18:36:35 -04:00
/ * *
* The OES_element_index_uint extension is part of the WebGL API and adds support for gl . UNSIGNED_INT types to WebGLRenderingContext . drawElements ( ) .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/OES_element_index_uint)
* /
2020-07-22 12:03:46 -04:00
interface OES_element_index_uint {
}
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/OES_fbo_render_mipmap) */
2021-08-26 20:12:59 -04:00
interface OES_fbo_render_mipmap {
}
2023-07-03 18:36:35 -04:00
/ * *
* The OES_standard_derivatives extension is part of the WebGL API and adds the GLSL derivative functions dFdx , dFdy , and fwidth .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/OES_standard_derivatives)
* /
2020-07-22 12:03:46 -04:00
interface OES_standard_derivatives {
2023-03-21 11:46:40 -04:00
readonly FRAGMENT_SHADER_DERIVATIVE_HINT_OES : 0x8B8B ;
2020-07-22 12:03:46 -04:00
}
2023-07-03 18:36:35 -04:00
/ * *
* The OES_texture_float extension is part of the WebGL API and exposes floating - point pixel types for textures .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/OES_texture_float)
* /
2020-07-22 12:03:46 -04:00
interface OES_texture_float {
}
2023-07-03 18:36:35 -04:00
/ * *
* The OES_texture_float_linear extension is part of the WebGL API and allows linear filtering with floating - point pixel types for textures .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/OES_texture_float_linear)
* /
2020-07-22 12:03:46 -04:00
interface OES_texture_float_linear {
}
2023-07-03 18:36:35 -04:00
/ * *
* 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 .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/OES_texture_half_float)
* /
2020-07-22 12:03:46 -04:00
interface OES_texture_half_float {
2023-03-21 11:46:40 -04:00
readonly HALF_FLOAT_OES : 0x8D61 ;
2020-07-22 12:03:46 -04:00
}
2023-07-03 18:36:35 -04:00
/ * *
* 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 .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/OES_texture_half_float_linear)
* /
2020-07-22 12:03:46 -04:00
interface OES_texture_half_float_linear {
}
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/OES_vertex_array_object) */
2020-07-22 12:03:46 -04:00
interface OES_vertex_array_object {
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/OES_vertex_array_object/bindVertexArrayOES) */
2020-07-22 12:03:46 -04:00
bindVertexArrayOES ( arrayObject : WebGLVertexArrayObjectOES | null ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/OES_vertex_array_object/createVertexArrayOES) */
2020-07-22 12:03:46 -04:00
createVertexArrayOES ( ) : WebGLVertexArrayObjectOES | null ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/OES_vertex_array_object/deleteVertexArrayOES) */
2020-07-22 12:03:46 -04:00
deleteVertexArrayOES ( arrayObject : WebGLVertexArrayObjectOES | null ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/OES_vertex_array_object/isVertexArrayOES) */
2020-07-22 12:03:46 -04:00
isVertexArrayOES ( arrayObject : WebGLVertexArrayObjectOES | null ) : GLboolean ;
2023-03-21 11:46:40 -04:00
readonly VERTEX_ARRAY_BINDING_OES : 0x85B5 ;
2020-07-22 12:03:46 -04:00
}
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/OVR_multiview2) */
2021-08-26 20:12:59 -04:00
interface OVR_multiview2 {
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/OVR_multiview2/framebufferTextureMultiviewOVR) */
2021-08-26 20:12:59 -04:00
framebufferTextureMultiviewOVR ( target : GLenum , attachment : GLenum , texture : WebGLTexture | null , level : GLint , baseViewIndex : GLint , numViews : GLsizei ) : void ;
2023-03-21 11:46:40 -04:00
readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_NUM_VIEWS_OVR : 0x9630 ;
readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_BASE_VIEW_INDEX_OVR : 0x9632 ;
readonly MAX_VIEWS_OVR : 0x9631 ;
readonly FRAMEBUFFER_INCOMPLETE_VIEW_TARGETS_OVR : 0x9633 ;
2020-07-22 12:03:46 -04:00
}
2022-12-07 12:59:59 -05:00
interface OffscreenCanvasEventMap {
"contextlost" : Event ;
"contextrestored" : Event ;
}
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/OffscreenCanvas) */
2021-08-26 20:12:59 -04:00
interface OffscreenCanvas extends EventTarget {
2022-12-07 12:59:59 -05:00
/ * *
* These attributes return the dimensions of the OffscreenCanvas object ' s bitmap .
*
* They can be set , to replace the bitmap with a new , transparent black bitmap of the specified dimensions ( effectively resizing it ) .
2023-07-03 18:36:35 -04:00
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/OffscreenCanvas/height)
2022-12-07 12:59:59 -05:00
* /
height : number ;
oncontextlost : ( ( this : OffscreenCanvas , ev : Event ) = > any ) | null ;
oncontextrestored : ( ( this : OffscreenCanvas , ev : Event ) = > any ) | null ;
/ * *
* These attributes return the dimensions of the OffscreenCanvas object ' s bitmap .
*
* They can be set , to replace the bitmap with a new , transparent black bitmap of the specified dimensions ( effectively resizing it ) .
2023-07-03 18:36:35 -04:00
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/OffscreenCanvas/width)
2022-12-07 12:59:59 -05:00
* /
width : number ;
2023-03-21 11:46:40 -04:00
/ * *
* Returns a promise that will fulfill with a new Blob object representing a file containing the image in the OffscreenCanvas object .
*
* The argument , if provided , is a dictionary that controls the encoding options of the image file to be created . The type field specifies the file format and has a default value of "image/png" ; that type is also used if the requested type isn ' t supported . If the image format supports variable quality ( such as "image/jpeg" ) , then the quality field is a number in the range 0.0 to 1.0 inclusive indicating the desired quality level for the resulting image .
2023-07-03 18:36:35 -04:00
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/OffscreenCanvas/convertToBlob)
2023-03-21 11:46:40 -04:00
* /
convertToBlob ( options? : ImageEncodeOptions ) : Promise < Blob > ;
2022-12-07 12:59:59 -05:00
/ * *
* 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 .
*
* 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 ]
*
* 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 ) .
2023-07-03 18:36:35 -04:00
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/OffscreenCanvas/getContext)
2022-12-07 12:59:59 -05:00
* /
2023-03-21 11:46:40 -04:00
getContext ( contextId : "2d" , options? : any ) : OffscreenCanvasRenderingContext2D | null ;
getContext ( contextId : "bitmaprenderer" , options? : any ) : ImageBitmapRenderingContext | null ;
getContext ( contextId : "webgl" , options? : any ) : WebGLRenderingContext | null ;
getContext ( contextId : "webgl2" , options? : any ) : WebGL2RenderingContext | null ;
2022-12-07 12:59:59 -05:00
getContext ( contextId : OffscreenRenderingContextId , options? : any ) : OffscreenRenderingContext | null ;
2023-07-03 18:36:35 -04:00
/ * *
* 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 .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/OffscreenCanvas/transferToImageBitmap)
* /
2022-12-07 12:59:59 -05:00
transferToImageBitmap ( ) : ImageBitmap ;
addEventListener < K extends keyof OffscreenCanvasEventMap > ( type : K , listener : ( this : OffscreenCanvas , ev : OffscreenCanvasEventMap [ K ] ) = > any , options? : boolean | AddEventListenerOptions ) : void ;
addEventListener ( type : string , listener : EventListenerOrEventListenerObject , options? : boolean | AddEventListenerOptions ) : void ;
removeEventListener < K extends keyof OffscreenCanvasEventMap > ( type : K , listener : ( this : OffscreenCanvas , ev : OffscreenCanvasEventMap [ K ] ) = > any , options? : boolean | EventListenerOptions ) : void ;
removeEventListener ( type : string , listener : EventListenerOrEventListenerObject , options? : boolean | EventListenerOptions ) : void ;
}
declare var OffscreenCanvas : {
prototype : OffscreenCanvas ;
new ( width : number , height : number ) : OffscreenCanvas ;
} ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/OffscreenCanvasRenderingContext2D) */
2022-12-07 12:59:59 -05:00
interface OffscreenCanvasRenderingContext2D extends CanvasCompositing , CanvasDrawImage , CanvasDrawPath , CanvasFillStrokeStyles , CanvasFilters , CanvasImageData , CanvasImageSmoothing , CanvasPath , CanvasPathDrawingStyles , CanvasRect , CanvasShadowStyles , CanvasState , CanvasText , CanvasTextDrawingStyles , CanvasTransform {
readonly canvas : OffscreenCanvas ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/OffscreenCanvasRenderingContext2D/commit) */
2022-12-07 12:59:59 -05:00
commit ( ) : void ;
2020-07-22 12:03:46 -04:00
}
2022-12-07 12:59:59 -05:00
declare var OffscreenCanvasRenderingContext2D : {
prototype : OffscreenCanvasRenderingContext2D ;
new ( ) : OffscreenCanvasRenderingContext2D ;
} ;
2023-07-03 18:36:35 -04:00
/ * *
* This Canvas 2 D 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 .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/Path2D)
* /
2020-07-22 12:03:46 -04:00
interface Path2D extends CanvasPath {
2023-07-03 18:36:35 -04:00
/ * *
* Adds to the path the path given by the argument .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/Path2D/addPath)
* /
2020-07-22 12:03:46 -04:00
addPath ( path : Path2D , transform? : DOMMatrix2DInit ) : void ;
}
declare var Path2D : {
prototype : Path2D ;
new ( path? : Path2D | string ) : Path2D ;
} ;
interface PerformanceEventMap {
"resourcetimingbufferfull" : Event ;
}
2023-07-03 18:36:35 -04:00
/ * *
* 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 .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/Performance)
* /
2020-07-22 12:03:46 -04:00
interface Performance extends EventTarget {
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/resourcetimingbufferfull_event) */
2020-07-22 12:03:46 -04:00
onresourcetimingbufferfull : ( ( this : Performance , ev : Event ) = > any ) | null ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/timeOrigin) */
2021-08-26 20:12:59 -04:00
readonly timeOrigin : DOMHighResTimeStamp ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/clearMarks) */
2020-07-22 12:03:46 -04:00
clearMarks ( markName? : string ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/clearMeasures) */
2020-07-22 12:03:46 -04:00
clearMeasures ( measureName? : string ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/clearResourceTimings) */
2020-07-22 12:03:46 -04:00
clearResourceTimings ( ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/getEntries) */
2020-07-22 12:03:46 -04:00
getEntries ( ) : PerformanceEntryList ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/getEntriesByName) */
2020-07-22 12:03:46 -04:00
getEntriesByName ( name : string , type ? : string ) : PerformanceEntryList ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/getEntriesByType) */
2020-07-22 12:03:46 -04:00
getEntriesByType ( type : string ) : PerformanceEntryList ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/mark) */
2021-08-26 20:12:59 -04:00
mark ( markName : string , markOptions? : PerformanceMarkOptions ) : PerformanceMark ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/measure) */
2021-08-26 20:12:59 -04:00
measure ( measureName : string , startOrMeasureOptions? : string | PerformanceMeasureOptions , endMark? : string ) : PerformanceMeasure ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/now) */
2021-08-26 20:12:59 -04:00
now ( ) : DOMHighResTimeStamp ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/setResourceTimingBufferSize) */
2020-07-22 12:03:46 -04:00
setResourceTimingBufferSize ( maxSize : number ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/toJSON) */
2020-07-22 12:03:46 -04:00
toJSON ( ) : any ;
addEventListener < K extends keyof PerformanceEventMap > ( type : K , listener : ( this : Performance , ev : PerformanceEventMap [ K ] ) = > any , options? : boolean | AddEventListenerOptions ) : void ;
addEventListener ( type : string , listener : EventListenerOrEventListenerObject , options? : boolean | AddEventListenerOptions ) : void ;
removeEventListener < K extends keyof PerformanceEventMap > ( type : K , listener : ( this : Performance , ev : PerformanceEventMap [ K ] ) = > any , options? : boolean | EventListenerOptions ) : void ;
removeEventListener ( type : string , listener : EventListenerOrEventListenerObject , options? : boolean | EventListenerOptions ) : void ;
}
declare var Performance : {
prototype : Performance ;
new ( ) : Performance ;
} ;
2023-07-03 18:36:35 -04:00
/ * *
* 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 ) .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/PerformanceEntry)
* /
2020-07-22 12:03:46 -04:00
interface PerformanceEntry {
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEntry/duration) */
2021-08-26 20:12:59 -04:00
readonly duration : DOMHighResTimeStamp ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEntry/entryType) */
2020-07-22 12:03:46 -04:00
readonly entryType : string ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEntry/name) */
2020-07-22 12:03:46 -04:00
readonly name : string ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEntry/startTime) */
2021-08-26 20:12:59 -04:00
readonly startTime : DOMHighResTimeStamp ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEntry/toJSON) */
2020-07-22 12:03:46 -04:00
toJSON ( ) : any ;
}
declare var PerformanceEntry : {
prototype : PerformanceEntry ;
new ( ) : PerformanceEntry ;
} ;
2023-07-03 18:36:35 -04:00
/ * *
* 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 .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/PerformanceMark)
* /
2020-07-22 12:03:46 -04:00
interface PerformanceMark extends PerformanceEntry {
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceMark/detail) */
2021-08-26 20:12:59 -04:00
readonly detail : any ;
2020-07-22 12:03:46 -04:00
}
declare var PerformanceMark : {
prototype : PerformanceMark ;
2021-08-26 20:12:59 -04:00
new ( markName : string , markOptions? : PerformanceMarkOptions ) : PerformanceMark ;
2020-07-22 12:03:46 -04:00
} ;
2023-07-03 18:36:35 -04:00
/ * *
* 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 .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/PerformanceMeasure)
* /
2020-07-22 12:03:46 -04:00
interface PerformanceMeasure extends PerformanceEntry {
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceMeasure/detail) */
2021-08-26 20:12:59 -04:00
readonly detail : any ;
2020-07-22 12:03:46 -04:00
}
declare var PerformanceMeasure : {
prototype : PerformanceMeasure ;
new ( ) : PerformanceMeasure ;
} ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceObserver) */
2020-07-22 12:03:46 -04:00
interface PerformanceObserver {
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceObserver/disconnect) */
2020-07-22 12:03:46 -04:00
disconnect ( ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceObserver/observe) */
2020-07-22 12:03:46 -04:00
observe ( options? : PerformanceObserverInit ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceObserver/takeRecords) */
2020-07-22 12:03:46 -04:00
takeRecords ( ) : PerformanceEntryList ;
}
declare var PerformanceObserver : {
prototype : PerformanceObserver ;
new ( callback : PerformanceObserverCallback ) : PerformanceObserver ;
2023-09-09 15:03:21 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceObserver/supportedEntryTypes_static) */
2020-07-22 12:03:46 -04:00
readonly supportedEntryTypes : ReadonlyArray < string > ;
} ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceObserverEntryList) */
2020-07-22 12:03:46 -04:00
interface PerformanceObserverEntryList {
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceObserverEntryList/getEntries) */
2020-07-22 12:03:46 -04:00
getEntries ( ) : PerformanceEntryList ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceObserverEntryList/getEntriesByName) */
2020-07-22 12:03:46 -04:00
getEntriesByName ( name : string , type ? : string ) : PerformanceEntryList ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceObserverEntryList/getEntriesByType) */
2020-07-22 12:03:46 -04:00
getEntriesByType ( type : string ) : PerformanceEntryList ;
}
declare var PerformanceObserverEntryList : {
prototype : PerformanceObserverEntryList ;
new ( ) : PerformanceObserverEntryList ;
} ;
2023-07-03 18:36:35 -04:00
/ * *
* 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 .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/PerformanceResourceTiming)
* /
2020-07-22 12:03:46 -04:00
interface PerformanceResourceTiming extends PerformanceEntry {
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/connectEnd) */
2021-08-26 20:12:59 -04:00
readonly connectEnd : DOMHighResTimeStamp ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/connectStart) */
2021-08-26 20:12:59 -04:00
readonly connectStart : DOMHighResTimeStamp ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/decodedBodySize) */
2020-07-22 12:03:46 -04:00
readonly decodedBodySize : number ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/domainLookupEnd) */
2021-08-26 20:12:59 -04:00
readonly domainLookupEnd : DOMHighResTimeStamp ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/domainLookupStart) */
2021-08-26 20:12:59 -04:00
readonly domainLookupStart : DOMHighResTimeStamp ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/encodedBodySize) */
2020-07-22 12:03:46 -04:00
readonly encodedBodySize : number ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/fetchStart) */
2021-08-26 20:12:59 -04:00
readonly fetchStart : DOMHighResTimeStamp ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/initiatorType) */
2020-07-22 12:03:46 -04:00
readonly initiatorType : string ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/nextHopProtocol) */
2020-07-22 12:03:46 -04:00
readonly nextHopProtocol : string ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/redirectEnd) */
2021-08-26 20:12:59 -04:00
readonly redirectEnd : DOMHighResTimeStamp ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/redirectStart) */
2021-08-26 20:12:59 -04:00
readonly redirectStart : DOMHighResTimeStamp ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/requestStart) */
2021-08-26 20:12:59 -04:00
readonly requestStart : DOMHighResTimeStamp ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/responseEnd) */
2021-08-26 20:12:59 -04:00
readonly responseEnd : DOMHighResTimeStamp ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/responseStart) */
2021-08-26 20:12:59 -04:00
readonly responseStart : DOMHighResTimeStamp ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/secureConnectionStart) */
2021-08-26 20:12:59 -04:00
readonly secureConnectionStart : DOMHighResTimeStamp ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/serverTiming) */
2021-08-26 20:12:59 -04:00
readonly serverTiming : ReadonlyArray < PerformanceServerTiming > ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/transferSize) */
2020-07-22 12:03:46 -04:00
readonly transferSize : number ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/workerStart) */
2021-08-26 20:12:59 -04:00
readonly workerStart : DOMHighResTimeStamp ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/toJSON) */
2020-07-22 12:03:46 -04:00
toJSON ( ) : any ;
}
declare var PerformanceResourceTiming : {
prototype : PerformanceResourceTiming ;
new ( ) : PerformanceResourceTiming ;
} ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceServerTiming) */
2021-08-26 20:12:59 -04:00
interface PerformanceServerTiming {
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceServerTiming/description) */
2021-08-26 20:12:59 -04:00
readonly description : string ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceServerTiming/duration) */
2021-08-26 20:12:59 -04:00
readonly duration : DOMHighResTimeStamp ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceServerTiming/name) */
2021-08-26 20:12:59 -04:00
readonly name : string ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceServerTiming/toJSON) */
2021-08-26 20:12:59 -04:00
toJSON ( ) : any ;
}
declare var PerformanceServerTiming : {
prototype : PerformanceServerTiming ;
new ( ) : PerformanceServerTiming ;
} ;
2020-07-22 12:03:46 -04:00
interface PermissionStatusEventMap {
"change" : Event ;
}
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PermissionStatus) */
2020-07-22 12:03:46 -04:00
interface PermissionStatus extends EventTarget {
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PermissionStatus/name) */
2022-12-07 12:59:59 -05:00
readonly name : string ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PermissionStatus/change_event) */
2020-07-22 12:03:46 -04:00
onchange : ( ( this : PermissionStatus , ev : Event ) = > any ) | null ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PermissionStatus/state) */
2020-07-22 12:03:46 -04:00
readonly state : PermissionState ;
addEventListener < K extends keyof PermissionStatusEventMap > ( type : K , listener : ( this : PermissionStatus , ev : PermissionStatusEventMap [ K ] ) = > any , options? : boolean | AddEventListenerOptions ) : void ;
addEventListener ( type : string , listener : EventListenerOrEventListenerObject , options? : boolean | AddEventListenerOptions ) : void ;
removeEventListener < K extends keyof PermissionStatusEventMap > ( type : K , listener : ( this : PermissionStatus , ev : PermissionStatusEventMap [ K ] ) = > any , options? : boolean | EventListenerOptions ) : void ;
removeEventListener ( type : string , listener : EventListenerOrEventListenerObject , options? : boolean | EventListenerOptions ) : void ;
}
declare var PermissionStatus : {
prototype : PermissionStatus ;
new ( ) : PermissionStatus ;
} ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Permissions) */
2020-07-22 12:03:46 -04:00
interface Permissions {
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Permissions/query) */
2021-08-26 20:12:59 -04:00
query ( permissionDesc : PermissionDescriptor ) : Promise < PermissionStatus > ;
2020-07-22 12:03:46 -04:00
}
declare var Permissions : {
prototype : Permissions ;
new ( ) : Permissions ;
} ;
2023-07-03 18:36:35 -04:00
/ * *
* 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 > ) .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/ProgressEvent)
* /
2020-07-22 12:03:46 -04:00
interface ProgressEvent < T extends EventTarget = EventTarget > extends Event {
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ProgressEvent/lengthComputable) */
2020-07-22 12:03:46 -04:00
readonly lengthComputable : boolean ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ProgressEvent/loaded) */
2020-07-22 12:03:46 -04:00
readonly loaded : number ;
readonly target : T | null ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ProgressEvent/total) */
2020-07-22 12:03:46 -04:00
readonly total : number ;
}
declare var ProgressEvent : {
prototype : ProgressEvent ;
new ( type : string , eventInitDict? : ProgressEventInit ) : ProgressEvent ;
} ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PromiseRejectionEvent) */
2020-07-22 12:03:46 -04:00
interface PromiseRejectionEvent extends Event {
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PromiseRejectionEvent/promise) */
2020-07-22 12:03:46 -04:00
readonly promise : Promise < any > ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PromiseRejectionEvent/reason) */
2020-07-22 12:03:46 -04:00
readonly reason : any ;
}
declare var PromiseRejectionEvent : {
prototype : PromiseRejectionEvent ;
new ( type : string , eventInitDict : PromiseRejectionEventInit ) : PromiseRejectionEvent ;
} ;
2021-12-09 17:12:21 -05:00
/ * *
* 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 .
* Available only in secure contexts .
2023-07-03 18:36:35 -04:00
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/PushEvent)
2021-12-09 17:12:21 -05:00
* /
2020-07-22 12:03:46 -04:00
interface PushEvent extends ExtendableEvent {
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PushEvent/data) */
2020-07-22 12:03:46 -04:00
readonly data : PushMessageData | null ;
}
declare var PushEvent : {
prototype : PushEvent ;
new ( type : string , eventInitDict? : PushEventInit ) : PushEvent ;
} ;
2021-12-09 17:12:21 -05:00
/ * *
* This Push API interface provides a way to receive notifications from third - party servers as well as request URLs for push notifications .
* Available only in secure contexts .
2023-07-03 18:36:35 -04:00
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/PushManager)
2021-12-09 17:12:21 -05:00
* /
2020-07-22 12:03:46 -04:00
interface PushManager {
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PushManager/getSubscription) */
2020-07-22 12:03:46 -04:00
getSubscription ( ) : Promise < PushSubscription | null > ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PushManager/permissionState) */
2022-03-01 15:44:43 -05:00
permissionState ( options? : PushSubscriptionOptionsInit ) : Promise < PermissionState > ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PushManager/subscribe) */
2020-07-22 12:03:46 -04:00
subscribe ( options? : PushSubscriptionOptionsInit ) : Promise < PushSubscription > ;
}
declare var PushManager : {
prototype : PushManager ;
new ( ) : PushManager ;
2023-09-09 15:03:21 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PushManager/supportedContentEncodings_static) */
2020-07-22 12:03:46 -04:00
readonly supportedContentEncodings : ReadonlyArray < string > ;
} ;
2021-12-09 17:12:21 -05:00
/ * *
* This Push API interface provides methods which let you retrieve the push data sent by a server in various formats .
* Available only in secure contexts .
2023-07-03 18:36:35 -04:00
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/PushMessageData)
2021-12-09 17:12:21 -05:00
* /
2020-07-22 12:03:46 -04:00
interface PushMessageData {
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PushMessageData/arrayBuffer) */
2020-07-22 12:03:46 -04:00
arrayBuffer ( ) : ArrayBuffer ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PushMessageData/blob) */
2020-07-22 12:03:46 -04:00
blob ( ) : Blob ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PushMessageData/json) */
2020-07-22 12:03:46 -04:00
json ( ) : any ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PushMessageData/text) */
2020-07-22 12:03:46 -04:00
text ( ) : string ;
}
declare var PushMessageData : {
prototype : PushMessageData ;
new ( ) : PushMessageData ;
} ;
2021-12-09 17:12:21 -05:00
/ * *
* This Push API interface provides a subcription ' s URL endpoint and allows unsubscription from a push service .
* Available only in secure contexts .
2023-07-03 18:36:35 -04:00
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/PushSubscription)
2021-12-09 17:12:21 -05:00
* /
2020-07-22 12:03:46 -04:00
interface PushSubscription {
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PushSubscription/endpoint) */
2020-07-22 12:03:46 -04:00
readonly endpoint : string ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PushSubscription/expirationTime) */
2022-09-19 17:00:01 -04:00
readonly expirationTime : EpochTimeStamp | null ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PushSubscription/options) */
2020-07-22 12:03:46 -04:00
readonly options : PushSubscriptionOptions ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PushSubscription/getKey) */
2020-07-22 12:03:46 -04:00
getKey ( name : PushEncryptionKeyName ) : ArrayBuffer | null ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PushSubscription/toJSON) */
2020-07-22 12:03:46 -04:00
toJSON ( ) : PushSubscriptionJSON ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PushSubscription/unsubscribe) */
2020-07-22 12:03:46 -04:00
unsubscribe ( ) : Promise < boolean > ;
}
declare var PushSubscription : {
prototype : PushSubscription ;
new ( ) : PushSubscription ;
} ;
2023-07-03 18:36:35 -04:00
/ * *
* Available only in secure contexts .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/PushSubscriptionOptions)
* /
2020-07-22 12:03:46 -04:00
interface PushSubscriptionOptions {
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PushSubscriptionOptions/applicationServerKey) */
2020-07-22 12:03:46 -04:00
readonly applicationServerKey : ArrayBuffer | null ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PushSubscriptionOptions/userVisibleOnly) */
2022-12-07 12:59:59 -05:00
readonly userVisibleOnly : boolean ;
2020-07-22 12:03:46 -04:00
}
declare var PushSubscriptionOptions : {
prototype : PushSubscriptionOptions ;
new ( ) : PushSubscriptionOptions ;
} ;
2024-03-26 18:52:57 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCEncodedAudioFrame) */
2022-05-31 20:19:18 -04:00
interface RTCEncodedAudioFrame {
2024-03-26 18:52:57 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCEncodedAudioFrame/data) */
2022-05-31 20:19:18 -04:00
data : ArrayBuffer ;
2024-03-26 18:52:57 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCEncodedAudioFrame/timestamp) */
2022-05-31 20:19:18 -04:00
readonly timestamp : number ;
2024-03-26 18:52:57 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCEncodedAudioFrame/getMetadata) */
2022-05-31 20:19:18 -04:00
getMetadata ( ) : RTCEncodedAudioFrameMetadata ;
}
declare var RTCEncodedAudioFrame : {
prototype : RTCEncodedAudioFrame ;
new ( ) : RTCEncodedAudioFrame ;
} ;
2024-03-26 18:52:57 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCEncodedVideoFrame) */
2022-05-31 20:19:18 -04:00
interface RTCEncodedVideoFrame {
2024-03-26 18:52:57 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCEncodedVideoFrame/data) */
2022-05-31 20:19:18 -04:00
data : ArrayBuffer ;
2024-03-26 18:52:57 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCEncodedVideoFrame/timestamp) */
2022-05-31 20:19:18 -04:00
readonly timestamp : number ;
2024-03-26 18:52:57 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCEncodedVideoFrame/type) */
2022-05-31 20:19:18 -04:00
readonly type : RTCEncodedVideoFrameType ;
2024-03-26 18:52:57 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCEncodedVideoFrame/getMetadata) */
2022-05-31 20:19:18 -04:00
getMetadata ( ) : RTCEncodedVideoFrameMetadata ;
}
declare var RTCEncodedVideoFrame : {
prototype : RTCEncodedVideoFrame ;
new ( ) : RTCEncodedVideoFrame ;
} ;
2024-03-26 18:52:57 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCRtpScriptTransformer) */
interface RTCRtpScriptTransformer extends EventTarget {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCRtpScriptTransformer/options) */
readonly options : any ;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCRtpScriptTransformer/readable) */
readonly readable : ReadableStream ;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCRtpScriptTransformer/writable) */
readonly writable : WritableStream ;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCRtpScriptTransformer/generateKeyFrame) */
generateKeyFrame ( rid? : string ) : Promise < number > ;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCRtpScriptTransformer/sendKeyFrameRequest) */
sendKeyFrameRequest ( ) : Promise < void > ;
}
declare var RTCRtpScriptTransformer : {
prototype : RTCRtpScriptTransformer ;
new ( ) : RTCRtpScriptTransformer ;
} ;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCTransformEvent) */
interface RTCTransformEvent extends Event {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCTransformEvent/transformer) */
readonly transformer : RTCRtpScriptTransformer ;
}
declare var RTCTransformEvent : {
prototype : RTCTransformEvent ;
new ( ) : RTCTransformEvent ;
} ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController) */
2022-09-19 17:00:01 -04:00
interface ReadableByteStreamController {
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/byobRequest) */
2022-09-19 17:00:01 -04:00
readonly byobRequest : ReadableStreamBYOBRequest | null ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/desiredSize) */
2022-09-19 17:00:01 -04:00
readonly desiredSize : number | null ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/close) */
2022-09-19 17:00:01 -04:00
close ( ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/enqueue) */
2022-09-19 17:00:01 -04:00
enqueue ( chunk : ArrayBufferView ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/error) */
2022-09-19 17:00:01 -04:00
error ( e? : any ) : void ;
}
declare var ReadableByteStreamController : {
prototype : ReadableByteStreamController ;
new ( ) : ReadableByteStreamController ;
} ;
2023-07-03 18:36:35 -04:00
/ * *
* 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 .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/ReadableStream)
* /
2020-07-22 12:03:46 -04:00
interface ReadableStream < R = any > {
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/locked) */
2020-07-22 12:03:46 -04:00
readonly locked : boolean ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/cancel) */
2020-07-22 12:03:46 -04:00
cancel ( reason? : any ) : Promise < void > ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/getReader) */
2022-12-07 12:59:59 -05:00
getReader ( options : { mode : "byob" } ) : ReadableStreamBYOBReader ;
2020-07-22 12:03:46 -04:00
getReader ( ) : ReadableStreamDefaultReader < R > ;
2022-12-07 12:59:59 -05:00
getReader ( options? : ReadableStreamGetReaderOptions ) : ReadableStreamReader < R > ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/pipeThrough) */
2021-02-24 23:16:19 -05:00
pipeThrough < T > ( transform : ReadableWritablePair < T , R > , options? : StreamPipeOptions ) : ReadableStream < T > ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/pipeTo) */
2021-08-26 20:12:59 -04:00
pipeTo ( destination : WritableStream < R > , options? : StreamPipeOptions ) : Promise < void > ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/tee) */
2020-07-22 12:03:46 -04:00
tee ( ) : [ ReadableStream < R > , ReadableStream < R > ] ;
}
declare var ReadableStream : {
prototype : ReadableStream ;
2022-12-07 12:59:59 -05:00
new ( underlyingSource : UnderlyingByteSource , strategy ? : { highWaterMark? : number } ) : ReadableStream < Uint8Array > ;
new < R = any > ( underlyingSource : UnderlyingDefaultSource < R > , strategy? : QueuingStrategy < R > ) : ReadableStream < R > ;
2020-07-22 12:03:46 -04:00
new < R = any > ( underlyingSource? : UnderlyingSource < R > , strategy? : QueuingStrategy < R > ) : ReadableStream < R > ;
} ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader) */
2022-09-19 17:00:01 -04:00
interface ReadableStreamBYOBReader extends ReadableStreamGenericReader {
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader/read) */
2022-12-07 12:59:59 -05:00
read < T extends ArrayBufferView > ( view : T ) : Promise < ReadableStreamReadResult < T > > ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader/releaseLock) */
2022-09-19 17:00:01 -04:00
releaseLock ( ) : void ;
}
declare var ReadableStreamBYOBReader : {
prototype : ReadableStreamBYOBReader ;
new ( stream : ReadableStream ) : ReadableStreamBYOBReader ;
} ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest) */
2022-09-19 17:00:01 -04:00
interface ReadableStreamBYOBRequest {
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest/view) */
2022-09-19 17:00:01 -04:00
readonly view : ArrayBufferView | null ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest/respond) */
2022-09-19 17:00:01 -04:00
respond ( bytesWritten : number ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest/respondWithNewView) */
2022-09-19 17:00:01 -04:00
respondWithNewView ( view : ArrayBufferView ) : void ;
}
declare var ReadableStreamBYOBRequest : {
prototype : ReadableStreamBYOBRequest ;
new ( ) : ReadableStreamBYOBRequest ;
} ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController) */
2020-07-22 12:03:46 -04:00
interface ReadableStreamDefaultController < R = any > {
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/desiredSize) */
2020-07-22 12:03:46 -04:00
readonly desiredSize : number | null ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/close) */
2020-07-22 12:03:46 -04:00
close ( ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/enqueue) */
2021-08-26 20:12:59 -04:00
enqueue ( chunk? : R ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/error) */
2021-02-24 23:16:19 -05:00
error ( e? : any ) : void ;
2020-07-22 12:03:46 -04:00
}
2020-11-23 17:31:10 -05:00
declare var ReadableStreamDefaultController : {
prototype : ReadableStreamDefaultController ;
new ( ) : ReadableStreamDefaultController ;
} ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultReader) */
2021-02-24 23:16:19 -05:00
interface ReadableStreamDefaultReader < R = any > extends ReadableStreamGenericReader {
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultReader/read) */
2022-09-19 17:00:01 -04:00
read ( ) : Promise < ReadableStreamReadResult < R > > ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultReader/releaseLock) */
2020-07-22 12:03:46 -04:00
releaseLock ( ) : void ;
}
2020-11-23 17:31:10 -05:00
declare var ReadableStreamDefaultReader : {
prototype : ReadableStreamDefaultReader ;
2021-02-24 23:16:19 -05:00
new < R = any > ( stream : ReadableStream < R > ) : ReadableStreamDefaultReader < R > ;
2020-11-23 17:31:10 -05:00
} ;
2021-02-24 23:16:19 -05:00
interface ReadableStreamGenericReader {
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader/closed) */
2021-02-24 23:16:19 -05:00
readonly closed : Promise < undefined > ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader/cancel) */
2021-02-24 23:16:19 -05:00
cancel ( reason? : any ) : Promise < void > ;
2020-07-22 12:03:46 -04:00
}
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Report) */
interface Report {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Report/body) */
readonly body : ReportBody | null ;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Report/type) */
readonly type : string ;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Report/url) */
readonly url : string ;
toJSON ( ) : any ;
}
declare var Report : {
prototype : Report ;
new ( ) : Report ;
} ;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReportBody) */
interface ReportBody {
toJSON ( ) : any ;
}
declare var ReportBody : {
prototype : ReportBody ;
new ( ) : ReportBody ;
} ;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReportingObserver) */
interface ReportingObserver {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReportingObserver/disconnect) */
disconnect ( ) : void ;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReportingObserver/observe) */
observe ( ) : void ;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReportingObserver/takeRecords) */
takeRecords ( ) : ReportList ;
}
declare var ReportingObserver : {
prototype : ReportingObserver ;
new ( callback : ReportingObserverCallback , options? : ReportingObserverOptions ) : ReportingObserver ;
} ;
/ * *
* This Fetch API interface represents a resource request .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/Request)
* /
2020-07-22 12:03:46 -04:00
interface Request extends Body {
2023-07-03 18:36:35 -04:00
/ * *
* Returns the cache mode associated with request , which is a string indicating how the request will interact with the browser ' s cache when fetching .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/Request/cache)
* /
2020-07-22 12:03:46 -04:00
readonly cache : RequestCache ;
2023-07-03 18:36:35 -04:00
/ * *
* 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 .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/Request/credentials)
* /
2020-07-22 12:03:46 -04:00
readonly credentials : RequestCredentials ;
2023-07-03 18:36:35 -04:00
/ * *
* Returns the kind of resource requested by request , e . g . , "document" or "script" .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/Request/destination)
* /
2020-07-22 12:03:46 -04:00
readonly destination : RequestDestination ;
2023-07-03 18:36:35 -04:00
/ * *
* 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 .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/Request/headers)
* /
2020-07-22 12:03:46 -04:00
readonly headers : Headers ;
2023-07-03 18:36:35 -04:00
/ * *
* 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 ]
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/Request/integrity)
* /
2020-07-22 12:03:46 -04:00
readonly integrity : string ;
2023-07-03 18:36:35 -04:00
/ * *
* Returns a boolean indicating whether or not request can outlive the global in which it was created .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/Request/keepalive)
* /
2020-07-22 12:03:46 -04:00
readonly keepalive : boolean ;
2023-07-03 18:36:35 -04:00
/ * *
* Returns request ' s HTTP method , which is "GET" by default .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/Request/method)
* /
2020-07-22 12:03:46 -04:00
readonly method : string ;
2023-07-03 18:36:35 -04:00
/ * *
* 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 .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/Request/mode)
* /
2020-07-22 12:03:46 -04:00
readonly mode : RequestMode ;
2023-07-03 18:36:35 -04:00
/ * *
* 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 .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/Request/redirect)
* /
2020-07-22 12:03:46 -04:00
readonly redirect : RequestRedirect ;
2023-07-03 18:36:35 -04:00
/ * *
* 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 .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/Request/referrer)
* /
2020-07-22 12:03:46 -04:00
readonly referrer : string ;
2023-07-03 18:36:35 -04:00
/ * *
* Returns the referrer policy associated with request . This is used during fetching to compute the value of the request ' s referrer .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/Request/referrerPolicy)
* /
2020-07-22 12:03:46 -04:00
readonly referrerPolicy : ReferrerPolicy ;
2023-07-03 18:36:35 -04:00
/ * *
* Returns the signal associated with request , which is an AbortSignal object indicating whether or not request has been aborted , and its abort event handler .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/Request/signal)
* /
2020-07-22 12:03:46 -04:00
readonly signal : AbortSignal ;
2023-07-03 18:36:35 -04:00
/ * *
* Returns the URL of request as a string .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/Request/url)
* /
2020-07-22 12:03:46 -04:00
readonly url : string ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/clone) */
2020-07-22 12:03:46 -04:00
clone ( ) : Request ;
}
declare var Request : {
prototype : Request ;
2022-05-31 20:19:18 -04:00
new ( input : RequestInfo | URL , init? : RequestInit ) : Request ;
2020-07-22 12:03:46 -04:00
} ;
2023-07-03 18:36:35 -04:00
/ * *
* This Fetch API interface represents the response to a request .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/Response)
* /
2020-07-22 12:03:46 -04:00
interface Response extends Body {
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/headers) */
2020-07-22 12:03:46 -04:00
readonly headers : Headers ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/ok) */
2020-07-22 12:03:46 -04:00
readonly ok : boolean ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/redirected) */
2020-07-22 12:03:46 -04:00
readonly redirected : boolean ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/status) */
2020-07-22 12:03:46 -04:00
readonly status : number ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/statusText) */
2020-07-22 12:03:46 -04:00
readonly statusText : string ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/type) */
2020-07-22 12:03:46 -04:00
readonly type : ResponseType ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/url) */
2020-07-22 12:03:46 -04:00
readonly url : string ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/clone) */
2020-07-22 12:03:46 -04:00
clone ( ) : Response ;
}
declare var Response : {
prototype : Response ;
new ( body? : BodyInit | null , init? : ResponseInit ) : Response ;
2023-09-09 15:03:21 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/error_static) */
2020-07-22 12:03:46 -04:00
error ( ) : Response ;
2023-09-09 15:03:21 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/json_static) */
json ( data : any , init? : ResponseInit ) : Response ;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/redirect_static) */
2021-08-26 20:12:59 -04:00
redirect ( url : string | URL , status? : number ) : Response ;
} ;
2023-07-03 18:36:35 -04:00
/ * *
* Inherits from Event , and represents the event object of an event sent on a document or worker when its content security policy is violated .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/SecurityPolicyViolationEvent)
* /
2021-08-26 20:12:59 -04:00
interface SecurityPolicyViolationEvent extends Event {
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SecurityPolicyViolationEvent/blockedURI) */
2021-08-26 20:12:59 -04:00
readonly blockedURI : string ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SecurityPolicyViolationEvent/columnNumber) */
2021-08-26 20:12:59 -04:00
readonly columnNumber : number ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SecurityPolicyViolationEvent/disposition) */
2021-08-26 20:12:59 -04:00
readonly disposition : SecurityPolicyViolationEventDisposition ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SecurityPolicyViolationEvent/documentURI) */
2021-08-26 20:12:59 -04:00
readonly documentURI : string ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SecurityPolicyViolationEvent/effectiveDirective) */
2021-08-26 20:12:59 -04:00
readonly effectiveDirective : string ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SecurityPolicyViolationEvent/lineNumber) */
2021-08-26 20:12:59 -04:00
readonly lineNumber : number ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SecurityPolicyViolationEvent/originalPolicy) */
2021-08-26 20:12:59 -04:00
readonly originalPolicy : string ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SecurityPolicyViolationEvent/referrer) */
2021-08-26 20:12:59 -04:00
readonly referrer : string ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SecurityPolicyViolationEvent/sample) */
2021-08-26 20:12:59 -04:00
readonly sample : string ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SecurityPolicyViolationEvent/sourceFile) */
2021-08-26 20:12:59 -04:00
readonly sourceFile : string ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SecurityPolicyViolationEvent/statusCode) */
2021-08-26 20:12:59 -04:00
readonly statusCode : number ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SecurityPolicyViolationEvent/violatedDirective) */
2021-08-26 20:12:59 -04:00
readonly violatedDirective : string ;
}
declare var SecurityPolicyViolationEvent : {
prototype : SecurityPolicyViolationEvent ;
new ( type : string , eventInitDict? : SecurityPolicyViolationEventInit ) : SecurityPolicyViolationEvent ;
2020-07-22 12:03:46 -04:00
} ;
interface ServiceWorkerEventMap extends AbstractWorkerEventMap {
"statechange" : Event ;
}
2021-12-09 17:12:21 -05:00
/ * *
* 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 .
* Available only in secure contexts .
2023-07-03 18:36:35 -04:00
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/ServiceWorker)
2021-12-09 17:12:21 -05:00
* /
2020-07-22 12:03:46 -04:00
interface ServiceWorker extends EventTarget , AbstractWorker {
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorker/statechange_event) */
2020-07-22 12:03:46 -04:00
onstatechange : ( ( this : ServiceWorker , ev : Event ) = > any ) | null ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorker/scriptURL) */
2020-07-22 12:03:46 -04:00
readonly scriptURL : string ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorker/state) */
2020-07-22 12:03:46 -04:00
readonly state : ServiceWorkerState ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorker/postMessage) */
2020-07-22 12:03:46 -04:00
postMessage ( message : any , transfer : Transferable [ ] ) : void ;
2021-12-09 17:12:21 -05:00
postMessage ( message : any , options? : StructuredSerializeOptions ) : void ;
2020-07-22 12:03:46 -04:00
addEventListener < K extends keyof ServiceWorkerEventMap > ( type : K , listener : ( this : ServiceWorker , ev : ServiceWorkerEventMap [ K ] ) = > any , options? : boolean | AddEventListenerOptions ) : void ;
addEventListener ( type : string , listener : EventListenerOrEventListenerObject , options? : boolean | AddEventListenerOptions ) : void ;
removeEventListener < K extends keyof ServiceWorkerEventMap > ( type : K , listener : ( this : ServiceWorker , ev : ServiceWorkerEventMap [ K ] ) = > any , options? : boolean | EventListenerOptions ) : void ;
removeEventListener ( type : string , listener : EventListenerOrEventListenerObject , options? : boolean | EventListenerOptions ) : void ;
}
declare var ServiceWorker : {
prototype : ServiceWorker ;
new ( ) : ServiceWorker ;
} ;
interface ServiceWorkerContainerEventMap {
"controllerchange" : Event ;
"message" : MessageEvent ;
"messageerror" : MessageEvent ;
}
2021-12-09 17:12:21 -05:00
/ * *
* 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 .
* Available only in secure contexts .
2023-07-03 18:36:35 -04:00
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/ServiceWorkerContainer)
2021-12-09 17:12:21 -05:00
* /
2020-07-22 12:03:46 -04:00
interface ServiceWorkerContainer extends EventTarget {
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerContainer/controller) */
2020-07-22 12:03:46 -04:00
readonly controller : ServiceWorker | null ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerContainer/controllerchange_event) */
2020-07-22 12:03:46 -04:00
oncontrollerchange : ( ( this : ServiceWorkerContainer , ev : Event ) = > any ) | null ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerContainer/message_event) */
2020-07-22 12:03:46 -04:00
onmessage : ( ( this : ServiceWorkerContainer , ev : MessageEvent ) = > any ) | null ;
2024-03-26 18:52:57 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerContainer/messageerror_event) */
2020-07-22 12:03:46 -04:00
onmessageerror : ( ( this : ServiceWorkerContainer , ev : MessageEvent ) = > any ) | null ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerContainer/ready) */
2020-07-22 12:03:46 -04:00
readonly ready : Promise < ServiceWorkerRegistration > ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerContainer/getRegistration) */
2021-08-26 20:12:59 -04:00
getRegistration ( clientURL? : string | URL ) : Promise < ServiceWorkerRegistration | undefined > ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerContainer/getRegistrations) */
2020-07-22 12:03:46 -04:00
getRegistrations ( ) : Promise < ReadonlyArray < ServiceWorkerRegistration > > ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerContainer/register) */
2021-02-24 23:16:19 -05:00
register ( scriptURL : string | URL , options? : RegistrationOptions ) : Promise < ServiceWorkerRegistration > ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerContainer/startMessages) */
2020-07-22 12:03:46 -04:00
startMessages ( ) : void ;
addEventListener < K extends keyof ServiceWorkerContainerEventMap > ( type : K , listener : ( this : ServiceWorkerContainer , ev : ServiceWorkerContainerEventMap [ K ] ) = > any , options? : boolean | AddEventListenerOptions ) : void ;
addEventListener ( type : string , listener : EventListenerOrEventListenerObject , options? : boolean | AddEventListenerOptions ) : void ;
removeEventListener < K extends keyof ServiceWorkerContainerEventMap > ( type : K , listener : ( this : ServiceWorkerContainer , ev : ServiceWorkerContainerEventMap [ K ] ) = > any , options? : boolean | EventListenerOptions ) : void ;
removeEventListener ( type : string , listener : EventListenerOrEventListenerObject , options? : boolean | EventListenerOptions ) : void ;
}
declare var ServiceWorkerContainer : {
prototype : ServiceWorkerContainer ;
new ( ) : ServiceWorkerContainer ;
} ;
interface ServiceWorkerGlobalScopeEventMap extends WorkerGlobalScopeEventMap {
"activate" : ExtendableEvent ;
"fetch" : FetchEvent ;
"install" : ExtendableEvent ;
"message" : ExtendableMessageEvent ;
"messageerror" : MessageEvent ;
"notificationclick" : NotificationEvent ;
"notificationclose" : NotificationEvent ;
"push" : PushEvent ;
2022-12-07 12:59:59 -05:00
"pushsubscriptionchange" : Event ;
2020-07-22 12:03:46 -04:00
}
2023-07-03 18:36:35 -04:00
/ * *
* This ServiceWorker API interface represents the global execution context of a service worker .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/ServiceWorkerGlobalScope)
* /
2020-07-22 12:03:46 -04:00
interface ServiceWorkerGlobalScope extends WorkerGlobalScope {
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerGlobalScope/clients) */
2020-07-22 12:03:46 -04:00
readonly clients : Clients ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerGlobalScope/activate_event) */
2020-07-22 12:03:46 -04:00
onactivate : ( ( this : ServiceWorkerGlobalScope , ev : ExtendableEvent ) = > any ) | null ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerGlobalScope/fetch_event) */
2020-07-22 12:03:46 -04:00
onfetch : ( ( this : ServiceWorkerGlobalScope , ev : FetchEvent ) = > any ) | null ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerGlobalScope/install_event) */
2020-07-22 12:03:46 -04:00
oninstall : ( ( this : ServiceWorkerGlobalScope , ev : ExtendableEvent ) = > any ) | null ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerGlobalScope/message_event) */
2020-07-22 12:03:46 -04:00
onmessage : ( ( this : ServiceWorkerGlobalScope , ev : ExtendableMessageEvent ) = > any ) | null ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerGlobalScope/messageerror_event) */
2020-07-22 12:03:46 -04:00
onmessageerror : ( ( this : ServiceWorkerGlobalScope , ev : MessageEvent ) = > any ) | null ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerGlobalScope/notificationclick_event) */
2020-07-22 12:03:46 -04:00
onnotificationclick : ( ( this : ServiceWorkerGlobalScope , ev : NotificationEvent ) = > any ) | null ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerGlobalScope/notificationclose_event) */
2020-07-22 12:03:46 -04:00
onnotificationclose : ( ( this : ServiceWorkerGlobalScope , ev : NotificationEvent ) = > any ) | null ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerGlobalScope/push_event) */
2020-07-22 12:03:46 -04:00
onpush : ( ( this : ServiceWorkerGlobalScope , ev : PushEvent ) = > any ) | null ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerGlobalScope/pushsubscriptionchange_event) */
2022-12-07 12:59:59 -05:00
onpushsubscriptionchange : ( ( this : ServiceWorkerGlobalScope , ev : Event ) = > any ) | null ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerGlobalScope/registration) */
2020-07-22 12:03:46 -04:00
readonly registration : ServiceWorkerRegistration ;
2024-03-26 18:52:57 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerGlobalScope/serviceWorker) */
2022-09-19 17:00:01 -04:00
readonly serviceWorker : ServiceWorker ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerGlobalScope/skipWaiting) */
2020-07-22 12:03:46 -04:00
skipWaiting ( ) : Promise < void > ;
addEventListener < K extends keyof ServiceWorkerGlobalScopeEventMap > ( type : K , listener : ( this : ServiceWorkerGlobalScope , ev : ServiceWorkerGlobalScopeEventMap [ K ] ) = > any , options? : boolean | AddEventListenerOptions ) : void ;
addEventListener ( type : string , listener : EventListenerOrEventListenerObject , options? : boolean | AddEventListenerOptions ) : void ;
removeEventListener < K extends keyof ServiceWorkerGlobalScopeEventMap > ( type : K , listener : ( this : ServiceWorkerGlobalScope , ev : ServiceWorkerGlobalScopeEventMap [ K ] ) = > any , options? : boolean | EventListenerOptions ) : void ;
removeEventListener ( type : string , listener : EventListenerOrEventListenerObject , options? : boolean | EventListenerOptions ) : void ;
}
declare var ServiceWorkerGlobalScope : {
prototype : ServiceWorkerGlobalScope ;
new ( ) : ServiceWorkerGlobalScope ;
} ;
interface ServiceWorkerRegistrationEventMap {
"updatefound" : Event ;
}
2021-12-09 17:12:21 -05:00
/ * *
* 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 .
* Available only in secure contexts .
2023-07-03 18:36:35 -04:00
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration)
2021-12-09 17:12:21 -05:00
* /
2020-07-22 12:03:46 -04:00
interface ServiceWorkerRegistration extends EventTarget {
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/active) */
2020-07-22 12:03:46 -04:00
readonly active : ServiceWorker | null ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/installing) */
2020-07-22 12:03:46 -04:00
readonly installing : ServiceWorker | null ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/navigationPreload) */
2022-05-31 20:19:18 -04:00
readonly navigationPreload : NavigationPreloadManager ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/updatefound_event) */
2020-07-22 12:03:46 -04:00
onupdatefound : ( ( this : ServiceWorkerRegistration , ev : Event ) = > any ) | null ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/pushManager) */
2020-07-22 12:03:46 -04:00
readonly pushManager : PushManager ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/scope) */
2020-07-22 12:03:46 -04:00
readonly scope : string ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/updateViaCache) */
2020-07-22 12:03:46 -04:00
readonly updateViaCache : ServiceWorkerUpdateViaCache ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/waiting) */
2020-07-22 12:03:46 -04:00
readonly waiting : ServiceWorker | null ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/getNotifications) */
2020-07-22 12:03:46 -04:00
getNotifications ( filter? : GetNotificationOptions ) : Promise < Notification [ ] > ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/showNotification) */
2020-07-22 12:03:46 -04:00
showNotification ( title : string , options? : NotificationOptions ) : Promise < void > ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/unregister) */
2020-07-22 12:03:46 -04:00
unregister ( ) : Promise < boolean > ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/update) */
2020-07-22 12:03:46 -04:00
update ( ) : Promise < void > ;
addEventListener < K extends keyof ServiceWorkerRegistrationEventMap > ( type : K , listener : ( this : ServiceWorkerRegistration , ev : ServiceWorkerRegistrationEventMap [ K ] ) = > any , options? : boolean | AddEventListenerOptions ) : void ;
addEventListener ( type : string , listener : EventListenerOrEventListenerObject , options? : boolean | AddEventListenerOptions ) : void ;
removeEventListener < K extends keyof ServiceWorkerRegistrationEventMap > ( type : K , listener : ( this : ServiceWorkerRegistration , ev : ServiceWorkerRegistrationEventMap [ K ] ) = > any , options? : boolean | EventListenerOptions ) : void ;
removeEventListener ( type : string , listener : EventListenerOrEventListenerObject , options? : boolean | EventListenerOptions ) : void ;
}
declare var ServiceWorkerRegistration : {
prototype : ServiceWorkerRegistration ;
new ( ) : ServiceWorkerRegistration ;
} ;
interface SharedWorkerGlobalScopeEventMap extends WorkerGlobalScopeEventMap {
"connect" : MessageEvent ;
}
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SharedWorkerGlobalScope) */
2020-07-22 12:03:46 -04:00
interface SharedWorkerGlobalScope extends WorkerGlobalScope {
2023-07-03 18:36:35 -04:00
/ * *
* 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 .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/SharedWorkerGlobalScope/name)
* /
2020-07-22 12:03:46 -04:00
readonly name : string ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SharedWorkerGlobalScope/connect_event) */
2020-07-22 12:03:46 -04:00
onconnect : ( ( this : SharedWorkerGlobalScope , ev : MessageEvent ) = > any ) | null ;
2023-07-03 18:36:35 -04:00
/ * *
* Aborts sharedWorkerGlobal .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/SharedWorkerGlobalScope/close)
* /
2020-07-22 12:03:46 -04:00
close ( ) : void ;
addEventListener < K extends keyof SharedWorkerGlobalScopeEventMap > ( type : K , listener : ( this : SharedWorkerGlobalScope , ev : SharedWorkerGlobalScopeEventMap [ K ] ) = > any , options? : boolean | AddEventListenerOptions ) : void ;
addEventListener ( type : string , listener : EventListenerOrEventListenerObject , options? : boolean | AddEventListenerOptions ) : void ;
removeEventListener < K extends keyof SharedWorkerGlobalScopeEventMap > ( type : K , listener : ( this : SharedWorkerGlobalScope , ev : SharedWorkerGlobalScopeEventMap [ K ] ) = > any , options? : boolean | EventListenerOptions ) : void ;
removeEventListener ( type : string , listener : EventListenerOrEventListenerObject , options? : boolean | EventListenerOptions ) : void ;
}
declare var SharedWorkerGlobalScope : {
prototype : SharedWorkerGlobalScope ;
new ( ) : SharedWorkerGlobalScope ;
} ;
2023-07-03 18:36:35 -04:00
/ * *
* Available only in secure contexts .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/StorageManager)
* /
2020-07-22 12:03:46 -04:00
interface StorageManager {
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/StorageManager/estimate) */
2020-07-22 12:03:46 -04:00
estimate ( ) : Promise < StorageEstimate > ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/StorageManager/getDirectory) */
2022-03-01 15:44:43 -05:00
getDirectory ( ) : Promise < FileSystemDirectoryHandle > ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/StorageManager/persisted) */
2020-07-22 12:03:46 -04:00
persisted ( ) : Promise < boolean > ;
}
declare var StorageManager : {
prototype : StorageManager ;
new ( ) : StorageManager ;
} ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/StylePropertyMapReadOnly) */
interface StylePropertyMapReadOnly {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/StylePropertyMapReadOnly/size) */
readonly size : number ;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/StylePropertyMapReadOnly/get) */
get ( property : string ) : undefined | CSSStyleValue ;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/StylePropertyMapReadOnly/getAll) */
getAll ( property : string ) : CSSStyleValue [ ] ;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/StylePropertyMapReadOnly/has) */
has ( property : string ) : boolean ;
forEach ( callbackfn : ( value : CSSStyleValue [ ] , key : string , parent : StylePropertyMapReadOnly ) = > void , thisArg? : any ) : void ;
}
declare var StylePropertyMapReadOnly : {
prototype : StylePropertyMapReadOnly ;
new ( ) : StylePropertyMapReadOnly ;
} ;
2021-12-09 17:12:21 -05:00
/ * *
* 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 ) .
* Available only in secure contexts .
2023-07-03 18:36:35 -04:00
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/SubtleCrypto)
2021-12-09 17:12:21 -05:00
* /
2020-07-22 12:03:46 -04:00
interface SubtleCrypto {
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/decrypt) */
2022-09-19 17:00:01 -04:00
decrypt ( algorithm : AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams , key : CryptoKey , data : BufferSource ) : Promise < ArrayBuffer > ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/deriveBits) */
2021-08-26 20:12:59 -04:00
deriveBits ( algorithm : AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params , baseKey : CryptoKey , length : number ) : Promise < ArrayBuffer > ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/deriveKey) */
2021-08-26 20:12:59 -04:00
deriveKey ( algorithm : AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params , baseKey : CryptoKey , derivedKeyType : AlgorithmIdentifier | AesDerivedKeyParams | HmacImportParams | HkdfParams | Pbkdf2Params , extractable : boolean , keyUsages : KeyUsage [ ] ) : Promise < CryptoKey > ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/digest) */
2021-08-26 20:12:59 -04:00
digest ( algorithm : AlgorithmIdentifier , data : BufferSource ) : Promise < ArrayBuffer > ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/encrypt) */
2022-09-19 17:00:01 -04:00
encrypt ( algorithm : AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams , key : CryptoKey , data : BufferSource ) : Promise < ArrayBuffer > ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/exportKey) */
2020-08-24 19:43:54 -04:00
exportKey ( format : "jwk" , key : CryptoKey ) : Promise < JsonWebKey > ;
2021-08-26 20:12:59 -04:00
exportKey ( format : Exclude < KeyFormat , " jwk " > , key : CryptoKey ) : Promise < ArrayBuffer > ;
2023-12-06 18:49:34 -05:00
exportKey ( format : KeyFormat , key : CryptoKey ) : Promise < ArrayBuffer | JsonWebKey > ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/generateKey) */
2023-12-06 18:49:34 -05:00
generateKey ( algorithm : "Ed25519" , extractable : boolean , keyUsages : ReadonlyArray < "sign" | "verify" > ) : Promise < CryptoKeyPair > ;
2022-05-31 20:19:18 -04:00
generateKey ( algorithm : RsaHashedKeyGenParams | EcKeyGenParams , extractable : boolean , keyUsages : ReadonlyArray < KeyUsage > ) : Promise < CryptoKeyPair > ;
generateKey ( algorithm : AesKeyGenParams | HmacKeyGenParams | Pbkdf2Params , extractable : boolean , keyUsages : ReadonlyArray < KeyUsage > ) : Promise < CryptoKey > ;
2020-11-23 17:31:10 -05:00
generateKey ( algorithm : AlgorithmIdentifier , extractable : boolean , keyUsages : KeyUsage [ ] ) : Promise < CryptoKeyPair | CryptoKey > ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/importKey) */
2022-05-31 20:19:18 -04:00
importKey ( format : "jwk" , keyData : JsonWebKey , algorithm : AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm , extractable : boolean , keyUsages : ReadonlyArray < KeyUsage > ) : Promise < CryptoKey > ;
2021-08-26 20:12:59 -04:00
importKey ( format : Exclude < KeyFormat , " jwk " > , keyData : BufferSource , algorithm : AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm , extractable : boolean , keyUsages : KeyUsage [ ] ) : Promise < CryptoKey > ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/sign) */
2021-08-26 20:12:59 -04:00
sign ( algorithm : AlgorithmIdentifier | RsaPssParams | EcdsaParams , key : CryptoKey , data : BufferSource ) : Promise < ArrayBuffer > ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/unwrapKey) */
2021-08-26 20:12:59 -04:00
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 > ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/verify) */
2021-08-26 20:12:59 -04:00
verify ( algorithm : AlgorithmIdentifier | RsaPssParams | EcdsaParams , key : CryptoKey , signature : BufferSource , data : BufferSource ) : Promise < boolean > ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/wrapKey) */
2021-08-26 20:12:59 -04:00
wrapKey ( format : KeyFormat , key : CryptoKey , wrappingKey : CryptoKey , wrapAlgorithm : AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams ) : Promise < ArrayBuffer > ;
2020-07-22 12:03:46 -04:00
}
declare var SubtleCrypto : {
prototype : SubtleCrypto ;
new ( ) : SubtleCrypto ;
} ;
2023-07-03 18:36:35 -04:00
/ * *
* 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 .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/TextDecoder)
* /
2020-07-22 12:03:46 -04:00
interface TextDecoder extends TextDecoderCommon {
/ * *
2021-02-24 23:16:19 -05:00
* 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 .
2021-05-27 19:33:11 -04:00
*
2020-07-22 12:03:46 -04:00
* ` ` `
* var string = "" , decoder = new TextDecoder ( encoding ) , buffer ;
* while ( buffer = next_chunk ( ) ) {
* string += decoder . decode ( buffer , { stream :true } ) ;
* }
2021-02-24 23:16:19 -05:00
* string += decoder . decode ( ) ; // end-of-queue
2020-07-22 12:03:46 -04:00
* ` ` `
2021-05-27 19:33:11 -04:00
*
2020-07-22 12:03:46 -04:00
* If the error mode is "fatal" and encoding ' s decoder returns error , throws a TypeError .
2023-07-03 18:36:35 -04:00
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/TextDecoder/decode)
2020-07-22 12:03:46 -04:00
* /
2023-09-09 15:03:21 -04:00
decode ( input? : AllowSharedBufferSource , options? : TextDecodeOptions ) : string ;
2020-07-22 12:03:46 -04:00
}
declare var TextDecoder : {
prototype : TextDecoder ;
new ( label? : string , options? : TextDecoderOptions ) : TextDecoder ;
} ;
interface TextDecoderCommon {
2023-07-03 18:36:35 -04:00
/ * *
* Returns encoding ' s name , lowercased .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/TextDecoder/encoding)
* /
2020-07-22 12:03:46 -04:00
readonly encoding : string ;
2023-07-03 18:36:35 -04:00
/ * *
* Returns true if error mode is "fatal" , otherwise false .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/TextDecoder/fatal)
* /
2020-07-22 12:03:46 -04:00
readonly fatal : boolean ;
2023-07-03 18:36:35 -04:00
/ * *
* Returns the value of ignore BOM .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/TextDecoder/ignoreBOM)
* /
2020-07-22 12:03:46 -04:00
readonly ignoreBOM : boolean ;
}
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextDecoderStream) */
2020-07-22 12:03:46 -04:00
interface TextDecoderStream extends GenericTransformStream , TextDecoderCommon {
readonly readable : ReadableStream < string > ;
readonly writable : WritableStream < BufferSource > ;
}
declare var TextDecoderStream : {
prototype : TextDecoderStream ;
new ( label? : string , options? : TextDecoderOptions ) : TextDecoderStream ;
} ;
2023-07-03 18:36:35 -04:00
/ * *
* 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 .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/TextEncoder)
* /
2020-07-22 12:03:46 -04:00
interface TextEncoder extends TextEncoderCommon {
2023-07-03 18:36:35 -04:00
/ * *
* Returns the result of running UTF - 8 ' s encoder .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/TextEncoder/encode)
* /
2020-07-22 12:03:46 -04:00
encode ( input? : string ) : Uint8Array ;
2023-07-03 18:36:35 -04:00
/ * *
* 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 .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/TextEncoder/encodeInto)
* /
2020-07-22 12:03:46 -04:00
encodeInto ( source : string , destination : Uint8Array ) : TextEncoderEncodeIntoResult ;
}
declare var TextEncoder : {
prototype : TextEncoder ;
new ( ) : TextEncoder ;
} ;
interface TextEncoderCommon {
2023-07-03 18:36:35 -04:00
/ * *
* Returns "utf-8" .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/TextEncoder/encoding)
* /
2020-07-22 12:03:46 -04:00
readonly encoding : string ;
}
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextEncoderStream) */
2020-07-22 12:03:46 -04:00
interface TextEncoderStream extends GenericTransformStream , TextEncoderCommon {
readonly readable : ReadableStream < Uint8Array > ;
readonly writable : WritableStream < string > ;
}
declare var TextEncoderStream : {
prototype : TextEncoderStream ;
new ( ) : TextEncoderStream ;
} ;
2023-07-03 18:36:35 -04:00
/ * *
* The dimensions of a piece of text in the canvas , as created by the CanvasRenderingContext2D . measureText ( ) method .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/TextMetrics)
* /
2020-07-22 12:03:46 -04:00
interface TextMetrics {
2023-07-03 18:36:35 -04:00
/ * *
* Returns the measurement described below .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/TextMetrics/actualBoundingBoxAscent)
* /
2020-07-22 12:03:46 -04:00
readonly actualBoundingBoxAscent : number ;
2023-07-03 18:36:35 -04:00
/ * *
* Returns the measurement described below .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/TextMetrics/actualBoundingBoxDescent)
* /
2020-07-22 12:03:46 -04:00
readonly actualBoundingBoxDescent : number ;
2023-07-03 18:36:35 -04:00
/ * *
* Returns the measurement described below .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/TextMetrics/actualBoundingBoxLeft)
* /
2020-07-22 12:03:46 -04:00
readonly actualBoundingBoxLeft : number ;
2023-07-03 18:36:35 -04:00
/ * *
* Returns the measurement described below .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/TextMetrics/actualBoundingBoxRight)
* /
2020-07-22 12:03:46 -04:00
readonly actualBoundingBoxRight : number ;
2024-03-26 18:52:57 -04:00
/ * *
* Returns the measurement described below .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/TextMetrics/alphabeticBaseline)
* /
readonly alphabeticBaseline : number ;
/ * *
* Returns the measurement described below .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/TextMetrics/emHeightAscent)
* /
readonly emHeightAscent : number ;
/ * *
* Returns the measurement described below .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/TextMetrics/emHeightDescent)
* /
readonly emHeightDescent : number ;
2023-07-03 18:36:35 -04:00
/ * *
* Returns the measurement described below .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/TextMetrics/fontBoundingBoxAscent)
* /
2021-08-26 20:12:59 -04:00
readonly fontBoundingBoxAscent : number ;
2023-07-03 18:36:35 -04:00
/ * *
* Returns the measurement described below .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/TextMetrics/fontBoundingBoxDescent)
* /
2021-08-26 20:12:59 -04:00
readonly fontBoundingBoxDescent : number ;
2024-03-26 18:52:57 -04:00
/ * *
* Returns the measurement described below .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/TextMetrics/hangingBaseline)
* /
readonly hangingBaseline : number ;
/ * *
* Returns the measurement described below .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/TextMetrics/ideographicBaseline)
* /
readonly ideographicBaseline : number ;
2023-07-03 18:36:35 -04:00
/ * *
* Returns the measurement described below .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/TextMetrics/width)
* /
2020-07-22 12:03:46 -04:00
readonly width : number ;
}
declare var TextMetrics : {
prototype : TextMetrics ;
new ( ) : TextMetrics ;
} ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStream) */
2020-07-22 12:03:46 -04:00
interface TransformStream < I = any , O = any > {
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStream/readable) */
2020-07-22 12:03:46 -04:00
readonly readable : ReadableStream < O > ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStream/writable) */
2020-07-22 12:03:46 -04:00
readonly writable : WritableStream < I > ;
}
declare var TransformStream : {
prototype : TransformStream ;
new < I = any , O = any > ( transformer? : Transformer < I , O > , writableStrategy? : QueuingStrategy < I > , readableStrategy? : QueuingStrategy < O > ) : TransformStream < I , O > ;
} ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController) */
2020-07-22 12:03:46 -04:00
interface TransformStreamDefaultController < O = any > {
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/desiredSize) */
2020-07-22 12:03:46 -04:00
readonly desiredSize : number | null ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/enqueue) */
2021-08-26 20:12:59 -04:00
enqueue ( chunk? : O ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/error) */
2020-07-22 12:03:46 -04:00
error ( reason? : any ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/terminate) */
2020-07-22 12:03:46 -04:00
terminate ( ) : void ;
}
2020-11-23 17:31:10 -05:00
declare var TransformStreamDefaultController : {
prototype : TransformStreamDefaultController ;
new ( ) : TransformStreamDefaultController ;
} ;
2023-07-03 18:36:35 -04:00
/ * *
* The URL interface represents an object providing static methods used for creating object URLs .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/URL)
* /
2020-07-22 12:03:46 -04:00
interface URL {
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/hash) */
2020-07-22 12:03:46 -04:00
hash : string ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/host) */
2020-07-22 12:03:46 -04:00
host : string ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/hostname) */
2020-07-22 12:03:46 -04:00
hostname : string ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/href) */
2020-07-22 12:03:46 -04:00
href : string ;
toString ( ) : string ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/origin) */
2020-07-22 12:03:46 -04:00
readonly origin : string ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/password) */
2020-07-22 12:03:46 -04:00
password : string ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/pathname) */
2020-07-22 12:03:46 -04:00
pathname : string ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/port) */
2020-07-22 12:03:46 -04:00
port : string ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/protocol) */
2020-07-22 12:03:46 -04:00
protocol : string ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/search) */
2020-07-22 12:03:46 -04:00
search : string ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/searchParams) */
2020-07-22 12:03:46 -04:00
readonly searchParams : URLSearchParams ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/username) */
2020-07-22 12:03:46 -04:00
username : string ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/toJSON) */
2020-07-22 12:03:46 -04:00
toJSON ( ) : string ;
}
declare var URL : {
prototype : URL ;
2021-08-26 20:12:59 -04:00
new ( url : string | URL , base? : string | URL ) : URL ;
2023-08-23 03:31:13 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/canParse_static) */
2023-09-09 15:03:21 -04:00
canParse ( url : string | URL , base? : string ) : boolean ;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/createObjectURL_static) */
2021-12-09 17:12:21 -05:00
createObjectURL ( obj : Blob ) : string ;
2023-09-09 15:03:21 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/revokeObjectURL_static) */
2020-07-22 12:03:46 -04:00
revokeObjectURL ( url : string ) : void ;
} ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams) */
2020-07-22 12:03:46 -04:00
interface URLSearchParams {
2023-09-09 15:03:21 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/size) */
readonly size : number ;
2023-07-03 18:36:35 -04:00
/ * *
* Appends a specified key / value pair as a new search parameter .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/URLSearchParams/append)
* /
2020-07-22 12:03:46 -04:00
append ( name : string , value : string ) : void ;
2023-07-03 18:36:35 -04:00
/ * *
* Deletes the given search parameter , and its associated value , from the list of all search parameters .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/URLSearchParams/delete)
* /
2023-09-09 15:03:21 -04:00
delete ( name : string , value? : string ) : void ;
2023-07-03 18:36:35 -04:00
/ * *
* Returns the first value associated to the given search parameter .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/URLSearchParams/get)
* /
2020-07-22 12:03:46 -04:00
get ( name : string ) : string | null ;
2023-07-03 18:36:35 -04:00
/ * *
* Returns all the values association with a given search parameter .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/URLSearchParams/getAll)
* /
2020-07-22 12:03:46 -04:00
getAll ( name : string ) : string [ ] ;
2023-07-03 18:36:35 -04:00
/ * *
* Returns a Boolean indicating if such a search parameter exists .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/URLSearchParams/has)
* /
2023-09-09 15:03:21 -04:00
has ( name : string , value? : string ) : boolean ;
2023-07-03 18:36:35 -04:00
/ * *
* Sets the value associated to a given search parameter to the given value . If there were several values , delete the others .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/URLSearchParams/set)
* /
2020-07-22 12:03:46 -04:00
set ( name : string , value : string ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/sort) */
2020-07-22 12:03:46 -04:00
sort ( ) : void ;
2021-12-09 17:12:21 -05:00
/** Returns a string containing a query string suitable for use in a URL. Does not include the question mark. */
2020-07-22 12:03:46 -04:00
toString ( ) : string ;
forEach ( callbackfn : ( value : string , key : string , parent : URLSearchParams ) = > void , thisArg? : any ) : void ;
}
declare var URLSearchParams : {
prototype : URLSearchParams ;
new ( init? : string [ ] [ ] | Record < string , string > | string | URLSearchParams ) : URLSearchParams ;
} ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/VideoColorSpace) */
2022-05-31 20:19:18 -04:00
interface VideoColorSpace {
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/VideoColorSpace/fullRange) */
2022-05-31 20:19:18 -04:00
readonly fullRange : boolean | null ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/VideoColorSpace/matrix) */
2022-05-31 20:19:18 -04:00
readonly matrix : VideoMatrixCoefficients | null ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/VideoColorSpace/primaries) */
2022-05-31 20:19:18 -04:00
readonly primaries : VideoColorPrimaries | null ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/VideoColorSpace/transfer) */
2022-05-31 20:19:18 -04:00
readonly transfer : VideoTransferCharacteristics | null ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/VideoColorSpace/toJSON) */
2022-05-31 20:19:18 -04:00
toJSON ( ) : VideoColorSpaceInit ;
}
declare var VideoColorSpace : {
prototype : VideoColorSpace ;
new ( init? : VideoColorSpaceInit ) : VideoColorSpace ;
} ;
2023-07-03 18:36:35 -04:00
interface VideoDecoderEventMap {
"dequeue" : Event ;
}
/ * *
* Available only in secure contexts .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/VideoDecoder)
* /
interface VideoDecoder extends EventTarget {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/VideoDecoder/decodeQueueSize) */
readonly decodeQueueSize : number ;
ondequeue : ( ( this : VideoDecoder , ev : Event ) = > any ) | null ;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/VideoDecoder/state) */
readonly state : CodecState ;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/VideoDecoder/close) */
close ( ) : void ;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/VideoDecoder/configure) */
configure ( config : VideoDecoderConfig ) : void ;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/VideoDecoder/decode) */
decode ( chunk : EncodedVideoChunk ) : void ;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/VideoDecoder/flush) */
flush ( ) : Promise < void > ;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/VideoDecoder/reset) */
reset ( ) : void ;
addEventListener < K extends keyof VideoDecoderEventMap > ( type : K , listener : ( this : VideoDecoder , ev : VideoDecoderEventMap [ K ] ) = > any , options? : boolean | AddEventListenerOptions ) : void ;
addEventListener ( type : string , listener : EventListenerOrEventListenerObject , options? : boolean | AddEventListenerOptions ) : void ;
removeEventListener < K extends keyof VideoDecoderEventMap > ( type : K , listener : ( this : VideoDecoder , ev : VideoDecoderEventMap [ K ] ) = > any , options? : boolean | EventListenerOptions ) : void ;
removeEventListener ( type : string , listener : EventListenerOrEventListenerObject , options? : boolean | EventListenerOptions ) : void ;
}
declare var VideoDecoder : {
prototype : VideoDecoder ;
new ( init : VideoDecoderInit ) : VideoDecoder ;
isConfigSupported ( config : VideoDecoderConfig ) : Promise < VideoDecoderSupport > ;
} ;
interface VideoEncoderEventMap {
"dequeue" : Event ;
}
/ * *
* Available only in secure contexts .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/VideoEncoder)
* /
interface VideoEncoder extends EventTarget {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/VideoEncoder/encodeQueueSize) */
readonly encodeQueueSize : number ;
ondequeue : ( ( this : VideoEncoder , ev : Event ) = > any ) | null ;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/VideoEncoder/state) */
readonly state : CodecState ;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/VideoEncoder/close) */
close ( ) : void ;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/VideoEncoder/configure) */
configure ( config : VideoEncoderConfig ) : void ;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/VideoEncoder/encode) */
encode ( frame : VideoFrame , options? : VideoEncoderEncodeOptions ) : void ;
flush ( ) : Promise < void > ;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/VideoEncoder/reset) */
reset ( ) : void ;
addEventListener < K extends keyof VideoEncoderEventMap > ( type : K , listener : ( this : VideoEncoder , ev : VideoEncoderEventMap [ K ] ) = > any , options? : boolean | AddEventListenerOptions ) : void ;
addEventListener ( type : string , listener : EventListenerOrEventListenerObject , options? : boolean | AddEventListenerOptions ) : void ;
removeEventListener < K extends keyof VideoEncoderEventMap > ( type : K , listener : ( this : VideoEncoder , ev : VideoEncoderEventMap [ K ] ) = > any , options? : boolean | EventListenerOptions ) : void ;
removeEventListener ( type : string , listener : EventListenerOrEventListenerObject , options? : boolean | EventListenerOptions ) : void ;
}
declare var VideoEncoder : {
prototype : VideoEncoder ;
new ( init : VideoEncoderInit ) : VideoEncoder ;
isConfigSupported ( config : VideoEncoderConfig ) : Promise < VideoEncoderSupport > ;
} ;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/VideoFrame) */
interface VideoFrame {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/VideoFrame/codedHeight) */
readonly codedHeight : number ;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/VideoFrame/codedRect) */
readonly codedRect : DOMRectReadOnly | null ;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/VideoFrame/codedWidth) */
readonly codedWidth : number ;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/VideoFrame/colorSpace) */
readonly colorSpace : VideoColorSpace ;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/VideoFrame/displayHeight) */
readonly displayHeight : number ;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/VideoFrame/displayWidth) */
readonly displayWidth : number ;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/VideoFrame/duration) */
readonly duration : number | null ;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/VideoFrame/format) */
readonly format : VideoPixelFormat | null ;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/VideoFrame/timestamp) */
readonly timestamp : number ;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/VideoFrame/visibleRect) */
readonly visibleRect : DOMRectReadOnly | null ;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/VideoFrame/allocationSize) */
allocationSize ( options? : VideoFrameCopyToOptions ) : number ;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/VideoFrame/clone) */
clone ( ) : VideoFrame ;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/VideoFrame/close) */
close ( ) : void ;
2024-03-26 18:52:57 -04:00
copyTo ( destination : AllowSharedBufferSource , options? : VideoFrameCopyToOptions ) : Promise < PlaneLayout [ ] > ;
2023-07-03 18:36:35 -04:00
}
declare var VideoFrame : {
prototype : VideoFrame ;
new ( image : CanvasImageSource , init? : VideoFrameInit ) : VideoFrame ;
2024-03-26 18:52:57 -04:00
new ( data : AllowSharedBufferSource , init : VideoFrameBufferInit ) : VideoFrame ;
2023-07-03 18:36:35 -04:00
} ;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WEBGL_color_buffer_float) */
2020-07-22 12:03:46 -04:00
interface WEBGL_color_buffer_float {
2023-03-21 11:46:40 -04:00
readonly RGBA32F_EXT : 0x8814 ;
readonly FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT : 0x8211 ;
readonly UNSIGNED_NORMALIZED_EXT : 0x8C17 ;
2020-07-22 12:03:46 -04:00
}
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WEBGL_compressed_texture_astc) */
2020-07-22 12:03:46 -04:00
interface WEBGL_compressed_texture_astc {
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WEBGL_compressed_texture_astc/getSupportedProfiles) */
2020-07-22 12:03:46 -04:00
getSupportedProfiles ( ) : string [ ] ;
2023-03-21 11:46:40 -04:00
readonly COMPRESSED_RGBA_ASTC_4x4_KHR : 0x93B0 ;
readonly COMPRESSED_RGBA_ASTC_5x4_KHR : 0x93B1 ;
readonly COMPRESSED_RGBA_ASTC_5x5_KHR : 0x93B2 ;
readonly COMPRESSED_RGBA_ASTC_6x5_KHR : 0x93B3 ;
readonly COMPRESSED_RGBA_ASTC_6x6_KHR : 0x93B4 ;
readonly COMPRESSED_RGBA_ASTC_8x5_KHR : 0x93B5 ;
readonly COMPRESSED_RGBA_ASTC_8x6_KHR : 0x93B6 ;
readonly COMPRESSED_RGBA_ASTC_8x8_KHR : 0x93B7 ;
readonly COMPRESSED_RGBA_ASTC_10x5_KHR : 0x93B8 ;
readonly COMPRESSED_RGBA_ASTC_10x6_KHR : 0x93B9 ;
readonly COMPRESSED_RGBA_ASTC_10x8_KHR : 0x93BA ;
readonly COMPRESSED_RGBA_ASTC_10x10_KHR : 0x93BB ;
readonly COMPRESSED_RGBA_ASTC_12x10_KHR : 0x93BC ;
readonly COMPRESSED_RGBA_ASTC_12x12_KHR : 0x93BD ;
readonly COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR : 0x93D0 ;
readonly COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR : 0x93D1 ;
readonly COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR : 0x93D2 ;
readonly COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR : 0x93D3 ;
readonly COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR : 0x93D4 ;
readonly COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR : 0x93D5 ;
readonly COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR : 0x93D6 ;
readonly COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR : 0x93D7 ;
readonly COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR : 0x93D8 ;
readonly COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR : 0x93D9 ;
readonly COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR : 0x93DA ;
readonly COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR : 0x93DB ;
readonly COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR : 0x93DC ;
readonly COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR : 0x93DD ;
2020-07-22 12:03:46 -04:00
}
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WEBGL_compressed_texture_etc) */
2021-08-26 20:12:59 -04:00
interface WEBGL_compressed_texture_etc {
2023-03-21 11:46:40 -04:00
readonly COMPRESSED_R11_EAC : 0x9270 ;
readonly COMPRESSED_SIGNED_R11_EAC : 0x9271 ;
readonly COMPRESSED_RG11_EAC : 0x9272 ;
readonly COMPRESSED_SIGNED_RG11_EAC : 0x9273 ;
readonly COMPRESSED_RGB8_ETC2 : 0x9274 ;
readonly COMPRESSED_SRGB8_ETC2 : 0x9275 ;
readonly COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 : 0x9276 ;
readonly COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 : 0x9277 ;
readonly COMPRESSED_RGBA8_ETC2_EAC : 0x9278 ;
readonly COMPRESSED_SRGB8_ALPHA8_ETC2_EAC : 0x9279 ;
2021-08-26 20:12:59 -04:00
}
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WEBGL_compressed_texture_etc1) */
2021-08-26 20:12:59 -04:00
interface WEBGL_compressed_texture_etc1 {
2023-03-21 11:46:40 -04:00
readonly COMPRESSED_RGB_ETC1_WEBGL : 0x8D64 ;
2021-08-26 20:12:59 -04:00
}
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WEBGL_compressed_texture_pvrtc) */
interface WEBGL_compressed_texture_pvrtc {
readonly COMPRESSED_RGB_PVRTC_4BPPV1_IMG : 0x8C00 ;
readonly COMPRESSED_RGB_PVRTC_2BPPV1_IMG : 0x8C01 ;
readonly COMPRESSED_RGBA_PVRTC_4BPPV1_IMG : 0x8C02 ;
readonly COMPRESSED_RGBA_PVRTC_2BPPV1_IMG : 0x8C03 ;
}
/ * *
* The WEBGL_compressed_texture_s3tc extension is part of the WebGL API and exposes four S3TC compressed texture formats .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/WEBGL_compressed_texture_s3tc)
* /
2020-07-22 12:03:46 -04:00
interface WEBGL_compressed_texture_s3tc {
2023-03-21 11:46:40 -04:00
readonly COMPRESSED_RGB_S3TC_DXT1_EXT : 0x83F0 ;
readonly COMPRESSED_RGBA_S3TC_DXT1_EXT : 0x83F1 ;
readonly COMPRESSED_RGBA_S3TC_DXT3_EXT : 0x83F2 ;
readonly COMPRESSED_RGBA_S3TC_DXT5_EXT : 0x83F3 ;
2020-07-22 12:03:46 -04:00
}
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WEBGL_compressed_texture_s3tc_srgb) */
2020-07-22 12:03:46 -04:00
interface WEBGL_compressed_texture_s3tc_srgb {
2023-03-21 11:46:40 -04:00
readonly COMPRESSED_SRGB_S3TC_DXT1_EXT : 0x8C4C ;
readonly COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT : 0x8C4D ;
readonly COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT : 0x8C4E ;
readonly COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT : 0x8C4F ;
2020-07-22 12:03:46 -04:00
}
2023-07-03 18:36:35 -04:00
/ * *
* 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 .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/WEBGL_debug_renderer_info)
* /
2020-07-22 12:03:46 -04:00
interface WEBGL_debug_renderer_info {
2023-03-21 11:46:40 -04:00
readonly UNMASKED_VENDOR_WEBGL : 0x9245 ;
readonly UNMASKED_RENDERER_WEBGL : 0x9246 ;
2020-07-22 12:03:46 -04:00
}
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WEBGL_debug_shaders) */
2020-07-22 12:03:46 -04:00
interface WEBGL_debug_shaders {
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WEBGL_debug_shaders/getTranslatedShaderSource) */
2020-07-22 12:03:46 -04:00
getTranslatedShaderSource ( shader : WebGLShader ) : string ;
}
2023-07-03 18:36:35 -04:00
/ * *
* The WEBGL_depth_texture extension is part of the WebGL API and defines 2 D depth and depth - stencil textures .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/WEBGL_depth_texture)
* /
2020-07-22 12:03:46 -04:00
interface WEBGL_depth_texture {
2023-03-21 11:46:40 -04:00
readonly UNSIGNED_INT_24_8_WEBGL : 0x84FA ;
2020-07-22 12:03:46 -04:00
}
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WEBGL_draw_buffers) */
2020-07-22 12:03:46 -04:00
interface WEBGL_draw_buffers {
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WEBGL_draw_buffers/drawBuffersWEBGL) */
2020-07-22 12:03:46 -04:00
drawBuffersWEBGL ( buffers : GLenum [ ] ) : void ;
2023-03-21 11:46:40 -04:00
readonly COLOR_ATTACHMENT0_WEBGL : 0x8CE0 ;
readonly COLOR_ATTACHMENT1_WEBGL : 0x8CE1 ;
readonly COLOR_ATTACHMENT2_WEBGL : 0x8CE2 ;
readonly COLOR_ATTACHMENT3_WEBGL : 0x8CE3 ;
readonly COLOR_ATTACHMENT4_WEBGL : 0x8CE4 ;
readonly COLOR_ATTACHMENT5_WEBGL : 0x8CE5 ;
readonly COLOR_ATTACHMENT6_WEBGL : 0x8CE6 ;
readonly COLOR_ATTACHMENT7_WEBGL : 0x8CE7 ;
readonly COLOR_ATTACHMENT8_WEBGL : 0x8CE8 ;
readonly COLOR_ATTACHMENT9_WEBGL : 0x8CE9 ;
readonly COLOR_ATTACHMENT10_WEBGL : 0x8CEA ;
readonly COLOR_ATTACHMENT11_WEBGL : 0x8CEB ;
readonly COLOR_ATTACHMENT12_WEBGL : 0x8CEC ;
readonly COLOR_ATTACHMENT13_WEBGL : 0x8CED ;
readonly COLOR_ATTACHMENT14_WEBGL : 0x8CEE ;
readonly COLOR_ATTACHMENT15_WEBGL : 0x8CEF ;
readonly DRAW_BUFFER0_WEBGL : 0x8825 ;
readonly DRAW_BUFFER1_WEBGL : 0x8826 ;
readonly DRAW_BUFFER2_WEBGL : 0x8827 ;
readonly DRAW_BUFFER3_WEBGL : 0x8828 ;
readonly DRAW_BUFFER4_WEBGL : 0x8829 ;
readonly DRAW_BUFFER5_WEBGL : 0x882A ;
readonly DRAW_BUFFER6_WEBGL : 0x882B ;
readonly DRAW_BUFFER7_WEBGL : 0x882C ;
readonly DRAW_BUFFER8_WEBGL : 0x882D ;
readonly DRAW_BUFFER9_WEBGL : 0x882E ;
readonly DRAW_BUFFER10_WEBGL : 0x882F ;
readonly DRAW_BUFFER11_WEBGL : 0x8830 ;
readonly DRAW_BUFFER12_WEBGL : 0x8831 ;
readonly DRAW_BUFFER13_WEBGL : 0x8832 ;
readonly DRAW_BUFFER14_WEBGL : 0x8833 ;
readonly DRAW_BUFFER15_WEBGL : 0x8834 ;
readonly MAX_COLOR_ATTACHMENTS_WEBGL : 0x8CDF ;
readonly MAX_DRAW_BUFFERS_WEBGL : 0x8824 ;
2020-07-22 12:03:46 -04:00
}
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WEBGL_lose_context) */
2020-07-22 12:03:46 -04:00
interface WEBGL_lose_context {
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WEBGL_lose_context/loseContext) */
2020-07-22 12:03:46 -04:00
loseContext ( ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WEBGL_lose_context/restoreContext) */
2020-07-22 12:03:46 -04:00
restoreContext ( ) : void ;
}
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WEBGL_multi_draw) */
2022-03-01 15:44:43 -05:00
interface WEBGL_multi_draw {
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WEBGL_multi_draw/multiDrawArraysInstancedWEBGL) */
2024-03-26 18:52:57 -04:00
multiDrawArraysInstancedWEBGL ( mode : GLenum , firstsList : Int32Array | GLint [ ] , firstsOffset : number , countsList : Int32Array | GLsizei [ ] , countsOffset : number , instanceCountsList : Int32Array | GLsizei [ ] , instanceCountsOffset : number , drawcount : GLsizei ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WEBGL_multi_draw/multiDrawArraysWEBGL) */
2024-03-26 18:52:57 -04:00
multiDrawArraysWEBGL ( mode : GLenum , firstsList : Int32Array | GLint [ ] , firstsOffset : number , countsList : Int32Array | GLsizei [ ] , countsOffset : number , drawcount : GLsizei ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WEBGL_multi_draw/multiDrawElementsInstancedWEBGL) */
2024-03-26 18:52:57 -04:00
multiDrawElementsInstancedWEBGL ( mode : GLenum , countsList : Int32Array | GLsizei [ ] , countsOffset : number , type : GLenum , offsetsList : Int32Array | GLsizei [ ] , offsetsOffset : number , instanceCountsList : Int32Array | GLsizei [ ] , instanceCountsOffset : number , drawcount : GLsizei ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WEBGL_multi_draw/multiDrawElementsWEBGL) */
2024-03-26 18:52:57 -04:00
multiDrawElementsWEBGL ( mode : GLenum , countsList : Int32Array | GLsizei [ ] , countsOffset : number , type : GLenum , offsetsList : Int32Array | GLsizei [ ] , offsetsOffset : number , drawcount : GLsizei ) : void ;
2022-03-01 15:44:43 -05:00
}
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext) */
2020-07-22 12:03:46 -04:00
interface WebGL2RenderingContext extends WebGL2RenderingContextBase , WebGL2RenderingContextOverloads , WebGLRenderingContextBase {
}
declare var WebGL2RenderingContext : {
prototype : WebGL2RenderingContext ;
new ( ) : WebGL2RenderingContext ;
2023-03-21 11:46:40 -04:00
readonly READ_BUFFER : 0x0C02 ;
readonly UNPACK_ROW_LENGTH : 0x0CF2 ;
readonly UNPACK_SKIP_ROWS : 0x0CF3 ;
readonly UNPACK_SKIP_PIXELS : 0x0CF4 ;
readonly PACK_ROW_LENGTH : 0x0D02 ;
readonly PACK_SKIP_ROWS : 0x0D03 ;
readonly PACK_SKIP_PIXELS : 0x0D04 ;
readonly COLOR : 0x1800 ;
readonly DEPTH : 0x1801 ;
readonly STENCIL : 0x1802 ;
readonly RED : 0x1903 ;
readonly RGB8 : 0x8051 ;
readonly RGB10_A2 : 0x8059 ;
readonly TEXTURE_BINDING_3D : 0x806A ;
readonly UNPACK_SKIP_IMAGES : 0x806D ;
readonly UNPACK_IMAGE_HEIGHT : 0x806E ;
readonly TEXTURE_3D : 0x806F ;
readonly TEXTURE_WRAP_R : 0x8072 ;
readonly MAX_3D_TEXTURE_SIZE : 0x8073 ;
readonly UNSIGNED_INT_2_10_10_10_REV : 0x8368 ;
readonly MAX_ELEMENTS_VERTICES : 0x80E8 ;
readonly MAX_ELEMENTS_INDICES : 0x80E9 ;
readonly TEXTURE_MIN_LOD : 0x813A ;
readonly TEXTURE_MAX_LOD : 0x813B ;
readonly TEXTURE_BASE_LEVEL : 0x813C ;
readonly TEXTURE_MAX_LEVEL : 0x813D ;
readonly MIN : 0x8007 ;
readonly MAX : 0x8008 ;
readonly DEPTH_COMPONENT24 : 0x81A6 ;
readonly MAX_TEXTURE_LOD_BIAS : 0x84FD ;
readonly TEXTURE_COMPARE_MODE : 0x884C ;
readonly TEXTURE_COMPARE_FUNC : 0x884D ;
readonly CURRENT_QUERY : 0x8865 ;
readonly QUERY_RESULT : 0x8866 ;
readonly QUERY_RESULT_AVAILABLE : 0x8867 ;
readonly STREAM_READ : 0x88E1 ;
readonly STREAM_COPY : 0x88E2 ;
readonly STATIC_READ : 0x88E5 ;
readonly STATIC_COPY : 0x88E6 ;
readonly DYNAMIC_READ : 0x88E9 ;
readonly DYNAMIC_COPY : 0x88EA ;
readonly MAX_DRAW_BUFFERS : 0x8824 ;
readonly DRAW_BUFFER0 : 0x8825 ;
readonly DRAW_BUFFER1 : 0x8826 ;
readonly DRAW_BUFFER2 : 0x8827 ;
readonly DRAW_BUFFER3 : 0x8828 ;
readonly DRAW_BUFFER4 : 0x8829 ;
readonly DRAW_BUFFER5 : 0x882A ;
readonly DRAW_BUFFER6 : 0x882B ;
readonly DRAW_BUFFER7 : 0x882C ;
readonly DRAW_BUFFER8 : 0x882D ;
readonly DRAW_BUFFER9 : 0x882E ;
readonly DRAW_BUFFER10 : 0x882F ;
readonly DRAW_BUFFER11 : 0x8830 ;
readonly DRAW_BUFFER12 : 0x8831 ;
readonly DRAW_BUFFER13 : 0x8832 ;
readonly DRAW_BUFFER14 : 0x8833 ;
readonly DRAW_BUFFER15 : 0x8834 ;
readonly MAX_FRAGMENT_UNIFORM_COMPONENTS : 0x8B49 ;
readonly MAX_VERTEX_UNIFORM_COMPONENTS : 0x8B4A ;
readonly SAMPLER_3D : 0x8B5F ;
readonly SAMPLER_2D_SHADOW : 0x8B62 ;
readonly FRAGMENT_SHADER_DERIVATIVE_HINT : 0x8B8B ;
readonly PIXEL_PACK_BUFFER : 0x88EB ;
readonly PIXEL_UNPACK_BUFFER : 0x88EC ;
readonly PIXEL_PACK_BUFFER_BINDING : 0x88ED ;
readonly PIXEL_UNPACK_BUFFER_BINDING : 0x88EF ;
readonly FLOAT_MAT2x3 : 0x8B65 ;
readonly FLOAT_MAT2x4 : 0x8B66 ;
readonly FLOAT_MAT3x2 : 0x8B67 ;
readonly FLOAT_MAT3x4 : 0x8B68 ;
readonly FLOAT_MAT4x2 : 0x8B69 ;
readonly FLOAT_MAT4x3 : 0x8B6A ;
readonly SRGB : 0x8C40 ;
readonly SRGB8 : 0x8C41 ;
readonly SRGB8_ALPHA8 : 0x8C43 ;
readonly COMPARE_REF_TO_TEXTURE : 0x884E ;
readonly RGBA32F : 0x8814 ;
readonly RGB32F : 0x8815 ;
readonly RGBA16F : 0x881A ;
readonly RGB16F : 0x881B ;
readonly VERTEX_ATTRIB_ARRAY_INTEGER : 0x88FD ;
readonly MAX_ARRAY_TEXTURE_LAYERS : 0x88FF ;
readonly MIN_PROGRAM_TEXEL_OFFSET : 0x8904 ;
readonly MAX_PROGRAM_TEXEL_OFFSET : 0x8905 ;
readonly MAX_VARYING_COMPONENTS : 0x8B4B ;
readonly TEXTURE_2D_ARRAY : 0x8C1A ;
readonly TEXTURE_BINDING_2D_ARRAY : 0x8C1D ;
readonly R11F_G11F_B10F : 0x8C3A ;
readonly UNSIGNED_INT_10F_11F_11F_REV : 0x8C3B ;
readonly RGB9_E5 : 0x8C3D ;
readonly UNSIGNED_INT_5_9_9_9_REV : 0x8C3E ;
readonly TRANSFORM_FEEDBACK_BUFFER_MODE : 0x8C7F ;
readonly MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS : 0x8C80 ;
readonly TRANSFORM_FEEDBACK_VARYINGS : 0x8C83 ;
readonly TRANSFORM_FEEDBACK_BUFFER_START : 0x8C84 ;
readonly TRANSFORM_FEEDBACK_BUFFER_SIZE : 0x8C85 ;
readonly TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN : 0x8C88 ;
readonly RASTERIZER_DISCARD : 0x8C89 ;
readonly MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS : 0x8C8A ;
readonly MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS : 0x8C8B ;
readonly INTERLEAVED_ATTRIBS : 0x8C8C ;
readonly SEPARATE_ATTRIBS : 0x8C8D ;
readonly TRANSFORM_FEEDBACK_BUFFER : 0x8C8E ;
readonly TRANSFORM_FEEDBACK_BUFFER_BINDING : 0x8C8F ;
readonly RGBA32UI : 0x8D70 ;
readonly RGB32UI : 0x8D71 ;
readonly RGBA16UI : 0x8D76 ;
readonly RGB16UI : 0x8D77 ;
readonly RGBA8UI : 0x8D7C ;
readonly RGB8UI : 0x8D7D ;
readonly RGBA32I : 0x8D82 ;
readonly RGB32I : 0x8D83 ;
readonly RGBA16I : 0x8D88 ;
readonly RGB16I : 0x8D89 ;
readonly RGBA8I : 0x8D8E ;
readonly RGB8I : 0x8D8F ;
readonly RED_INTEGER : 0x8D94 ;
readonly RGB_INTEGER : 0x8D98 ;
readonly RGBA_INTEGER : 0x8D99 ;
readonly SAMPLER_2D_ARRAY : 0x8DC1 ;
readonly SAMPLER_2D_ARRAY_SHADOW : 0x8DC4 ;
readonly SAMPLER_CUBE_SHADOW : 0x8DC5 ;
readonly UNSIGNED_INT_VEC2 : 0x8DC6 ;
readonly UNSIGNED_INT_VEC3 : 0x8DC7 ;
readonly UNSIGNED_INT_VEC4 : 0x8DC8 ;
readonly INT_SAMPLER_2D : 0x8DCA ;
readonly INT_SAMPLER_3D : 0x8DCB ;
readonly INT_SAMPLER_CUBE : 0x8DCC ;
readonly INT_SAMPLER_2D_ARRAY : 0x8DCF ;
readonly UNSIGNED_INT_SAMPLER_2D : 0x8DD2 ;
readonly UNSIGNED_INT_SAMPLER_3D : 0x8DD3 ;
readonly UNSIGNED_INT_SAMPLER_CUBE : 0x8DD4 ;
readonly UNSIGNED_INT_SAMPLER_2D_ARRAY : 0x8DD7 ;
readonly DEPTH_COMPONENT32F : 0x8CAC ;
readonly DEPTH32F_STENCIL8 : 0x8CAD ;
readonly FLOAT_32_UNSIGNED_INT_24_8_REV : 0x8DAD ;
readonly FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING : 0x8210 ;
readonly FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE : 0x8211 ;
readonly FRAMEBUFFER_ATTACHMENT_RED_SIZE : 0x8212 ;
readonly FRAMEBUFFER_ATTACHMENT_GREEN_SIZE : 0x8213 ;
readonly FRAMEBUFFER_ATTACHMENT_BLUE_SIZE : 0x8214 ;
readonly FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE : 0x8215 ;
readonly FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE : 0x8216 ;
readonly FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE : 0x8217 ;
readonly FRAMEBUFFER_DEFAULT : 0x8218 ;
readonly UNSIGNED_INT_24_8 : 0x84FA ;
readonly DEPTH24_STENCIL8 : 0x88F0 ;
readonly UNSIGNED_NORMALIZED : 0x8C17 ;
readonly DRAW_FRAMEBUFFER_BINDING : 0x8CA6 ;
readonly READ_FRAMEBUFFER : 0x8CA8 ;
readonly DRAW_FRAMEBUFFER : 0x8CA9 ;
readonly READ_FRAMEBUFFER_BINDING : 0x8CAA ;
readonly RENDERBUFFER_SAMPLES : 0x8CAB ;
readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER : 0x8CD4 ;
readonly MAX_COLOR_ATTACHMENTS : 0x8CDF ;
readonly COLOR_ATTACHMENT1 : 0x8CE1 ;
readonly COLOR_ATTACHMENT2 : 0x8CE2 ;
readonly COLOR_ATTACHMENT3 : 0x8CE3 ;
readonly COLOR_ATTACHMENT4 : 0x8CE4 ;
readonly COLOR_ATTACHMENT5 : 0x8CE5 ;
readonly COLOR_ATTACHMENT6 : 0x8CE6 ;
readonly COLOR_ATTACHMENT7 : 0x8CE7 ;
readonly COLOR_ATTACHMENT8 : 0x8CE8 ;
readonly COLOR_ATTACHMENT9 : 0x8CE9 ;
readonly COLOR_ATTACHMENT10 : 0x8CEA ;
readonly COLOR_ATTACHMENT11 : 0x8CEB ;
readonly COLOR_ATTACHMENT12 : 0x8CEC ;
readonly COLOR_ATTACHMENT13 : 0x8CED ;
readonly COLOR_ATTACHMENT14 : 0x8CEE ;
readonly COLOR_ATTACHMENT15 : 0x8CEF ;
readonly FRAMEBUFFER_INCOMPLETE_MULTISAMPLE : 0x8D56 ;
readonly MAX_SAMPLES : 0x8D57 ;
readonly HALF_FLOAT : 0x140B ;
readonly RG : 0x8227 ;
readonly RG_INTEGER : 0x8228 ;
readonly R8 : 0x8229 ;
readonly RG8 : 0x822B ;
readonly R16F : 0x822D ;
readonly R32F : 0x822E ;
readonly RG16F : 0x822F ;
readonly RG32F : 0x8230 ;
readonly R8I : 0x8231 ;
readonly R8UI : 0x8232 ;
readonly R16I : 0x8233 ;
readonly R16UI : 0x8234 ;
readonly R32I : 0x8235 ;
readonly R32UI : 0x8236 ;
readonly RG8I : 0x8237 ;
readonly RG8UI : 0x8238 ;
readonly RG16I : 0x8239 ;
readonly RG16UI : 0x823A ;
readonly RG32I : 0x823B ;
readonly RG32UI : 0x823C ;
readonly VERTEX_ARRAY_BINDING : 0x85B5 ;
readonly R8_SNORM : 0x8F94 ;
readonly RG8_SNORM : 0x8F95 ;
readonly RGB8_SNORM : 0x8F96 ;
readonly RGBA8_SNORM : 0x8F97 ;
readonly SIGNED_NORMALIZED : 0x8F9C ;
readonly COPY_READ_BUFFER : 0x8F36 ;
readonly COPY_WRITE_BUFFER : 0x8F37 ;
readonly COPY_READ_BUFFER_BINDING : 0x8F36 ;
readonly COPY_WRITE_BUFFER_BINDING : 0x8F37 ;
readonly UNIFORM_BUFFER : 0x8A11 ;
readonly UNIFORM_BUFFER_BINDING : 0x8A28 ;
readonly UNIFORM_BUFFER_START : 0x8A29 ;
readonly UNIFORM_BUFFER_SIZE : 0x8A2A ;
readonly MAX_VERTEX_UNIFORM_BLOCKS : 0x8A2B ;
readonly MAX_FRAGMENT_UNIFORM_BLOCKS : 0x8A2D ;
readonly MAX_COMBINED_UNIFORM_BLOCKS : 0x8A2E ;
readonly MAX_UNIFORM_BUFFER_BINDINGS : 0x8A2F ;
readonly MAX_UNIFORM_BLOCK_SIZE : 0x8A30 ;
readonly MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS : 0x8A31 ;
readonly MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS : 0x8A33 ;
readonly UNIFORM_BUFFER_OFFSET_ALIGNMENT : 0x8A34 ;
readonly ACTIVE_UNIFORM_BLOCKS : 0x8A36 ;
readonly UNIFORM_TYPE : 0x8A37 ;
readonly UNIFORM_SIZE : 0x8A38 ;
readonly UNIFORM_BLOCK_INDEX : 0x8A3A ;
readonly UNIFORM_OFFSET : 0x8A3B ;
readonly UNIFORM_ARRAY_STRIDE : 0x8A3C ;
readonly UNIFORM_MATRIX_STRIDE : 0x8A3D ;
readonly UNIFORM_IS_ROW_MAJOR : 0x8A3E ;
readonly UNIFORM_BLOCK_BINDING : 0x8A3F ;
readonly UNIFORM_BLOCK_DATA_SIZE : 0x8A40 ;
readonly UNIFORM_BLOCK_ACTIVE_UNIFORMS : 0x8A42 ;
readonly UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES : 0x8A43 ;
readonly UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER : 0x8A44 ;
readonly UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER : 0x8A46 ;
readonly INVALID_INDEX : 0xFFFFFFFF ;
readonly MAX_VERTEX_OUTPUT_COMPONENTS : 0x9122 ;
readonly MAX_FRAGMENT_INPUT_COMPONENTS : 0x9125 ;
readonly MAX_SERVER_WAIT_TIMEOUT : 0x9111 ;
readonly OBJECT_TYPE : 0x9112 ;
readonly SYNC_CONDITION : 0x9113 ;
readonly SYNC_STATUS : 0x9114 ;
readonly SYNC_FLAGS : 0x9115 ;
readonly SYNC_FENCE : 0x9116 ;
readonly SYNC_GPU_COMMANDS_COMPLETE : 0x9117 ;
readonly UNSIGNALED : 0x9118 ;
readonly SIGNALED : 0x9119 ;
readonly ALREADY_SIGNALED : 0x911A ;
readonly TIMEOUT_EXPIRED : 0x911B ;
readonly CONDITION_SATISFIED : 0x911C ;
readonly WAIT_FAILED : 0x911D ;
readonly SYNC_FLUSH_COMMANDS_BIT : 0x00000001 ;
readonly VERTEX_ATTRIB_ARRAY_DIVISOR : 0x88FE ;
readonly ANY_SAMPLES_PASSED : 0x8C2F ;
readonly ANY_SAMPLES_PASSED_CONSERVATIVE : 0x8D6A ;
readonly SAMPLER_BINDING : 0x8919 ;
readonly RGB10_A2UI : 0x906F ;
readonly INT_2_10_10_10_REV : 0x8D9F ;
readonly TRANSFORM_FEEDBACK : 0x8E22 ;
readonly TRANSFORM_FEEDBACK_PAUSED : 0x8E23 ;
readonly TRANSFORM_FEEDBACK_ACTIVE : 0x8E24 ;
readonly TRANSFORM_FEEDBACK_BINDING : 0x8E25 ;
readonly TEXTURE_IMMUTABLE_FORMAT : 0x912F ;
readonly MAX_ELEMENT_INDEX : 0x8D6B ;
readonly TEXTURE_IMMUTABLE_LEVELS : 0x82DF ;
readonly TIMEOUT_IGNORED : - 1 ;
readonly MAX_CLIENT_WAIT_TIMEOUT_WEBGL : 0x9247 ;
readonly DEPTH_BUFFER_BIT : 0x00000100 ;
readonly STENCIL_BUFFER_BIT : 0x00000400 ;
readonly COLOR_BUFFER_BIT : 0x00004000 ;
readonly POINTS : 0x0000 ;
readonly LINES : 0x0001 ;
readonly LINE_LOOP : 0x0002 ;
readonly LINE_STRIP : 0x0003 ;
readonly TRIANGLES : 0x0004 ;
readonly TRIANGLE_STRIP : 0x0005 ;
readonly TRIANGLE_FAN : 0x0006 ;
readonly ZERO : 0 ;
readonly ONE : 1 ;
readonly SRC_COLOR : 0x0300 ;
readonly ONE_MINUS_SRC_COLOR : 0x0301 ;
readonly SRC_ALPHA : 0x0302 ;
readonly ONE_MINUS_SRC_ALPHA : 0x0303 ;
readonly DST_ALPHA : 0x0304 ;
readonly ONE_MINUS_DST_ALPHA : 0x0305 ;
readonly DST_COLOR : 0x0306 ;
readonly ONE_MINUS_DST_COLOR : 0x0307 ;
readonly SRC_ALPHA_SATURATE : 0x0308 ;
readonly FUNC_ADD : 0x8006 ;
readonly BLEND_EQUATION : 0x8009 ;
readonly BLEND_EQUATION_RGB : 0x8009 ;
readonly BLEND_EQUATION_ALPHA : 0x883D ;
readonly FUNC_SUBTRACT : 0x800A ;
readonly FUNC_REVERSE_SUBTRACT : 0x800B ;
readonly BLEND_DST_RGB : 0x80C8 ;
readonly BLEND_SRC_RGB : 0x80C9 ;
readonly BLEND_DST_ALPHA : 0x80CA ;
readonly BLEND_SRC_ALPHA : 0x80CB ;
readonly CONSTANT_COLOR : 0x8001 ;
readonly ONE_MINUS_CONSTANT_COLOR : 0x8002 ;
readonly CONSTANT_ALPHA : 0x8003 ;
readonly ONE_MINUS_CONSTANT_ALPHA : 0x8004 ;
readonly BLEND_COLOR : 0x8005 ;
readonly ARRAY_BUFFER : 0x8892 ;
readonly ELEMENT_ARRAY_BUFFER : 0x8893 ;
readonly ARRAY_BUFFER_BINDING : 0x8894 ;
readonly ELEMENT_ARRAY_BUFFER_BINDING : 0x8895 ;
readonly STREAM_DRAW : 0x88E0 ;
readonly STATIC_DRAW : 0x88E4 ;
readonly DYNAMIC_DRAW : 0x88E8 ;
readonly BUFFER_SIZE : 0x8764 ;
readonly BUFFER_USAGE : 0x8765 ;
readonly CURRENT_VERTEX_ATTRIB : 0x8626 ;
readonly FRONT : 0x0404 ;
readonly BACK : 0x0405 ;
readonly FRONT_AND_BACK : 0x0408 ;
readonly CULL_FACE : 0x0B44 ;
readonly BLEND : 0x0BE2 ;
readonly DITHER : 0x0BD0 ;
readonly STENCIL_TEST : 0x0B90 ;
readonly DEPTH_TEST : 0x0B71 ;
readonly SCISSOR_TEST : 0x0C11 ;
readonly POLYGON_OFFSET_FILL : 0x8037 ;
readonly SAMPLE_ALPHA_TO_COVERAGE : 0x809E ;
readonly SAMPLE_COVERAGE : 0x80A0 ;
readonly NO_ERROR : 0 ;
readonly INVALID_ENUM : 0x0500 ;
readonly INVALID_VALUE : 0x0501 ;
readonly INVALID_OPERATION : 0x0502 ;
readonly OUT_OF_MEMORY : 0x0505 ;
readonly CW : 0x0900 ;
readonly CCW : 0x0901 ;
readonly LINE_WIDTH : 0x0B21 ;
readonly ALIASED_POINT_SIZE_RANGE : 0x846D ;
readonly ALIASED_LINE_WIDTH_RANGE : 0x846E ;
readonly CULL_FACE_MODE : 0x0B45 ;
readonly FRONT_FACE : 0x0B46 ;
readonly DEPTH_RANGE : 0x0B70 ;
readonly DEPTH_WRITEMASK : 0x0B72 ;
readonly DEPTH_CLEAR_VALUE : 0x0B73 ;
readonly DEPTH_FUNC : 0x0B74 ;
readonly STENCIL_CLEAR_VALUE : 0x0B91 ;
readonly STENCIL_FUNC : 0x0B92 ;
readonly STENCIL_FAIL : 0x0B94 ;
readonly STENCIL_PASS_DEPTH_FAIL : 0x0B95 ;
readonly STENCIL_PASS_DEPTH_PASS : 0x0B96 ;
readonly STENCIL_REF : 0x0B97 ;
readonly STENCIL_VALUE_MASK : 0x0B93 ;
readonly STENCIL_WRITEMASK : 0x0B98 ;
readonly STENCIL_BACK_FUNC : 0x8800 ;
readonly STENCIL_BACK_FAIL : 0x8801 ;
readonly STENCIL_BACK_PASS_DEPTH_FAIL : 0x8802 ;
readonly STENCIL_BACK_PASS_DEPTH_PASS : 0x8803 ;
readonly STENCIL_BACK_REF : 0x8CA3 ;
readonly STENCIL_BACK_VALUE_MASK : 0x8CA4 ;
readonly STENCIL_BACK_WRITEMASK : 0x8CA5 ;
readonly VIEWPORT : 0x0BA2 ;
readonly SCISSOR_BOX : 0x0C10 ;
readonly COLOR_CLEAR_VALUE : 0x0C22 ;
readonly COLOR_WRITEMASK : 0x0C23 ;
readonly UNPACK_ALIGNMENT : 0x0CF5 ;
readonly PACK_ALIGNMENT : 0x0D05 ;
readonly MAX_TEXTURE_SIZE : 0x0D33 ;
readonly MAX_VIEWPORT_DIMS : 0x0D3A ;
readonly SUBPIXEL_BITS : 0x0D50 ;
readonly RED_BITS : 0x0D52 ;
readonly GREEN_BITS : 0x0D53 ;
readonly BLUE_BITS : 0x0D54 ;
readonly ALPHA_BITS : 0x0D55 ;
readonly DEPTH_BITS : 0x0D56 ;
readonly STENCIL_BITS : 0x0D57 ;
readonly POLYGON_OFFSET_UNITS : 0x2A00 ;
readonly POLYGON_OFFSET_FACTOR : 0x8038 ;
readonly TEXTURE_BINDING_2D : 0x8069 ;
readonly SAMPLE_BUFFERS : 0x80A8 ;
readonly SAMPLES : 0x80A9 ;
readonly SAMPLE_COVERAGE_VALUE : 0x80AA ;
readonly SAMPLE_COVERAGE_INVERT : 0x80AB ;
readonly COMPRESSED_TEXTURE_FORMATS : 0x86A3 ;
readonly DONT_CARE : 0x1100 ;
readonly FASTEST : 0x1101 ;
readonly NICEST : 0x1102 ;
readonly GENERATE_MIPMAP_HINT : 0x8192 ;
readonly BYTE : 0x1400 ;
readonly UNSIGNED_BYTE : 0x1401 ;
readonly SHORT : 0x1402 ;
readonly UNSIGNED_SHORT : 0x1403 ;
readonly INT : 0x1404 ;
readonly UNSIGNED_INT : 0x1405 ;
readonly FLOAT : 0x1406 ;
readonly DEPTH_COMPONENT : 0x1902 ;
readonly ALPHA : 0x1906 ;
readonly RGB : 0x1907 ;
readonly RGBA : 0x1908 ;
readonly LUMINANCE : 0x1909 ;
readonly LUMINANCE_ALPHA : 0x190A ;
readonly UNSIGNED_SHORT_4_4_4_4 : 0x8033 ;
readonly UNSIGNED_SHORT_5_5_5_1 : 0x8034 ;
readonly UNSIGNED_SHORT_5_6_5 : 0x8363 ;
readonly FRAGMENT_SHADER : 0x8B30 ;
readonly VERTEX_SHADER : 0x8B31 ;
readonly MAX_VERTEX_ATTRIBS : 0x8869 ;
readonly MAX_VERTEX_UNIFORM_VECTORS : 0x8DFB ;
readonly MAX_VARYING_VECTORS : 0x8DFC ;
readonly MAX_COMBINED_TEXTURE_IMAGE_UNITS : 0x8B4D ;
readonly MAX_VERTEX_TEXTURE_IMAGE_UNITS : 0x8B4C ;
readonly MAX_TEXTURE_IMAGE_UNITS : 0x8872 ;
readonly MAX_FRAGMENT_UNIFORM_VECTORS : 0x8DFD ;
readonly SHADER_TYPE : 0x8B4F ;
readonly DELETE_STATUS : 0x8B80 ;
readonly LINK_STATUS : 0x8B82 ;
readonly VALIDATE_STATUS : 0x8B83 ;
readonly ATTACHED_SHADERS : 0x8B85 ;
readonly ACTIVE_UNIFORMS : 0x8B86 ;
readonly ACTIVE_ATTRIBUTES : 0x8B89 ;
readonly SHADING_LANGUAGE_VERSION : 0x8B8C ;
readonly CURRENT_PROGRAM : 0x8B8D ;
readonly NEVER : 0x0200 ;
readonly LESS : 0x0201 ;
readonly EQUAL : 0x0202 ;
readonly LEQUAL : 0x0203 ;
readonly GREATER : 0x0204 ;
readonly NOTEQUAL : 0x0205 ;
readonly GEQUAL : 0x0206 ;
readonly ALWAYS : 0x0207 ;
readonly KEEP : 0x1E00 ;
readonly REPLACE : 0x1E01 ;
readonly INCR : 0x1E02 ;
readonly DECR : 0x1E03 ;
readonly INVERT : 0x150A ;
readonly INCR_WRAP : 0x8507 ;
readonly DECR_WRAP : 0x8508 ;
readonly VENDOR : 0x1F00 ;
readonly RENDERER : 0x1F01 ;
readonly VERSION : 0x1F02 ;
readonly NEAREST : 0x2600 ;
readonly LINEAR : 0x2601 ;
readonly NEAREST_MIPMAP_NEAREST : 0x2700 ;
readonly LINEAR_MIPMAP_NEAREST : 0x2701 ;
readonly NEAREST_MIPMAP_LINEAR : 0x2702 ;
readonly LINEAR_MIPMAP_LINEAR : 0x2703 ;
readonly TEXTURE_MAG_FILTER : 0x2800 ;
readonly TEXTURE_MIN_FILTER : 0x2801 ;
readonly TEXTURE_WRAP_S : 0x2802 ;
readonly TEXTURE_WRAP_T : 0x2803 ;
readonly TEXTURE_2D : 0x0DE1 ;
readonly TEXTURE : 0x1702 ;
readonly TEXTURE_CUBE_MAP : 0x8513 ;
readonly TEXTURE_BINDING_CUBE_MAP : 0x8514 ;
readonly TEXTURE_CUBE_MAP_POSITIVE_X : 0x8515 ;
readonly TEXTURE_CUBE_MAP_NEGATIVE_X : 0x8516 ;
readonly TEXTURE_CUBE_MAP_POSITIVE_Y : 0x8517 ;
readonly TEXTURE_CUBE_MAP_NEGATIVE_Y : 0x8518 ;
readonly TEXTURE_CUBE_MAP_POSITIVE_Z : 0x8519 ;
readonly TEXTURE_CUBE_MAP_NEGATIVE_Z : 0x851A ;
readonly MAX_CUBE_MAP_TEXTURE_SIZE : 0x851C ;
readonly TEXTURE0 : 0x84C0 ;
readonly TEXTURE1 : 0x84C1 ;
readonly TEXTURE2 : 0x84C2 ;
readonly TEXTURE3 : 0x84C3 ;
readonly TEXTURE4 : 0x84C4 ;
readonly TEXTURE5 : 0x84C5 ;
readonly TEXTURE6 : 0x84C6 ;
readonly TEXTURE7 : 0x84C7 ;
readonly TEXTURE8 : 0x84C8 ;
readonly TEXTURE9 : 0x84C9 ;
readonly TEXTURE10 : 0x84CA ;
readonly TEXTURE11 : 0x84CB ;
readonly TEXTURE12 : 0x84CC ;
readonly TEXTURE13 : 0x84CD ;
readonly TEXTURE14 : 0x84CE ;
readonly TEXTURE15 : 0x84CF ;
readonly TEXTURE16 : 0x84D0 ;
readonly TEXTURE17 : 0x84D1 ;
readonly TEXTURE18 : 0x84D2 ;
readonly TEXTURE19 : 0x84D3 ;
readonly TEXTURE20 : 0x84D4 ;
readonly TEXTURE21 : 0x84D5 ;
readonly TEXTURE22 : 0x84D6 ;
readonly TEXTURE23 : 0x84D7 ;
readonly TEXTURE24 : 0x84D8 ;
readonly TEXTURE25 : 0x84D9 ;
readonly TEXTURE26 : 0x84DA ;
readonly TEXTURE27 : 0x84DB ;
readonly TEXTURE28 : 0x84DC ;
readonly TEXTURE29 : 0x84DD ;
readonly TEXTURE30 : 0x84DE ;
readonly TEXTURE31 : 0x84DF ;
readonly ACTIVE_TEXTURE : 0x84E0 ;
readonly REPEAT : 0x2901 ;
readonly CLAMP_TO_EDGE : 0x812F ;
readonly MIRRORED_REPEAT : 0x8370 ;
readonly FLOAT_VEC2 : 0x8B50 ;
readonly FLOAT_VEC3 : 0x8B51 ;
readonly FLOAT_VEC4 : 0x8B52 ;
readonly INT_VEC2 : 0x8B53 ;
readonly INT_VEC3 : 0x8B54 ;
readonly INT_VEC4 : 0x8B55 ;
readonly BOOL : 0x8B56 ;
readonly BOOL_VEC2 : 0x8B57 ;
readonly BOOL_VEC3 : 0x8B58 ;
readonly BOOL_VEC4 : 0x8B59 ;
readonly FLOAT_MAT2 : 0x8B5A ;
readonly FLOAT_MAT3 : 0x8B5B ;
readonly FLOAT_MAT4 : 0x8B5C ;
readonly SAMPLER_2D : 0x8B5E ;
readonly SAMPLER_CUBE : 0x8B60 ;
readonly VERTEX_ATTRIB_ARRAY_ENABLED : 0x8622 ;
readonly VERTEX_ATTRIB_ARRAY_SIZE : 0x8623 ;
readonly VERTEX_ATTRIB_ARRAY_STRIDE : 0x8624 ;
readonly VERTEX_ATTRIB_ARRAY_TYPE : 0x8625 ;
readonly VERTEX_ATTRIB_ARRAY_NORMALIZED : 0x886A ;
readonly VERTEX_ATTRIB_ARRAY_POINTER : 0x8645 ;
readonly VERTEX_ATTRIB_ARRAY_BUFFER_BINDING : 0x889F ;
readonly IMPLEMENTATION_COLOR_READ_TYPE : 0x8B9A ;
readonly IMPLEMENTATION_COLOR_READ_FORMAT : 0x8B9B ;
readonly COMPILE_STATUS : 0x8B81 ;
readonly LOW_FLOAT : 0x8DF0 ;
readonly MEDIUM_FLOAT : 0x8DF1 ;
readonly HIGH_FLOAT : 0x8DF2 ;
readonly LOW_INT : 0x8DF3 ;
readonly MEDIUM_INT : 0x8DF4 ;
readonly HIGH_INT : 0x8DF5 ;
readonly FRAMEBUFFER : 0x8D40 ;
readonly RENDERBUFFER : 0x8D41 ;
readonly RGBA4 : 0x8056 ;
readonly RGB5_A1 : 0x8057 ;
2024-03-26 18:52:57 -04:00
readonly RGBA8 : 0x8058 ;
2023-03-21 11:46:40 -04:00
readonly RGB565 : 0x8D62 ;
readonly DEPTH_COMPONENT16 : 0x81A5 ;
readonly STENCIL_INDEX8 : 0x8D48 ;
readonly DEPTH_STENCIL : 0x84F9 ;
readonly RENDERBUFFER_WIDTH : 0x8D42 ;
readonly RENDERBUFFER_HEIGHT : 0x8D43 ;
readonly RENDERBUFFER_INTERNAL_FORMAT : 0x8D44 ;
readonly RENDERBUFFER_RED_SIZE : 0x8D50 ;
readonly RENDERBUFFER_GREEN_SIZE : 0x8D51 ;
readonly RENDERBUFFER_BLUE_SIZE : 0x8D52 ;
readonly RENDERBUFFER_ALPHA_SIZE : 0x8D53 ;
readonly RENDERBUFFER_DEPTH_SIZE : 0x8D54 ;
readonly RENDERBUFFER_STENCIL_SIZE : 0x8D55 ;
readonly FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE : 0x8CD0 ;
readonly FRAMEBUFFER_ATTACHMENT_OBJECT_NAME : 0x8CD1 ;
readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL : 0x8CD2 ;
readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE : 0x8CD3 ;
readonly COLOR_ATTACHMENT0 : 0x8CE0 ;
readonly DEPTH_ATTACHMENT : 0x8D00 ;
readonly STENCIL_ATTACHMENT : 0x8D20 ;
readonly DEPTH_STENCIL_ATTACHMENT : 0x821A ;
readonly NONE : 0 ;
readonly FRAMEBUFFER_COMPLETE : 0x8CD5 ;
readonly FRAMEBUFFER_INCOMPLETE_ATTACHMENT : 0x8CD6 ;
readonly FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT : 0x8CD7 ;
readonly FRAMEBUFFER_INCOMPLETE_DIMENSIONS : 0x8CD9 ;
readonly FRAMEBUFFER_UNSUPPORTED : 0x8CDD ;
readonly FRAMEBUFFER_BINDING : 0x8CA6 ;
readonly RENDERBUFFER_BINDING : 0x8CA7 ;
readonly MAX_RENDERBUFFER_SIZE : 0x84E8 ;
readonly INVALID_FRAMEBUFFER_OPERATION : 0x0506 ;
readonly UNPACK_FLIP_Y_WEBGL : 0x9240 ;
readonly UNPACK_PREMULTIPLY_ALPHA_WEBGL : 0x9241 ;
readonly CONTEXT_LOST_WEBGL : 0x9242 ;
readonly UNPACK_COLORSPACE_CONVERSION_WEBGL : 0x9243 ;
readonly BROWSER_DEFAULT_WEBGL : 0x9244 ;
2020-07-22 12:03:46 -04:00
} ;
interface WebGL2RenderingContextBase {
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/beginQuery) */
2020-07-22 12:03:46 -04:00
beginQuery ( target : GLenum , query : WebGLQuery ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/beginTransformFeedback) */
2020-07-22 12:03:46 -04:00
beginTransformFeedback ( primitiveMode : GLenum ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/bindBufferBase) */
2020-07-22 12:03:46 -04:00
bindBufferBase ( target : GLenum , index : GLuint , buffer : WebGLBuffer | null ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/bindBufferRange) */
2020-07-22 12:03:46 -04:00
bindBufferRange ( target : GLenum , index : GLuint , buffer : WebGLBuffer | null , offset : GLintptr , size : GLsizeiptr ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/bindSampler) */
2020-07-22 12:03:46 -04:00
bindSampler ( unit : GLuint , sampler : WebGLSampler | null ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/bindTransformFeedback) */
2020-07-22 12:03:46 -04:00
bindTransformFeedback ( target : GLenum , tf : WebGLTransformFeedback | null ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/bindVertexArray) */
2020-07-22 12:03:46 -04:00
bindVertexArray ( array : WebGLVertexArrayObject | null ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/blitFramebuffer) */
2020-07-22 12:03:46 -04:00
blitFramebuffer ( srcX0 : GLint , srcY0 : GLint , srcX1 : GLint , srcY1 : GLint , dstX0 : GLint , dstY0 : GLint , dstX1 : GLint , dstY1 : GLint , mask : GLbitfield , filter : GLenum ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/clearBuffer) */
2020-07-22 12:03:46 -04:00
clearBufferfi ( buffer : GLenum , drawbuffer : GLint , depth : GLfloat , stencil : GLint ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/clearBuffer) */
2024-03-26 18:52:57 -04:00
clearBufferfv ( buffer : GLenum , drawbuffer : GLint , values : Float32List , srcOffset? : number ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/clearBuffer) */
2024-03-26 18:52:57 -04:00
clearBufferiv ( buffer : GLenum , drawbuffer : GLint , values : Int32List , srcOffset? : number ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/clearBuffer) */
2024-03-26 18:52:57 -04:00
clearBufferuiv ( buffer : GLenum , drawbuffer : GLint , values : Uint32List , srcOffset? : number ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/clientWaitSync) */
2020-07-22 12:03:46 -04:00
clientWaitSync ( sync : WebGLSync , flags : GLbitfield , timeout : GLuint64 ) : GLenum ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/compressedTexImage3D) */
2020-07-22 12:03:46 -04:00
compressedTexImage3D ( target : GLenum , level : GLint , internalformat : GLenum , width : GLsizei , height : GLsizei , depth : GLsizei , border : GLint , imageSize : GLsizei , offset : GLintptr ) : void ;
2024-03-26 18:52:57 -04:00
compressedTexImage3D ( target : GLenum , level : GLint , internalformat : GLenum , width : GLsizei , height : GLsizei , depth : GLsizei , border : GLint , srcData : ArrayBufferView , srcOffset? : number , srcLengthOverride? : GLuint ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/compressedTexSubImage3D) */
2020-07-22 12:03:46 -04:00
compressedTexSubImage3D ( target : GLenum , level : GLint , xoffset : GLint , yoffset : GLint , zoffset : GLint , width : GLsizei , height : GLsizei , depth : GLsizei , format : GLenum , imageSize : GLsizei , offset : GLintptr ) : void ;
2024-03-26 18:52:57 -04:00
compressedTexSubImage3D ( target : GLenum , level : GLint , xoffset : GLint , yoffset : GLint , zoffset : GLint , width : GLsizei , height : GLsizei , depth : GLsizei , format : GLenum , srcData : ArrayBufferView , srcOffset? : number , srcLengthOverride? : GLuint ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/copyBufferSubData) */
2020-07-22 12:03:46 -04:00
copyBufferSubData ( readTarget : GLenum , writeTarget : GLenum , readOffset : GLintptr , writeOffset : GLintptr , size : GLsizeiptr ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/copyTexSubImage3D) */
2020-07-22 12:03:46 -04:00
copyTexSubImage3D ( target : GLenum , level : GLint , xoffset : GLint , yoffset : GLint , zoffset : GLint , x : GLint , y : GLint , width : GLsizei , height : GLsizei ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/createQuery) */
2020-07-22 12:03:46 -04:00
createQuery ( ) : WebGLQuery | null ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/createSampler) */
2020-07-22 12:03:46 -04:00
createSampler ( ) : WebGLSampler | null ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/createTransformFeedback) */
2020-07-22 12:03:46 -04:00
createTransformFeedback ( ) : WebGLTransformFeedback | null ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/createVertexArray) */
2020-07-22 12:03:46 -04:00
createVertexArray ( ) : WebGLVertexArrayObject | null ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/deleteQuery) */
2020-07-22 12:03:46 -04:00
deleteQuery ( query : WebGLQuery | null ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/deleteSampler) */
2020-07-22 12:03:46 -04:00
deleteSampler ( sampler : WebGLSampler | null ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/deleteSync) */
2020-07-22 12:03:46 -04:00
deleteSync ( sync : WebGLSync | null ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/deleteTransformFeedback) */
2020-07-22 12:03:46 -04:00
deleteTransformFeedback ( tf : WebGLTransformFeedback | null ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/deleteVertexArray) */
2020-07-22 12:03:46 -04:00
deleteVertexArray ( vertexArray : WebGLVertexArrayObject | null ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/drawArraysInstanced) */
2020-07-22 12:03:46 -04:00
drawArraysInstanced ( mode : GLenum , first : GLint , count : GLsizei , instanceCount : GLsizei ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/drawBuffers) */
2020-07-22 12:03:46 -04:00
drawBuffers ( buffers : GLenum [ ] ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/drawElementsInstanced) */
2020-07-22 12:03:46 -04:00
drawElementsInstanced ( mode : GLenum , count : GLsizei , type : GLenum , offset : GLintptr , instanceCount : GLsizei ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/drawRangeElements) */
2020-07-22 12:03:46 -04:00
drawRangeElements ( mode : GLenum , start : GLuint , end : GLuint , count : GLsizei , type : GLenum , offset : GLintptr ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/endQuery) */
2020-07-22 12:03:46 -04:00
endQuery ( target : GLenum ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/endTransformFeedback) */
2020-07-22 12:03:46 -04:00
endTransformFeedback ( ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/fenceSync) */
2020-07-22 12:03:46 -04:00
fenceSync ( condition : GLenum , flags : GLbitfield ) : WebGLSync | null ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/framebufferTextureLayer) */
2020-07-22 12:03:46 -04:00
framebufferTextureLayer ( target : GLenum , attachment : GLenum , texture : WebGLTexture | null , level : GLint , layer : GLint ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/getActiveUniformBlockName) */
2020-07-22 12:03:46 -04:00
getActiveUniformBlockName ( program : WebGLProgram , uniformBlockIndex : GLuint ) : string | null ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/getActiveUniformBlockParameter) */
2020-07-22 12:03:46 -04:00
getActiveUniformBlockParameter ( program : WebGLProgram , uniformBlockIndex : GLuint , pname : GLenum ) : any ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/getActiveUniforms) */
2020-07-22 12:03:46 -04:00
getActiveUniforms ( program : WebGLProgram , uniformIndices : GLuint [ ] , pname : GLenum ) : any ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/getBufferSubData) */
2024-03-26 18:52:57 -04:00
getBufferSubData ( target : GLenum , srcByteOffset : GLintptr , dstBuffer : ArrayBufferView , dstOffset? : number , length? : GLuint ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/getFragDataLocation) */
2020-07-22 12:03:46 -04:00
getFragDataLocation ( program : WebGLProgram , name : string ) : GLint ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/getIndexedParameter) */
2020-07-22 12:03:46 -04:00
getIndexedParameter ( target : GLenum , index : GLuint ) : any ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/getInternalformatParameter) */
2020-07-22 12:03:46 -04:00
getInternalformatParameter ( target : GLenum , internalformat : GLenum , pname : GLenum ) : any ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/getQuery) */
2020-07-22 12:03:46 -04:00
getQuery ( target : GLenum , pname : GLenum ) : WebGLQuery | null ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/getQueryParameter) */
2020-07-22 12:03:46 -04:00
getQueryParameter ( query : WebGLQuery , pname : GLenum ) : any ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/getSamplerParameter) */
2020-07-22 12:03:46 -04:00
getSamplerParameter ( sampler : WebGLSampler , pname : GLenum ) : any ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/getSyncParameter) */
2020-07-22 12:03:46 -04:00
getSyncParameter ( sync : WebGLSync , pname : GLenum ) : any ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/getTransformFeedbackVarying) */
2020-07-22 12:03:46 -04:00
getTransformFeedbackVarying ( program : WebGLProgram , index : GLuint ) : WebGLActiveInfo | null ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/getUniformBlockIndex) */
2020-07-22 12:03:46 -04:00
getUniformBlockIndex ( program : WebGLProgram , uniformBlockName : string ) : GLuint ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/getUniformIndices) */
2020-07-22 12:03:46 -04:00
getUniformIndices ( program : WebGLProgram , uniformNames : string [ ] ) : GLuint [ ] | null ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/invalidateFramebuffer) */
2020-07-22 12:03:46 -04:00
invalidateFramebuffer ( target : GLenum , attachments : GLenum [ ] ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/invalidateSubFramebuffer) */
2020-07-22 12:03:46 -04:00
invalidateSubFramebuffer ( target : GLenum , attachments : GLenum [ ] , x : GLint , y : GLint , width : GLsizei , height : GLsizei ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/isQuery) */
2020-07-22 12:03:46 -04:00
isQuery ( query : WebGLQuery | null ) : GLboolean ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/isSampler) */
2020-07-22 12:03:46 -04:00
isSampler ( sampler : WebGLSampler | null ) : GLboolean ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/isSync) */
2020-07-22 12:03:46 -04:00
isSync ( sync : WebGLSync | null ) : GLboolean ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/isTransformFeedback) */
2020-07-22 12:03:46 -04:00
isTransformFeedback ( tf : WebGLTransformFeedback | null ) : GLboolean ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/isVertexArray) */
2020-07-22 12:03:46 -04:00
isVertexArray ( vertexArray : WebGLVertexArrayObject | null ) : GLboolean ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/pauseTransformFeedback) */
2020-07-22 12:03:46 -04:00
pauseTransformFeedback ( ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/readBuffer) */
2020-07-22 12:03:46 -04:00
readBuffer ( src : GLenum ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/renderbufferStorageMultisample) */
2020-07-22 12:03:46 -04:00
renderbufferStorageMultisample ( target : GLenum , samples : GLsizei , internalformat : GLenum , width : GLsizei , height : GLsizei ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/resumeTransformFeedback) */
2020-07-22 12:03:46 -04:00
resumeTransformFeedback ( ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/samplerParameter) */
2020-07-22 12:03:46 -04:00
samplerParameterf ( sampler : WebGLSampler , pname : GLenum , param : GLfloat ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/samplerParameter) */
2020-07-22 12:03:46 -04:00
samplerParameteri ( sampler : WebGLSampler , pname : GLenum , param : GLint ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/texImage3D) */
2020-07-22 12:03:46 -04:00
texImage3D ( target : GLenum , level : GLint , internalformat : GLint , width : GLsizei , height : GLsizei , depth : GLsizei , border : GLint , format : GLenum , type : GLenum , pboOffset : GLintptr ) : void ;
texImage3D ( target : GLenum , level : GLint , internalformat : GLint , width : GLsizei , height : GLsizei , depth : GLsizei , border : GLint , format : GLenum , type : GLenum , source : TexImageSource ) : void ;
texImage3D ( target : GLenum , level : GLint , internalformat : GLint , width : GLsizei , height : GLsizei , depth : GLsizei , border : GLint , format : GLenum , type : GLenum , srcData : ArrayBufferView | null ) : void ;
2024-03-26 18:52:57 -04:00
texImage3D ( target : GLenum , level : GLint , internalformat : GLint , width : GLsizei , height : GLsizei , depth : GLsizei , border : GLint , format : GLenum , type : GLenum , srcData : ArrayBufferView , srcOffset : number ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/texStorage2D) */
2020-07-22 12:03:46 -04:00
texStorage2D ( target : GLenum , levels : GLsizei , internalformat : GLenum , width : GLsizei , height : GLsizei ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/texStorage3D) */
2020-07-22 12:03:46 -04:00
texStorage3D ( target : GLenum , levels : GLsizei , internalformat : GLenum , width : GLsizei , height : GLsizei , depth : GLsizei ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/texSubImage3D) */
2020-07-22 12:03:46 -04:00
texSubImage3D ( target : GLenum , level : GLint , xoffset : GLint , yoffset : GLint , zoffset : GLint , width : GLsizei , height : GLsizei , depth : GLsizei , format : GLenum , type : GLenum , pboOffset : GLintptr ) : void ;
texSubImage3D ( target : GLenum , level : GLint , xoffset : GLint , yoffset : GLint , zoffset : GLint , width : GLsizei , height : GLsizei , depth : GLsizei , format : GLenum , type : GLenum , source : TexImageSource ) : void ;
2024-03-26 18:52:57 -04:00
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? : number ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/transformFeedbackVaryings) */
2020-07-22 12:03:46 -04:00
transformFeedbackVaryings ( program : WebGLProgram , varyings : string [ ] , bufferMode : GLenum ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniform) */
2020-07-22 12:03:46 -04:00
uniform1ui ( location : WebGLUniformLocation | null , v0 : GLuint ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniform) */
2024-03-26 18:52:57 -04:00
uniform1uiv ( location : WebGLUniformLocation | null , data : Uint32List , srcOffset? : number , srcLength? : GLuint ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniform) */
2020-07-22 12:03:46 -04:00
uniform2ui ( location : WebGLUniformLocation | null , v0 : GLuint , v1 : GLuint ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniform) */
2024-03-26 18:52:57 -04:00
uniform2uiv ( location : WebGLUniformLocation | null , data : Uint32List , srcOffset? : number , srcLength? : GLuint ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniform) */
2020-07-22 12:03:46 -04:00
uniform3ui ( location : WebGLUniformLocation | null , v0 : GLuint , v1 : GLuint , v2 : GLuint ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniform) */
2024-03-26 18:52:57 -04:00
uniform3uiv ( location : WebGLUniformLocation | null , data : Uint32List , srcOffset? : number , srcLength? : GLuint ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniform) */
2020-07-22 12:03:46 -04:00
uniform4ui ( location : WebGLUniformLocation | null , v0 : GLuint , v1 : GLuint , v2 : GLuint , v3 : GLuint ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniform) */
2024-03-26 18:52:57 -04:00
uniform4uiv ( location : WebGLUniformLocation | null , data : Uint32List , srcOffset? : number , srcLength? : GLuint ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformBlockBinding) */
2020-07-22 12:03:46 -04:00
uniformBlockBinding ( program : WebGLProgram , uniformBlockIndex : GLuint , uniformBlockBinding : GLuint ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformMatrix) */
2024-03-26 18:52:57 -04:00
uniformMatrix2x3fv ( location : WebGLUniformLocation | null , transpose : GLboolean , data : Float32List , srcOffset? : number , srcLength? : GLuint ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformMatrix) */
2024-03-26 18:52:57 -04:00
uniformMatrix2x4fv ( location : WebGLUniformLocation | null , transpose : GLboolean , data : Float32List , srcOffset? : number , srcLength? : GLuint ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformMatrix) */
2024-03-26 18:52:57 -04:00
uniformMatrix3x2fv ( location : WebGLUniformLocation | null , transpose : GLboolean , data : Float32List , srcOffset? : number , srcLength? : GLuint ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformMatrix) */
2024-03-26 18:52:57 -04:00
uniformMatrix3x4fv ( location : WebGLUniformLocation | null , transpose : GLboolean , data : Float32List , srcOffset? : number , srcLength? : GLuint ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformMatrix) */
2024-03-26 18:52:57 -04:00
uniformMatrix4x2fv ( location : WebGLUniformLocation | null , transpose : GLboolean , data : Float32List , srcOffset? : number , srcLength? : GLuint ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformMatrix) */
2024-03-26 18:52:57 -04:00
uniformMatrix4x3fv ( location : WebGLUniformLocation | null , transpose : GLboolean , data : Float32List , srcOffset? : number , srcLength? : GLuint ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/vertexAttribDivisor) */
2020-07-22 12:03:46 -04:00
vertexAttribDivisor ( index : GLuint , divisor : GLuint ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/vertexAttribI) */
2020-07-22 12:03:46 -04:00
vertexAttribI4i ( index : GLuint , x : GLint , y : GLint , z : GLint , w : GLint ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/vertexAttribI) */
2020-07-22 12:03:46 -04:00
vertexAttribI4iv ( index : GLuint , values : Int32List ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/vertexAttribI) */
2020-07-22 12:03:46 -04:00
vertexAttribI4ui ( index : GLuint , x : GLuint , y : GLuint , z : GLuint , w : GLuint ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/vertexAttribI) */
2020-07-22 12:03:46 -04:00
vertexAttribI4uiv ( index : GLuint , values : Uint32List ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/vertexAttribIPointer) */
2020-07-22 12:03:46 -04:00
vertexAttribIPointer ( index : GLuint , size : GLint , type : GLenum , stride : GLsizei , offset : GLintptr ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/waitSync) */
2020-07-22 12:03:46 -04:00
waitSync ( sync : WebGLSync , flags : GLbitfield , timeout : GLint64 ) : void ;
2023-03-21 11:46:40 -04:00
readonly READ_BUFFER : 0x0C02 ;
readonly UNPACK_ROW_LENGTH : 0x0CF2 ;
readonly UNPACK_SKIP_ROWS : 0x0CF3 ;
readonly UNPACK_SKIP_PIXELS : 0x0CF4 ;
readonly PACK_ROW_LENGTH : 0x0D02 ;
readonly PACK_SKIP_ROWS : 0x0D03 ;
readonly PACK_SKIP_PIXELS : 0x0D04 ;
readonly COLOR : 0x1800 ;
readonly DEPTH : 0x1801 ;
readonly STENCIL : 0x1802 ;
readonly RED : 0x1903 ;
readonly RGB8 : 0x8051 ;
readonly RGB10_A2 : 0x8059 ;
readonly TEXTURE_BINDING_3D : 0x806A ;
readonly UNPACK_SKIP_IMAGES : 0x806D ;
readonly UNPACK_IMAGE_HEIGHT : 0x806E ;
readonly TEXTURE_3D : 0x806F ;
readonly TEXTURE_WRAP_R : 0x8072 ;
readonly MAX_3D_TEXTURE_SIZE : 0x8073 ;
readonly UNSIGNED_INT_2_10_10_10_REV : 0x8368 ;
readonly MAX_ELEMENTS_VERTICES : 0x80E8 ;
readonly MAX_ELEMENTS_INDICES : 0x80E9 ;
readonly TEXTURE_MIN_LOD : 0x813A ;
readonly TEXTURE_MAX_LOD : 0x813B ;
readonly TEXTURE_BASE_LEVEL : 0x813C ;
readonly TEXTURE_MAX_LEVEL : 0x813D ;
readonly MIN : 0x8007 ;
readonly MAX : 0x8008 ;
readonly DEPTH_COMPONENT24 : 0x81A6 ;
readonly MAX_TEXTURE_LOD_BIAS : 0x84FD ;
readonly TEXTURE_COMPARE_MODE : 0x884C ;
readonly TEXTURE_COMPARE_FUNC : 0x884D ;
readonly CURRENT_QUERY : 0x8865 ;
readonly QUERY_RESULT : 0x8866 ;
readonly QUERY_RESULT_AVAILABLE : 0x8867 ;
readonly STREAM_READ : 0x88E1 ;
readonly STREAM_COPY : 0x88E2 ;
readonly STATIC_READ : 0x88E5 ;
readonly STATIC_COPY : 0x88E6 ;
readonly DYNAMIC_READ : 0x88E9 ;
readonly DYNAMIC_COPY : 0x88EA ;
readonly MAX_DRAW_BUFFERS : 0x8824 ;
readonly DRAW_BUFFER0 : 0x8825 ;
readonly DRAW_BUFFER1 : 0x8826 ;
readonly DRAW_BUFFER2 : 0x8827 ;
readonly DRAW_BUFFER3 : 0x8828 ;
readonly DRAW_BUFFER4 : 0x8829 ;
readonly DRAW_BUFFER5 : 0x882A ;
readonly DRAW_BUFFER6 : 0x882B ;
readonly DRAW_BUFFER7 : 0x882C ;
readonly DRAW_BUFFER8 : 0x882D ;
readonly DRAW_BUFFER9 : 0x882E ;
readonly DRAW_BUFFER10 : 0x882F ;
readonly DRAW_BUFFER11 : 0x8830 ;
readonly DRAW_BUFFER12 : 0x8831 ;
readonly DRAW_BUFFER13 : 0x8832 ;
readonly DRAW_BUFFER14 : 0x8833 ;
readonly DRAW_BUFFER15 : 0x8834 ;
readonly MAX_FRAGMENT_UNIFORM_COMPONENTS : 0x8B49 ;
readonly MAX_VERTEX_UNIFORM_COMPONENTS : 0x8B4A ;
readonly SAMPLER_3D : 0x8B5F ;
readonly SAMPLER_2D_SHADOW : 0x8B62 ;
readonly FRAGMENT_SHADER_DERIVATIVE_HINT : 0x8B8B ;
readonly PIXEL_PACK_BUFFER : 0x88EB ;
readonly PIXEL_UNPACK_BUFFER : 0x88EC ;
readonly PIXEL_PACK_BUFFER_BINDING : 0x88ED ;
readonly PIXEL_UNPACK_BUFFER_BINDING : 0x88EF ;
readonly FLOAT_MAT2x3 : 0x8B65 ;
readonly FLOAT_MAT2x4 : 0x8B66 ;
readonly FLOAT_MAT3x2 : 0x8B67 ;
readonly FLOAT_MAT3x4 : 0x8B68 ;
readonly FLOAT_MAT4x2 : 0x8B69 ;
readonly FLOAT_MAT4x3 : 0x8B6A ;
readonly SRGB : 0x8C40 ;
readonly SRGB8 : 0x8C41 ;
readonly SRGB8_ALPHA8 : 0x8C43 ;
readonly COMPARE_REF_TO_TEXTURE : 0x884E ;
readonly RGBA32F : 0x8814 ;
readonly RGB32F : 0x8815 ;
readonly RGBA16F : 0x881A ;
readonly RGB16F : 0x881B ;
readonly VERTEX_ATTRIB_ARRAY_INTEGER : 0x88FD ;
readonly MAX_ARRAY_TEXTURE_LAYERS : 0x88FF ;
readonly MIN_PROGRAM_TEXEL_OFFSET : 0x8904 ;
readonly MAX_PROGRAM_TEXEL_OFFSET : 0x8905 ;
readonly MAX_VARYING_COMPONENTS : 0x8B4B ;
readonly TEXTURE_2D_ARRAY : 0x8C1A ;
readonly TEXTURE_BINDING_2D_ARRAY : 0x8C1D ;
readonly R11F_G11F_B10F : 0x8C3A ;
readonly UNSIGNED_INT_10F_11F_11F_REV : 0x8C3B ;
readonly RGB9_E5 : 0x8C3D ;
readonly UNSIGNED_INT_5_9_9_9_REV : 0x8C3E ;
readonly TRANSFORM_FEEDBACK_BUFFER_MODE : 0x8C7F ;
readonly MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS : 0x8C80 ;
readonly TRANSFORM_FEEDBACK_VARYINGS : 0x8C83 ;
readonly TRANSFORM_FEEDBACK_BUFFER_START : 0x8C84 ;
readonly TRANSFORM_FEEDBACK_BUFFER_SIZE : 0x8C85 ;
readonly TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN : 0x8C88 ;
readonly RASTERIZER_DISCARD : 0x8C89 ;
readonly MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS : 0x8C8A ;
readonly MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS : 0x8C8B ;
readonly INTERLEAVED_ATTRIBS : 0x8C8C ;
readonly SEPARATE_ATTRIBS : 0x8C8D ;
readonly TRANSFORM_FEEDBACK_BUFFER : 0x8C8E ;
readonly TRANSFORM_FEEDBACK_BUFFER_BINDING : 0x8C8F ;
readonly RGBA32UI : 0x8D70 ;
readonly RGB32UI : 0x8D71 ;
readonly RGBA16UI : 0x8D76 ;
readonly RGB16UI : 0x8D77 ;
readonly RGBA8UI : 0x8D7C ;
readonly RGB8UI : 0x8D7D ;
readonly RGBA32I : 0x8D82 ;
readonly RGB32I : 0x8D83 ;
readonly RGBA16I : 0x8D88 ;
readonly RGB16I : 0x8D89 ;
readonly RGBA8I : 0x8D8E ;
readonly RGB8I : 0x8D8F ;
readonly RED_INTEGER : 0x8D94 ;
readonly RGB_INTEGER : 0x8D98 ;
readonly RGBA_INTEGER : 0x8D99 ;
readonly SAMPLER_2D_ARRAY : 0x8DC1 ;
readonly SAMPLER_2D_ARRAY_SHADOW : 0x8DC4 ;
readonly SAMPLER_CUBE_SHADOW : 0x8DC5 ;
readonly UNSIGNED_INT_VEC2 : 0x8DC6 ;
readonly UNSIGNED_INT_VEC3 : 0x8DC7 ;
readonly UNSIGNED_INT_VEC4 : 0x8DC8 ;
readonly INT_SAMPLER_2D : 0x8DCA ;
readonly INT_SAMPLER_3D : 0x8DCB ;
readonly INT_SAMPLER_CUBE : 0x8DCC ;
readonly INT_SAMPLER_2D_ARRAY : 0x8DCF ;
readonly UNSIGNED_INT_SAMPLER_2D : 0x8DD2 ;
readonly UNSIGNED_INT_SAMPLER_3D : 0x8DD3 ;
readonly UNSIGNED_INT_SAMPLER_CUBE : 0x8DD4 ;
readonly UNSIGNED_INT_SAMPLER_2D_ARRAY : 0x8DD7 ;
readonly DEPTH_COMPONENT32F : 0x8CAC ;
readonly DEPTH32F_STENCIL8 : 0x8CAD ;
readonly FLOAT_32_UNSIGNED_INT_24_8_REV : 0x8DAD ;
readonly FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING : 0x8210 ;
readonly FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE : 0x8211 ;
readonly FRAMEBUFFER_ATTACHMENT_RED_SIZE : 0x8212 ;
readonly FRAMEBUFFER_ATTACHMENT_GREEN_SIZE : 0x8213 ;
readonly FRAMEBUFFER_ATTACHMENT_BLUE_SIZE : 0x8214 ;
readonly FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE : 0x8215 ;
readonly FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE : 0x8216 ;
readonly FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE : 0x8217 ;
readonly FRAMEBUFFER_DEFAULT : 0x8218 ;
readonly UNSIGNED_INT_24_8 : 0x84FA ;
readonly DEPTH24_STENCIL8 : 0x88F0 ;
readonly UNSIGNED_NORMALIZED : 0x8C17 ;
readonly DRAW_FRAMEBUFFER_BINDING : 0x8CA6 ;
readonly READ_FRAMEBUFFER : 0x8CA8 ;
readonly DRAW_FRAMEBUFFER : 0x8CA9 ;
readonly READ_FRAMEBUFFER_BINDING : 0x8CAA ;
readonly RENDERBUFFER_SAMPLES : 0x8CAB ;
readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER : 0x8CD4 ;
readonly MAX_COLOR_ATTACHMENTS : 0x8CDF ;
readonly COLOR_ATTACHMENT1 : 0x8CE1 ;
readonly COLOR_ATTACHMENT2 : 0x8CE2 ;
readonly COLOR_ATTACHMENT3 : 0x8CE3 ;
readonly COLOR_ATTACHMENT4 : 0x8CE4 ;
readonly COLOR_ATTACHMENT5 : 0x8CE5 ;
readonly COLOR_ATTACHMENT6 : 0x8CE6 ;
readonly COLOR_ATTACHMENT7 : 0x8CE7 ;
readonly COLOR_ATTACHMENT8 : 0x8CE8 ;
readonly COLOR_ATTACHMENT9 : 0x8CE9 ;
readonly COLOR_ATTACHMENT10 : 0x8CEA ;
readonly COLOR_ATTACHMENT11 : 0x8CEB ;
readonly COLOR_ATTACHMENT12 : 0x8CEC ;
readonly COLOR_ATTACHMENT13 : 0x8CED ;
readonly COLOR_ATTACHMENT14 : 0x8CEE ;
readonly COLOR_ATTACHMENT15 : 0x8CEF ;
readonly FRAMEBUFFER_INCOMPLETE_MULTISAMPLE : 0x8D56 ;
readonly MAX_SAMPLES : 0x8D57 ;
readonly HALF_FLOAT : 0x140B ;
readonly RG : 0x8227 ;
readonly RG_INTEGER : 0x8228 ;
readonly R8 : 0x8229 ;
readonly RG8 : 0x822B ;
readonly R16F : 0x822D ;
readonly R32F : 0x822E ;
readonly RG16F : 0x822F ;
readonly RG32F : 0x8230 ;
readonly R8I : 0x8231 ;
readonly R8UI : 0x8232 ;
readonly R16I : 0x8233 ;
readonly R16UI : 0x8234 ;
readonly R32I : 0x8235 ;
readonly R32UI : 0x8236 ;
readonly RG8I : 0x8237 ;
readonly RG8UI : 0x8238 ;
readonly RG16I : 0x8239 ;
readonly RG16UI : 0x823A ;
readonly RG32I : 0x823B ;
readonly RG32UI : 0x823C ;
readonly VERTEX_ARRAY_BINDING : 0x85B5 ;
readonly R8_SNORM : 0x8F94 ;
readonly RG8_SNORM : 0x8F95 ;
readonly RGB8_SNORM : 0x8F96 ;
readonly RGBA8_SNORM : 0x8F97 ;
readonly SIGNED_NORMALIZED : 0x8F9C ;
readonly COPY_READ_BUFFER : 0x8F36 ;
readonly COPY_WRITE_BUFFER : 0x8F37 ;
readonly COPY_READ_BUFFER_BINDING : 0x8F36 ;
readonly COPY_WRITE_BUFFER_BINDING : 0x8F37 ;
readonly UNIFORM_BUFFER : 0x8A11 ;
readonly UNIFORM_BUFFER_BINDING : 0x8A28 ;
readonly UNIFORM_BUFFER_START : 0x8A29 ;
readonly UNIFORM_BUFFER_SIZE : 0x8A2A ;
readonly MAX_VERTEX_UNIFORM_BLOCKS : 0x8A2B ;
readonly MAX_FRAGMENT_UNIFORM_BLOCKS : 0x8A2D ;
readonly MAX_COMBINED_UNIFORM_BLOCKS : 0x8A2E ;
readonly MAX_UNIFORM_BUFFER_BINDINGS : 0x8A2F ;
readonly MAX_UNIFORM_BLOCK_SIZE : 0x8A30 ;
readonly MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS : 0x8A31 ;
readonly MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS : 0x8A33 ;
readonly UNIFORM_BUFFER_OFFSET_ALIGNMENT : 0x8A34 ;
readonly ACTIVE_UNIFORM_BLOCKS : 0x8A36 ;
readonly UNIFORM_TYPE : 0x8A37 ;
readonly UNIFORM_SIZE : 0x8A38 ;
readonly UNIFORM_BLOCK_INDEX : 0x8A3A ;
readonly UNIFORM_OFFSET : 0x8A3B ;
readonly UNIFORM_ARRAY_STRIDE : 0x8A3C ;
readonly UNIFORM_MATRIX_STRIDE : 0x8A3D ;
readonly UNIFORM_IS_ROW_MAJOR : 0x8A3E ;
readonly UNIFORM_BLOCK_BINDING : 0x8A3F ;
readonly UNIFORM_BLOCK_DATA_SIZE : 0x8A40 ;
readonly UNIFORM_BLOCK_ACTIVE_UNIFORMS : 0x8A42 ;
readonly UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES : 0x8A43 ;
readonly UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER : 0x8A44 ;
readonly UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER : 0x8A46 ;
readonly INVALID_INDEX : 0xFFFFFFFF ;
readonly MAX_VERTEX_OUTPUT_COMPONENTS : 0x9122 ;
readonly MAX_FRAGMENT_INPUT_COMPONENTS : 0x9125 ;
readonly MAX_SERVER_WAIT_TIMEOUT : 0x9111 ;
readonly OBJECT_TYPE : 0x9112 ;
readonly SYNC_CONDITION : 0x9113 ;
readonly SYNC_STATUS : 0x9114 ;
readonly SYNC_FLAGS : 0x9115 ;
readonly SYNC_FENCE : 0x9116 ;
readonly SYNC_GPU_COMMANDS_COMPLETE : 0x9117 ;
readonly UNSIGNALED : 0x9118 ;
readonly SIGNALED : 0x9119 ;
readonly ALREADY_SIGNALED : 0x911A ;
readonly TIMEOUT_EXPIRED : 0x911B ;
readonly CONDITION_SATISFIED : 0x911C ;
readonly WAIT_FAILED : 0x911D ;
readonly SYNC_FLUSH_COMMANDS_BIT : 0x00000001 ;
readonly VERTEX_ATTRIB_ARRAY_DIVISOR : 0x88FE ;
readonly ANY_SAMPLES_PASSED : 0x8C2F ;
readonly ANY_SAMPLES_PASSED_CONSERVATIVE : 0x8D6A ;
readonly SAMPLER_BINDING : 0x8919 ;
readonly RGB10_A2UI : 0x906F ;
readonly INT_2_10_10_10_REV : 0x8D9F ;
readonly TRANSFORM_FEEDBACK : 0x8E22 ;
readonly TRANSFORM_FEEDBACK_PAUSED : 0x8E23 ;
readonly TRANSFORM_FEEDBACK_ACTIVE : 0x8E24 ;
readonly TRANSFORM_FEEDBACK_BINDING : 0x8E25 ;
readonly TEXTURE_IMMUTABLE_FORMAT : 0x912F ;
readonly MAX_ELEMENT_INDEX : 0x8D6B ;
readonly TEXTURE_IMMUTABLE_LEVELS : 0x82DF ;
readonly TIMEOUT_IGNORED : - 1 ;
readonly MAX_CLIENT_WAIT_TIMEOUT_WEBGL : 0x9247 ;
2020-07-22 12:03:46 -04:00
}
interface WebGL2RenderingContextOverloads {
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/bufferData) */
2020-07-22 12:03:46 -04:00
bufferData ( target : GLenum , size : GLsizeiptr , usage : GLenum ) : void ;
2024-03-26 18:52:57 -04:00
bufferData ( target : GLenum , srcData : AllowSharedBufferSource | null , usage : GLenum ) : void ;
bufferData ( target : GLenum , srcData : ArrayBufferView , usage : GLenum , srcOffset : number , length? : GLuint ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/bufferSubData) */
2024-03-26 18:52:57 -04:00
bufferSubData ( target : GLenum , dstByteOffset : GLintptr , srcData : AllowSharedBufferSource ) : void ;
bufferSubData ( target : GLenum , dstByteOffset : GLintptr , srcData : ArrayBufferView , srcOffset : number , length? : GLuint ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/compressedTexImage2D) */
2020-07-22 12:03:46 -04:00
compressedTexImage2D ( target : GLenum , level : GLint , internalformat : GLenum , width : GLsizei , height : GLsizei , border : GLint , imageSize : GLsizei , offset : GLintptr ) : void ;
2024-03-26 18:52:57 -04:00
compressedTexImage2D ( target : GLenum , level : GLint , internalformat : GLenum , width : GLsizei , height : GLsizei , border : GLint , srcData : ArrayBufferView , srcOffset? : number , srcLengthOverride? : GLuint ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/compressedTexSubImage2D) */
2020-07-22 12:03:46 -04:00
compressedTexSubImage2D ( target : GLenum , level : GLint , xoffset : GLint , yoffset : GLint , width : GLsizei , height : GLsizei , format : GLenum , imageSize : GLsizei , offset : GLintptr ) : void ;
2024-03-26 18:52:57 -04:00
compressedTexSubImage2D ( target : GLenum , level : GLint , xoffset : GLint , yoffset : GLint , width : GLsizei , height : GLsizei , format : GLenum , srcData : ArrayBufferView , srcOffset? : number , srcLengthOverride? : GLuint ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/readPixels) */
2020-07-22 12:03:46 -04:00
readPixels ( x : GLint , y : GLint , width : GLsizei , height : GLsizei , format : GLenum , type : GLenum , dstData : ArrayBufferView | null ) : void ;
readPixels ( x : GLint , y : GLint , width : GLsizei , height : GLsizei , format : GLenum , type : GLenum , offset : GLintptr ) : void ;
2024-03-26 18:52:57 -04:00
readPixels ( x : GLint , y : GLint , width : GLsizei , height : GLsizei , format : GLenum , type : GLenum , dstData : ArrayBufferView , dstOffset : number ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/texImage2D) */
2020-07-22 12:03:46 -04:00
texImage2D ( target : GLenum , level : GLint , internalformat : GLint , width : GLsizei , height : GLsizei , border : GLint , format : GLenum , type : GLenum , pixels : ArrayBufferView | null ) : void ;
texImage2D ( target : GLenum , level : GLint , internalformat : GLint , format : GLenum , type : GLenum , source : TexImageSource ) : void ;
texImage2D ( target : GLenum , level : GLint , internalformat : GLint , width : GLsizei , height : GLsizei , border : GLint , format : GLenum , type : GLenum , pboOffset : GLintptr ) : void ;
texImage2D ( target : GLenum , level : GLint , internalformat : GLint , width : GLsizei , height : GLsizei , border : GLint , format : GLenum , type : GLenum , source : TexImageSource ) : void ;
2024-03-26 18:52:57 -04:00
texImage2D ( target : GLenum , level : GLint , internalformat : GLint , width : GLsizei , height : GLsizei , border : GLint , format : GLenum , type : GLenum , srcData : ArrayBufferView , srcOffset : number ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/texSubImage2D) */
2020-07-22 12:03:46 -04:00
texSubImage2D ( target : GLenum , level : GLint , xoffset : GLint , yoffset : GLint , width : GLsizei , height : GLsizei , format : GLenum , type : GLenum , pixels : ArrayBufferView | null ) : void ;
texSubImage2D ( target : GLenum , level : GLint , xoffset : GLint , yoffset : GLint , format : GLenum , type : GLenum , source : TexImageSource ) : void ;
texSubImage2D ( target : GLenum , level : GLint , xoffset : GLint , yoffset : GLint , width : GLsizei , height : GLsizei , format : GLenum , type : GLenum , pboOffset : GLintptr ) : void ;
texSubImage2D ( target : GLenum , level : GLint , xoffset : GLint , yoffset : GLint , width : GLsizei , height : GLsizei , format : GLenum , type : GLenum , source : TexImageSource ) : void ;
2024-03-26 18:52:57 -04:00
texSubImage2D ( target : GLenum , level : GLint , xoffset : GLint , yoffset : GLint , width : GLsizei , height : GLsizei , format : GLenum , type : GLenum , srcData : ArrayBufferView , srcOffset : number ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */
2024-03-26 18:52:57 -04:00
uniform1fv ( location : WebGLUniformLocation | null , data : Float32List , srcOffset? : number , srcLength? : GLuint ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */
2024-03-26 18:52:57 -04:00
uniform1iv ( location : WebGLUniformLocation | null , data : Int32List , srcOffset? : number , srcLength? : GLuint ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */
2024-03-26 18:52:57 -04:00
uniform2fv ( location : WebGLUniformLocation | null , data : Float32List , srcOffset? : number , srcLength? : GLuint ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */
2024-03-26 18:52:57 -04:00
uniform2iv ( location : WebGLUniformLocation | null , data : Int32List , srcOffset? : number , srcLength? : GLuint ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */
2024-03-26 18:52:57 -04:00
uniform3fv ( location : WebGLUniformLocation | null , data : Float32List , srcOffset? : number , srcLength? : GLuint ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */
2024-03-26 18:52:57 -04:00
uniform3iv ( location : WebGLUniformLocation | null , data : Int32List , srcOffset? : number , srcLength? : GLuint ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */
2024-03-26 18:52:57 -04:00
uniform4fv ( location : WebGLUniformLocation | null , data : Float32List , srcOffset? : number , srcLength? : GLuint ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */
2024-03-26 18:52:57 -04:00
uniform4iv ( location : WebGLUniformLocation | null , data : Int32List , srcOffset? : number , srcLength? : GLuint ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniformMatrix) */
2024-03-26 18:52:57 -04:00
uniformMatrix2fv ( location : WebGLUniformLocation | null , transpose : GLboolean , data : Float32List , srcOffset? : number , srcLength? : GLuint ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniformMatrix) */
2024-03-26 18:52:57 -04:00
uniformMatrix3fv ( location : WebGLUniformLocation | null , transpose : GLboolean , data : Float32List , srcOffset? : number , srcLength? : GLuint ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniformMatrix) */
2024-03-26 18:52:57 -04:00
uniformMatrix4fv ( location : WebGLUniformLocation | null , transpose : GLboolean , data : Float32List , srcOffset? : number , srcLength? : GLuint ) : void ;
2020-07-22 12:03:46 -04:00
}
2023-07-03 18:36:35 -04:00
/ * *
* Part of the WebGL API and represents the information returned by calling the WebGLRenderingContext . getActiveAttrib ( ) and WebGLRenderingContext . getActiveUniform ( ) methods .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/WebGLActiveInfo)
* /
2020-07-22 12:03:46 -04:00
interface WebGLActiveInfo {
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLActiveInfo/name) */
2020-07-22 12:03:46 -04:00
readonly name : string ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLActiveInfo/size) */
2020-07-22 12:03:46 -04:00
readonly size : GLint ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLActiveInfo/type) */
2020-07-22 12:03:46 -04:00
readonly type : GLenum ;
}
declare var WebGLActiveInfo : {
prototype : WebGLActiveInfo ;
new ( ) : WebGLActiveInfo ;
} ;
2023-07-03 18:36:35 -04:00
/ * *
* Part of the WebGL API and represents an opaque buffer object storing data such as vertices or colors .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/WebGLBuffer)
* /
2021-05-27 19:33:11 -04:00
interface WebGLBuffer {
2020-07-22 12:03:46 -04:00
}
declare var WebGLBuffer : {
prototype : WebGLBuffer ;
new ( ) : WebGLBuffer ;
} ;
2023-07-03 18:36:35 -04:00
/ * *
* 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 .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/WebGLContextEvent)
* /
2020-07-22 12:03:46 -04:00
interface WebGLContextEvent extends Event {
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLContextEvent/statusMessage) */
2020-07-22 12:03:46 -04:00
readonly statusMessage : string ;
}
declare var WebGLContextEvent : {
prototype : WebGLContextEvent ;
new ( type : string , eventInit? : WebGLContextEventInit ) : WebGLContextEvent ;
} ;
2023-07-03 18:36:35 -04:00
/ * *
* Part of the WebGL API and represents a collection of buffers that serve as a rendering destination .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/WebGLFramebuffer)
* /
2021-05-27 19:33:11 -04:00
interface WebGLFramebuffer {
2020-07-22 12:03:46 -04:00
}
declare var WebGLFramebuffer : {
prototype : WebGLFramebuffer ;
new ( ) : WebGLFramebuffer ;
} ;
2023-07-03 18:36:35 -04:00
/ * *
* 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 ) .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/WebGLProgram)
* /
2021-05-27 19:33:11 -04:00
interface WebGLProgram {
2020-07-22 12:03:46 -04:00
}
declare var WebGLProgram : {
prototype : WebGLProgram ;
new ( ) : WebGLProgram ;
} ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLQuery) */
2021-05-27 19:33:11 -04:00
interface WebGLQuery {
2020-07-22 12:03:46 -04:00
}
declare var WebGLQuery : {
prototype : WebGLQuery ;
new ( ) : WebGLQuery ;
} ;
2023-07-03 18:36:35 -04:00
/ * *
* Part of the WebGL API and represents a buffer that can contain an image , or can be source or target of an rendering operation .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/WebGLRenderbuffer)
* /
2021-05-27 19:33:11 -04:00
interface WebGLRenderbuffer {
2020-07-22 12:03:46 -04:00
}
declare var WebGLRenderbuffer : {
prototype : WebGLRenderbuffer ;
new ( ) : WebGLRenderbuffer ;
} ;
2023-07-03 18:36:35 -04:00
/ * *
* Provides an interface to the OpenGL ES 2.0 graphics rendering context for the drawing surface of an HTML < canvas > element .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/WebGLRenderingContext)
* /
2020-07-22 12:03:46 -04:00
interface WebGLRenderingContext extends WebGLRenderingContextBase , WebGLRenderingContextOverloads {
}
declare var WebGLRenderingContext : {
prototype : WebGLRenderingContext ;
new ( ) : WebGLRenderingContext ;
2023-03-21 11:46:40 -04:00
readonly DEPTH_BUFFER_BIT : 0x00000100 ;
readonly STENCIL_BUFFER_BIT : 0x00000400 ;
readonly COLOR_BUFFER_BIT : 0x00004000 ;
readonly POINTS : 0x0000 ;
readonly LINES : 0x0001 ;
readonly LINE_LOOP : 0x0002 ;
readonly LINE_STRIP : 0x0003 ;
readonly TRIANGLES : 0x0004 ;
readonly TRIANGLE_STRIP : 0x0005 ;
readonly TRIANGLE_FAN : 0x0006 ;
readonly ZERO : 0 ;
readonly ONE : 1 ;
readonly SRC_COLOR : 0x0300 ;
readonly ONE_MINUS_SRC_COLOR : 0x0301 ;
readonly SRC_ALPHA : 0x0302 ;
readonly ONE_MINUS_SRC_ALPHA : 0x0303 ;
readonly DST_ALPHA : 0x0304 ;
readonly ONE_MINUS_DST_ALPHA : 0x0305 ;
readonly DST_COLOR : 0x0306 ;
readonly ONE_MINUS_DST_COLOR : 0x0307 ;
readonly SRC_ALPHA_SATURATE : 0x0308 ;
readonly FUNC_ADD : 0x8006 ;
readonly BLEND_EQUATION : 0x8009 ;
readonly BLEND_EQUATION_RGB : 0x8009 ;
readonly BLEND_EQUATION_ALPHA : 0x883D ;
readonly FUNC_SUBTRACT : 0x800A ;
readonly FUNC_REVERSE_SUBTRACT : 0x800B ;
readonly BLEND_DST_RGB : 0x80C8 ;
readonly BLEND_SRC_RGB : 0x80C9 ;
readonly BLEND_DST_ALPHA : 0x80CA ;
readonly BLEND_SRC_ALPHA : 0x80CB ;
readonly CONSTANT_COLOR : 0x8001 ;
readonly ONE_MINUS_CONSTANT_COLOR : 0x8002 ;
readonly CONSTANT_ALPHA : 0x8003 ;
readonly ONE_MINUS_CONSTANT_ALPHA : 0x8004 ;
readonly BLEND_COLOR : 0x8005 ;
readonly ARRAY_BUFFER : 0x8892 ;
readonly ELEMENT_ARRAY_BUFFER : 0x8893 ;
readonly ARRAY_BUFFER_BINDING : 0x8894 ;
readonly ELEMENT_ARRAY_BUFFER_BINDING : 0x8895 ;
readonly STREAM_DRAW : 0x88E0 ;
readonly STATIC_DRAW : 0x88E4 ;
readonly DYNAMIC_DRAW : 0x88E8 ;
readonly BUFFER_SIZE : 0x8764 ;
readonly BUFFER_USAGE : 0x8765 ;
readonly CURRENT_VERTEX_ATTRIB : 0x8626 ;
readonly FRONT : 0x0404 ;
readonly BACK : 0x0405 ;
readonly FRONT_AND_BACK : 0x0408 ;
readonly CULL_FACE : 0x0B44 ;
readonly BLEND : 0x0BE2 ;
readonly DITHER : 0x0BD0 ;
readonly STENCIL_TEST : 0x0B90 ;
readonly DEPTH_TEST : 0x0B71 ;
readonly SCISSOR_TEST : 0x0C11 ;
readonly POLYGON_OFFSET_FILL : 0x8037 ;
readonly SAMPLE_ALPHA_TO_COVERAGE : 0x809E ;
readonly SAMPLE_COVERAGE : 0x80A0 ;
readonly NO_ERROR : 0 ;
readonly INVALID_ENUM : 0x0500 ;
readonly INVALID_VALUE : 0x0501 ;
readonly INVALID_OPERATION : 0x0502 ;
readonly OUT_OF_MEMORY : 0x0505 ;
readonly CW : 0x0900 ;
readonly CCW : 0x0901 ;
readonly LINE_WIDTH : 0x0B21 ;
readonly ALIASED_POINT_SIZE_RANGE : 0x846D ;
readonly ALIASED_LINE_WIDTH_RANGE : 0x846E ;
readonly CULL_FACE_MODE : 0x0B45 ;
readonly FRONT_FACE : 0x0B46 ;
readonly DEPTH_RANGE : 0x0B70 ;
readonly DEPTH_WRITEMASK : 0x0B72 ;
readonly DEPTH_CLEAR_VALUE : 0x0B73 ;
readonly DEPTH_FUNC : 0x0B74 ;
readonly STENCIL_CLEAR_VALUE : 0x0B91 ;
readonly STENCIL_FUNC : 0x0B92 ;
readonly STENCIL_FAIL : 0x0B94 ;
readonly STENCIL_PASS_DEPTH_FAIL : 0x0B95 ;
readonly STENCIL_PASS_DEPTH_PASS : 0x0B96 ;
readonly STENCIL_REF : 0x0B97 ;
readonly STENCIL_VALUE_MASK : 0x0B93 ;
readonly STENCIL_WRITEMASK : 0x0B98 ;
readonly STENCIL_BACK_FUNC : 0x8800 ;
readonly STENCIL_BACK_FAIL : 0x8801 ;
readonly STENCIL_BACK_PASS_DEPTH_FAIL : 0x8802 ;
readonly STENCIL_BACK_PASS_DEPTH_PASS : 0x8803 ;
readonly STENCIL_BACK_REF : 0x8CA3 ;
readonly STENCIL_BACK_VALUE_MASK : 0x8CA4 ;
readonly STENCIL_BACK_WRITEMASK : 0x8CA5 ;
readonly VIEWPORT : 0x0BA2 ;
readonly SCISSOR_BOX : 0x0C10 ;
readonly COLOR_CLEAR_VALUE : 0x0C22 ;
readonly COLOR_WRITEMASK : 0x0C23 ;
readonly UNPACK_ALIGNMENT : 0x0CF5 ;
readonly PACK_ALIGNMENT : 0x0D05 ;
readonly MAX_TEXTURE_SIZE : 0x0D33 ;
readonly MAX_VIEWPORT_DIMS : 0x0D3A ;
readonly SUBPIXEL_BITS : 0x0D50 ;
readonly RED_BITS : 0x0D52 ;
readonly GREEN_BITS : 0x0D53 ;
readonly BLUE_BITS : 0x0D54 ;
readonly ALPHA_BITS : 0x0D55 ;
readonly DEPTH_BITS : 0x0D56 ;
readonly STENCIL_BITS : 0x0D57 ;
readonly POLYGON_OFFSET_UNITS : 0x2A00 ;
readonly POLYGON_OFFSET_FACTOR : 0x8038 ;
readonly TEXTURE_BINDING_2D : 0x8069 ;
readonly SAMPLE_BUFFERS : 0x80A8 ;
readonly SAMPLES : 0x80A9 ;
readonly SAMPLE_COVERAGE_VALUE : 0x80AA ;
readonly SAMPLE_COVERAGE_INVERT : 0x80AB ;
readonly COMPRESSED_TEXTURE_FORMATS : 0x86A3 ;
readonly DONT_CARE : 0x1100 ;
readonly FASTEST : 0x1101 ;
readonly NICEST : 0x1102 ;
readonly GENERATE_MIPMAP_HINT : 0x8192 ;
readonly BYTE : 0x1400 ;
readonly UNSIGNED_BYTE : 0x1401 ;
readonly SHORT : 0x1402 ;
readonly UNSIGNED_SHORT : 0x1403 ;
readonly INT : 0x1404 ;
readonly UNSIGNED_INT : 0x1405 ;
readonly FLOAT : 0x1406 ;
readonly DEPTH_COMPONENT : 0x1902 ;
readonly ALPHA : 0x1906 ;
readonly RGB : 0x1907 ;
readonly RGBA : 0x1908 ;
readonly LUMINANCE : 0x1909 ;
readonly LUMINANCE_ALPHA : 0x190A ;
readonly UNSIGNED_SHORT_4_4_4_4 : 0x8033 ;
readonly UNSIGNED_SHORT_5_5_5_1 : 0x8034 ;
readonly UNSIGNED_SHORT_5_6_5 : 0x8363 ;
readonly FRAGMENT_SHADER : 0x8B30 ;
readonly VERTEX_SHADER : 0x8B31 ;
readonly MAX_VERTEX_ATTRIBS : 0x8869 ;
readonly MAX_VERTEX_UNIFORM_VECTORS : 0x8DFB ;
readonly MAX_VARYING_VECTORS : 0x8DFC ;
readonly MAX_COMBINED_TEXTURE_IMAGE_UNITS : 0x8B4D ;
readonly MAX_VERTEX_TEXTURE_IMAGE_UNITS : 0x8B4C ;
readonly MAX_TEXTURE_IMAGE_UNITS : 0x8872 ;
readonly MAX_FRAGMENT_UNIFORM_VECTORS : 0x8DFD ;
readonly SHADER_TYPE : 0x8B4F ;
readonly DELETE_STATUS : 0x8B80 ;
readonly LINK_STATUS : 0x8B82 ;
readonly VALIDATE_STATUS : 0x8B83 ;
readonly ATTACHED_SHADERS : 0x8B85 ;
readonly ACTIVE_UNIFORMS : 0x8B86 ;
readonly ACTIVE_ATTRIBUTES : 0x8B89 ;
readonly SHADING_LANGUAGE_VERSION : 0x8B8C ;
readonly CURRENT_PROGRAM : 0x8B8D ;
readonly NEVER : 0x0200 ;
readonly LESS : 0x0201 ;
readonly EQUAL : 0x0202 ;
readonly LEQUAL : 0x0203 ;
readonly GREATER : 0x0204 ;
readonly NOTEQUAL : 0x0205 ;
readonly GEQUAL : 0x0206 ;
readonly ALWAYS : 0x0207 ;
readonly KEEP : 0x1E00 ;
readonly REPLACE : 0x1E01 ;
readonly INCR : 0x1E02 ;
readonly DECR : 0x1E03 ;
readonly INVERT : 0x150A ;
readonly INCR_WRAP : 0x8507 ;
readonly DECR_WRAP : 0x8508 ;
readonly VENDOR : 0x1F00 ;
readonly RENDERER : 0x1F01 ;
readonly VERSION : 0x1F02 ;
readonly NEAREST : 0x2600 ;
readonly LINEAR : 0x2601 ;
readonly NEAREST_MIPMAP_NEAREST : 0x2700 ;
readonly LINEAR_MIPMAP_NEAREST : 0x2701 ;
readonly NEAREST_MIPMAP_LINEAR : 0x2702 ;
readonly LINEAR_MIPMAP_LINEAR : 0x2703 ;
readonly TEXTURE_MAG_FILTER : 0x2800 ;
readonly TEXTURE_MIN_FILTER : 0x2801 ;
readonly TEXTURE_WRAP_S : 0x2802 ;
readonly TEXTURE_WRAP_T : 0x2803 ;
readonly TEXTURE_2D : 0x0DE1 ;
readonly TEXTURE : 0x1702 ;
readonly TEXTURE_CUBE_MAP : 0x8513 ;
readonly TEXTURE_BINDING_CUBE_MAP : 0x8514 ;
readonly TEXTURE_CUBE_MAP_POSITIVE_X : 0x8515 ;
readonly TEXTURE_CUBE_MAP_NEGATIVE_X : 0x8516 ;
readonly TEXTURE_CUBE_MAP_POSITIVE_Y : 0x8517 ;
readonly TEXTURE_CUBE_MAP_NEGATIVE_Y : 0x8518 ;
readonly TEXTURE_CUBE_MAP_POSITIVE_Z : 0x8519 ;
readonly TEXTURE_CUBE_MAP_NEGATIVE_Z : 0x851A ;
readonly MAX_CUBE_MAP_TEXTURE_SIZE : 0x851C ;
readonly TEXTURE0 : 0x84C0 ;
readonly TEXTURE1 : 0x84C1 ;
readonly TEXTURE2 : 0x84C2 ;
readonly TEXTURE3 : 0x84C3 ;
readonly TEXTURE4 : 0x84C4 ;
readonly TEXTURE5 : 0x84C5 ;
readonly TEXTURE6 : 0x84C6 ;
readonly TEXTURE7 : 0x84C7 ;
readonly TEXTURE8 : 0x84C8 ;
readonly TEXTURE9 : 0x84C9 ;
readonly TEXTURE10 : 0x84CA ;
readonly TEXTURE11 : 0x84CB ;
readonly TEXTURE12 : 0x84CC ;
readonly TEXTURE13 : 0x84CD ;
readonly TEXTURE14 : 0x84CE ;
readonly TEXTURE15 : 0x84CF ;
readonly TEXTURE16 : 0x84D0 ;
readonly TEXTURE17 : 0x84D1 ;
readonly TEXTURE18 : 0x84D2 ;
readonly TEXTURE19 : 0x84D3 ;
readonly TEXTURE20 : 0x84D4 ;
readonly TEXTURE21 : 0x84D5 ;
readonly TEXTURE22 : 0x84D6 ;
readonly TEXTURE23 : 0x84D7 ;
readonly TEXTURE24 : 0x84D8 ;
readonly TEXTURE25 : 0x84D9 ;
readonly TEXTURE26 : 0x84DA ;
readonly TEXTURE27 : 0x84DB ;
readonly TEXTURE28 : 0x84DC ;
readonly TEXTURE29 : 0x84DD ;
readonly TEXTURE30 : 0x84DE ;
readonly TEXTURE31 : 0x84DF ;
readonly ACTIVE_TEXTURE : 0x84E0 ;
readonly REPEAT : 0x2901 ;
readonly CLAMP_TO_EDGE : 0x812F ;
readonly MIRRORED_REPEAT : 0x8370 ;
readonly FLOAT_VEC2 : 0x8B50 ;
readonly FLOAT_VEC3 : 0x8B51 ;
readonly FLOAT_VEC4 : 0x8B52 ;
readonly INT_VEC2 : 0x8B53 ;
readonly INT_VEC3 : 0x8B54 ;
readonly INT_VEC4 : 0x8B55 ;
readonly BOOL : 0x8B56 ;
readonly BOOL_VEC2 : 0x8B57 ;
readonly BOOL_VEC3 : 0x8B58 ;
readonly BOOL_VEC4 : 0x8B59 ;
readonly FLOAT_MAT2 : 0x8B5A ;
readonly FLOAT_MAT3 : 0x8B5B ;
readonly FLOAT_MAT4 : 0x8B5C ;
readonly SAMPLER_2D : 0x8B5E ;
readonly SAMPLER_CUBE : 0x8B60 ;
readonly VERTEX_ATTRIB_ARRAY_ENABLED : 0x8622 ;
readonly VERTEX_ATTRIB_ARRAY_SIZE : 0x8623 ;
readonly VERTEX_ATTRIB_ARRAY_STRIDE : 0x8624 ;
readonly VERTEX_ATTRIB_ARRAY_TYPE : 0x8625 ;
readonly VERTEX_ATTRIB_ARRAY_NORMALIZED : 0x886A ;
readonly VERTEX_ATTRIB_ARRAY_POINTER : 0x8645 ;
readonly VERTEX_ATTRIB_ARRAY_BUFFER_BINDING : 0x889F ;
readonly IMPLEMENTATION_COLOR_READ_TYPE : 0x8B9A ;
readonly IMPLEMENTATION_COLOR_READ_FORMAT : 0x8B9B ;
readonly COMPILE_STATUS : 0x8B81 ;
readonly LOW_FLOAT : 0x8DF0 ;
readonly MEDIUM_FLOAT : 0x8DF1 ;
readonly HIGH_FLOAT : 0x8DF2 ;
readonly LOW_INT : 0x8DF3 ;
readonly MEDIUM_INT : 0x8DF4 ;
readonly HIGH_INT : 0x8DF5 ;
readonly FRAMEBUFFER : 0x8D40 ;
readonly RENDERBUFFER : 0x8D41 ;
readonly RGBA4 : 0x8056 ;
readonly RGB5_A1 : 0x8057 ;
2024-03-26 18:52:57 -04:00
readonly RGBA8 : 0x8058 ;
2023-03-21 11:46:40 -04:00
readonly RGB565 : 0x8D62 ;
readonly DEPTH_COMPONENT16 : 0x81A5 ;
readonly STENCIL_INDEX8 : 0x8D48 ;
readonly DEPTH_STENCIL : 0x84F9 ;
readonly RENDERBUFFER_WIDTH : 0x8D42 ;
readonly RENDERBUFFER_HEIGHT : 0x8D43 ;
readonly RENDERBUFFER_INTERNAL_FORMAT : 0x8D44 ;
readonly RENDERBUFFER_RED_SIZE : 0x8D50 ;
readonly RENDERBUFFER_GREEN_SIZE : 0x8D51 ;
readonly RENDERBUFFER_BLUE_SIZE : 0x8D52 ;
readonly RENDERBUFFER_ALPHA_SIZE : 0x8D53 ;
readonly RENDERBUFFER_DEPTH_SIZE : 0x8D54 ;
readonly RENDERBUFFER_STENCIL_SIZE : 0x8D55 ;
readonly FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE : 0x8CD0 ;
readonly FRAMEBUFFER_ATTACHMENT_OBJECT_NAME : 0x8CD1 ;
readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL : 0x8CD2 ;
readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE : 0x8CD3 ;
readonly COLOR_ATTACHMENT0 : 0x8CE0 ;
readonly DEPTH_ATTACHMENT : 0x8D00 ;
readonly STENCIL_ATTACHMENT : 0x8D20 ;
readonly DEPTH_STENCIL_ATTACHMENT : 0x821A ;
readonly NONE : 0 ;
readonly FRAMEBUFFER_COMPLETE : 0x8CD5 ;
readonly FRAMEBUFFER_INCOMPLETE_ATTACHMENT : 0x8CD6 ;
readonly FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT : 0x8CD7 ;
readonly FRAMEBUFFER_INCOMPLETE_DIMENSIONS : 0x8CD9 ;
readonly FRAMEBUFFER_UNSUPPORTED : 0x8CDD ;
readonly FRAMEBUFFER_BINDING : 0x8CA6 ;
readonly RENDERBUFFER_BINDING : 0x8CA7 ;
readonly MAX_RENDERBUFFER_SIZE : 0x84E8 ;
readonly INVALID_FRAMEBUFFER_OPERATION : 0x0506 ;
readonly UNPACK_FLIP_Y_WEBGL : 0x9240 ;
readonly UNPACK_PREMULTIPLY_ALPHA_WEBGL : 0x9241 ;
readonly CONTEXT_LOST_WEBGL : 0x9242 ;
readonly UNPACK_COLORSPACE_CONVERSION_WEBGL : 0x9243 ;
readonly BROWSER_DEFAULT_WEBGL : 0x9244 ;
2020-07-22 12:03:46 -04:00
} ;
interface WebGLRenderingContextBase {
2023-07-03 18:36:35 -04:00
drawingBufferColorSpace : PredefinedColorSpace ;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/drawingBufferHeight) */
2020-07-22 12:03:46 -04:00
readonly drawingBufferHeight : GLsizei ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/drawingBufferWidth) */
2020-07-22 12:03:46 -04:00
readonly drawingBufferWidth : GLsizei ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/activeTexture) */
2020-07-22 12:03:46 -04:00
activeTexture ( texture : GLenum ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/attachShader) */
2020-07-22 12:03:46 -04:00
attachShader ( program : WebGLProgram , shader : WebGLShader ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/bindAttribLocation) */
2020-07-22 12:03:46 -04:00
bindAttribLocation ( program : WebGLProgram , index : GLuint , name : string ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/bindBuffer) */
2020-07-22 12:03:46 -04:00
bindBuffer ( target : GLenum , buffer : WebGLBuffer | null ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/bindFramebuffer) */
2020-07-22 12:03:46 -04:00
bindFramebuffer ( target : GLenum , framebuffer : WebGLFramebuffer | null ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/bindRenderbuffer) */
2020-07-22 12:03:46 -04:00
bindRenderbuffer ( target : GLenum , renderbuffer : WebGLRenderbuffer | null ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/bindTexture) */
2020-07-22 12:03:46 -04:00
bindTexture ( target : GLenum , texture : WebGLTexture | null ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/blendColor) */
2020-07-22 12:03:46 -04:00
blendColor ( red : GLclampf , green : GLclampf , blue : GLclampf , alpha : GLclampf ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/blendEquation) */
2020-07-22 12:03:46 -04:00
blendEquation ( mode : GLenum ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/blendEquationSeparate) */
2020-07-22 12:03:46 -04:00
blendEquationSeparate ( modeRGB : GLenum , modeAlpha : GLenum ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/blendFunc) */
2020-07-22 12:03:46 -04:00
blendFunc ( sfactor : GLenum , dfactor : GLenum ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/blendFuncSeparate) */
2020-07-22 12:03:46 -04:00
blendFuncSeparate ( srcRGB : GLenum , dstRGB : GLenum , srcAlpha : GLenum , dstAlpha : GLenum ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/checkFramebufferStatus) */
2020-07-22 12:03:46 -04:00
checkFramebufferStatus ( target : GLenum ) : GLenum ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/clear) */
2020-07-22 12:03:46 -04:00
clear ( mask : GLbitfield ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/clearColor) */
2020-07-22 12:03:46 -04:00
clearColor ( red : GLclampf , green : GLclampf , blue : GLclampf , alpha : GLclampf ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/clearDepth) */
2020-07-22 12:03:46 -04:00
clearDepth ( depth : GLclampf ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/clearStencil) */
2020-07-22 12:03:46 -04:00
clearStencil ( s : GLint ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/colorMask) */
2020-07-22 12:03:46 -04:00
colorMask ( red : GLboolean , green : GLboolean , blue : GLboolean , alpha : GLboolean ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/compileShader) */
2020-07-22 12:03:46 -04:00
compileShader ( shader : WebGLShader ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/copyTexImage2D) */
2020-07-22 12:03:46 -04:00
copyTexImage2D ( target : GLenum , level : GLint , internalformat : GLenum , x : GLint , y : GLint , width : GLsizei , height : GLsizei , border : GLint ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/copyTexSubImage2D) */
2020-07-22 12:03:46 -04:00
copyTexSubImage2D ( target : GLenum , level : GLint , xoffset : GLint , yoffset : GLint , x : GLint , y : GLint , width : GLsizei , height : GLsizei ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/createBuffer) */
2020-07-22 12:03:46 -04:00
createBuffer ( ) : WebGLBuffer | null ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/createFramebuffer) */
2020-07-22 12:03:46 -04:00
createFramebuffer ( ) : WebGLFramebuffer | null ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/createProgram) */
2020-07-22 12:03:46 -04:00
createProgram ( ) : WebGLProgram | null ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/createRenderbuffer) */
2020-07-22 12:03:46 -04:00
createRenderbuffer ( ) : WebGLRenderbuffer | null ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/createShader) */
2020-07-22 12:03:46 -04:00
createShader ( type : GLenum ) : WebGLShader | null ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/createTexture) */
2020-07-22 12:03:46 -04:00
createTexture ( ) : WebGLTexture | null ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/cullFace) */
2020-07-22 12:03:46 -04:00
cullFace ( mode : GLenum ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/deleteBuffer) */
2020-07-22 12:03:46 -04:00
deleteBuffer ( buffer : WebGLBuffer | null ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/deleteFramebuffer) */
2020-07-22 12:03:46 -04:00
deleteFramebuffer ( framebuffer : WebGLFramebuffer | null ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/deleteProgram) */
2020-07-22 12:03:46 -04:00
deleteProgram ( program : WebGLProgram | null ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/deleteRenderbuffer) */
2020-07-22 12:03:46 -04:00
deleteRenderbuffer ( renderbuffer : WebGLRenderbuffer | null ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/deleteShader) */
2020-07-22 12:03:46 -04:00
deleteShader ( shader : WebGLShader | null ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/deleteTexture) */
2020-07-22 12:03:46 -04:00
deleteTexture ( texture : WebGLTexture | null ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/depthFunc) */
2020-07-22 12:03:46 -04:00
depthFunc ( func : GLenum ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/depthMask) */
2020-07-22 12:03:46 -04:00
depthMask ( flag : GLboolean ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/depthRange) */
2020-07-22 12:03:46 -04:00
depthRange ( zNear : GLclampf , zFar : GLclampf ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/detachShader) */
2020-07-22 12:03:46 -04:00
detachShader ( program : WebGLProgram , shader : WebGLShader ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/disable) */
2020-07-22 12:03:46 -04:00
disable ( cap : GLenum ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/disableVertexAttribArray) */
2020-07-22 12:03:46 -04:00
disableVertexAttribArray ( index : GLuint ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/drawArrays) */
2020-07-22 12:03:46 -04:00
drawArrays ( mode : GLenum , first : GLint , count : GLsizei ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/drawElements) */
2020-07-22 12:03:46 -04:00
drawElements ( mode : GLenum , count : GLsizei , type : GLenum , offset : GLintptr ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/enable) */
2020-07-22 12:03:46 -04:00
enable ( cap : GLenum ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/enableVertexAttribArray) */
2020-07-22 12:03:46 -04:00
enableVertexAttribArray ( index : GLuint ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/finish) */
2020-07-22 12:03:46 -04:00
finish ( ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/flush) */
2020-07-22 12:03:46 -04:00
flush ( ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/framebufferRenderbuffer) */
2020-07-22 12:03:46 -04:00
framebufferRenderbuffer ( target : GLenum , attachment : GLenum , renderbuffertarget : GLenum , renderbuffer : WebGLRenderbuffer | null ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/framebufferTexture2D) */
2020-07-22 12:03:46 -04:00
framebufferTexture2D ( target : GLenum , attachment : GLenum , textarget : GLenum , texture : WebGLTexture | null , level : GLint ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/frontFace) */
2020-07-22 12:03:46 -04:00
frontFace ( mode : GLenum ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/generateMipmap) */
2020-07-22 12:03:46 -04:00
generateMipmap ( target : GLenum ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/getActiveAttrib) */
2020-07-22 12:03:46 -04:00
getActiveAttrib ( program : WebGLProgram , index : GLuint ) : WebGLActiveInfo | null ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/getActiveUniform) */
2020-07-22 12:03:46 -04:00
getActiveUniform ( program : WebGLProgram , index : GLuint ) : WebGLActiveInfo | null ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/getAttachedShaders) */
2020-07-22 12:03:46 -04:00
getAttachedShaders ( program : WebGLProgram ) : WebGLShader [ ] | null ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/getAttribLocation) */
2020-07-22 12:03:46 -04:00
getAttribLocation ( program : WebGLProgram , name : string ) : GLint ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/getBufferParameter) */
2020-07-22 12:03:46 -04:00
getBufferParameter ( target : GLenum , pname : GLenum ) : any ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/getContextAttributes) */
2020-07-22 12:03:46 -04:00
getContextAttributes ( ) : WebGLContextAttributes | null ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/getError) */
2020-07-22 12:03:46 -04:00
getError ( ) : GLenum ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/getExtension) */
2022-12-07 12:59:59 -05:00
getExtension ( extensionName : "ANGLE_instanced_arrays" ) : ANGLE_instanced_arrays | null ;
2020-07-22 12:03:46 -04:00
getExtension ( extensionName : "EXT_blend_minmax" ) : EXT_blend_minmax | null ;
2021-08-26 20:12:59 -04:00
getExtension ( extensionName : "EXT_color_buffer_float" ) : EXT_color_buffer_float | null ;
getExtension ( extensionName : "EXT_color_buffer_half_float" ) : EXT_color_buffer_half_float | null ;
getExtension ( extensionName : "EXT_float_blend" ) : EXT_float_blend | null ;
2020-07-22 12:03:46 -04:00
getExtension ( extensionName : "EXT_frag_depth" ) : EXT_frag_depth | null ;
getExtension ( extensionName : "EXT_sRGB" ) : EXT_sRGB | null ;
2022-12-07 12:59:59 -05:00
getExtension ( extensionName : "EXT_shader_texture_lod" ) : EXT_shader_texture_lod | null ;
getExtension ( extensionName : "EXT_texture_compression_bptc" ) : EXT_texture_compression_bptc | null ;
getExtension ( extensionName : "EXT_texture_compression_rgtc" ) : EXT_texture_compression_rgtc | null ;
getExtension ( extensionName : "EXT_texture_filter_anisotropic" ) : EXT_texture_filter_anisotropic | null ;
2021-08-26 20:12:59 -04:00
getExtension ( extensionName : "KHR_parallel_shader_compile" ) : KHR_parallel_shader_compile | null ;
2022-12-07 12:59:59 -05:00
getExtension ( extensionName : "OES_element_index_uint" ) : OES_element_index_uint | null ;
getExtension ( extensionName : "OES_fbo_render_mipmap" ) : OES_fbo_render_mipmap | null ;
getExtension ( extensionName : "OES_standard_derivatives" ) : OES_standard_derivatives | null ;
getExtension ( extensionName : "OES_texture_float" ) : OES_texture_float | null ;
getExtension ( extensionName : "OES_texture_float_linear" ) : OES_texture_float_linear | null ;
getExtension ( extensionName : "OES_texture_half_float" ) : OES_texture_half_float | null ;
getExtension ( extensionName : "OES_texture_half_float_linear" ) : OES_texture_half_float_linear | null ;
2020-07-22 12:03:46 -04:00
getExtension ( extensionName : "OES_vertex_array_object" ) : OES_vertex_array_object | null ;
2021-08-26 20:12:59 -04:00
getExtension ( extensionName : "OVR_multiview2" ) : OVR_multiview2 | null ;
2020-07-22 12:03:46 -04:00
getExtension ( extensionName : "WEBGL_color_buffer_float" ) : WEBGL_color_buffer_float | null ;
getExtension ( extensionName : "WEBGL_compressed_texture_astc" ) : WEBGL_compressed_texture_astc | null ;
2021-08-26 20:12:59 -04:00
getExtension ( extensionName : "WEBGL_compressed_texture_etc" ) : WEBGL_compressed_texture_etc | null ;
getExtension ( extensionName : "WEBGL_compressed_texture_etc1" ) : WEBGL_compressed_texture_etc1 | null ;
2023-07-03 18:36:35 -04:00
getExtension ( extensionName : "WEBGL_compressed_texture_pvrtc" ) : WEBGL_compressed_texture_pvrtc | null ;
2022-12-07 12:59:59 -05:00
getExtension ( extensionName : "WEBGL_compressed_texture_s3tc" ) : WEBGL_compressed_texture_s3tc | null ;
2020-07-22 12:03:46 -04:00
getExtension ( extensionName : "WEBGL_compressed_texture_s3tc_srgb" ) : WEBGL_compressed_texture_s3tc_srgb | null ;
2022-12-07 12:59:59 -05:00
getExtension ( extensionName : "WEBGL_debug_renderer_info" ) : WEBGL_debug_renderer_info | null ;
2020-07-22 12:03:46 -04:00
getExtension ( extensionName : "WEBGL_debug_shaders" ) : WEBGL_debug_shaders | null ;
2022-12-07 12:59:59 -05:00
getExtension ( extensionName : "WEBGL_depth_texture" ) : WEBGL_depth_texture | null ;
2020-07-22 12:03:46 -04:00
getExtension ( extensionName : "WEBGL_draw_buffers" ) : WEBGL_draw_buffers | null ;
getExtension ( extensionName : "WEBGL_lose_context" ) : WEBGL_lose_context | null ;
2022-12-07 12:59:59 -05:00
getExtension ( extensionName : "WEBGL_multi_draw" ) : WEBGL_multi_draw | null ;
2021-08-26 20:12:59 -04:00
getExtension ( name : string ) : any ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/getFramebufferAttachmentParameter) */
2020-07-22 12:03:46 -04:00
getFramebufferAttachmentParameter ( target : GLenum , attachment : GLenum , pname : GLenum ) : any ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/getParameter) */
2020-07-22 12:03:46 -04:00
getParameter ( pname : GLenum ) : any ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/getProgramInfoLog) */
2020-07-22 12:03:46 -04:00
getProgramInfoLog ( program : WebGLProgram ) : string | null ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/getProgramParameter) */
2020-07-22 12:03:46 -04:00
getProgramParameter ( program : WebGLProgram , pname : GLenum ) : any ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/getRenderbufferParameter) */
2020-07-22 12:03:46 -04:00
getRenderbufferParameter ( target : GLenum , pname : GLenum ) : any ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/getShaderInfoLog) */
2020-07-22 12:03:46 -04:00
getShaderInfoLog ( shader : WebGLShader ) : string | null ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/getShaderParameter) */
2020-07-22 12:03:46 -04:00
getShaderParameter ( shader : WebGLShader , pname : GLenum ) : any ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/getShaderPrecisionFormat) */
2020-07-22 12:03:46 -04:00
getShaderPrecisionFormat ( shadertype : GLenum , precisiontype : GLenum ) : WebGLShaderPrecisionFormat | null ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/getShaderSource) */
2020-07-22 12:03:46 -04:00
getShaderSource ( shader : WebGLShader ) : string | null ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/getSupportedExtensions) */
2020-07-22 12:03:46 -04:00
getSupportedExtensions ( ) : string [ ] | null ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/getTexParameter) */
2020-07-22 12:03:46 -04:00
getTexParameter ( target : GLenum , pname : GLenum ) : any ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/getUniform) */
2020-07-22 12:03:46 -04:00
getUniform ( program : WebGLProgram , location : WebGLUniformLocation ) : any ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/getUniformLocation) */
2020-07-22 12:03:46 -04:00
getUniformLocation ( program : WebGLProgram , name : string ) : WebGLUniformLocation | null ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/getVertexAttrib) */
2020-07-22 12:03:46 -04:00
getVertexAttrib ( index : GLuint , pname : GLenum ) : any ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/getVertexAttribOffset) */
2020-07-22 12:03:46 -04:00
getVertexAttribOffset ( index : GLuint , pname : GLenum ) : GLintptr ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/hint) */
2020-07-22 12:03:46 -04:00
hint ( target : GLenum , mode : GLenum ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/isBuffer) */
2020-07-22 12:03:46 -04:00
isBuffer ( buffer : WebGLBuffer | null ) : GLboolean ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/isContextLost) */
2020-07-22 12:03:46 -04:00
isContextLost ( ) : boolean ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/isEnabled) */
2020-07-22 12:03:46 -04:00
isEnabled ( cap : GLenum ) : GLboolean ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/isFramebuffer) */
2020-07-22 12:03:46 -04:00
isFramebuffer ( framebuffer : WebGLFramebuffer | null ) : GLboolean ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/isProgram) */
2020-07-22 12:03:46 -04:00
isProgram ( program : WebGLProgram | null ) : GLboolean ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/isRenderbuffer) */
2020-07-22 12:03:46 -04:00
isRenderbuffer ( renderbuffer : WebGLRenderbuffer | null ) : GLboolean ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/isShader) */
2020-07-22 12:03:46 -04:00
isShader ( shader : WebGLShader | null ) : GLboolean ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/isTexture) */
2020-07-22 12:03:46 -04:00
isTexture ( texture : WebGLTexture | null ) : GLboolean ;
lineWidth ( width : GLfloat ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/linkProgram) */
2020-07-22 12:03:46 -04:00
linkProgram ( program : WebGLProgram ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/pixelStorei) */
2020-07-22 12:03:46 -04:00
pixelStorei ( pname : GLenum , param : GLint | GLboolean ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/polygonOffset) */
2020-07-22 12:03:46 -04:00
polygonOffset ( factor : GLfloat , units : GLfloat ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/renderbufferStorage) */
2020-07-22 12:03:46 -04:00
renderbufferStorage ( target : GLenum , internalformat : GLenum , width : GLsizei , height : GLsizei ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/sampleCoverage) */
2020-07-22 12:03:46 -04:00
sampleCoverage ( value : GLclampf , invert : GLboolean ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/scissor) */
2020-07-22 12:03:46 -04:00
scissor ( x : GLint , y : GLint , width : GLsizei , height : GLsizei ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/shaderSource) */
2020-07-22 12:03:46 -04:00
shaderSource ( shader : WebGLShader , source : string ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/stencilFunc) */
2020-07-22 12:03:46 -04:00
stencilFunc ( func : GLenum , ref : GLint , mask : GLuint ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/stencilFuncSeparate) */
2020-07-22 12:03:46 -04:00
stencilFuncSeparate ( face : GLenum , func : GLenum , ref : GLint , mask : GLuint ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/stencilMask) */
2020-07-22 12:03:46 -04:00
stencilMask ( mask : GLuint ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/stencilMaskSeparate) */
2020-07-22 12:03:46 -04:00
stencilMaskSeparate ( face : GLenum , mask : GLuint ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/stencilOp) */
2020-07-22 12:03:46 -04:00
stencilOp ( fail : GLenum , zfail : GLenum , zpass : GLenum ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/stencilOpSeparate) */
2020-07-22 12:03:46 -04:00
stencilOpSeparate ( face : GLenum , fail : GLenum , zfail : GLenum , zpass : GLenum ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/texParameter) */
2020-07-22 12:03:46 -04:00
texParameterf ( target : GLenum , pname : GLenum , param : GLfloat ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/texParameter) */
2020-07-22 12:03:46 -04:00
texParameteri ( target : GLenum , pname : GLenum , param : GLint ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */
2020-07-22 12:03:46 -04:00
uniform1f ( location : WebGLUniformLocation | null , x : GLfloat ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */
2020-07-22 12:03:46 -04:00
uniform1i ( location : WebGLUniformLocation | null , x : GLint ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */
2020-07-22 12:03:46 -04:00
uniform2f ( location : WebGLUniformLocation | null , x : GLfloat , y : GLfloat ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */
2020-07-22 12:03:46 -04:00
uniform2i ( location : WebGLUniformLocation | null , x : GLint , y : GLint ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */
2020-07-22 12:03:46 -04:00
uniform3f ( location : WebGLUniformLocation | null , x : GLfloat , y : GLfloat , z : GLfloat ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */
2020-07-22 12:03:46 -04:00
uniform3i ( location : WebGLUniformLocation | null , x : GLint , y : GLint , z : GLint ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */
2020-07-22 12:03:46 -04:00
uniform4f ( location : WebGLUniformLocation | null , x : GLfloat , y : GLfloat , z : GLfloat , w : GLfloat ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */
2020-07-22 12:03:46 -04:00
uniform4i ( location : WebGLUniformLocation | null , x : GLint , y : GLint , z : GLint , w : GLint ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/useProgram) */
2020-07-22 12:03:46 -04:00
useProgram ( program : WebGLProgram | null ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/validateProgram) */
2020-07-22 12:03:46 -04:00
validateProgram ( program : WebGLProgram ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/vertexAttrib) */
2020-07-22 12:03:46 -04:00
vertexAttrib1f ( index : GLuint , x : GLfloat ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/vertexAttrib) */
2020-07-22 12:03:46 -04:00
vertexAttrib1fv ( index : GLuint , values : Float32List ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/vertexAttrib) */
2020-07-22 12:03:46 -04:00
vertexAttrib2f ( index : GLuint , x : GLfloat , y : GLfloat ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/vertexAttrib) */
2020-07-22 12:03:46 -04:00
vertexAttrib2fv ( index : GLuint , values : Float32List ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/vertexAttrib) */
2020-07-22 12:03:46 -04:00
vertexAttrib3f ( index : GLuint , x : GLfloat , y : GLfloat , z : GLfloat ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/vertexAttrib) */
2020-07-22 12:03:46 -04:00
vertexAttrib3fv ( index : GLuint , values : Float32List ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/vertexAttrib) */
2020-07-22 12:03:46 -04:00
vertexAttrib4f ( index : GLuint , x : GLfloat , y : GLfloat , z : GLfloat , w : GLfloat ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/vertexAttrib) */
2020-07-22 12:03:46 -04:00
vertexAttrib4fv ( index : GLuint , values : Float32List ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/vertexAttribPointer) */
2020-07-22 12:03:46 -04:00
vertexAttribPointer ( index : GLuint , size : GLint , type : GLenum , normalized : GLboolean , stride : GLsizei , offset : GLintptr ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/viewport) */
2020-07-22 12:03:46 -04:00
viewport ( x : GLint , y : GLint , width : GLsizei , height : GLsizei ) : void ;
2023-03-21 11:46:40 -04:00
readonly DEPTH_BUFFER_BIT : 0x00000100 ;
readonly STENCIL_BUFFER_BIT : 0x00000400 ;
readonly COLOR_BUFFER_BIT : 0x00004000 ;
readonly POINTS : 0x0000 ;
readonly LINES : 0x0001 ;
readonly LINE_LOOP : 0x0002 ;
readonly LINE_STRIP : 0x0003 ;
readonly TRIANGLES : 0x0004 ;
readonly TRIANGLE_STRIP : 0x0005 ;
readonly TRIANGLE_FAN : 0x0006 ;
readonly ZERO : 0 ;
readonly ONE : 1 ;
readonly SRC_COLOR : 0x0300 ;
readonly ONE_MINUS_SRC_COLOR : 0x0301 ;
readonly SRC_ALPHA : 0x0302 ;
readonly ONE_MINUS_SRC_ALPHA : 0x0303 ;
readonly DST_ALPHA : 0x0304 ;
readonly ONE_MINUS_DST_ALPHA : 0x0305 ;
readonly DST_COLOR : 0x0306 ;
readonly ONE_MINUS_DST_COLOR : 0x0307 ;
readonly SRC_ALPHA_SATURATE : 0x0308 ;
readonly FUNC_ADD : 0x8006 ;
readonly BLEND_EQUATION : 0x8009 ;
readonly BLEND_EQUATION_RGB : 0x8009 ;
readonly BLEND_EQUATION_ALPHA : 0x883D ;
readonly FUNC_SUBTRACT : 0x800A ;
readonly FUNC_REVERSE_SUBTRACT : 0x800B ;
readonly BLEND_DST_RGB : 0x80C8 ;
readonly BLEND_SRC_RGB : 0x80C9 ;
readonly BLEND_DST_ALPHA : 0x80CA ;
readonly BLEND_SRC_ALPHA : 0x80CB ;
readonly CONSTANT_COLOR : 0x8001 ;
readonly ONE_MINUS_CONSTANT_COLOR : 0x8002 ;
readonly CONSTANT_ALPHA : 0x8003 ;
readonly ONE_MINUS_CONSTANT_ALPHA : 0x8004 ;
readonly BLEND_COLOR : 0x8005 ;
readonly ARRAY_BUFFER : 0x8892 ;
readonly ELEMENT_ARRAY_BUFFER : 0x8893 ;
readonly ARRAY_BUFFER_BINDING : 0x8894 ;
readonly ELEMENT_ARRAY_BUFFER_BINDING : 0x8895 ;
readonly STREAM_DRAW : 0x88E0 ;
readonly STATIC_DRAW : 0x88E4 ;
readonly DYNAMIC_DRAW : 0x88E8 ;
readonly BUFFER_SIZE : 0x8764 ;
readonly BUFFER_USAGE : 0x8765 ;
readonly CURRENT_VERTEX_ATTRIB : 0x8626 ;
readonly FRONT : 0x0404 ;
readonly BACK : 0x0405 ;
readonly FRONT_AND_BACK : 0x0408 ;
readonly CULL_FACE : 0x0B44 ;
readonly BLEND : 0x0BE2 ;
readonly DITHER : 0x0BD0 ;
readonly STENCIL_TEST : 0x0B90 ;
readonly DEPTH_TEST : 0x0B71 ;
readonly SCISSOR_TEST : 0x0C11 ;
readonly POLYGON_OFFSET_FILL : 0x8037 ;
readonly SAMPLE_ALPHA_TO_COVERAGE : 0x809E ;
readonly SAMPLE_COVERAGE : 0x80A0 ;
readonly NO_ERROR : 0 ;
readonly INVALID_ENUM : 0x0500 ;
readonly INVALID_VALUE : 0x0501 ;
readonly INVALID_OPERATION : 0x0502 ;
readonly OUT_OF_MEMORY : 0x0505 ;
readonly CW : 0x0900 ;
readonly CCW : 0x0901 ;
readonly LINE_WIDTH : 0x0B21 ;
readonly ALIASED_POINT_SIZE_RANGE : 0x846D ;
readonly ALIASED_LINE_WIDTH_RANGE : 0x846E ;
readonly CULL_FACE_MODE : 0x0B45 ;
readonly FRONT_FACE : 0x0B46 ;
readonly DEPTH_RANGE : 0x0B70 ;
readonly DEPTH_WRITEMASK : 0x0B72 ;
readonly DEPTH_CLEAR_VALUE : 0x0B73 ;
readonly DEPTH_FUNC : 0x0B74 ;
readonly STENCIL_CLEAR_VALUE : 0x0B91 ;
readonly STENCIL_FUNC : 0x0B92 ;
readonly STENCIL_FAIL : 0x0B94 ;
readonly STENCIL_PASS_DEPTH_FAIL : 0x0B95 ;
readonly STENCIL_PASS_DEPTH_PASS : 0x0B96 ;
readonly STENCIL_REF : 0x0B97 ;
readonly STENCIL_VALUE_MASK : 0x0B93 ;
readonly STENCIL_WRITEMASK : 0x0B98 ;
readonly STENCIL_BACK_FUNC : 0x8800 ;
readonly STENCIL_BACK_FAIL : 0x8801 ;
readonly STENCIL_BACK_PASS_DEPTH_FAIL : 0x8802 ;
readonly STENCIL_BACK_PASS_DEPTH_PASS : 0x8803 ;
readonly STENCIL_BACK_REF : 0x8CA3 ;
readonly STENCIL_BACK_VALUE_MASK : 0x8CA4 ;
readonly STENCIL_BACK_WRITEMASK : 0x8CA5 ;
readonly VIEWPORT : 0x0BA2 ;
readonly SCISSOR_BOX : 0x0C10 ;
readonly COLOR_CLEAR_VALUE : 0x0C22 ;
readonly COLOR_WRITEMASK : 0x0C23 ;
readonly UNPACK_ALIGNMENT : 0x0CF5 ;
readonly PACK_ALIGNMENT : 0x0D05 ;
readonly MAX_TEXTURE_SIZE : 0x0D33 ;
readonly MAX_VIEWPORT_DIMS : 0x0D3A ;
readonly SUBPIXEL_BITS : 0x0D50 ;
readonly RED_BITS : 0x0D52 ;
readonly GREEN_BITS : 0x0D53 ;
readonly BLUE_BITS : 0x0D54 ;
readonly ALPHA_BITS : 0x0D55 ;
readonly DEPTH_BITS : 0x0D56 ;
readonly STENCIL_BITS : 0x0D57 ;
readonly POLYGON_OFFSET_UNITS : 0x2A00 ;
readonly POLYGON_OFFSET_FACTOR : 0x8038 ;
readonly TEXTURE_BINDING_2D : 0x8069 ;
readonly SAMPLE_BUFFERS : 0x80A8 ;
readonly SAMPLES : 0x80A9 ;
readonly SAMPLE_COVERAGE_VALUE : 0x80AA ;
readonly SAMPLE_COVERAGE_INVERT : 0x80AB ;
readonly COMPRESSED_TEXTURE_FORMATS : 0x86A3 ;
readonly DONT_CARE : 0x1100 ;
readonly FASTEST : 0x1101 ;
readonly NICEST : 0x1102 ;
readonly GENERATE_MIPMAP_HINT : 0x8192 ;
readonly BYTE : 0x1400 ;
readonly UNSIGNED_BYTE : 0x1401 ;
readonly SHORT : 0x1402 ;
readonly UNSIGNED_SHORT : 0x1403 ;
readonly INT : 0x1404 ;
readonly UNSIGNED_INT : 0x1405 ;
readonly FLOAT : 0x1406 ;
readonly DEPTH_COMPONENT : 0x1902 ;
readonly ALPHA : 0x1906 ;
readonly RGB : 0x1907 ;
readonly RGBA : 0x1908 ;
readonly LUMINANCE : 0x1909 ;
readonly LUMINANCE_ALPHA : 0x190A ;
readonly UNSIGNED_SHORT_4_4_4_4 : 0x8033 ;
readonly UNSIGNED_SHORT_5_5_5_1 : 0x8034 ;
readonly UNSIGNED_SHORT_5_6_5 : 0x8363 ;
readonly FRAGMENT_SHADER : 0x8B30 ;
readonly VERTEX_SHADER : 0x8B31 ;
readonly MAX_VERTEX_ATTRIBS : 0x8869 ;
readonly MAX_VERTEX_UNIFORM_VECTORS : 0x8DFB ;
readonly MAX_VARYING_VECTORS : 0x8DFC ;
readonly MAX_COMBINED_TEXTURE_IMAGE_UNITS : 0x8B4D ;
readonly MAX_VERTEX_TEXTURE_IMAGE_UNITS : 0x8B4C ;
readonly MAX_TEXTURE_IMAGE_UNITS : 0x8872 ;
readonly MAX_FRAGMENT_UNIFORM_VECTORS : 0x8DFD ;
readonly SHADER_TYPE : 0x8B4F ;
readonly DELETE_STATUS : 0x8B80 ;
readonly LINK_STATUS : 0x8B82 ;
readonly VALIDATE_STATUS : 0x8B83 ;
readonly ATTACHED_SHADERS : 0x8B85 ;
readonly ACTIVE_UNIFORMS : 0x8B86 ;
readonly ACTIVE_ATTRIBUTES : 0x8B89 ;
readonly SHADING_LANGUAGE_VERSION : 0x8B8C ;
readonly CURRENT_PROGRAM : 0x8B8D ;
readonly NEVER : 0x0200 ;
readonly LESS : 0x0201 ;
readonly EQUAL : 0x0202 ;
readonly LEQUAL : 0x0203 ;
readonly GREATER : 0x0204 ;
readonly NOTEQUAL : 0x0205 ;
readonly GEQUAL : 0x0206 ;
readonly ALWAYS : 0x0207 ;
readonly KEEP : 0x1E00 ;
readonly REPLACE : 0x1E01 ;
readonly INCR : 0x1E02 ;
readonly DECR : 0x1E03 ;
readonly INVERT : 0x150A ;
readonly INCR_WRAP : 0x8507 ;
readonly DECR_WRAP : 0x8508 ;
readonly VENDOR : 0x1F00 ;
readonly RENDERER : 0x1F01 ;
readonly VERSION : 0x1F02 ;
readonly NEAREST : 0x2600 ;
readonly LINEAR : 0x2601 ;
readonly NEAREST_MIPMAP_NEAREST : 0x2700 ;
readonly LINEAR_MIPMAP_NEAREST : 0x2701 ;
readonly NEAREST_MIPMAP_LINEAR : 0x2702 ;
readonly LINEAR_MIPMAP_LINEAR : 0x2703 ;
readonly TEXTURE_MAG_FILTER : 0x2800 ;
readonly TEXTURE_MIN_FILTER : 0x2801 ;
readonly TEXTURE_WRAP_S : 0x2802 ;
readonly TEXTURE_WRAP_T : 0x2803 ;
readonly TEXTURE_2D : 0x0DE1 ;
readonly TEXTURE : 0x1702 ;
readonly TEXTURE_CUBE_MAP : 0x8513 ;
readonly TEXTURE_BINDING_CUBE_MAP : 0x8514 ;
readonly TEXTURE_CUBE_MAP_POSITIVE_X : 0x8515 ;
readonly TEXTURE_CUBE_MAP_NEGATIVE_X : 0x8516 ;
readonly TEXTURE_CUBE_MAP_POSITIVE_Y : 0x8517 ;
readonly TEXTURE_CUBE_MAP_NEGATIVE_Y : 0x8518 ;
readonly TEXTURE_CUBE_MAP_POSITIVE_Z : 0x8519 ;
readonly TEXTURE_CUBE_MAP_NEGATIVE_Z : 0x851A ;
readonly MAX_CUBE_MAP_TEXTURE_SIZE : 0x851C ;
readonly TEXTURE0 : 0x84C0 ;
readonly TEXTURE1 : 0x84C1 ;
readonly TEXTURE2 : 0x84C2 ;
readonly TEXTURE3 : 0x84C3 ;
readonly TEXTURE4 : 0x84C4 ;
readonly TEXTURE5 : 0x84C5 ;
readonly TEXTURE6 : 0x84C6 ;
readonly TEXTURE7 : 0x84C7 ;
readonly TEXTURE8 : 0x84C8 ;
readonly TEXTURE9 : 0x84C9 ;
readonly TEXTURE10 : 0x84CA ;
readonly TEXTURE11 : 0x84CB ;
readonly TEXTURE12 : 0x84CC ;
readonly TEXTURE13 : 0x84CD ;
readonly TEXTURE14 : 0x84CE ;
readonly TEXTURE15 : 0x84CF ;
readonly TEXTURE16 : 0x84D0 ;
readonly TEXTURE17 : 0x84D1 ;
readonly TEXTURE18 : 0x84D2 ;
readonly TEXTURE19 : 0x84D3 ;
readonly TEXTURE20 : 0x84D4 ;
readonly TEXTURE21 : 0x84D5 ;
readonly TEXTURE22 : 0x84D6 ;
readonly TEXTURE23 : 0x84D7 ;
readonly TEXTURE24 : 0x84D8 ;
readonly TEXTURE25 : 0x84D9 ;
readonly TEXTURE26 : 0x84DA ;
readonly TEXTURE27 : 0x84DB ;
readonly TEXTURE28 : 0x84DC ;
readonly TEXTURE29 : 0x84DD ;
readonly TEXTURE30 : 0x84DE ;
readonly TEXTURE31 : 0x84DF ;
readonly ACTIVE_TEXTURE : 0x84E0 ;
readonly REPEAT : 0x2901 ;
readonly CLAMP_TO_EDGE : 0x812F ;
readonly MIRRORED_REPEAT : 0x8370 ;
readonly FLOAT_VEC2 : 0x8B50 ;
readonly FLOAT_VEC3 : 0x8B51 ;
readonly FLOAT_VEC4 : 0x8B52 ;
readonly INT_VEC2 : 0x8B53 ;
readonly INT_VEC3 : 0x8B54 ;
readonly INT_VEC4 : 0x8B55 ;
readonly BOOL : 0x8B56 ;
readonly BOOL_VEC2 : 0x8B57 ;
readonly BOOL_VEC3 : 0x8B58 ;
readonly BOOL_VEC4 : 0x8B59 ;
readonly FLOAT_MAT2 : 0x8B5A ;
readonly FLOAT_MAT3 : 0x8B5B ;
readonly FLOAT_MAT4 : 0x8B5C ;
readonly SAMPLER_2D : 0x8B5E ;
readonly SAMPLER_CUBE : 0x8B60 ;
readonly VERTEX_ATTRIB_ARRAY_ENABLED : 0x8622 ;
readonly VERTEX_ATTRIB_ARRAY_SIZE : 0x8623 ;
readonly VERTEX_ATTRIB_ARRAY_STRIDE : 0x8624 ;
readonly VERTEX_ATTRIB_ARRAY_TYPE : 0x8625 ;
readonly VERTEX_ATTRIB_ARRAY_NORMALIZED : 0x886A ;
readonly VERTEX_ATTRIB_ARRAY_POINTER : 0x8645 ;
readonly VERTEX_ATTRIB_ARRAY_BUFFER_BINDING : 0x889F ;
readonly IMPLEMENTATION_COLOR_READ_TYPE : 0x8B9A ;
readonly IMPLEMENTATION_COLOR_READ_FORMAT : 0x8B9B ;
readonly COMPILE_STATUS : 0x8B81 ;
readonly LOW_FLOAT : 0x8DF0 ;
readonly MEDIUM_FLOAT : 0x8DF1 ;
readonly HIGH_FLOAT : 0x8DF2 ;
readonly LOW_INT : 0x8DF3 ;
readonly MEDIUM_INT : 0x8DF4 ;
readonly HIGH_INT : 0x8DF5 ;
readonly FRAMEBUFFER : 0x8D40 ;
readonly RENDERBUFFER : 0x8D41 ;
readonly RGBA4 : 0x8056 ;
readonly RGB5_A1 : 0x8057 ;
2024-03-26 18:52:57 -04:00
readonly RGBA8 : 0x8058 ;
2023-03-21 11:46:40 -04:00
readonly RGB565 : 0x8D62 ;
readonly DEPTH_COMPONENT16 : 0x81A5 ;
readonly STENCIL_INDEX8 : 0x8D48 ;
readonly DEPTH_STENCIL : 0x84F9 ;
readonly RENDERBUFFER_WIDTH : 0x8D42 ;
readonly RENDERBUFFER_HEIGHT : 0x8D43 ;
readonly RENDERBUFFER_INTERNAL_FORMAT : 0x8D44 ;
readonly RENDERBUFFER_RED_SIZE : 0x8D50 ;
readonly RENDERBUFFER_GREEN_SIZE : 0x8D51 ;
readonly RENDERBUFFER_BLUE_SIZE : 0x8D52 ;
readonly RENDERBUFFER_ALPHA_SIZE : 0x8D53 ;
readonly RENDERBUFFER_DEPTH_SIZE : 0x8D54 ;
readonly RENDERBUFFER_STENCIL_SIZE : 0x8D55 ;
readonly FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE : 0x8CD0 ;
readonly FRAMEBUFFER_ATTACHMENT_OBJECT_NAME : 0x8CD1 ;
readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL : 0x8CD2 ;
readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE : 0x8CD3 ;
readonly COLOR_ATTACHMENT0 : 0x8CE0 ;
readonly DEPTH_ATTACHMENT : 0x8D00 ;
readonly STENCIL_ATTACHMENT : 0x8D20 ;
readonly DEPTH_STENCIL_ATTACHMENT : 0x821A ;
readonly NONE : 0 ;
readonly FRAMEBUFFER_COMPLETE : 0x8CD5 ;
readonly FRAMEBUFFER_INCOMPLETE_ATTACHMENT : 0x8CD6 ;
readonly FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT : 0x8CD7 ;
readonly FRAMEBUFFER_INCOMPLETE_DIMENSIONS : 0x8CD9 ;
readonly FRAMEBUFFER_UNSUPPORTED : 0x8CDD ;
readonly FRAMEBUFFER_BINDING : 0x8CA6 ;
readonly RENDERBUFFER_BINDING : 0x8CA7 ;
readonly MAX_RENDERBUFFER_SIZE : 0x84E8 ;
readonly INVALID_FRAMEBUFFER_OPERATION : 0x0506 ;
readonly UNPACK_FLIP_Y_WEBGL : 0x9240 ;
readonly UNPACK_PREMULTIPLY_ALPHA_WEBGL : 0x9241 ;
readonly CONTEXT_LOST_WEBGL : 0x9242 ;
readonly UNPACK_COLORSPACE_CONVERSION_WEBGL : 0x9243 ;
readonly BROWSER_DEFAULT_WEBGL : 0x9244 ;
2020-07-22 12:03:46 -04:00
}
interface WebGLRenderingContextOverloads {
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/bufferData) */
2020-07-22 12:03:46 -04:00
bufferData ( target : GLenum , size : GLsizeiptr , usage : GLenum ) : void ;
2024-03-26 18:52:57 -04:00
bufferData ( target : GLenum , data : AllowSharedBufferSource | null , usage : GLenum ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/bufferSubData) */
2024-03-26 18:52:57 -04:00
bufferSubData ( target : GLenum , offset : GLintptr , data : AllowSharedBufferSource ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/compressedTexImage2D) */
2020-07-22 12:03:46 -04:00
compressedTexImage2D ( target : GLenum , level : GLint , internalformat : GLenum , width : GLsizei , height : GLsizei , border : GLint , data : ArrayBufferView ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/compressedTexSubImage2D) */
2020-07-22 12:03:46 -04:00
compressedTexSubImage2D ( target : GLenum , level : GLint , xoffset : GLint , yoffset : GLint , width : GLsizei , height : GLsizei , format : GLenum , data : ArrayBufferView ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/readPixels) */
2020-07-22 12:03:46 -04:00
readPixels ( x : GLint , y : GLint , width : GLsizei , height : GLsizei , format : GLenum , type : GLenum , pixels : ArrayBufferView | null ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/texImage2D) */
2020-07-22 12:03:46 -04:00
texImage2D ( target : GLenum , level : GLint , internalformat : GLint , width : GLsizei , height : GLsizei , border : GLint , format : GLenum , type : GLenum , pixels : ArrayBufferView | null ) : void ;
texImage2D ( target : GLenum , level : GLint , internalformat : GLint , format : GLenum , type : GLenum , source : TexImageSource ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/texSubImage2D) */
2020-07-22 12:03:46 -04:00
texSubImage2D ( target : GLenum , level : GLint , xoffset : GLint , yoffset : GLint , width : GLsizei , height : GLsizei , format : GLenum , type : GLenum , pixels : ArrayBufferView | null ) : void ;
texSubImage2D ( target : GLenum , level : GLint , xoffset : GLint , yoffset : GLint , format : GLenum , type : GLenum , source : TexImageSource ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */
2020-07-22 12:03:46 -04:00
uniform1fv ( location : WebGLUniformLocation | null , v : Float32List ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */
2020-07-22 12:03:46 -04:00
uniform1iv ( location : WebGLUniformLocation | null , v : Int32List ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */
2020-07-22 12:03:46 -04:00
uniform2fv ( location : WebGLUniformLocation | null , v : Float32List ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */
2020-07-22 12:03:46 -04:00
uniform2iv ( location : WebGLUniformLocation | null , v : Int32List ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */
2020-07-22 12:03:46 -04:00
uniform3fv ( location : WebGLUniformLocation | null , v : Float32List ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */
2020-07-22 12:03:46 -04:00
uniform3iv ( location : WebGLUniformLocation | null , v : Int32List ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */
2020-07-22 12:03:46 -04:00
uniform4fv ( location : WebGLUniformLocation | null , v : Float32List ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */
2020-07-22 12:03:46 -04:00
uniform4iv ( location : WebGLUniformLocation | null , v : Int32List ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniformMatrix) */
2020-07-22 12:03:46 -04:00
uniformMatrix2fv ( location : WebGLUniformLocation | null , transpose : GLboolean , value : Float32List ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniformMatrix) */
2020-07-22 12:03:46 -04:00
uniformMatrix3fv ( location : WebGLUniformLocation | null , transpose : GLboolean , value : Float32List ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniformMatrix) */
2020-07-22 12:03:46 -04:00
uniformMatrix4fv ( location : WebGLUniformLocation | null , transpose : GLboolean , value : Float32List ) : void ;
}
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLSampler) */
2021-05-27 19:33:11 -04:00
interface WebGLSampler {
2020-07-22 12:03:46 -04:00
}
declare var WebGLSampler : {
prototype : WebGLSampler ;
new ( ) : WebGLSampler ;
} ;
2023-07-03 18:36:35 -04:00
/ * *
* 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 .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/WebGLShader)
* /
2021-05-27 19:33:11 -04:00
interface WebGLShader {
2020-07-22 12:03:46 -04:00
}
declare var WebGLShader : {
prototype : WebGLShader ;
new ( ) : WebGLShader ;
} ;
2023-07-03 18:36:35 -04:00
/ * *
* Part of the WebGL API and represents the information returned by calling the WebGLRenderingContext . getShaderPrecisionFormat ( ) method .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/WebGLShaderPrecisionFormat)
* /
2020-07-22 12:03:46 -04:00
interface WebGLShaderPrecisionFormat {
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLShaderPrecisionFormat/precision) */
2020-07-22 12:03:46 -04:00
readonly precision : GLint ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLShaderPrecisionFormat/rangeMax) */
2020-07-22 12:03:46 -04:00
readonly rangeMax : GLint ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLShaderPrecisionFormat/rangeMin) */
2020-07-22 12:03:46 -04:00
readonly rangeMin : GLint ;
}
declare var WebGLShaderPrecisionFormat : {
prototype : WebGLShaderPrecisionFormat ;
new ( ) : WebGLShaderPrecisionFormat ;
} ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLSync) */
2021-05-27 19:33:11 -04:00
interface WebGLSync {
2020-07-22 12:03:46 -04:00
}
declare var WebGLSync : {
prototype : WebGLSync ;
new ( ) : WebGLSync ;
} ;
2023-07-03 18:36:35 -04:00
/ * *
* Part of the WebGL API and represents an opaque texture object providing storage and state for texturing operations .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/WebGLTexture)
* /
2021-05-27 19:33:11 -04:00
interface WebGLTexture {
2020-07-22 12:03:46 -04:00
}
declare var WebGLTexture : {
prototype : WebGLTexture ;
new ( ) : WebGLTexture ;
} ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLTransformFeedback) */
2021-05-27 19:33:11 -04:00
interface WebGLTransformFeedback {
2020-07-22 12:03:46 -04:00
}
declare var WebGLTransformFeedback : {
prototype : WebGLTransformFeedback ;
new ( ) : WebGLTransformFeedback ;
} ;
2023-07-03 18:36:35 -04:00
/ * *
* Part of the WebGL API and represents the location of a uniform variable in a shader program .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/WebGLUniformLocation)
* /
2020-07-22 12:03:46 -04:00
interface WebGLUniformLocation {
}
declare var WebGLUniformLocation : {
prototype : WebGLUniformLocation ;
new ( ) : WebGLUniformLocation ;
} ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLVertexArrayObject) */
2021-05-27 19:33:11 -04:00
interface WebGLVertexArrayObject {
2020-07-22 12:03:46 -04:00
}
declare var WebGLVertexArrayObject : {
prototype : WebGLVertexArrayObject ;
new ( ) : WebGLVertexArrayObject ;
} ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLVertexArrayObjectOES) */
2021-05-27 19:33:11 -04:00
interface WebGLVertexArrayObjectOES {
2020-07-22 12:03:46 -04:00
}
interface WebSocketEventMap {
"close" : CloseEvent ;
"error" : Event ;
"message" : MessageEvent ;
"open" : Event ;
}
2023-07-03 18:36:35 -04:00
/ * *
* Provides the API for creating and managing a WebSocket connection to a server , as well as for sending and receiving data on the connection .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/WebSocket)
* /
2020-07-22 12:03:46 -04:00
interface WebSocket extends EventTarget {
/ * *
* Returns a string that indicates how binary data from the WebSocket object is exposed to scripts :
2021-05-27 19:33:11 -04:00
*
2020-07-22 12:03:46 -04:00
* Can be set , to change how binary data is returned . The default is "blob" .
2023-07-03 18:36:35 -04:00
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/WebSocket/binaryType)
2020-07-22 12:03:46 -04:00
* /
binaryType : BinaryType ;
/ * *
* 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 .
2021-05-27 19:33:11 -04:00
*
2020-07-22 12:03:46 -04:00
* 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 . )
2023-07-03 18:36:35 -04:00
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/WebSocket/bufferedAmount)
2020-07-22 12:03:46 -04:00
* /
readonly bufferedAmount : number ;
2023-07-03 18:36:35 -04:00
/ * *
* Returns the extensions selected by the server , if any .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/WebSocket/extensions)
* /
2020-07-22 12:03:46 -04:00
readonly extensions : string ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/close_event) */
2020-07-22 12:03:46 -04:00
onclose : ( ( this : WebSocket , ev : CloseEvent ) = > any ) | null ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/error_event) */
2020-07-22 12:03:46 -04:00
onerror : ( ( this : WebSocket , ev : Event ) = > any ) | null ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/message_event) */
2020-07-22 12:03:46 -04:00
onmessage : ( ( this : WebSocket , ev : MessageEvent ) = > any ) | null ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/open_event) */
2020-07-22 12:03:46 -04:00
onopen : ( ( this : WebSocket , ev : Event ) = > any ) | null ;
2023-07-03 18:36:35 -04:00
/ * *
* 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 .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/WebSocket/protocol)
* /
2020-07-22 12:03:46 -04:00
readonly protocol : string ;
2023-07-03 18:36:35 -04:00
/ * *
* Returns the state of the WebSocket object ' s connection . It can have the values described below .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/WebSocket/readyState)
* /
2020-07-22 12:03:46 -04:00
readonly readyState : number ;
2023-07-03 18:36:35 -04:00
/ * *
* Returns the URL that was used to establish the WebSocket connection .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/WebSocket/url)
* /
2020-07-22 12:03:46 -04:00
readonly url : string ;
2023-07-03 18:36:35 -04:00
/ * *
* Closes the WebSocket connection , optionally using code as the the WebSocket connection close code and reason as the the WebSocket connection close reason .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/WebSocket/close)
* /
2020-07-22 12:03:46 -04:00
close ( code? : number , reason? : string ) : void ;
2023-07-03 18:36:35 -04:00
/ * *
* Transmits data using the WebSocket connection . data can be a string , a Blob , an ArrayBuffer , or an ArrayBufferView .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/WebSocket/send)
* /
2020-07-22 12:03:46 -04:00
send ( data : string | ArrayBufferLike | Blob | ArrayBufferView ) : void ;
2023-03-21 11:46:40 -04:00
readonly CONNECTING : 0 ;
readonly OPEN : 1 ;
readonly CLOSING : 2 ;
readonly CLOSED : 3 ;
2020-07-22 12:03:46 -04:00
addEventListener < K extends keyof WebSocketEventMap > ( type : K , listener : ( this : WebSocket , ev : WebSocketEventMap [ K ] ) = > any , options? : boolean | AddEventListenerOptions ) : void ;
addEventListener ( type : string , listener : EventListenerOrEventListenerObject , options? : boolean | AddEventListenerOptions ) : void ;
removeEventListener < K extends keyof WebSocketEventMap > ( type : K , listener : ( this : WebSocket , ev : WebSocketEventMap [ K ] ) = > any , options? : boolean | EventListenerOptions ) : void ;
removeEventListener ( type : string , listener : EventListenerOrEventListenerObject , options? : boolean | EventListenerOptions ) : void ;
}
declare var WebSocket : {
prototype : WebSocket ;
2021-08-26 20:12:59 -04:00
new ( url : string | URL , protocols? : string | string [ ] ) : WebSocket ;
2023-03-21 11:46:40 -04:00
readonly CONNECTING : 0 ;
readonly OPEN : 1 ;
readonly CLOSING : 2 ;
readonly CLOSED : 3 ;
2020-07-22 12:03:46 -04:00
} ;
2023-09-09 15:03:21 -04:00
/ * *
* Available only in secure contexts .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/WebTransport)
* /
interface WebTransport {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransport/closed) */
readonly closed : Promise < WebTransportCloseInfo > ;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransport/datagrams) */
readonly datagrams : WebTransportDatagramDuplexStream ;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransport/incomingBidirectionalStreams) */
readonly incomingBidirectionalStreams : ReadableStream ;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransport/incomingUnidirectionalStreams) */
readonly incomingUnidirectionalStreams : ReadableStream ;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransport/ready) */
readonly ready : Promise < undefined > ;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransport/close) */
close ( closeInfo? : WebTransportCloseInfo ) : void ;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransport/createBidirectionalStream) */
createBidirectionalStream ( options? : WebTransportSendStreamOptions ) : Promise < WebTransportBidirectionalStream > ;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransport/createUnidirectionalStream) */
createUnidirectionalStream ( options? : WebTransportSendStreamOptions ) : Promise < WritableStream > ;
}
declare var WebTransport : {
prototype : WebTransport ;
new ( url : string | URL , options? : WebTransportOptions ) : WebTransport ;
} ;
/ * *
* Available only in secure contexts .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/WebTransportBidirectionalStream)
* /
interface WebTransportBidirectionalStream {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportBidirectionalStream/readable) */
readonly readable : ReadableStream ;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportBidirectionalStream/writable) */
readonly writable : WritableStream ;
}
declare var WebTransportBidirectionalStream : {
prototype : WebTransportBidirectionalStream ;
new ( ) : WebTransportBidirectionalStream ;
} ;
/ * *
* Available only in secure contexts .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/WebTransportDatagramDuplexStream)
* /
interface WebTransportDatagramDuplexStream {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportDatagramDuplexStream/incomingHighWaterMark) */
incomingHighWaterMark : number ;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportDatagramDuplexStream/incomingMaxAge) */
2024-03-26 18:52:57 -04:00
incomingMaxAge : number | null ;
2023-09-09 15:03:21 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportDatagramDuplexStream/maxDatagramSize) */
readonly maxDatagramSize : number ;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportDatagramDuplexStream/outgoingHighWaterMark) */
outgoingHighWaterMark : number ;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportDatagramDuplexStream/outgoingMaxAge) */
2024-03-26 18:52:57 -04:00
outgoingMaxAge : number | null ;
2023-09-09 15:03:21 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportDatagramDuplexStream/readable) */
readonly readable : ReadableStream ;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportDatagramDuplexStream/writable) */
readonly writable : WritableStream ;
}
declare var WebTransportDatagramDuplexStream : {
prototype : WebTransportDatagramDuplexStream ;
new ( ) : WebTransportDatagramDuplexStream ;
} ;
/ * *
* Available only in secure contexts .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/WebTransportError)
* /
interface WebTransportError extends DOMException {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportError/source) */
readonly source : WebTransportErrorSource ;
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportError/streamErrorCode) */
readonly streamErrorCode : number | null ;
}
declare var WebTransportError : {
prototype : WebTransportError ;
new ( message? : string , options? : WebTransportErrorOptions ) : WebTransportError ;
} ;
2023-07-03 18:36:35 -04:00
/ * *
* 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 .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/WindowClient)
* /
2020-07-22 12:03:46 -04:00
interface WindowClient extends Client {
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WindowClient/focused) */
2020-07-22 12:03:46 -04:00
readonly focused : boolean ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WindowClient/visibilityState) */
2022-03-01 15:44:43 -05:00
readonly visibilityState : DocumentVisibilityState ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WindowClient/focus) */
2020-07-22 12:03:46 -04:00
focus ( ) : Promise < WindowClient > ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WindowClient/navigate) */
2021-08-26 20:12:59 -04:00
navigate ( url : string | URL ) : Promise < WindowClient | null > ;
2020-07-22 12:03:46 -04:00
}
declare var WindowClient : {
prototype : WindowClient ;
new ( ) : WindowClient ;
} ;
interface WindowOrWorkerGlobalScope {
2023-07-03 18:36:35 -04:00
/ * *
* Available only in secure contexts .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/caches)
* /
2020-07-22 12:03:46 -04:00
readonly caches : CacheStorage ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/crossOriginIsolated) */
2021-08-26 20:12:59 -04:00
readonly crossOriginIsolated : boolean ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/crypto_property) */
2020-07-22 12:03:46 -04:00
readonly crypto : Crypto ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/indexedDB) */
2020-07-22 12:03:46 -04:00
readonly indexedDB : IDBFactory ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/isSecureContext) */
2020-07-22 12:03:46 -04:00
readonly isSecureContext : boolean ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/origin) */
2020-07-22 12:03:46 -04:00
readonly origin : string ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/performance_property) */
2020-07-22 12:03:46 -04:00
readonly performance : Performance ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/atob) */
2020-07-22 12:03:46 -04:00
atob ( data : string ) : string ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/btoa) */
2020-07-22 12:03:46 -04:00
btoa ( data : string ) : string ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/clearInterval) */
2022-09-19 17:00:01 -04:00
clearInterval ( id : number | undefined ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/clearTimeout) */
2022-09-19 17:00:01 -04:00
clearTimeout ( id : number | undefined ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/createImageBitmap) */
2020-07-22 12:03:46 -04:00
createImageBitmap ( image : ImageBitmapSource , options? : ImageBitmapOptions ) : Promise < ImageBitmap > ;
createImageBitmap ( image : ImageBitmapSource , sx : number , sy : number , sw : number , sh : number , options? : ImageBitmapOptions ) : Promise < ImageBitmap > ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/fetch) */
2022-05-31 20:19:18 -04:00
fetch ( input : RequestInfo | URL , init? : RequestInit ) : Promise < Response > ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/queueMicrotask) */
2020-07-22 12:03:46 -04:00
queueMicrotask ( callback : VoidFunction ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/reportError) */
2022-03-01 15:44:43 -05:00
reportError ( e : any ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/setInterval) */
2020-07-22 12:03:46 -04:00
setInterval ( handler : TimerHandler , timeout? : number , . . . arguments : any [ ] ) : number ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/setTimeout) */
2020-07-22 12:03:46 -04:00
setTimeout ( handler : TimerHandler , timeout? : number , . . . arguments : any [ ] ) : number ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/structuredClone) */
structuredClone < T = any > ( value : T , options? : StructuredSerializeOptions ) : T ;
2020-07-22 12:03:46 -04:00
}
interface WorkerEventMap extends AbstractWorkerEventMap {
"message" : MessageEvent ;
"messageerror" : MessageEvent ;
}
2023-07-03 18:36:35 -04:00
/ * *
* 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 .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/Worker)
* /
2020-07-22 12:03:46 -04:00
interface Worker extends EventTarget , AbstractWorker {
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Worker/message_event) */
2020-07-22 12:03:46 -04:00
onmessage : ( ( this : Worker , ev : MessageEvent ) = > any ) | null ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Worker/messageerror_event) */
2020-07-22 12:03:46 -04:00
onmessageerror : ( ( this : Worker , ev : MessageEvent ) = > any ) | null ;
2023-07-03 18:36:35 -04:00
/ * *
* 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 .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/Worker/postMessage)
* /
2020-07-22 12:03:46 -04:00
postMessage ( message : any , transfer : Transferable [ ] ) : void ;
2021-12-09 17:12:21 -05:00
postMessage ( message : any , options? : StructuredSerializeOptions ) : void ;
2023-07-03 18:36:35 -04:00
/ * *
* Aborts worker ' s associated global environment .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/Worker/terminate)
* /
2020-07-22 12:03:46 -04:00
terminate ( ) : void ;
addEventListener < K extends keyof WorkerEventMap > ( type : K , listener : ( this : Worker , ev : WorkerEventMap [ K ] ) = > any , options? : boolean | AddEventListenerOptions ) : void ;
addEventListener ( type : string , listener : EventListenerOrEventListenerObject , options? : boolean | AddEventListenerOptions ) : void ;
removeEventListener < K extends keyof WorkerEventMap > ( type : K , listener : ( this : Worker , ev : WorkerEventMap [ K ] ) = > any , options? : boolean | EventListenerOptions ) : void ;
removeEventListener ( type : string , listener : EventListenerOrEventListenerObject , options? : boolean | EventListenerOptions ) : void ;
}
declare var Worker : {
prototype : Worker ;
2021-08-26 20:12:59 -04:00
new ( scriptURL : string | URL , options? : WorkerOptions ) : Worker ;
2020-07-22 12:03:46 -04:00
} ;
interface WorkerGlobalScopeEventMap {
"error" : ErrorEvent ;
"languagechange" : Event ;
"offline" : Event ;
"online" : Event ;
"rejectionhandled" : PromiseRejectionEvent ;
"unhandledrejection" : PromiseRejectionEvent ;
}
2023-07-03 18:36:35 -04:00
/ * *
* 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 .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/WorkerGlobalScope)
* /
2021-08-26 20:12:59 -04:00
interface WorkerGlobalScope extends EventTarget , FontFaceSource , WindowOrWorkerGlobalScope {
2023-07-03 18:36:35 -04:00
/ * *
* Returns workerGlobal ' s WorkerLocation object .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/WorkerGlobalScope/location)
* /
2020-07-22 12:03:46 -04:00
readonly location : WorkerLocation ;
2023-07-03 18:36:35 -04:00
/ * *
* Returns workerGlobal ' s WorkerNavigator object .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/WorkerGlobalScope/navigator)
* /
2020-07-22 12:03:46 -04:00
readonly navigator : WorkerNavigator ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WorkerGlobalScope/error_event) */
2020-07-22 12:03:46 -04:00
onerror : ( ( this : WorkerGlobalScope , ev : ErrorEvent ) = > any ) | null ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WorkerGlobalScope/languagechange_event) */
2020-07-22 12:03:46 -04:00
onlanguagechange : ( ( this : WorkerGlobalScope , ev : Event ) = > any ) | null ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WorkerGlobalScope/offline_event) */
2020-07-22 12:03:46 -04:00
onoffline : ( ( this : WorkerGlobalScope , ev : Event ) = > any ) | null ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WorkerGlobalScope/online_event) */
2020-07-22 12:03:46 -04:00
ononline : ( ( this : WorkerGlobalScope , ev : Event ) = > any ) | null ;
onrejectionhandled : ( ( this : WorkerGlobalScope , ev : PromiseRejectionEvent ) = > any ) | null ;
onunhandledrejection : ( ( this : WorkerGlobalScope , ev : PromiseRejectionEvent ) = > any ) | null ;
2023-07-03 18:36:35 -04:00
/ * *
* Returns workerGlobal .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/WorkerGlobalScope/self)
* /
2020-07-22 12:03:46 -04:00
readonly self : WorkerGlobalScope & typeof globalThis ;
2023-07-03 18:36:35 -04:00
/ * *
* 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 ) .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/WorkerGlobalScope/importScripts)
* /
2021-08-26 20:12:59 -04:00
importScripts ( . . . urls : ( string | URL ) [ ] ) : void ;
2020-07-22 12:03:46 -04:00
addEventListener < K extends keyof WorkerGlobalScopeEventMap > ( type : K , listener : ( this : WorkerGlobalScope , ev : WorkerGlobalScopeEventMap [ K ] ) = > any , options? : boolean | AddEventListenerOptions ) : void ;
addEventListener ( type : string , listener : EventListenerOrEventListenerObject , options? : boolean | AddEventListenerOptions ) : void ;
removeEventListener < K extends keyof WorkerGlobalScopeEventMap > ( type : K , listener : ( this : WorkerGlobalScope , ev : WorkerGlobalScopeEventMap [ K ] ) = > any , options? : boolean | EventListenerOptions ) : void ;
removeEventListener ( type : string , listener : EventListenerOrEventListenerObject , options? : boolean | EventListenerOptions ) : void ;
}
declare var WorkerGlobalScope : {
prototype : WorkerGlobalScope ;
new ( ) : WorkerGlobalScope ;
} ;
2023-07-03 18:36:35 -04:00
/ * *
* 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 .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/WorkerLocation)
* /
2020-07-22 12:03:46 -04:00
interface WorkerLocation {
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WorkerLocation/hash) */
2020-07-22 12:03:46 -04:00
readonly hash : string ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WorkerLocation/host) */
2020-07-22 12:03:46 -04:00
readonly host : string ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WorkerLocation/hostname) */
2020-07-22 12:03:46 -04:00
readonly hostname : string ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WorkerLocation/href) */
2020-07-22 12:03:46 -04:00
readonly href : string ;
toString ( ) : string ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WorkerLocation/origin) */
2020-07-22 12:03:46 -04:00
readonly origin : string ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WorkerLocation/pathname) */
2020-07-22 12:03:46 -04:00
readonly pathname : string ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WorkerLocation/port) */
2020-07-22 12:03:46 -04:00
readonly port : string ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WorkerLocation/protocol) */
2020-07-22 12:03:46 -04:00
readonly protocol : string ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WorkerLocation/search) */
2020-07-22 12:03:46 -04:00
readonly search : string ;
}
declare var WorkerLocation : {
prototype : WorkerLocation ;
new ( ) : WorkerLocation ;
} ;
2023-07-03 18:36:35 -04:00
/ * *
* 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 .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/WorkerNavigator)
* /
interface WorkerNavigator extends NavigatorBadge , NavigatorConcurrentHardware , NavigatorID , NavigatorLanguage , NavigatorLocks , NavigatorOnLine , NavigatorStorage {
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WorkerNavigator/mediaCapabilities) */
2021-08-26 20:12:59 -04:00
readonly mediaCapabilities : MediaCapabilities ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WorkerNavigator/permissions) */
readonly permissions : Permissions ;
2020-07-22 12:03:46 -04:00
}
declare var WorkerNavigator : {
prototype : WorkerNavigator ;
new ( ) : WorkerNavigator ;
} ;
2023-07-03 18:36:35 -04:00
/ * *
* 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 .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/WritableStream)
* /
2020-07-22 12:03:46 -04:00
interface WritableStream < W = any > {
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/locked) */
2020-07-22 12:03:46 -04:00
readonly locked : boolean ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/abort) */
2020-07-22 12:03:46 -04:00
abort ( reason? : any ) : Promise < void > ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/close) */
2021-08-26 20:12:59 -04:00
close ( ) : Promise < void > ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/getWriter) */
2020-07-22 12:03:46 -04:00
getWriter ( ) : WritableStreamDefaultWriter < W > ;
}
declare var WritableStream : {
prototype : WritableStream ;
new < W = any > ( underlyingSink? : UnderlyingSink < W > , strategy? : QueuingStrategy < W > ) : WritableStream < W > ;
} ;
2023-07-03 18:36:35 -04:00
/ * *
* 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 .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/WritableStreamDefaultController)
* /
2020-07-22 12:03:46 -04:00
interface WritableStreamDefaultController {
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultController/signal) */
2022-09-19 17:00:01 -04:00
readonly signal : AbortSignal ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultController/error) */
2021-02-24 23:16:19 -05:00
error ( e? : any ) : void ;
2020-07-22 12:03:46 -04:00
}
2020-11-23 17:31:10 -05:00
declare var WritableStreamDefaultController : {
prototype : WritableStreamDefaultController ;
new ( ) : WritableStreamDefaultController ;
} ;
2023-07-03 18:36:35 -04:00
/ * *
* 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 .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter)
* /
2020-07-22 12:03:46 -04:00
interface WritableStreamDefaultWriter < W = any > {
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/closed) */
2021-02-24 23:16:19 -05:00
readonly closed : Promise < undefined > ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/desiredSize) */
2020-07-22 12:03:46 -04:00
readonly desiredSize : number | null ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/ready) */
2021-02-24 23:16:19 -05:00
readonly ready : Promise < undefined > ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/abort) */
2020-07-22 12:03:46 -04:00
abort ( reason? : any ) : Promise < void > ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/close) */
2020-07-22 12:03:46 -04:00
close ( ) : Promise < void > ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/releaseLock) */
2020-07-22 12:03:46 -04:00
releaseLock ( ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/write) */
2021-08-26 20:12:59 -04:00
write ( chunk? : W ) : Promise < void > ;
2020-07-22 12:03:46 -04:00
}
2020-11-23 17:31:10 -05:00
declare var WritableStreamDefaultWriter : {
prototype : WritableStreamDefaultWriter ;
2021-02-24 23:16:19 -05:00
new < W = any > ( stream : WritableStream < W > ) : WritableStreamDefaultWriter < W > ;
2020-11-23 17:31:10 -05:00
} ;
2020-07-22 12:03:46 -04:00
interface XMLHttpRequestEventMap extends XMLHttpRequestEventTargetEventMap {
"readystatechange" : Event ;
}
2023-07-03 18:36:35 -04:00
/ * *
* 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 .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/XMLHttpRequest)
* /
2020-07-22 12:03:46 -04:00
interface XMLHttpRequest extends XMLHttpRequestEventTarget {
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/XMLHttpRequest/readystatechange_event) */
2020-07-22 12:03:46 -04:00
onreadystatechange : ( ( this : XMLHttpRequest , ev : Event ) = > any ) | null ;
2023-07-03 18:36:35 -04:00
/ * *
* Returns client ' s state .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/XMLHttpRequest/readyState)
* /
2020-07-22 12:03:46 -04:00
readonly readyState : number ;
2023-07-03 18:36:35 -04:00
/ * *
* Returns the response body .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/XMLHttpRequest/response)
* /
2020-07-22 12:03:46 -04:00
readonly response : any ;
/ * *
2021-08-26 20:12:59 -04:00
* Returns response as text .
2021-05-27 19:33:11 -04:00
*
2020-07-22 12:03:46 -04:00
* Throws an "InvalidStateError" DOMException if responseType is not the empty string or "text" .
2023-07-03 18:36:35 -04:00
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/XMLHttpRequest/responseText)
2020-07-22 12:03:46 -04:00
* /
readonly responseText : string ;
/ * *
* Returns the response type .
2021-05-27 19:33:11 -04:00
*
2020-07-22 12:03:46 -04:00
* Can be set to change the response type . Values are : the empty string ( default ) , "arraybuffer" , "blob" , "document" , "json" , and "text" .
2021-05-27 19:33:11 -04:00
*
2020-07-22 12:03:46 -04:00
* When set : setting to "document" is ignored if current global object is not a Window object .
2021-05-27 19:33:11 -04:00
*
2020-07-22 12:03:46 -04:00
* When set : throws an "InvalidStateError" DOMException if state is loading or done .
2021-05-27 19:33:11 -04:00
*
2020-07-22 12:03:46 -04:00
* When set : throws an "InvalidAccessError" DOMException if the synchronous flag is set and current global object is a Window object .
2023-07-03 18:36:35 -04:00
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/XMLHttpRequest/responseType)
2020-07-22 12:03:46 -04:00
* /
responseType : XMLHttpRequestResponseType ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/XMLHttpRequest/responseURL) */
2020-07-22 12:03:46 -04:00
readonly responseURL : string ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/XMLHttpRequest/status) */
2020-07-22 12:03:46 -04:00
readonly status : number ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/XMLHttpRequest/statusText) */
2020-07-22 12:03:46 -04:00
readonly statusText : string ;
/ * *
2021-08-26 20:12:59 -04:00
* 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 ) .
2021-05-27 19:33:11 -04:00
*
2020-07-22 12:03:46 -04:00
* When set : throws an "InvalidAccessError" DOMException if the synchronous flag is set and current global object is a Window object .
2023-07-03 18:36:35 -04:00
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/XMLHttpRequest/timeout)
2020-07-22 12:03:46 -04:00
* /
timeout : number ;
2023-07-03 18:36:35 -04:00
/ * *
* Returns the associated XMLHttpRequestUpload object . It can be used to gather transmission information when data is transferred to a server .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/XMLHttpRequest/upload)
* /
2020-07-22 12:03:46 -04:00
readonly upload : XMLHttpRequestUpload ;
/ * *
* 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 .
2021-05-27 19:33:11 -04:00
*
2020-07-22 12:03:46 -04:00
* When set : throws an "InvalidStateError" DOMException if state is not unsent or opened , or if the send ( ) flag is set .
2023-07-03 18:36:35 -04:00
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/XMLHttpRequest/withCredentials)
2020-07-22 12:03:46 -04:00
* /
withCredentials : boolean ;
2023-07-03 18:36:35 -04:00
/ * *
* Cancels any network activity .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/XMLHttpRequest/abort)
* /
2020-07-22 12:03:46 -04:00
abort ( ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/XMLHttpRequest/getAllResponseHeaders) */
2020-07-22 12:03:46 -04:00
getAllResponseHeaders ( ) : string ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/XMLHttpRequest/getResponseHeader) */
2020-07-22 12:03:46 -04:00
getResponseHeader ( name : string ) : string | null ;
/ * *
* Sets the request method , request URL , and synchronous flag .
2021-05-27 19:33:11 -04:00
*
2021-08-26 20:12:59 -04:00
* Throws a "SyntaxError" DOMException if either method is not a valid method or url cannot be parsed .
2021-05-27 19:33:11 -04:00
*
2020-07-22 12:03:46 -04:00
* Throws a "SecurityError" DOMException if method is a case - insensitive match for ` CONNECT ` , ` TRACE ` , or ` TRACK ` .
2021-05-27 19:33:11 -04:00
*
2020-07-22 12:03:46 -04:00
* 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 .
2023-07-03 18:36:35 -04:00
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/XMLHttpRequest/open)
2020-07-22 12:03:46 -04:00
* /
2021-08-26 20:12:59 -04:00
open ( method : string , url : string | URL ) : void ;
open ( method : string , url : string | URL , async : boolean , username? : string | null , password? : string | null ) : void ;
2020-07-22 12:03:46 -04:00
/ * *
2021-08-26 20:12:59 -04:00
* Acts as if the ` Content-Type ` header value for a response is mime . ( It does not change the header . )
2021-05-27 19:33:11 -04:00
*
2020-07-22 12:03:46 -04:00
* Throws an "InvalidStateError" DOMException if state is loading or done .
2023-07-03 18:36:35 -04:00
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/XMLHttpRequest/overrideMimeType)
2020-07-22 12:03:46 -04:00
* /
overrideMimeType ( mime : string ) : void ;
/ * *
* Initiates the request . The body argument provides the request body , if any , and is ignored if the request method is GET or HEAD .
2021-05-27 19:33:11 -04:00
*
2020-07-22 12:03:46 -04:00
* Throws an "InvalidStateError" DOMException if either state is not opened or the send ( ) flag is set .
2023-07-03 18:36:35 -04:00
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/XMLHttpRequest/send)
2020-07-22 12:03:46 -04:00
* /
2021-08-26 20:12:59 -04:00
send ( body? : XMLHttpRequestBodyInit | null ) : void ;
2020-07-22 12:03:46 -04:00
/ * *
* Combines a header in author request headers .
2021-05-27 19:33:11 -04:00
*
2020-07-22 12:03:46 -04:00
* Throws an "InvalidStateError" DOMException if either state is not opened or the send ( ) flag is set .
2021-05-27 19:33:11 -04:00
*
2020-07-22 12:03:46 -04:00
* Throws a "SyntaxError" DOMException if name is not a header name or if value is not a header value .
2023-07-03 18:36:35 -04:00
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/XMLHttpRequest/setRequestHeader)
2020-07-22 12:03:46 -04:00
* /
setRequestHeader ( name : string , value : string ) : void ;
2023-03-21 11:46:40 -04:00
readonly UNSENT : 0 ;
readonly OPENED : 1 ;
readonly HEADERS_RECEIVED : 2 ;
readonly LOADING : 3 ;
readonly DONE : 4 ;
2020-07-22 12:03:46 -04:00
addEventListener < K extends keyof XMLHttpRequestEventMap > ( type : K , listener : ( this : XMLHttpRequest , ev : XMLHttpRequestEventMap [ K ] ) = > any , options? : boolean | AddEventListenerOptions ) : void ;
addEventListener ( type : string , listener : EventListenerOrEventListenerObject , options? : boolean | AddEventListenerOptions ) : void ;
removeEventListener < K extends keyof XMLHttpRequestEventMap > ( type : K , listener : ( this : XMLHttpRequest , ev : XMLHttpRequestEventMap [ K ] ) = > any , options? : boolean | EventListenerOptions ) : void ;
removeEventListener ( type : string , listener : EventListenerOrEventListenerObject , options? : boolean | EventListenerOptions ) : void ;
}
declare var XMLHttpRequest : {
prototype : XMLHttpRequest ;
new ( ) : XMLHttpRequest ;
2023-03-21 11:46:40 -04:00
readonly UNSENT : 0 ;
readonly OPENED : 1 ;
readonly HEADERS_RECEIVED : 2 ;
readonly LOADING : 3 ;
readonly DONE : 4 ;
2020-07-22 12:03:46 -04:00
} ;
interface XMLHttpRequestEventTargetEventMap {
"abort" : ProgressEvent < XMLHttpRequestEventTarget > ;
"error" : ProgressEvent < XMLHttpRequestEventTarget > ;
"load" : ProgressEvent < XMLHttpRequestEventTarget > ;
"loadend" : ProgressEvent < XMLHttpRequestEventTarget > ;
"loadstart" : ProgressEvent < XMLHttpRequestEventTarget > ;
"progress" : ProgressEvent < XMLHttpRequestEventTarget > ;
"timeout" : ProgressEvent < XMLHttpRequestEventTarget > ;
}
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/XMLHttpRequestEventTarget) */
2020-07-22 12:03:46 -04:00
interface XMLHttpRequestEventTarget extends EventTarget {
onabort : ( ( this : XMLHttpRequest , ev : ProgressEvent ) = > any ) | null ;
onerror : ( ( this : XMLHttpRequest , ev : ProgressEvent ) = > any ) | null ;
onload : ( ( this : XMLHttpRequest , ev : ProgressEvent ) = > any ) | null ;
onloadend : ( ( this : XMLHttpRequest , ev : ProgressEvent ) = > any ) | null ;
onloadstart : ( ( this : XMLHttpRequest , ev : ProgressEvent ) = > any ) | null ;
onprogress : ( ( this : XMLHttpRequest , ev : ProgressEvent ) = > any ) | null ;
ontimeout : ( ( this : XMLHttpRequest , ev : ProgressEvent ) = > any ) | null ;
addEventListener < K extends keyof XMLHttpRequestEventTargetEventMap > ( type : K , listener : ( this : XMLHttpRequestEventTarget , ev : XMLHttpRequestEventTargetEventMap [ K ] ) = > any , options? : boolean | AddEventListenerOptions ) : void ;
addEventListener ( type : string , listener : EventListenerOrEventListenerObject , options? : boolean | AddEventListenerOptions ) : void ;
removeEventListener < K extends keyof XMLHttpRequestEventTargetEventMap > ( type : K , listener : ( this : XMLHttpRequestEventTarget , ev : XMLHttpRequestEventTargetEventMap [ K ] ) = > any , options? : boolean | EventListenerOptions ) : void ;
removeEventListener ( type : string , listener : EventListenerOrEventListenerObject , options? : boolean | EventListenerOptions ) : void ;
}
declare var XMLHttpRequestEventTarget : {
prototype : XMLHttpRequestEventTarget ;
new ( ) : XMLHttpRequestEventTarget ;
} ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/XMLHttpRequestUpload) */
2020-07-22 12:03:46 -04:00
interface XMLHttpRequestUpload extends XMLHttpRequestEventTarget {
addEventListener < K extends keyof XMLHttpRequestEventTargetEventMap > ( type : K , listener : ( this : XMLHttpRequestUpload , ev : XMLHttpRequestEventTargetEventMap [ K ] ) = > any , options? : boolean | AddEventListenerOptions ) : void ;
addEventListener ( type : string , listener : EventListenerOrEventListenerObject , options? : boolean | AddEventListenerOptions ) : void ;
removeEventListener < K extends keyof XMLHttpRequestEventTargetEventMap > ( type : K , listener : ( this : XMLHttpRequestUpload , ev : XMLHttpRequestEventTargetEventMap [ K ] ) = > any , options? : boolean | EventListenerOptions ) : void ;
removeEventListener ( type : string , listener : EventListenerOrEventListenerObject , options? : boolean | EventListenerOptions ) : void ;
}
declare var XMLHttpRequestUpload : {
prototype : XMLHttpRequestUpload ;
new ( ) : XMLHttpRequestUpload ;
} ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console) */
2020-07-22 12:03:46 -04:00
interface Console {
2024-03-26 18:52:57 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/assert_static) */
2020-07-22 12:03:46 -04:00
assert ( condition? : boolean , . . . data : any [ ] ) : void ;
2024-03-26 18:52:57 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/clear_static) */
2020-07-22 12:03:46 -04:00
clear ( ) : void ;
2024-03-26 18:52:57 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/count_static) */
2020-07-22 12:03:46 -04:00
count ( label? : string ) : void ;
2024-03-26 18:52:57 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/countReset_static) */
2020-07-22 12:03:46 -04:00
countReset ( label? : string ) : void ;
2024-03-26 18:52:57 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/debug_static) */
2020-07-22 12:03:46 -04:00
debug ( . . . data : any [ ] ) : void ;
2024-03-26 18:52:57 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/dir_static) */
2020-07-22 12:03:46 -04:00
dir ( item? : any , options? : any ) : void ;
2024-03-26 18:52:57 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/dirxml_static) */
2020-07-22 12:03:46 -04:00
dirxml ( . . . data : any [ ] ) : void ;
2024-03-26 18:52:57 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/error_static) */
2020-07-22 12:03:46 -04:00
error ( . . . data : any [ ] ) : void ;
2024-03-26 18:52:57 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/group_static) */
2020-07-22 12:03:46 -04:00
group ( . . . data : any [ ] ) : void ;
2024-03-26 18:52:57 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/groupCollapsed_static) */
2020-07-22 12:03:46 -04:00
groupCollapsed ( . . . data : any [ ] ) : void ;
2024-03-26 18:52:57 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/groupEnd_static) */
2020-07-22 12:03:46 -04:00
groupEnd ( ) : void ;
2024-03-26 18:52:57 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/info_static) */
2020-07-22 12:03:46 -04:00
info ( . . . data : any [ ] ) : void ;
2024-03-26 18:52:57 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/log_static) */
2020-07-22 12:03:46 -04:00
log ( . . . data : any [ ] ) : void ;
2024-03-26 18:52:57 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/table_static) */
2020-07-22 12:03:46 -04:00
table ( tabularData? : any , properties? : string [ ] ) : void ;
2024-03-26 18:52:57 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/time_static) */
2020-07-22 12:03:46 -04:00
time ( label? : string ) : void ;
2024-03-26 18:52:57 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/timeEnd_static) */
2020-07-22 12:03:46 -04:00
timeEnd ( label? : string ) : void ;
2024-03-26 18:52:57 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/timeLog_static) */
2020-07-22 12:03:46 -04:00
timeLog ( label? : string , . . . data : any [ ] ) : void ;
timeStamp ( label? : string ) : void ;
2024-03-26 18:52:57 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/trace_static) */
2020-07-22 12:03:46 -04:00
trace ( . . . data : any [ ] ) : void ;
2024-03-26 18:52:57 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/warn_static) */
2020-07-22 12:03:46 -04:00
warn ( . . . data : any [ ] ) : void ;
}
declare var console : Console ;
declare namespace WebAssembly {
2021-08-26 20:12:59 -04:00
interface CompileError extends Error {
}
var CompileError : {
prototype : CompileError ;
2021-12-09 17:12:21 -05:00
new ( message? : string ) : CompileError ;
( message? : string ) : CompileError ;
2021-08-26 20:12:59 -04:00
} ;
2024-03-26 18:52:57 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/JavaScript_interface/Global) */
2023-09-09 15:03:21 -04:00
interface Global < T extends ValueType = ValueType > {
2024-03-26 18:52:57 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/JavaScript_interface/Global/value) */
2023-09-09 15:03:21 -04:00
value : ValueTypeMap [ T ] ;
2024-03-26 18:52:57 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/JavaScript_interface/Global/valueOf) */
2023-09-09 15:03:21 -04:00
valueOf ( ) : ValueTypeMap [ T ] ;
2020-07-22 12:03:46 -04:00
}
2021-05-27 19:33:11 -04:00
2020-07-22 12:03:46 -04:00
var Global : {
prototype : Global ;
2023-09-09 15:03:21 -04:00
new < T extends ValueType = ValueType > ( descriptor : GlobalDescriptor < T > , v? : ValueTypeMap [ T ] ) : Global < T > ;
2020-07-22 12:03:46 -04:00
} ;
2021-05-27 19:33:11 -04:00
2024-03-26 18:52:57 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/JavaScript_interface/Instance) */
2020-07-22 12:03:46 -04:00
interface Instance {
2024-03-26 18:52:57 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/JavaScript_interface/Instance/exports) */
2020-07-22 12:03:46 -04:00
readonly exports : Exports ;
}
2021-05-27 19:33:11 -04:00
2020-07-22 12:03:46 -04:00
var Instance : {
prototype : Instance ;
new ( module : Module , importObject? : Imports ) : Instance ;
} ;
2021-05-27 19:33:11 -04:00
2021-08-26 20:12:59 -04:00
interface LinkError extends Error {
}
var LinkError : {
prototype : LinkError ;
2021-12-09 17:12:21 -05:00
new ( message? : string ) : LinkError ;
( message? : string ) : LinkError ;
2021-08-26 20:12:59 -04:00
} ;
2024-03-26 18:52:57 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/JavaScript_interface/Memory) */
2020-07-22 12:03:46 -04:00
interface Memory {
2024-03-26 18:52:57 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/JavaScript_interface/Memory/buffer) */
2020-07-22 12:03:46 -04:00
readonly buffer : ArrayBuffer ;
2024-03-26 18:52:57 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/JavaScript_interface/Memory/grow) */
2020-07-22 12:03:46 -04:00
grow ( delta : number ) : number ;
}
2021-05-27 19:33:11 -04:00
2020-07-22 12:03:46 -04:00
var Memory : {
prototype : Memory ;
new ( descriptor : MemoryDescriptor ) : Memory ;
} ;
2021-05-27 19:33:11 -04:00
2024-03-26 18:52:57 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/JavaScript_interface/Module) */
2020-07-22 12:03:46 -04:00
interface Module {
}
2021-05-27 19:33:11 -04:00
2020-07-22 12:03:46 -04:00
var Module : {
prototype : Module ;
new ( bytes : BufferSource ) : Module ;
2024-03-26 18:52:57 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/JavaScript_interface/Module/customSections_static) */
2020-07-22 12:03:46 -04:00
customSections ( moduleObject : Module , sectionName : string ) : ArrayBuffer [ ] ;
2024-03-26 18:52:57 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/JavaScript_interface/Module/exports_static) */
2020-07-22 12:03:46 -04:00
exports ( moduleObject : Module ) : ModuleExportDescriptor [ ] ;
2024-03-26 18:52:57 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/JavaScript_interface/Module/imports_static) */
2020-07-22 12:03:46 -04:00
imports ( moduleObject : Module ) : ModuleImportDescriptor [ ] ;
} ;
2021-05-27 19:33:11 -04:00
2021-08-26 20:12:59 -04:00
interface RuntimeError extends Error {
}
var RuntimeError : {
prototype : RuntimeError ;
2021-12-09 17:12:21 -05:00
new ( message? : string ) : RuntimeError ;
( message? : string ) : RuntimeError ;
2021-08-26 20:12:59 -04:00
} ;
2024-03-26 18:52:57 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/JavaScript_interface/Table) */
2020-07-22 12:03:46 -04:00
interface Table {
2024-03-26 18:52:57 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/JavaScript_interface/Table/length) */
2020-07-22 12:03:46 -04:00
readonly length : number ;
2024-03-26 18:52:57 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/JavaScript_interface/Table/get) */
2021-08-26 20:12:59 -04:00
get ( index : number ) : any ;
2024-03-26 18:52:57 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/JavaScript_interface/Table/grow) */
2021-08-26 20:12:59 -04:00
grow ( delta : number , value? : any ) : number ;
2024-03-26 18:52:57 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/JavaScript_interface/Table/set) */
2021-08-26 20:12:59 -04:00
set ( index : number , value? : any ) : void ;
2020-07-22 12:03:46 -04:00
}
2021-05-27 19:33:11 -04:00
2020-07-22 12:03:46 -04:00
var Table : {
prototype : Table ;
2021-08-26 20:12:59 -04:00
new ( descriptor : TableDescriptor , value? : any ) : Table ;
2020-07-22 12:03:46 -04:00
} ;
2021-05-27 19:33:11 -04:00
2023-09-09 15:03:21 -04:00
interface GlobalDescriptor < T extends ValueType = ValueType > {
2020-07-22 12:03:46 -04:00
mutable? : boolean ;
2023-09-09 15:03:21 -04:00
value : T ;
2020-07-22 12:03:46 -04:00
}
2021-05-27 19:33:11 -04:00
2020-07-22 12:03:46 -04:00
interface MemoryDescriptor {
initial : number ;
maximum? : number ;
2021-05-27 19:33:11 -04:00
shared? : boolean ;
2020-07-22 12:03:46 -04:00
}
2021-05-27 19:33:11 -04:00
2020-07-22 12:03:46 -04:00
interface ModuleExportDescriptor {
kind : ImportExportKind ;
name : string ;
}
2021-05-27 19:33:11 -04:00
2020-07-22 12:03:46 -04:00
interface ModuleImportDescriptor {
kind : ImportExportKind ;
module : string ;
name : string ;
}
2021-05-27 19:33:11 -04:00
2020-07-22 12:03:46 -04:00
interface TableDescriptor {
element : TableKind ;
initial : number ;
maximum? : number ;
}
2021-05-27 19:33:11 -04:00
2023-09-09 15:03:21 -04:00
interface ValueTypeMap {
anyfunc : Function ;
externref : any ;
f32 : number ;
f64 : number ;
i32 : number ;
i64 : bigint ;
v128 : never ;
}
2020-07-22 12:03:46 -04:00
interface WebAssemblyInstantiatedSource {
instance : Instance ;
module : Module ;
}
2021-05-27 19:33:11 -04:00
2020-07-22 12:03:46 -04:00
type ImportExportKind = "function" | "global" | "memory" | "table" ;
2021-08-26 20:12:59 -04:00
type TableKind = "anyfunc" | "externref" ;
2020-07-22 12:03:46 -04:00
type ExportValue = Function | Global | Memory | Table ;
type Exports = Record < string , ExportValue > ;
type ImportValue = ExportValue | number ;
type Imports = Record < string , ModuleImports > ;
2021-08-26 20:12:59 -04:00
type ModuleImports = Record < string , ImportValue > ;
2023-09-09 15:03:21 -04:00
type ValueType = keyof ValueTypeMap ;
2024-03-26 18:52:57 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/JavaScript_interface/compile_static) */
2020-07-22 12:03:46 -04:00
function compile ( bytes : BufferSource ) : Promise < Module > ;
2024-03-26 18:52:57 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/JavaScript_interface/compileStreaming_static) */
2021-08-26 20:12:59 -04:00
function compileStreaming ( source : Response | PromiseLike < Response > ) : Promise < Module > ;
2024-03-26 18:52:57 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/JavaScript_interface/instantiate_static) */
2020-07-22 12:03:46 -04:00
function instantiate ( bytes : BufferSource , importObject? : Imports ) : Promise < WebAssemblyInstantiatedSource > ;
function instantiate ( moduleObject : Module , importObject? : Imports ) : Promise < Instance > ;
2024-03-26 18:52:57 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/JavaScript_interface/instantiateStreaming_static) */
2021-08-26 20:12:59 -04:00
function instantiateStreaming ( source : Response | PromiseLike < Response > , importObject? : Imports ) : Promise < WebAssemblyInstantiatedSource > ;
2024-03-26 18:52:57 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/JavaScript_interface/validate_static) */
2020-07-22 12:03:46 -04:00
function validate ( bytes : BufferSource ) : boolean ;
}
2023-07-03 18:36:35 -04:00
interface EncodedVideoChunkOutputCallback {
( chunk : EncodedVideoChunk , metadata? : EncodedVideoChunkMetadata ) : void ;
}
2020-07-22 12:03:46 -04:00
interface FrameRequestCallback {
2021-08-26 20:12:59 -04:00
( time : DOMHighResTimeStamp ) : void ;
2020-07-22 12:03:46 -04:00
}
2022-03-01 15:44:43 -05:00
interface LockGrantedCallback {
( lock : Lock | null ) : any ;
}
2020-07-22 12:03:46 -04:00
interface OnErrorEventHandlerNonNull {
( event : Event | string , source? : string , lineno? : number , colno? : number , error? : Error ) : any ;
}
interface PerformanceObserverCallback {
( entries : PerformanceObserverEntryList , observer : PerformanceObserver ) : void ;
}
2021-02-24 23:16:19 -05:00
interface QueuingStrategySize < T = any > {
2021-12-09 17:12:21 -05:00
( chunk : T ) : number ;
2020-07-22 12:03:46 -04:00
}
2023-07-03 18:36:35 -04:00
interface ReportingObserverCallback {
( reports : Report [ ] , observer : ReportingObserver ) : void ;
}
2021-02-24 23:16:19 -05:00
interface TransformerFlushCallback < O > {
( controller : TransformStreamDefaultController < O > ) : void | PromiseLike < void > ;
2020-07-22 12:03:46 -04:00
}
2021-02-24 23:16:19 -05:00
interface TransformerStartCallback < O > {
2021-08-26 20:12:59 -04:00
( controller : TransformStreamDefaultController < O > ) : any ;
2020-07-22 12:03:46 -04:00
}
2021-02-24 23:16:19 -05:00
interface TransformerTransformCallback < I , O > {
2020-07-22 12:03:46 -04:00
( chunk : I , controller : TransformStreamDefaultController < O > ) : void | PromiseLike < void > ;
}
2021-02-24 23:16:19 -05:00
interface UnderlyingSinkAbortCallback {
2021-08-26 20:12:59 -04:00
( reason? : any ) : void | PromiseLike < void > ;
2020-07-22 12:03:46 -04:00
}
2021-02-24 23:16:19 -05:00
interface UnderlyingSinkCloseCallback {
2020-07-22 12:03:46 -04:00
( ) : void | PromiseLike < void > ;
}
2021-02-24 23:16:19 -05:00
interface UnderlyingSinkStartCallback {
2021-08-26 20:12:59 -04:00
( controller : WritableStreamDefaultController ) : any ;
2020-07-22 12:03:46 -04:00
}
2021-02-24 23:16:19 -05:00
interface UnderlyingSinkWriteCallback < W > {
2020-07-22 12:03:46 -04:00
( chunk : W , controller : WritableStreamDefaultController ) : void | PromiseLike < void > ;
}
2021-02-24 23:16:19 -05:00
interface UnderlyingSourceCancelCallback {
2021-08-26 20:12:59 -04:00
( reason? : any ) : void | PromiseLike < void > ;
2020-07-22 12:03:46 -04:00
}
2021-02-24 23:16:19 -05:00
interface UnderlyingSourcePullCallback < R > {
( controller : ReadableStreamController < R > ) : void | PromiseLike < void > ;
}
interface UnderlyingSourceStartCallback < R > {
2021-08-26 20:12:59 -04:00
( controller : ReadableStreamController < R > ) : any ;
2021-02-24 23:16:19 -05:00
}
2023-07-03 18:36:35 -04:00
interface VideoFrameOutputCallback {
( output : VideoFrame ) : void ;
}
2021-02-24 23:16:19 -05:00
interface VoidFunction {
( ) : void ;
}
2023-07-03 18:36:35 -04:00
interface WebCodecsErrorCallback {
( error : DOMException ) : void ;
}
/ * *
* Returns dedicatedWorkerGlobal ' s name , i . e . the value given to the Worker constructor . Primarily useful for debugging .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/DedicatedWorkerGlobalScope/name)
* /
2020-07-22 12:03:46 -04:00
declare var name : string ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DedicatedWorkerGlobalScope/message_event) */
2020-07-22 12:03:46 -04:00
declare var onmessage : ( ( this : DedicatedWorkerGlobalScope , ev : MessageEvent ) = > any ) | null ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DedicatedWorkerGlobalScope/messageerror_event) */
2020-07-22 12:03:46 -04:00
declare var onmessageerror : ( ( this : DedicatedWorkerGlobalScope , ev : MessageEvent ) = > any ) | null ;
2024-03-26 18:52:57 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DedicatedWorkerGlobalScope/rtctransform_event) */
declare var onrtctransform : ( ( this : DedicatedWorkerGlobalScope , ev : Event ) = > any ) | null ;
2023-07-03 18:36:35 -04:00
/ * *
* Aborts dedicatedWorkerGlobal .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/DedicatedWorkerGlobalScope/close)
* /
2020-07-22 12:03:46 -04:00
declare function close ( ) : void ;
2023-07-03 18:36:35 -04:00
/ * *
* 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 .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/DedicatedWorkerGlobalScope/postMessage)
* /
2020-07-22 12:03:46 -04:00
declare function postMessage ( message : any , transfer : Transferable [ ] ) : void ;
2021-12-09 17:12:21 -05:00
declare function postMessage ( message : any , options? : StructuredSerializeOptions ) : void ;
2023-07-03 18:36:35 -04:00
/ * *
2023-12-06 18:49:34 -05:00
* 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 .
2023-07-03 18:36:35 -04:00
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/EventTarget/dispatchEvent)
* /
2020-07-22 12:03:46 -04:00
declare function dispatchEvent ( event : Event ) : boolean ;
2023-07-03 18:36:35 -04:00
/ * *
* Returns workerGlobal ' s WorkerLocation object .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/WorkerGlobalScope/location)
* /
2020-07-22 12:03:46 -04:00
declare var location : WorkerLocation ;
2023-07-03 18:36:35 -04:00
/ * *
* Returns workerGlobal ' s WorkerNavigator object .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/WorkerGlobalScope/navigator)
* /
2020-07-22 12:03:46 -04:00
declare var navigator : WorkerNavigator ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WorkerGlobalScope/error_event) */
2020-07-22 12:03:46 -04:00
declare var onerror : ( ( this : DedicatedWorkerGlobalScope , ev : ErrorEvent ) = > any ) | null ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WorkerGlobalScope/languagechange_event) */
2020-07-22 12:03:46 -04:00
declare var onlanguagechange : ( ( this : DedicatedWorkerGlobalScope , ev : Event ) = > any ) | null ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WorkerGlobalScope/offline_event) */
2020-07-22 12:03:46 -04:00
declare var onoffline : ( ( this : DedicatedWorkerGlobalScope , ev : Event ) = > any ) | null ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WorkerGlobalScope/online_event) */
2020-07-22 12:03:46 -04:00
declare var ononline : ( ( this : DedicatedWorkerGlobalScope , ev : Event ) = > any ) | null ;
declare var onrejectionhandled : ( ( this : DedicatedWorkerGlobalScope , ev : PromiseRejectionEvent ) = > any ) | null ;
declare var onunhandledrejection : ( ( this : DedicatedWorkerGlobalScope , ev : PromiseRejectionEvent ) = > any ) | null ;
2023-07-03 18:36:35 -04:00
/ * *
* Returns workerGlobal .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/WorkerGlobalScope/self)
* /
2020-07-22 12:03:46 -04:00
declare var self : WorkerGlobalScope & typeof globalThis ;
2023-07-03 18:36:35 -04:00
/ * *
* 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 ) .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/WorkerGlobalScope/importScripts)
* /
2021-08-26 20:12:59 -04:00
declare function importScripts ( . . . urls : ( string | URL ) [ ] ) : void ;
2023-07-03 18:36:35 -04:00
/ * *
2023-12-06 18:49:34 -05:00
* 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 .
2023-07-03 18:36:35 -04:00
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/EventTarget/dispatchEvent)
* /
2020-07-22 12:03:46 -04:00
declare function dispatchEvent ( event : Event ) : boolean ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Document/fonts) */
2021-08-26 20:12:59 -04:00
declare var fonts : FontFaceSet ;
2023-07-03 18:36:35 -04:00
/ * *
* Available only in secure contexts .
*
* [ MDN Reference ] ( https : //developer.mozilla.org/docs/Web/API/caches)
* /
2020-07-22 12:03:46 -04:00
declare var caches : CacheStorage ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/crossOriginIsolated) */
2021-08-26 20:12:59 -04:00
declare var crossOriginIsolated : boolean ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/crypto_property) */
2020-07-22 12:03:46 -04:00
declare var crypto : Crypto ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/indexedDB) */
2020-07-22 12:03:46 -04:00
declare var indexedDB : IDBFactory ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/isSecureContext) */
2020-07-22 12:03:46 -04:00
declare var isSecureContext : boolean ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/origin) */
2020-07-22 12:03:46 -04:00
declare var origin : string ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/performance_property) */
2020-07-22 12:03:46 -04:00
declare var performance : Performance ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/atob) */
2020-07-22 12:03:46 -04:00
declare function atob ( data : string ) : string ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/btoa) */
2020-07-22 12:03:46 -04:00
declare function btoa ( data : string ) : string ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/clearInterval) */
2022-09-19 17:00:01 -04:00
declare function clearInterval ( id : number | undefined ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/clearTimeout) */
2022-09-19 17:00:01 -04:00
declare function clearTimeout ( id : number | undefined ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/createImageBitmap) */
2020-07-22 12:03:46 -04:00
declare function createImageBitmap ( image : ImageBitmapSource , options? : ImageBitmapOptions ) : Promise < ImageBitmap > ;
declare function createImageBitmap ( image : ImageBitmapSource , sx : number , sy : number , sw : number , sh : number , options? : ImageBitmapOptions ) : Promise < ImageBitmap > ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/fetch) */
2022-05-31 20:19:18 -04:00
declare function fetch ( input : RequestInfo | URL , init? : RequestInit ) : Promise < Response > ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/queueMicrotask) */
2020-07-22 12:03:46 -04:00
declare function queueMicrotask ( callback : VoidFunction ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/reportError) */
2022-03-01 15:44:43 -05:00
declare function reportError ( e : any ) : void ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/setInterval) */
2020-07-22 12:03:46 -04:00
declare function setInterval ( handler : TimerHandler , timeout? : number , . . . arguments : any [ ] ) : number ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/setTimeout) */
2020-07-22 12:03:46 -04:00
declare function setTimeout ( handler : TimerHandler , timeout? : number , . . . arguments : any [ ] ) : number ;
2023-07-03 18:36:35 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/structuredClone) */
declare function structuredClone < T = any > ( value : T , options? : StructuredSerializeOptions ) : T ;
2024-03-26 18:52:57 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DedicatedWorkerGlobalScope/cancelAnimationFrame) */
2020-07-22 12:03:46 -04:00
declare function cancelAnimationFrame ( handle : number ) : void ;
2024-03-26 18:52:57 -04:00
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DedicatedWorkerGlobalScope/requestAnimationFrame) */
2020-07-22 12:03:46 -04:00
declare function requestAnimationFrame ( callback : FrameRequestCallback ) : number ;
declare function addEventListener < K extends keyof DedicatedWorkerGlobalScopeEventMap > ( type : K , listener : ( this : DedicatedWorkerGlobalScope , ev : DedicatedWorkerGlobalScopeEventMap [ K ] ) = > any , options? : boolean | AddEventListenerOptions ) : void ;
declare function addEventListener ( type : string , listener : EventListenerOrEventListenerObject , options? : boolean | AddEventListenerOptions ) : void ;
declare function removeEventListener < K extends keyof DedicatedWorkerGlobalScopeEventMap > ( type : K , listener : ( this : DedicatedWorkerGlobalScope , ev : DedicatedWorkerGlobalScopeEventMap [ K ] ) = > any , options? : boolean | EventListenerOptions ) : void ;
declare function removeEventListener ( type : string , listener : EventListenerOrEventListenerObject , options? : boolean | EventListenerOptions ) : void ;
2021-08-26 20:12:59 -04:00
type AlgorithmIdentifier = Algorithm | string ;
2023-09-09 15:03:21 -04:00
type AllowSharedBufferSource = ArrayBuffer | ArrayBufferView ;
2021-08-26 20:12:59 -04:00
type BigInteger = Uint8Array ;
type BinaryData = ArrayBuffer | ArrayBufferView ;
2020-07-22 12:03:46 -04:00
type BlobPart = BufferSource | Blob | string ;
2021-08-26 20:12:59 -04:00
type BodyInit = ReadableStream | XMLHttpRequestBodyInit ;
type BufferSource = ArrayBufferView | ArrayBuffer ;
2023-07-03 18:36:35 -04:00
type CSSKeywordish = string | CSSKeywordValue ;
type CSSNumberish = number | CSSNumericValue ;
type CSSPerspectiveValue = CSSNumericValue | CSSKeywordish ;
type CSSUnparsedSegment = string | CSSVariableReferenceValue ;
type CanvasImageSource = ImageBitmap | OffscreenCanvas | VideoFrame ;
2021-08-26 20:12:59 -04:00
type DOMHighResTimeStamp = number ;
2022-03-01 15:44:43 -05:00
type EpochTimeStamp = number ;
2021-08-26 20:12:59 -04:00
type EventListenerOrEventListenerObject = EventListener | EventListenerObject ;
2023-07-03 18:36:35 -04:00
type FileSystemWriteChunkType = BufferSource | Blob | string | WriteParams ;
2021-08-26 20:12:59 -04:00
type Float32List = Float32Array | GLfloat [ ] ;
type FormDataEntryValue = File | string ;
2020-07-22 12:03:46 -04:00
type GLbitfield = number ;
2021-08-26 20:12:59 -04:00
type GLboolean = boolean ;
type GLclampf = number ;
type GLenum = number ;
type GLfloat = number ;
2020-07-22 12:03:46 -04:00
type GLint = number ;
2021-08-26 20:12:59 -04:00
type GLint64 = number ;
2020-07-22 12:03:46 -04:00
type GLintptr = number ;
2021-08-26 20:12:59 -04:00
type GLsizei = number ;
2020-07-22 12:03:46 -04:00
type GLsizeiptr = number ;
type GLuint = number ;
type GLuint64 = number ;
2021-08-26 20:12:59 -04:00
type HashAlgorithmIdentifier = AlgorithmIdentifier ;
2022-09-19 17:00:01 -04:00
type HeadersInit = [ string , string ] [ ] | Record < string , string > | Headers ;
2021-08-26 20:12:59 -04:00
type IDBValidKey = number | string | Date | BufferSource | IDBValidKey [ ] ;
type ImageBitmapSource = CanvasImageSource | Blob | ImageData ;
type Int32List = Int32Array | GLint [ ] ;
type MessageEventSource = MessagePort | ServiceWorker ;
type NamedCurve = string ;
2022-12-07 12:59:59 -05:00
type OffscreenRenderingContext = OffscreenCanvasRenderingContext2D | ImageBitmapRenderingContext | WebGLRenderingContext | WebGL2RenderingContext ;
2021-08-26 20:12:59 -04:00
type OnErrorEventHandler = OnErrorEventHandlerNonNull | null ;
type PerformanceEntryList = PerformanceEntry [ ] ;
type PushMessageDataInit = BufferSource | string ;
2022-12-07 12:59:59 -05:00
type ReadableStreamController < T > = ReadableStreamDefaultController < T > | ReadableByteStreamController ;
type ReadableStreamReadResult < T > = ReadableStreamReadValueResult < T > | ReadableStreamReadDoneResult < T > ;
type ReadableStreamReader < T > = ReadableStreamDefaultReader < T > | ReadableStreamBYOBReader ;
2023-07-03 18:36:35 -04:00
type ReportList = Report [ ] ;
2021-08-26 20:12:59 -04:00
type RequestInfo = Request | string ;
2023-07-03 18:36:35 -04:00
type TexImageSource = ImageBitmap | ImageData | OffscreenCanvas | VideoFrame ;
2021-08-26 20:12:59 -04:00
type TimerHandler = string | Function ;
2023-07-03 18:36:35 -04:00
type Transferable = OffscreenCanvas | ImageBitmap | MessagePort | ReadableStream | WritableStream | TransformStream | VideoFrame | ArrayBuffer ;
2021-08-26 20:12:59 -04:00
type Uint32List = Uint32Array | GLuint [ ] ;
type XMLHttpRequestBodyInit = Blob | BufferSource | FormData | URLSearchParams | string ;
2023-07-03 18:36:35 -04:00
type AlphaOption = "discard" | "keep" ;
type AvcBitstreamFormat = "annexb" | "avc" ;
2020-07-22 12:03:46 -04:00
type BinaryType = "arraybuffer" | "blob" ;
2023-07-03 18:36:35 -04:00
type CSSMathOperator = "clamp" | "invert" | "max" | "min" | "negate" | "product" | "sum" ;
type CSSNumericBaseType = "angle" | "flex" | "frequency" | "length" | "percent" | "resolution" | "time" ;
2022-12-07 12:59:59 -05:00
type CanvasDirection = "inherit" | "ltr" | "rtl" ;
type CanvasFillRule = "evenodd" | "nonzero" ;
type CanvasFontKerning = "auto" | "none" | "normal" ;
type CanvasFontStretch = "condensed" | "expanded" | "extra-condensed" | "extra-expanded" | "normal" | "semi-condensed" | "semi-expanded" | "ultra-condensed" | "ultra-expanded" ;
type CanvasFontVariantCaps = "all-petite-caps" | "all-small-caps" | "normal" | "petite-caps" | "small-caps" | "titling-caps" | "unicase" ;
type CanvasLineCap = "butt" | "round" | "square" ;
type CanvasLineJoin = "bevel" | "miter" | "round" ;
type CanvasTextAlign = "center" | "end" | "left" | "right" | "start" ;
type CanvasTextBaseline = "alphabetic" | "bottom" | "hanging" | "ideographic" | "middle" | "top" ;
type CanvasTextRendering = "auto" | "geometricPrecision" | "optimizeLegibility" | "optimizeSpeed" ;
2020-07-22 12:03:46 -04:00
type ClientTypes = "all" | "sharedworker" | "window" | "worker" ;
2023-07-03 18:36:35 -04:00
type CodecState = "closed" | "configured" | "unconfigured" ;
2021-08-26 20:12:59 -04:00
type ColorGamut = "p3" | "rec2020" | "srgb" ;
2020-07-22 12:03:46 -04:00
type ColorSpaceConversion = "default" | "none" ;
2023-07-03 18:36:35 -04:00
type CompressionFormat = "deflate" | "deflate-raw" | "gzip" ;
2022-03-01 15:44:43 -05:00
type DocumentVisibilityState = "hidden" | "visible" ;
2023-07-03 18:36:35 -04:00
type EncodedVideoChunkType = "delta" | "key" ;
2020-07-22 12:03:46 -04:00
type EndingType = "native" | "transparent" ;
2022-03-01 15:44:43 -05:00
type FileSystemHandleKind = "directory" | "file" ;
2023-03-21 11:46:40 -04:00
type FontDisplay = "auto" | "block" | "fallback" | "optional" | "swap" ;
2021-08-26 20:12:59 -04:00
type FontFaceLoadStatus = "error" | "loaded" | "loading" | "unloaded" ;
type FontFaceSetLoadStatus = "loaded" | "loading" ;
2020-07-22 12:03:46 -04:00
type FrameType = "auxiliary" | "nested" | "none" | "top-level" ;
2022-12-07 12:59:59 -05:00
type 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" ;
2023-07-03 18:36:35 -04:00
type HardwareAcceleration = "no-preference" | "prefer-hardware" | "prefer-software" ;
2021-08-26 20:12:59 -04:00
type HdrMetadataType = "smpteSt2086" | "smpteSt2094-10" | "smpteSt2094-40" ;
2020-07-22 12:03:46 -04:00
type IDBCursorDirection = "next" | "nextunique" | "prev" | "prevunique" ;
type IDBRequestReadyState = "done" | "pending" ;
2022-03-01 15:44:43 -05:00
type IDBTransactionDurability = "default" | "relaxed" | "strict" ;
2020-07-22 12:03:46 -04:00
type IDBTransactionMode = "readonly" | "readwrite" | "versionchange" ;
2023-07-03 18:36:35 -04:00
type ImageOrientation = "flipY" | "from-image" | "none" ;
2022-12-07 12:59:59 -05:00
type ImageSmoothingQuality = "high" | "low" | "medium" ;
2020-07-22 12:03:46 -04:00
type KeyFormat = "jwk" | "pkcs8" | "raw" | "spki" ;
type KeyType = "private" | "public" | "secret" ;
type KeyUsage = "decrypt" | "deriveBits" | "deriveKey" | "encrypt" | "sign" | "unwrapKey" | "verify" | "wrapKey" ;
2023-07-03 18:36:35 -04:00
type LatencyMode = "quality" | "realtime" ;
2022-03-01 15:44:43 -05:00
type LockMode = "exclusive" | "shared" ;
2021-08-26 20:12:59 -04:00
type MediaDecodingType = "file" | "media-source" | "webrtc" ;
type MediaEncodingType = "record" | "webrtc" ;
2020-07-22 12:03:46 -04:00
type NotificationDirection = "auto" | "ltr" | "rtl" ;
type NotificationPermission = "default" | "denied" | "granted" ;
2022-12-07 12:59:59 -05:00
type OffscreenRenderingContextId = "2d" | "bitmaprenderer" | "webgl" | "webgl2" | "webgpu" ;
2021-12-09 17:12:21 -05:00
type PermissionName = "geolocation" | "notifications" | "persistent-storage" | "push" | "screen-wake-lock" | "xr-spatial-tracking" ;
2020-07-22 12:03:46 -04:00
type PermissionState = "denied" | "granted" | "prompt" ;
2021-08-26 20:12:59 -04:00
type PredefinedColorSpace = "display-p3" | "srgb" ;
2020-07-22 12:03:46 -04:00
type PremultiplyAlpha = "default" | "none" | "premultiply" ;
type PushEncryptionKeyName = "auth" | "p256dh" ;
2022-05-31 20:19:18 -04:00
type RTCEncodedVideoFrameType = "delta" | "empty" | "key" ;
2022-12-07 12:59:59 -05:00
type ReadableStreamReaderMode = "byob" ;
type ReadableStreamType = "bytes" ;
2020-07-22 12:03:46 -04:00
type ReferrerPolicy = "" | "no-referrer" | "no-referrer-when-downgrade" | "origin" | "origin-when-cross-origin" | "same-origin" | "strict-origin" | "strict-origin-when-cross-origin" | "unsafe-url" ;
type RequestCache = "default" | "force-cache" | "no-cache" | "no-store" | "only-if-cached" | "reload" ;
type RequestCredentials = "include" | "omit" | "same-origin" ;
2021-08-26 20:12:59 -04:00
type RequestDestination = "" | "audio" | "audioworklet" | "document" | "embed" | "font" | "frame" | "iframe" | "image" | "manifest" | "object" | "paintworklet" | "report" | "script" | "sharedworker" | "style" | "track" | "video" | "worker" | "xslt" ;
2020-07-22 12:03:46 -04:00
type RequestMode = "cors" | "navigate" | "no-cors" | "same-origin" ;
2024-03-26 18:52:57 -04:00
type RequestPriority = "auto" | "high" | "low" ;
2020-07-22 12:03:46 -04:00
type RequestRedirect = "error" | "follow" | "manual" ;
type ResizeQuality = "high" | "low" | "medium" | "pixelated" ;
type ResponseType = "basic" | "cors" | "default" | "error" | "opaque" | "opaqueredirect" ;
2021-08-26 20:12:59 -04:00
type SecurityPolicyViolationEventDisposition = "enforce" | "report" ;
2020-07-22 12:03:46 -04:00
type ServiceWorkerState = "activated" | "activating" | "installed" | "installing" | "parsed" | "redundant" ;
type ServiceWorkerUpdateViaCache = "all" | "imports" | "none" ;
2021-08-26 20:12:59 -04:00
type TransferFunction = "hlg" | "pq" | "srgb" ;
2022-05-31 20:19:18 -04:00
type VideoColorPrimaries = "bt470bg" | "bt709" | "smpte170m" ;
2023-07-03 18:36:35 -04:00
type VideoEncoderBitrateMode = "constant" | "quantizer" | "variable" ;
2022-05-31 20:19:18 -04:00
type VideoMatrixCoefficients = "bt470bg" | "bt709" | "rgb" | "smpte170m" ;
2023-07-03 18:36:35 -04:00
type VideoPixelFormat = "BGRA" | "BGRX" | "I420" | "I420A" | "I422" | "I444" | "NV12" | "RGBA" | "RGBX" ;
2022-05-31 20:19:18 -04:00
type VideoTransferCharacteristics = "bt709" | "iec61966-2-1" | "smpte170m" ;
2020-07-22 12:03:46 -04:00
type WebGLPowerPreference = "default" | "high-performance" | "low-power" ;
2023-09-09 15:03:21 -04:00
type WebTransportCongestionControl = "default" | "low-latency" | "throughput" ;
type WebTransportErrorSource = "session" | "stream" ;
2020-07-22 12:03:46 -04:00
type WorkerType = "classic" | "module" ;
2023-07-03 18:36:35 -04:00
type WriteCommandType = "seek" | "truncate" | "write" ;
2020-07-22 12:03:46 -04:00
type XMLHttpRequestResponseType = "" | "arraybuffer" | "blob" | "document" | "json" | "text" ;