From ea65c4309189e93b7b1e938572bc6cd1f4b44815 Mon Sep 17 00:00:00 2001 From: Orta Date: Mon, 21 Jun 2021 14:10:32 +0100 Subject: [PATCH 1/4] Add the types_web dom dts --- src/lib/dom.generated.d.ts | 6806 +++++++---------- src/lib/dom.iterable.generated.d.ts | 52 +- ...contextualOverloadListFromArrayUnion.types | 2 +- .../reference/customEventDetail.types | 4 +- .../reference/elaboratedErrors.symbols | 8 +- .../globalThisBlockscopedProperties.types | 2 +- ...portMeta(module=commonjs,target=es5).types | 8 +- ...tMeta(module=commonjs,target=esnext).types | 8 +- ...importMeta(module=es2020,target=es5).types | 8 +- ...ortMeta(module=es2020,target=esnext).types | 8 +- ...importMeta(module=esnext,target=es5).types | 8 +- ...ortMeta(module=esnext,target=esnext).types | 8 +- ...importMeta(module=system,target=es5).types | 8 +- ...ortMeta(module=system,target=esnext).types | 8 +- .../intersectionsOfLargeUnions.types | 6 +- .../intersectionsOfLargeUnions2.errors.txt | 2 +- .../intersectionsOfLargeUnions2.types | 6 +- ...sDeclarationsNonIdentifierInferredNames.js | 18 - .../reference/jsdocTemplateTag.types | 2 +- .../mappedTypeRecursiveInference.errors.txt | 34 + .../mappedTypeRecursiveInference.types | 20 +- .../misspelledJsDocTypedefTags.types | 4 +- .../reference/objectFromEntries.types | 2 +- ...uthinessCallExpressionCoercion2.errors.txt | 6 +- .../truthinessCallExpressionCoercion2.symbols | 2 - .../truthinessCallExpressionCoercion2.types | 10 +- .../typeFromPropertyAssignment21.types | 2 +- .../baselines/reference/typedArrays-es5.types | 2 +- .../baselines/reference/typedArrays-es6.types | 2 +- ...anceCallbacksAndIndexedAccesses.errors.txt | 36 + ...arianceCallbacksAndIndexedAccesses.symbols | 1 - .../varianceCallbacksAndIndexedAccesses.types | 2 +- 32 files changed, 3061 insertions(+), 4034 deletions(-) create mode 100644 tests/baselines/reference/mappedTypeRecursiveInference.errors.txt create mode 100644 tests/baselines/reference/varianceCallbacksAndIndexedAccesses.errors.txt diff --git a/src/lib/dom.generated.d.ts b/src/lib/dom.generated.d.ts index 3c8af43e812e7..25d3a95c8fd65 100644 --- a/src/lib/dom.generated.d.ts +++ b/src/lib/dom.generated.d.ts @@ -1,31 +1,19 @@ ///////////////////////////// -/// DOM APIs +/// Window APIs ///////////////////////////// interface AddEventListenerOptions extends EventListenerOptions { once?: boolean; passive?: boolean; -} - -interface AddressErrors { - addressLine?: string; - city?: string; - country?: string; - dependentLocality?: string; - organization?: string; - phone?: string; - postalCode?: string; - recipient?: string; - region?: string; - sortingCode?: string; + signal?: AbortSignal; } interface AesCbcParams extends Algorithm { - iv: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer; + iv: BufferSource; } interface AesCtrParams extends Algorithm { - counter: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer; + counter: BufferSource; length: number; } @@ -34,8 +22,8 @@ interface AesDerivedKeyParams extends Algorithm { } interface AesGcmParams extends Algorithm { - additionalData?: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer; - iv: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer; + additionalData?: BufferSource; + iv: BufferSource; tagLength?: number; } @@ -88,9 +76,12 @@ interface AudioBufferSourceOptions { playbackRate?: number; } -interface AudioContextInfo { - currentTime?: number; - sampleRate?: number; +interface AudioConfiguration { + bitrate?: number; + channels?: string; + contentType: string; + samplerate?: number; + spatialRendering?: boolean; } interface AudioContextOptions { @@ -104,14 +95,6 @@ interface AudioNodeOptions { channelInterpretation?: ChannelInterpretation; } -interface AudioParamDescriptor { - automationRate?: AutomationRate; - defaultValue?: number; - maxValue?: number; - minValue?: number; - name: string; -} - interface AudioProcessingEventInit extends EventInit { inputBuffer: AudioBuffer; outputBuffer: AudioBuffer; @@ -120,7 +103,7 @@ interface AudioProcessingEventInit extends EventInit { interface AudioTimestamp { contextTime?: number; - performanceTime?: number; + performanceTime?: DOMHighResTimeStamp; } interface AudioWorkletNodeOptions extends AudioNodeOptions { @@ -159,15 +142,16 @@ interface BiquadFilterOptions extends AudioNodeOptions { type?: BiquadFilterType; } +interface BlobEventInit { + data: Blob; + timecode?: DOMHighResTimeStamp; +} + interface BlobPropertyBag { endings?: EndingType; type?: string; } -interface ByteLengthChunk { - byteLength?: number; -} - interface CacheQueryOptions { ignoreMethod?: boolean; ignoreSearch?: boolean; @@ -176,6 +160,7 @@ interface CacheQueryOptions { interface CanvasRenderingContext2DSettings { alpha?: boolean; + colorSpace?: PredefinedColorSpace; desynchronized?: boolean; } @@ -196,6 +181,10 @@ interface ClipboardEventInit extends EventInit { clipboardData?: DataTransfer | null; } +interface ClipboardItemOptions { + presentationStyle?: PresentationStyle; +} + interface CloseEventInit extends EventInit { code?: number; reason?: string; @@ -212,6 +201,7 @@ interface ComputedEffectTiming extends EffectTiming { endTime?: number; localTime?: number | null; progress?: number | null; + startTime?: number; } interface ComputedKeyframe { @@ -222,10 +212,6 @@ interface ComputedKeyframe { [property: string]: string | number | null | undefined; } -interface ConfirmSiteSpecificExceptionsInformation extends ExceptionInformation { - arrayOfDomainStrings?: string[]; -} - interface ConstantSourceOptions { offset?: number; } @@ -250,11 +236,6 @@ interface ConstrainULongRange extends ULongRange { ideal?: number; } -interface ConstrainVideoFacingModeParameters { - exact?: VideoFacingModeEnum | VideoFacingModeEnum[]; - ideal?: VideoFacingModeEnum | VideoFacingModeEnum[]; -} - interface ConvolverOptions extends AudioNodeOptions { buffer?: AudioBuffer | null; disableNormalization?: boolean; @@ -275,6 +256,11 @@ interface CredentialRequestOptions { signal?: AbortSignal; } +interface CryptoKeyPair { + privateKey?: CryptoKey; + publicKey?: CryptoKey; +} + interface CustomEventInit extends EventInit { detail?: T; } @@ -360,13 +346,13 @@ interface DeviceOrientationEventInit extends EventInit { gamma?: number | null; } -interface DevicePermissionDescriptor extends PermissionDescriptor { - deviceId?: string; - name: "camera" | "microphone" | "speaker"; +interface DisplayMediaStreamConstraints { + audio?: boolean | MediaTrackConstraints; + video?: boolean | MediaTrackConstraints; } interface DocumentTimelineOptions { - originTime?: number; + originTime?: DOMHighResTimeStamp; } interface DoubleRange { @@ -415,6 +401,7 @@ interface EffectTiming { fill?: FillMode; iterationStart?: number; iterations?: number; + playbackRate?: number; } interface ElementCreationOptions { @@ -464,35 +451,39 @@ interface EventSourceInit { withCredentials?: boolean; } -interface ExceptionInformation { - domain?: string | null; -} - interface FilePropertyBag extends BlobPropertyBag { lastModified?: number; } +interface FileSystemFlags { + create?: boolean; + exclusive?: boolean; +} + interface FocusEventInit extends UIEventInit { relatedTarget?: EventTarget | null; } -interface FocusNavigationEventInit extends EventInit { - navigationReason?: string | null; - originHeight?: number; - originLeft?: number; - originTop?: number; - originWidth?: number; +interface FocusOptions { + preventScroll?: boolean; } -interface FocusNavigationOrigin { - originHeight?: number; - originLeft?: number; - originTop?: number; - originWidth?: number; +interface FontFaceDescriptors { + display?: string; + featureSettings?: string; + stretch?: string; + style?: string; + unicodeRange?: string; + variant?: string; + weight?: string; } -interface FocusOptions { - preventScroll?: boolean; +interface FontFaceSetLoadEventInit extends EventInit { + fontfaces?: FontFace[]; +} + +interface FormDataEventInit extends EventInit { + formData: FormData; } interface FullscreenOptions { @@ -507,6 +498,10 @@ interface GamepadEventInit extends EventInit { gamepad: Gamepad; } +interface GetAnimationsOptions { + subtree?: boolean; +} + interface GetNotificationOptions { tag?: string; } @@ -522,8 +517,8 @@ interface HashChangeEventInit extends EventInit { interface HkdfParams extends Algorithm { hash: HashAlgorithmIdentifier; - info: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer; - salt: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer; + info: BufferSource; + salt: BufferSource; } interface HmacImportParams extends Algorithm { @@ -541,6 +536,11 @@ interface HmacKeyGenParams extends Algorithm { length?: number; } +interface IDBDatabaseInfo { + name?: string; + version?: number; +} + interface IDBIndexParameters { multiEntry?: boolean; unique?: boolean; @@ -561,6 +561,10 @@ interface IIRFilterOptions extends AudioNodeOptions { feedforward: number[]; } +interface IdleRequestOptions { + timeout?: number; +} + interface ImageBitmapOptions { colorSpaceConversion?: ColorSpaceConversion; imageOrientation?: ImageOrientation; @@ -574,9 +578,8 @@ interface ImageBitmapRenderingContextSettings { alpha?: boolean; } -interface ImageEncodeOptions { - quality?: number; - type?: string; +interface ImageDataSettings { + colorSpace?: PredefinedColorSpace; } interface ImportMeta { @@ -585,8 +588,10 @@ interface ImportMeta { interface InputEventInit extends UIEventInit { data?: string | null; + dataTransfer?: DataTransfer | null; inputType?: string; isComposing?: boolean; + targetRanges?: StaticRange[]; } interface IntersectionObserverEntryInit { @@ -596,7 +601,7 @@ interface IntersectionObserverEntryInit { isIntersecting: boolean; rootBounds: DOMRectInit | null; target: Element; - time: number; + time: DOMHighResTimeStamp; } interface IntersectionObserverInit { @@ -656,17 +661,51 @@ interface KeyframeAnimationOptions extends KeyframeEffectOptions { interface KeyframeEffectOptions extends EffectTiming { composite?: CompositeOperation; iterationComposite?: IterationCompositeOperation; + pseudoElement?: string | null; +} + +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 MediaElementAudioSourceOptions { mediaElement: HTMLMediaElement; } +interface MediaEncodingConfiguration extends MediaConfiguration { + type: MediaEncodingType; +} + interface MediaEncryptedEventInit extends EventInit { initData?: ArrayBuffer | null; initDataType?: string; } +interface MediaImage { + sizes?: string; + src: string; + type?: string; +} + interface MediaKeyMessageEventInit extends EventInit { message: ArrayBuffer; messageType: MediaKeyMessageType; @@ -684,34 +723,54 @@ interface MediaKeySystemConfiguration { interface MediaKeySystemMediaCapability { contentType?: string; + encryptionScheme?: string | null; robustness?: string; } +interface MediaMetadataInit { + album?: string; + artist?: string; + artwork?: MediaImage[]; + title?: string; +} + +interface MediaPositionState { + duration?: number; + playbackRate?: number; + position?: number; +} + interface MediaQueryListEventInit extends EventInit { matches?: boolean; media?: string; } -interface MediaStreamAudioSourceOptions { - mediaStream: MediaStream; +interface MediaRecorderErrorEventInit extends EventInit { + error: DOMException; } -interface MediaStreamConstraints { - audio?: boolean | MediaTrackConstraints; - peerIdentity?: string; - video?: boolean | MediaTrackConstraints; +interface MediaRecorderOptions { + audioBitsPerSecond?: number; + bitsPerSecond?: number; + mimeType?: string; + videoBitsPerSecond?: number; } -interface MediaStreamErrorEventInit extends EventInit { - error?: MediaStreamError | null; +interface MediaSessionActionDetails { + action: MediaSessionAction; + fastSeek?: boolean | null; + seekOffset?: number | null; + seekTime?: number | null; } -interface MediaStreamEventInit extends EventInit { - stream?: MediaStream; +interface MediaStreamAudioSourceOptions { + mediaStream: MediaStream; } -interface MediaStreamTrackAudioSourceOptions { - mediaStreamTrack: MediaStreamTrack; +interface MediaStreamConstraints { + audio?: boolean | MediaTrackConstraints; + peerIdentity?: string; + video?: boolean | MediaTrackConstraints; } interface MediaStreamTrackEventInit extends EventInit { @@ -722,13 +781,16 @@ interface MediaTrackCapabilities { aspectRatio?: DoubleRange; autoGainControl?: boolean[]; channelCount?: ULongRange; + cursor?: string[]; deviceId?: string; + displaySurface?: string; echoCancellation?: boolean[]; facingMode?: string[]; frameRate?: DoubleRange; groupId?: string; height?: ULongRange; latency?: DoubleRange; + logicalSurface?: boolean; noiseSuppression?: boolean[]; resizeMode?: string[]; sampleRate?: ULongRange; @@ -738,7 +800,6 @@ interface MediaTrackCapabilities { interface MediaTrackConstraintSet { aspectRatio?: ConstrainDouble; - autoGainControl?: ConstrainBoolean; channelCount?: ConstrainULong; deviceId?: ConstrainDOMString; echoCancellation?: ConstrainBoolean; @@ -747,10 +808,9 @@ interface MediaTrackConstraintSet { groupId?: ConstrainDOMString; height?: ConstrainULong; latency?: ConstrainDouble; - noiseSuppression?: ConstrainBoolean; - resizeMode?: ConstrainDOMString; sampleRate?: ConstrainULong; sampleSize?: ConstrainULong; + suppressLocalAudioPlayback?: ConstrainBoolean; width?: ConstrainULong; } @@ -760,17 +820,13 @@ interface MediaTrackConstraints extends MediaTrackConstraintSet { interface MediaTrackSettings { aspectRatio?: number; - autoGainControl?: boolean; - channelCount?: number; deviceId?: string; echoCancellation?: boolean; facingMode?: string; frameRate?: number; groupId?: string; height?: number; - latency?: number; - noiseSuppression?: boolean; - resizeMode?: string; + restrictOwnAudio?: boolean; sampleRate?: number; sampleSize?: number; width?: number; @@ -778,19 +834,15 @@ interface MediaTrackSettings { interface MediaTrackSupportedConstraints { aspectRatio?: boolean; - autoGainControl?: boolean; - channelCount?: boolean; deviceId?: boolean; echoCancellation?: boolean; facingMode?: boolean; frameRate?: boolean; groupId?: boolean; height?: boolean; - latency?: boolean; - noiseSuppression?: boolean; - resizeMode?: boolean; sampleRate?: boolean; sampleSize?: boolean; + suppressLocalAudioPlayback?: boolean; width?: boolean; } @@ -802,11 +854,6 @@ interface MessageEventInit extends EventInit { source?: MessageEventSource | null; } -interface MidiPermissionDescriptor extends PermissionDescriptor { - name: "midi"; - sysex?: boolean; -} - interface MouseEventInit extends EventModifierInit { button?: number; buttons?: number; @@ -854,11 +901,6 @@ interface MutationObserverInit { subtree?: boolean; } -interface NavigationPreloadState { - enabled?: boolean; - headerValue?: string; -} - interface NotificationAction { action: string; icon?: string; @@ -878,7 +920,7 @@ interface NotificationOptions { requireInteraction?: boolean; silent?: boolean; tag?: string; - timestamp?: number; + timestamp?: DOMTimeStamp; vibrate?: VibratePattern; } @@ -901,6 +943,7 @@ interface OptionalEffectTiming { fill?: FillMode; iterationStart?: number; iterations?: number; + playbackRate?: number; } interface OscillatorOptions extends AudioNodeOptions { @@ -931,12 +974,6 @@ interface PannerOptions extends AudioNodeOptions { rolloffFactor?: number; } -interface PayerErrors { - email?: string; - name?: string; - phone?: string; -} - interface PaymentCurrencyAmount { currency: string; value: string; @@ -945,7 +982,6 @@ interface PaymentCurrencyAmount { interface PaymentDetailsBase { displayItems?: PaymentItem[]; modifiers?: PaymentDetailsModifier[]; - shippingOptions?: PaymentShippingOption[]; } interface PaymentDetailsInit extends PaymentDetailsBase { @@ -956,15 +992,12 @@ interface PaymentDetailsInit extends PaymentDetailsBase { interface PaymentDetailsModifier { additionalDisplayItems?: PaymentItem[]; data?: any; - supportedMethods: string | string[]; + supportedMethods: string; total?: PaymentItem; } interface PaymentDetailsUpdate extends PaymentDetailsBase { - error?: string; - payerErrors?: PayerErrors; paymentMethodErrors?: any; - shippingAddressErrors?: AddressErrors; total?: PaymentItem; } @@ -981,39 +1014,33 @@ interface PaymentMethodChangeEventInit extends PaymentRequestUpdateEventInit { interface PaymentMethodData { data?: any; - supportedMethods: string | string[]; -} - -interface PaymentOptions { - requestBillingAddress?: boolean; - requestPayerEmail?: boolean; - requestPayerName?: boolean; - requestPayerPhone?: boolean; - requestShipping?: boolean; - shippingType?: PaymentShippingType; + supportedMethods: string; } interface PaymentRequestUpdateEventInit extends EventInit { } -interface PaymentShippingOption { - amount: PaymentCurrencyAmount; - id: string; - label: string; - selected?: boolean; -} - interface PaymentValidationErrors { error?: string; - payer?: PayerErrors; paymentMethod?: any; - shippingAddress?: AddressErrors; } interface Pbkdf2Params extends Algorithm { hash: HashAlgorithmIdentifier; iterations: number; - salt: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer; + salt: BufferSource; +} + +interface PerformanceMarkOptions { + detail?: any; + startTime?: DOMHighResTimeStamp; +} + +interface PerformanceMeasureOptions { + detail?: any; + duration?: DOMHighResTimeStamp; + end?: string | DOMHighResTimeStamp; + start?: string | DOMHighResTimeStamp; } interface PerformanceObserverInit { @@ -1127,14 +1154,9 @@ interface PublicKeyCredentialUserEntity extends PublicKeyCredentialEntity { id: BufferSource; } -interface PushPermissionDescriptor extends PermissionDescriptor { - name: "push"; - userVisibleOnly?: boolean; -} - interface PushSubscriptionJSON { endpoint?: string; - expirationTime?: number | null; + expirationTime?: DOMTimeStamp | null; keys?: Record; } @@ -1161,7 +1183,7 @@ interface RTCAnswerOptions extends RTCOfferAnswerOptions { } interface RTCCertificateExpiration { - expires?: number; + expires?: DOMTimeStamp; } interface RTCConfiguration { @@ -1195,48 +1217,6 @@ interface RTCDtlsFingerprint { value?: string; } -interface RTCDtlsParameters { - fingerprints?: RTCDtlsFingerprint[]; - role?: RTCDtlsRole; -} - -interface RTCErrorEventInit extends EventInit { - error: RTCError; -} - -interface RTCErrorInit { - errorDetail: RTCErrorDetailType; - receivedAlert?: number; - sctpCauseCode?: number; - sdpLineNumber?: number; - sentAlert?: number; -} - -interface RTCIceCandidateAttributes extends RTCStats { - addressSourceUrl?: string; - candidateType?: RTCStatsIceCandidateType; - ipAddress?: string; - portNumber?: number; - priority?: number; - transport?: string; -} - -interface RTCIceCandidateComplete { -} - -interface RTCIceCandidateDictionary { - foundation?: string; - ip?: string; - msMTurnSessionId?: string; - port?: number; - priority?: number; - protocol?: RTCIceProtocol; - relatedAddress?: string; - relatedPort?: number; - tcpType?: RTCIceTcpCandidateType; - type?: RTCIceCandidateType; -} - interface RTCIceCandidateInit { candidate?: string; sdpMLineIndex?: number | null; @@ -1244,54 +1224,22 @@ interface RTCIceCandidateInit { usernameFragment?: string | null; } -interface RTCIceCandidatePair { - local?: RTCIceCandidate; - remote?: RTCIceCandidate; -} - interface RTCIceCandidatePairStats extends RTCStats { availableIncomingBitrate?: number; availableOutgoingBitrate?: number; - bytesDiscardedOnSend?: number; bytesReceived?: number; bytesSent?: number; - circuitBreakerTriggerCount?: number; - consentExpiredTimestamp?: number; - consentRequestsSent?: number; currentRoundTripTime?: number; - currentRtt?: number; - firstRequestTimestamp?: number; - lastPacketReceivedTimestamp?: number; - lastPacketSentTimestamp?: number; - lastRequestTimestamp?: number; - lastResponseTimestamp?: number; - localCandidateId?: string; + localCandidateId: string; nominated?: boolean; - packetsDiscardedOnSend?: number; - packetsReceived?: number; - packetsSent?: number; - priority?: number; - remoteCandidateId?: string; + remoteCandidateId: string; requestsReceived?: number; requestsSent?: number; responsesReceived?: number; responsesSent?: number; - retransmissionsReceived?: number; - retransmissionsSent?: number; - state?: RTCStatsIceCandidatePairState; + state: RTCStatsIceCandidatePairState; totalRoundTripTime?: number; - totalRtt?: number; - transportId?: string; -} - -interface RTCIceGatherOptions { - gatherPolicy?: RTCIceGatherPolicy; - iceservers?: RTCIceServer[]; -} - -interface RTCIceParameters { - password?: string; - usernameFragment?: string; + transportId: string; } interface RTCIceServer { @@ -1301,18 +1249,13 @@ interface RTCIceServer { username?: string; } -interface RTCIdentityProviderOptions { - peerIdentity?: string; - protocol?: string; - usernameHint?: string; -} - -interface RTCInboundRTPStreamStats extends RTCRTPStreamStats { - bytesReceived?: number; - fractionLost?: number; - jitter?: number; - packetsLost?: number; - packetsReceived?: number; +interface RTCInboundRtpStreamStats extends RTCReceivedRtpStreamStats { + firCount?: number; + framesDecoded?: number; + nackCount?: number; + pliCount?: number; + qpSum?: number; + remoteId?: string; } interface RTCLocalSessionDescriptionInit { @@ -1320,23 +1263,6 @@ interface RTCLocalSessionDescriptionInit { type?: RTCSdpType; } -interface RTCMediaStreamTrackStats extends RTCStats { - audioLevel?: number; - echoReturnLoss?: number; - echoReturnLossEnhancement?: number; - frameHeight?: number; - frameWidth?: number; - framesCorrupted?: number; - framesDecoded?: number; - framesDropped?: number; - framesPerSecond?: number; - framesReceived?: number; - framesSent?: number; - remoteSource?: boolean; - ssrcIds?: string[]; - trackIdentifier?: string; -} - interface RTCOfferAnswerOptions { } @@ -1346,18 +1272,20 @@ interface RTCOfferOptions extends RTCOfferAnswerOptions { offerToReceiveVideo?: boolean; } -interface RTCOutboundRTPStreamStats extends RTCRTPStreamStats { - bytesSent?: number; - packetsSent?: number; - roundTripTime?: number; - targetBitrate?: number; +interface RTCOutboundRtpStreamStats extends RTCSentRtpStreamStats { + firCount?: number; + framesEncoded?: number; + nackCount?: number; + pliCount?: number; + qpSum?: number; + remoteId?: string; } interface RTCPeerConnectionIceErrorEventInit extends EventInit { address?: string | null; errorCode: number; + errorText?: string; port?: number | null; - statusText?: string; url?: string; } @@ -1366,23 +1294,11 @@ interface RTCPeerConnectionIceEventInit extends EventInit { url?: string | null; } -interface RTCRTPStreamStats extends RTCStats { - associateStatsId?: string; - codecId?: string; - firCount?: number; - isRemote?: boolean; - mediaTrackId?: string; - mediaType?: string; - nackCount?: number; - pliCount?: number; - sliCount?: number; - ssrc?: string; - transportId?: string; -} - -interface RTCRtcpFeedback { - parameter?: string; - type?: string; +interface RTCReceivedRtpStreamStats extends RTCRtpStreamStats { + jitter?: number; + packetsDiscarded?: number; + packetsLost?: number; + packetsReceived?: number; } interface RTCRtcpParameters { @@ -1418,27 +1334,16 @@ interface RTCRtpContributingSource { audioLevel?: number; rtpTimestamp: number; source: number; - timestamp: number; + timestamp: DOMHighResTimeStamp; } interface RTCRtpEncodingParameters extends RTCRtpCodingParameters { active?: boolean; maxBitrate?: number; + priority?: RTCPriorityType; scaleResolutionDownBy?: number; } -interface RTCRtpFecParameters { - mechanism?: string; - ssrc?: number; -} - -interface RTCRtpHeaderExtension { - kind?: string; - preferredEncrypt?: boolean; - preferredId?: number; - uri?: string; -} - interface RTCRtpHeaderExtensionCapability { uri?: string; } @@ -1458,17 +1363,20 @@ interface RTCRtpParameters { interface RTCRtpReceiveParameters extends RTCRtpParameters { } -interface RTCRtpRtxParameters { - ssrc?: number; -} - interface RTCRtpSendParameters extends RTCRtpParameters { + degradationPreference?: RTCDegradationPreference; encodings: RTCRtpEncodingParameters[]; transactionId: string; } +interface RTCRtpStreamStats extends RTCStats { + codecId?: string; + kind: string; + ssrc: number; + transportId?: string; +} + interface RTCRtpSynchronizationSource extends RTCRtpContributingSource { - voiceActivityFlag?: boolean; } interface RTCRtpTransceiverInit { @@ -1477,10 +1385,9 @@ interface RTCRtpTransceiverInit { streams?: MediaStream[]; } -interface RTCRtpUnhandled { - muxId?: string; - payloadType?: number; - ssrc?: number; +interface RTCSentRtpStreamStats extends RTCRtpStreamStats { + bytesSent?: number; + packetsSent?: number; } interface RTCSessionDescriptionInit { @@ -1488,33 +1395,10 @@ interface RTCSessionDescriptionInit { type: RTCSdpType; } -interface RTCSrtpKeyParam { - keyMethod?: string; - keySalt?: string; - lifetime?: string; - mkiLength?: number; - mkiValue?: number; -} - -interface RTCSrtpSdesParameters { - cryptoSuite?: string; - keyParams?: RTCSrtpKeyParam[]; - sessionParams?: string[]; - tag?: number; -} - -interface RTCSsrcRange { - max?: number; - min?: number; -} - interface RTCStats { - id?: string; - timestamp?: number; - type?: RTCStatsType; -} - -interface RTCStatsReport { + id: string; + timestamp: DOMHighResTimeStamp; + type: RTCStatsType; } interface RTCTrackEventInit extends EventInit { @@ -1528,17 +1412,12 @@ interface RTCTransportStats extends RTCStats { bytesReceived?: number; bytesSent?: number; dtlsCipher?: string; - dtlsState?: RTCDtlsTransportState; - iceRole?: RTCIceRole; + dtlsState: RTCDtlsTransportState; localCertificateId?: string; - packetsReceived?: number; - packetsSent?: number; remoteCertificateId?: string; rtcpTransportStatsId?: string; - selectedCandidatePairChanges?: number; selectedCandidatePairId?: string; srtpCipher?: string; - tlsGroup?: string; tlsVersion?: string; } @@ -1656,7 +1535,7 @@ interface RsaKeyGenParams extends Algorithm { } interface RsaOaepParams extends Algorithm { - label?: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer; + label?: BufferSource; } interface RsaOtherPrimesInfo { @@ -1692,23 +1571,30 @@ interface ScrollToOptions extends ScrollOptions { interface SecurityPolicyViolationEventInit extends EventInit { blockedURI?: string; + blockedURL?: string; + colno?: number; columnNumber?: number; + disposition: SecurityPolicyViolationEventDisposition; documentURI?: string; - effectiveDirective?: string; + documentURL: string; + effectiveDirective: string; lineNumber?: number; - originalPolicy?: string; + lineno?: number; + originalPolicy: string; referrer?: string; + sample?: string; sourceFile?: string; - statusCode?: number; - violatedDirective?: string; + statusCode: number; } interface ShadowRootInit { delegatesFocus?: boolean; mode: ShadowRootMode; + slotAssignment?: SlotAssignmentMode; } interface ShareData { + files?: File[]; text?: string; title?: string; url?: string; @@ -1719,11 +1605,6 @@ interface SpeechRecognitionErrorEventInit extends EventInit { message?: string; } -interface SpeechRecognitionEventInit extends EventInit { - resultIndex?: number; - results: SpeechRecognitionResultList; -} - interface SpeechSynthesisErrorEventInit extends SpeechSynthesisEventInit { error: SpeechSynthesisErrorCode; } @@ -1760,16 +1641,6 @@ interface StorageEventInit extends EventInit { url?: string; } -interface StoreExceptionsInformation extends ExceptionInformation { - detailURI?: string | null; - explanationString?: string | null; - siteName?: string | null; -} - -interface StoreSiteSpecificExceptionsInformation extends StoreExceptionsInformation { - arrayOfDomainStrings?: string[]; -} - interface StreamPipeOptions { preventAbort?: boolean; preventCancel?: boolean; @@ -1794,6 +1665,10 @@ interface StreamPipeOptions { signal?: AbortSignal; } +interface SubmitEventInit extends EventInit { + submitter?: HTMLElement | null; +} + interface TextDecodeOptions { stream?: boolean; } @@ -1853,6 +1728,8 @@ interface TransitionEventInit extends EventInit { interface UIEventInit extends EventInit { detail?: number; view?: Window | null; + /** @deprecated */ + which?: number; } interface ULongRange { @@ -1875,21 +1752,16 @@ interface UnderlyingSource { type?: undefined; } -interface VRDisplayEventInit extends EventInit { - display: VRDisplay; - reason?: VRDisplayEventReason; -} - -interface VRLayer { - leftBounds?: number[] | Float32Array | null; - rightBounds?: number[] | Float32Array | null; - source?: HTMLCanvasElement | null; -} - -interface VRStageParameters { - sittingToStandingTransform?: Float32Array; - sizeX?: number; - sizeY?: number; +interface VideoConfiguration { + bitrate: number; + colorGamut?: ColorGamut; + contentType: string; + framerate: number; + hdrMetadataType?: HdrMetadataType; + height: number; + scalabilityMode?: string; + transferFunction?: TransferFunction; + width: number; } interface WaveShaperOptions extends AudioNodeOptions { @@ -1920,6 +1792,10 @@ interface WheelEventInit extends MouseEventInit { deltaZ?: number; } +interface WindowPostMessageOptions extends PostMessageOptions { + targetOrigin?: string; +} + interface WorkerOptions { credentials?: RequestCredentials; name?: string; @@ -1930,9 +1806,28 @@ interface WorkletOptions { credentials?: RequestCredentials; } -interface EventListener { - (evt: Event): void; -} +type EventListener = ((event: Event) => void) | { handleEvent(event: Event): void; }; + +type NodeFilter = ((node: Node) => number) | { acceptNode(node: Node): number; }; + +declare var NodeFilter: { + readonly FILTER_ACCEPT: number; + readonly FILTER_REJECT: number; + readonly FILTER_SKIP: number; + readonly SHOW_ALL: number; + readonly SHOW_ATTRIBUTE: number; + readonly SHOW_CDATA_SECTION: number; + readonly SHOW_COMMENT: number; + readonly SHOW_DOCUMENT: number; + readonly SHOW_DOCUMENT_FRAGMENT: number; + readonly SHOW_DOCUMENT_TYPE: number; + readonly SHOW_ELEMENT: number; + readonly SHOW_ENTITY: number; + readonly SHOW_ENTITY_REFERENCE: number; + readonly SHOW_NOTATION: number; + readonly SHOW_PROCESSING_INSTRUCTION: number; + readonly SHOW_TEXT: number; +}; type XPathNSResolver = ((prefix: string | null) => string | null) | { lookupNamespaceURI(prefix: string | null): string | null; }; @@ -1944,6 +1839,45 @@ interface ANGLE_instanced_arrays { readonly VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE: GLenum; } +interface ARIAMixin { + ariaAtomic: string; + ariaAutoComplete: string; + ariaBusy: string; + ariaChecked: string; + ariaColCount: string; + ariaColIndex: string; + ariaColSpan: string; + ariaCurrent: string; + ariaDisabled: string; + ariaExpanded: string; + ariaHasPopup: string; + ariaHidden: string; + ariaKeyShortcuts: string; + ariaLabel: string; + ariaLevel: string; + ariaLive: string; + ariaModal: string; + ariaMultiLine: string; + ariaMultiSelectable: string; + ariaOrientation: string; + ariaPlaceholder: string; + ariaPosInSet: string; + ariaPressed: string; + ariaReadOnly: string; + ariaRequired: string; + ariaRoleDescription: string; + ariaRowCount: string; + ariaRowIndex: string; + ariaRowSpan: string; + ariaSelected: string; + ariaSetSize: string; + ariaSort: string; + ariaValueMax: string; + ariaValueMin: string; + ariaValueNow: string; + ariaValueText: string; +} + /** A controller object that allows you to abort one or more DOM requests as and when desired. */ interface AbortController { /** @@ -1957,7 +1891,7 @@ interface AbortController { } declare var AbortController: { - prototype: AbortController; + readonly prototype: AbortController; new(): AbortController; }; @@ -1973,13 +1907,13 @@ interface AbortSignal extends EventTarget { readonly aborted: boolean; onabort: ((this: AbortSignal, ev: Event) => any) | null; addEventListener(type: K, listener: (this: AbortSignal, ev: AbortSignalEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; + addEventListener(type: string, listener: EventListener, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: AbortSignal, ev: AbortSignalEventMap[K]) => any, options?: boolean | EventListenerOptions): void; - removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; + removeEventListener(type: string, listener: EventListener, options?: boolean | EventListenerOptions): void; } declare var AbortSignal: { - prototype: AbortSignal; + readonly prototype: AbortSignal; new(): AbortSignal; }; @@ -2007,7 +1941,7 @@ interface AbstractRange { } declare var AbstractRange: { - prototype: AbstractRange; + readonly prototype: AbstractRange; new(): AbstractRange; }; @@ -2018,17 +1952,9 @@ interface AbstractWorkerEventMap { interface AbstractWorker { onerror: ((this: AbstractWorker, ev: ErrorEvent) => any) | null; addEventListener(type: K, listener: (this: AbstractWorker, ev: AbstractWorkerEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; + addEventListener(type: string, listener: EventListener, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: AbstractWorker, ev: AbstractWorkerEventMap[K]) => any, options?: boolean | EventListenerOptions): void; - removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; -} - -interface AesCfbParams extends Algorithm { - iv: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer; -} - -interface AesCmacParams extends Algorithm { - length: number; + removeEventListener(type: string, listener: EventListener, options?: boolean | EventListenerOptions): void; } /** A node able to provide real-time frequency and time-domain analysis information. It is an AudioNode that passes the audio stream unchanged from the input to the output, but allows you to take the generated data, process it, and create audio visualizations. */ @@ -2045,18 +1971,19 @@ interface AnalyserNode extends AudioNode { } declare var AnalyserNode: { - prototype: AnalyserNode; + readonly prototype: AnalyserNode; new(context: BaseAudioContext, options?: AnalyserOptions): AnalyserNode; }; interface Animatable { animate(keyframes: Keyframe[] | PropertyIndexedKeyframes | null, options?: number | KeyframeAnimationOptions): Animation; - getAnimations(): Animation[]; + getAnimations(options?: GetAnimationsOptions): Animation[]; } interface AnimationEventMap { "cancel": AnimationPlaybackEvent; "finish": AnimationPlaybackEvent; + "remove": Event; } interface Animation extends EventTarget { @@ -2066,26 +1993,30 @@ interface Animation extends EventTarget { id: string; oncancel: ((this: Animation, ev: AnimationPlaybackEvent) => any) | null; onfinish: ((this: Animation, ev: AnimationPlaybackEvent) => any) | null; + onremove: ((this: Animation, ev: Event) => any) | null; readonly pending: boolean; readonly playState: AnimationPlayState; playbackRate: number; readonly ready: Promise; + readonly replaceState: AnimationReplaceState; startTime: number | null; timeline: AnimationTimeline | null; cancel(): void; + commitStyles(): void; finish(): void; pause(): void; + persist(): void; play(): void; reverse(): void; updatePlaybackRate(playbackRate: number): void; addEventListener(type: K, listener: (this: Animation, ev: AnimationEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; + addEventListener(type: string, listener: EventListener, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: Animation, ev: AnimationEventMap[K]) => any, options?: boolean | EventListenerOptions): void; - removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; + removeEventListener(type: string, listener: EventListener, options?: boolean | EventListenerOptions): void; } declare var Animation: { - prototype: Animation; + readonly prototype: Animation; new(effect?: AnimationEffect | null, timeline?: AnimationTimeline | null): Animation; }; @@ -2096,7 +2027,7 @@ interface AnimationEffect { } declare var AnimationEffect: { - prototype: AnimationEffect; + readonly prototype: AnimationEffect; new(): AnimationEffect; }; @@ -2108,7 +2039,7 @@ interface AnimationEvent extends Event { } declare var AnimationEvent: { - prototype: AnimationEvent; + readonly prototype: AnimationEvent; new(type: string, animationEventInitDict?: AnimationEventInit): AnimationEvent; }; @@ -2123,7 +2054,7 @@ interface AnimationPlaybackEvent extends Event { } declare var AnimationPlaybackEvent: { - prototype: AnimationPlaybackEvent; + readonly prototype: AnimationPlaybackEvent; new(type: string, eventInitDict?: AnimationPlaybackEventInit): AnimationPlaybackEvent; }; @@ -2132,69 +2063,10 @@ interface AnimationTimeline { } declare var AnimationTimeline: { - prototype: AnimationTimeline; + readonly prototype: AnimationTimeline; new(): AnimationTimeline; }; -interface ApplicationCacheEventMap { - "cached": Event; - "checking": Event; - "downloading": Event; - "error": Event; - "noupdate": Event; - "obsolete": Event; - "progress": ProgressEvent; - "updateready": Event; -} - -interface ApplicationCache extends EventTarget { - /** @deprecated */ - oncached: ((this: ApplicationCache, ev: Event) => any) | null; - /** @deprecated */ - onchecking: ((this: ApplicationCache, ev: Event) => any) | null; - /** @deprecated */ - ondownloading: ((this: ApplicationCache, ev: Event) => any) | null; - /** @deprecated */ - onerror: ((this: ApplicationCache, ev: Event) => any) | null; - /** @deprecated */ - onnoupdate: ((this: ApplicationCache, ev: Event) => any) | null; - /** @deprecated */ - onobsolete: ((this: ApplicationCache, ev: Event) => any) | null; - /** @deprecated */ - onprogress: ((this: ApplicationCache, ev: ProgressEvent) => any) | null; - /** @deprecated */ - onupdateready: ((this: ApplicationCache, ev: Event) => any) | null; - /** @deprecated */ - readonly status: number; - /** @deprecated */ - abort(): void; - /** @deprecated */ - swapCache(): void; - /** @deprecated */ - update(): void; - readonly CHECKING: number; - readonly DOWNLOADING: number; - readonly IDLE: number; - readonly OBSOLETE: number; - readonly UNCACHED: number; - readonly UPDATEREADY: number; - addEventListener(type: K, listener: (this: ApplicationCache, ev: ApplicationCacheEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; - removeEventListener(type: K, listener: (this: ApplicationCache, ev: ApplicationCacheEventMap[K]) => any, options?: boolean | EventListenerOptions): void; - removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; -} - -declare var ApplicationCache: { - prototype: ApplicationCache; - new(): ApplicationCache; - readonly CHECKING: number; - readonly DOWNLOADING: number; - readonly IDLE: number; - readonly OBSOLETE: number; - readonly UNCACHED: number; - readonly UPDATEREADY: number; -}; - /** A DOM element's attribute as an object. In most DOM methods, you will probably directly retrieve the attribute as a string (e.g., Element.getAttribute(), but certain functions (e.g., Element.getAttributeNode()) or means of iterating give Attr types. */ interface Attr extends Node { readonly localName: string; @@ -2208,7 +2080,7 @@ interface Attr extends Node { } declare var Attr: { - prototype: Attr; + readonly prototype: Attr; new(): Attr; }; @@ -2224,7 +2096,7 @@ interface AudioBuffer { } declare var AudioBuffer: { - prototype: AudioBuffer; + readonly prototype: AudioBuffer; new(options: AudioBufferOptions): AudioBuffer; }; @@ -2238,36 +2110,34 @@ interface AudioBufferSourceNode extends AudioScheduledSourceNode { readonly playbackRate: AudioParam; start(when?: number, offset?: number, duration?: number): void; addEventListener(type: K, listener: (this: AudioBufferSourceNode, ev: AudioScheduledSourceNodeEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; + addEventListener(type: string, listener: EventListener, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: AudioBufferSourceNode, ev: AudioScheduledSourceNodeEventMap[K]) => any, options?: boolean | EventListenerOptions): void; - removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; + removeEventListener(type: string, listener: EventListener, options?: boolean | EventListenerOptions): void; } declare var AudioBufferSourceNode: { - prototype: AudioBufferSourceNode; + readonly prototype: AudioBufferSourceNode; new(context: BaseAudioContext, options?: AudioBufferSourceOptions): AudioBufferSourceNode; }; /** An audio-processing graph built from audio modules linked together, each represented by an AudioNode. */ interface AudioContext extends BaseAudioContext { readonly baseLatency: number; - readonly outputLatency: number; close(): Promise; createMediaElementSource(mediaElement: HTMLMediaElement): MediaElementAudioSourceNode; createMediaStreamDestination(): MediaStreamAudioDestinationNode; createMediaStreamSource(mediaStream: MediaStream): MediaStreamAudioSourceNode; - createMediaStreamTrackSource(mediaStreamTrack: MediaStreamTrack): MediaStreamTrackAudioSourceNode; getOutputTimestamp(): AudioTimestamp; resume(): Promise; suspend(): Promise; addEventListener(type: K, listener: (this: AudioContext, ev: BaseAudioContextEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; + addEventListener(type: string, listener: EventListener, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: AudioContext, ev: BaseAudioContextEventMap[K]) => any, options?: boolean | EventListenerOptions): void; - removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; + removeEventListener(type: string, listener: EventListener, options?: boolean | EventListenerOptions): void; } declare var AudioContext: { - prototype: AudioContext; + readonly prototype: AudioContext; new(contextOptions?: AudioContextOptions): AudioContext; }; @@ -2277,7 +2147,7 @@ interface AudioDestinationNode extends AudioNode { } declare var AudioDestinationNode: { - prototype: AudioDestinationNode; + readonly prototype: AudioDestinationNode; new(): AudioDestinationNode; }; @@ -2299,7 +2169,7 @@ interface AudioListener { } declare var AudioListener: { - prototype: AudioListener; + readonly prototype: AudioListener; new(): AudioListener; }; @@ -2323,7 +2193,7 @@ interface AudioNode extends EventTarget { } declare var AudioNode: { - prototype: AudioNode; + readonly prototype: AudioNode; new(): AudioNode; }; @@ -2344,7 +2214,7 @@ interface AudioParam { } declare var AudioParam: { - prototype: AudioParam; + readonly prototype: AudioParam; new(): AudioParam; }; @@ -2353,21 +2223,24 @@ interface AudioParamMap { } declare var AudioParamMap: { - prototype: AudioParamMap; + readonly prototype: AudioParamMap; new(): AudioParamMap; }; /** The Web Audio API events that occur when a ScriptProcessorNode input buffer is ready to be processed. - * @deprecated As of the August 29 2014 Web Audio API spec publication, this feature has been marked as deprecated, and is soon to be replaced by AudioWorklet. - */ + * @deprecated As of the August 29 2014 Web Audio API spec publication, this feature has been marked as deprecated, and is soon to be replaced by AudioWorklet. */ interface AudioProcessingEvent extends Event { + /** @deprecated */ readonly inputBuffer: AudioBuffer; + /** @deprecated */ readonly outputBuffer: AudioBuffer; + /** @deprecated */ readonly playbackTime: number; } +/** @deprecated */ declare var AudioProcessingEvent: { - prototype: AudioProcessingEvent; + readonly prototype: AudioProcessingEvent; new(type: string, eventInitDict: AudioProcessingEventInit): AudioProcessingEvent; }; @@ -2380,13 +2253,13 @@ interface AudioScheduledSourceNode extends AudioNode { start(when?: number): void; stop(when?: number): void; addEventListener(type: K, listener: (this: AudioScheduledSourceNode, ev: AudioScheduledSourceNodeEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; + addEventListener(type: string, listener: EventListener, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: AudioScheduledSourceNode, ev: AudioScheduledSourceNodeEventMap[K]) => any, options?: boolean | EventListenerOptions): void; - removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; + removeEventListener(type: string, listener: EventListener, options?: boolean | EventListenerOptions): void; } declare var AudioScheduledSourceNode: { - prototype: AudioScheduledSourceNode; + readonly prototype: AudioScheduledSourceNode; new(): AudioScheduledSourceNode; }; @@ -2394,7 +2267,7 @@ interface AudioWorklet extends Worklet { } declare var AudioWorklet: { - prototype: AudioWorklet; + readonly prototype: AudioWorklet; new(): AudioWorklet; }; @@ -2407,13 +2280,13 @@ interface AudioWorkletNode extends AudioNode { readonly parameters: AudioParamMap; readonly port: MessagePort; addEventListener(type: K, listener: (this: AudioWorkletNode, ev: AudioWorkletNodeEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; + addEventListener(type: string, listener: EventListener, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: AudioWorkletNode, ev: AudioWorkletNodeEventMap[K]) => any, options?: boolean | EventListenerOptions): void; - removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; + removeEventListener(type: string, listener: EventListener, options?: boolean | EventListenerOptions): void; } declare var AudioWorkletNode: { - prototype: AudioWorkletNode; + readonly prototype: AudioWorkletNode; new(context: BaseAudioContext, name: string, options?: AudioWorkletNodeOptions): AudioWorkletNode; }; @@ -2424,7 +2297,7 @@ interface AuthenticatorAssertionResponse extends AuthenticatorResponse { } declare var AuthenticatorAssertionResponse: { - prototype: AuthenticatorAssertionResponse; + readonly prototype: AuthenticatorAssertionResponse; new(): AuthenticatorAssertionResponse; }; @@ -2433,7 +2306,7 @@ interface AuthenticatorAttestationResponse extends AuthenticatorResponse { } declare var AuthenticatorAttestationResponse: { - prototype: AuthenticatorAttestationResponse; + readonly prototype: AuthenticatorAttestationResponse; new(): AuthenticatorAttestationResponse; }; @@ -2442,7 +2315,7 @@ interface AuthenticatorResponse { } declare var AuthenticatorResponse: { - prototype: AuthenticatorResponse; + readonly prototype: AuthenticatorResponse; new(): AuthenticatorResponse; }; @@ -2451,7 +2324,7 @@ interface BarProp { } declare var BarProp: { - prototype: BarProp; + readonly prototype: BarProp; new(): BarProp; }; @@ -2482,18 +2355,19 @@ interface BaseAudioContext extends EventTarget { createOscillator(): OscillatorNode; createPanner(): PannerNode; createPeriodicWave(real: number[] | Float32Array, imag: number[] | Float32Array, constraints?: PeriodicWaveConstraints): PeriodicWave; + /** @deprecated */ createScriptProcessor(bufferSize?: number, numberOfInputChannels?: number, numberOfOutputChannels?: number): ScriptProcessorNode; createStereoPanner(): StereoPannerNode; createWaveShaper(): WaveShaperNode; decodeAudioData(audioData: ArrayBuffer, successCallback?: DecodeSuccessCallback | null, errorCallback?: DecodeErrorCallback | null): Promise; addEventListener(type: K, listener: (this: BaseAudioContext, ev: BaseAudioContextEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; + addEventListener(type: string, listener: EventListener, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: BaseAudioContext, ev: BaseAudioContextEventMap[K]) => any, options?: boolean | EventListenerOptions): void; - removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; + removeEventListener(type: string, listener: EventListener, options?: boolean | EventListenerOptions): void; } declare var BaseAudioContext: { - prototype: BaseAudioContext; + readonly prototype: BaseAudioContext; new(): BaseAudioContext; }; @@ -2503,32 +2377,10 @@ interface BeforeUnloadEvent extends Event { } declare var BeforeUnloadEvent: { - prototype: BeforeUnloadEvent; + readonly prototype: BeforeUnloadEvent; new(): BeforeUnloadEvent; }; -interface BhxBrowser { - readonly lastError: DOMException; - checkMatchesGlobExpression(pattern: string, value: string): boolean; - checkMatchesUriExpression(pattern: string, value: string): boolean; - clearLastError(): void; - currentWindowId(): number; - fireExtensionApiTelemetry(functionName: string, isSucceeded: boolean, isSupported: boolean, errorString: string): void; - genericFunction(functionId: number, destination: any, parameters?: string, callbackId?: number): void; - genericSynchronousFunction(functionId: number, parameters?: string): string; - getExtensionId(): string; - getThisAddress(): any; - registerGenericFunctionCallbackHandler(callbackHandler: Function): void; - registerGenericListenerHandler(eventHandler: Function): void; - setLastError(parameters: string): void; - webPlatformGenericFunction(destination: any, parameters?: string, callbackId?: number): void; -} - -declare var BhxBrowser: { - prototype: BhxBrowser; - new(): BhxBrowser; -}; - /** A simple low-order filter, and is created using the AudioContext.createBiquadFilter() method. It is an AudioNode that can represent different kinds of filters, tone control devices, and graphic equalizers. */ interface BiquadFilterNode extends AudioNode { readonly Q: AudioParam; @@ -2540,7 +2392,7 @@ interface BiquadFilterNode extends AudioNode { } declare var BiquadFilterNode: { - prototype: BiquadFilterNode; + readonly prototype: BiquadFilterNode; new(context: BaseAudioContext, options?: BiquadFilterOptions): BiquadFilterNode; }; @@ -2555,10 +2407,20 @@ interface Blob { } declare var Blob: { - prototype: Blob; + readonly prototype: Blob; new(blobParts?: BlobPart[], options?: BlobPropertyBag): Blob; }; +interface BlobEvent extends Event { + readonly data: Blob; + readonly timecode: DOMHighResTimeStamp; +} + +declare var BlobEvent: { + readonly prototype: BlobEvent; + new(type: string, eventInitDict: BlobEventInit): BlobEvent; +}; + interface Body { readonly body: ReadableStream | null; readonly bodyUsed: boolean; @@ -2590,13 +2452,13 @@ interface BroadcastChannel extends EventTarget { */ postMessage(message: any): void; addEventListener(type: K, listener: (this: BroadcastChannel, ev: BroadcastChannelEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; + addEventListener(type: string, listener: EventListener, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: BroadcastChannel, ev: BroadcastChannelEventMap[K]) => any, options?: boolean | EventListenerOptions): void; - removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; + removeEventListener(type: string, listener: EventListener, options?: boolean | EventListenerOptions): void; } declare var BroadcastChannel: { - prototype: BroadcastChannel; + readonly prototype: BroadcastChannel; new(name: string): BroadcastChannel; }; @@ -2607,7 +2469,7 @@ interface ByteLengthQueuingStrategy extends QueuingStrategy { } declare var ByteLengthQueuingStrategy: { - prototype: ByteLengthQueuingStrategy; + readonly prototype: ByteLengthQueuingStrategy; new(init: QueuingStrategyInit): ByteLengthQueuingStrategy; }; @@ -2616,26 +2478,58 @@ interface CDATASection extends Text { } declare var CDATASection: { - prototype: CDATASection; + readonly prototype: CDATASection; new(): CDATASection; }; +interface CSSAnimation extends Animation { + readonly animationName: string; + addEventListener(type: K, listener: (this: CSSAnimation, ev: AnimationEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; + addEventListener(type: string, listener: EventListener, options?: boolean | AddEventListenerOptions): void; + removeEventListener(type: K, listener: (this: CSSAnimation, ev: AnimationEventMap[K]) => any, options?: boolean | EventListenerOptions): void; + removeEventListener(type: string, listener: EventListener, options?: boolean | EventListenerOptions): void; +} + +declare var CSSAnimation: { + readonly prototype: CSSAnimation; + new(): CSSAnimation; +}; + /** A single condition CSS at-rule, which consists of a condition and a statement block. It is a child of CSSGroupingRule. */ interface CSSConditionRule extends CSSGroupingRule { conditionText: string; } declare var CSSConditionRule: { - prototype: CSSConditionRule; + readonly prototype: CSSConditionRule; new(): CSSConditionRule; }; +interface CSSCounterStyleRule extends CSSRule { + additiveSymbols: string; + fallback: string; + name: string; + negative: string; + pad: string; + prefix: string; + range: string; + speakAs: string; + suffix: string; + symbols: string; + system: string; +} + +declare var CSSCounterStyleRule: { + readonly prototype: CSSCounterStyleRule; + new(): CSSCounterStyleRule; +}; + interface CSSFontFaceRule extends CSSRule { readonly style: CSSStyleDeclaration; } declare var CSSFontFaceRule: { - prototype: CSSFontFaceRule; + readonly prototype: CSSFontFaceRule; new(): CSSFontFaceRule; }; @@ -2647,7 +2541,7 @@ interface CSSGroupingRule extends CSSRule { } declare var CSSGroupingRule: { - prototype: CSSGroupingRule; + readonly prototype: CSSGroupingRule; new(): CSSGroupingRule; }; @@ -2658,7 +2552,7 @@ interface CSSImportRule extends CSSRule { } declare var CSSImportRule: { - prototype: CSSImportRule; + readonly prototype: CSSImportRule; new(): CSSImportRule; }; @@ -2669,7 +2563,7 @@ interface CSSKeyframeRule extends CSSRule { } declare var CSSKeyframeRule: { - prototype: CSSKeyframeRule; + readonly prototype: CSSKeyframeRule; new(): CSSKeyframeRule; }; @@ -2683,7 +2577,7 @@ interface CSSKeyframesRule extends CSSRule { } declare var CSSKeyframesRule: { - prototype: CSSKeyframesRule; + readonly prototype: CSSKeyframesRule; new(): CSSKeyframesRule; }; @@ -2693,7 +2587,7 @@ interface CSSMediaRule extends CSSConditionRule { } declare var CSSMediaRule: { - prototype: CSSMediaRule; + readonly prototype: CSSMediaRule; new(): CSSMediaRule; }; @@ -2704,7 +2598,7 @@ interface CSSNamespaceRule extends CSSRule { } declare var CSSNamespaceRule: { - prototype: CSSNamespaceRule; + readonly prototype: CSSNamespaceRule; new(): CSSNamespaceRule; }; @@ -2715,7 +2609,7 @@ interface CSSPageRule extends CSSGroupingRule { } declare var CSSPageRule: { - prototype: CSSPageRule; + readonly prototype: CSSPageRule; new(): CSSPageRule; }; @@ -2724,6 +2618,7 @@ interface CSSRule { cssText: string; readonly parentRule: CSSRule | null; readonly parentStyleSheet: CSSStyleSheet | null; + /** @deprecated */ readonly type: number; readonly CHARSET_RULE: number; readonly FONT_FACE_RULE: number; @@ -2738,7 +2633,7 @@ interface CSSRule { } declare var CSSRule: { - prototype: CSSRule; + readonly prototype: CSSRule; new(): CSSRule; readonly CHARSET_RULE: number; readonly FONT_FACE_RULE: number; @@ -2760,7 +2655,7 @@ interface CSSRuleList { } declare var CSSRuleList: { - prototype: CSSRuleList; + readonly prototype: CSSRuleList; new(): CSSRuleList; }; @@ -2780,9 +2675,12 @@ interface CSSStyleDeclaration { animationName: string; animationPlayState: string; animationTimingFunction: string; + appearance: string; + aspectRatio: string; backfaceVisibility: string; background: string; backgroundAttachment: string; + backgroundBlendMode: string; backgroundClip: string; backgroundColor: string; backgroundImage: string; @@ -2795,6 +2693,8 @@ interface CSSStyleDeclaration { baselineShift: string; blockSize: string; border: string; + borderBlock: string; + borderBlockColor: string; borderBlockEnd: string; borderBlockEndColor: string; borderBlockEndStyle: string; @@ -2803,6 +2703,8 @@ interface CSSStyleDeclaration { borderBlockStartColor: string; borderBlockStartStyle: string; borderBlockStartWidth: string; + borderBlockStyle: string; + borderBlockWidth: string; borderBottom: string; borderBottomColor: string; borderBottomLeftRadius: string; @@ -2811,12 +2713,16 @@ interface CSSStyleDeclaration { borderBottomWidth: string; borderCollapse: string; borderColor: string; + borderEndEndRadius: string; + borderEndStartRadius: string; borderImage: string; borderImageOutset: string; borderImageRepeat: string; borderImageSlice: string; borderImageSource: string; borderImageWidth: string; + borderInline: string; + borderInlineColor: string; borderInlineEnd: string; borderInlineEndColor: string; borderInlineEndStyle: string; @@ -2825,6 +2731,8 @@ interface CSSStyleDeclaration { borderInlineStartColor: string; borderInlineStartStyle: string; borderInlineStartWidth: string; + borderInlineStyle: string; + borderInlineWidth: string; borderLeft: string; borderLeftColor: string; borderLeftStyle: string; @@ -2835,6 +2743,8 @@ interface CSSStyleDeclaration { borderRightStyle: string; borderRightWidth: string; borderSpacing: string; + borderStartEndRadius: string; + borderStartStartRadius: string; borderStyle: string; borderTop: string; borderTopColor: string; @@ -2858,6 +2768,7 @@ interface CSSStyleDeclaration { color: string; colorInterpolation: string; colorInterpolationFilters: string; + colorScheme: string; columnCount: string; columnFill: string; columnGap: string; @@ -2868,9 +2779,11 @@ interface CSSStyleDeclaration { columnSpan: string; columnWidth: string; columns: string; + contain: string; content: string; counterIncrement: string; counterReset: string; + counterSet: string; cssFloat: string; cssText: string; cursor: string; @@ -2896,20 +2809,22 @@ interface CSSStyleDeclaration { fontFamily: string; fontFeatureSettings: string; fontKerning: string; + fontOpticalSizing: string; fontSize: string; fontSizeAdjust: string; fontStretch: string; fontStyle: string; fontSynthesis: string; fontVariant: string; + fontVariantAlternates: string; fontVariantCaps: string; fontVariantEastAsian: string; fontVariantLigatures: string; fontVariantNumeric: string; fontVariantPosition: string; + fontVariationSettings: string; fontWeight: string; gap: string; - glyphOrientationVertical: string; grid: string; gridArea: string; gridAutoColumns: string; @@ -2930,9 +2845,18 @@ interface CSSStyleDeclaration { gridTemplateRows: string; height: string; hyphens: string; + /** @deprecated */ imageOrientation: string; imageRendering: string; inlineSize: string; + inset: string; + insetBlock: string; + insetBlockEnd: string; + insetBlockStart: string; + insetInline: string; + insetInlineEnd: string; + insetInlineStart: string; + isolation: string; justifyContent: string; justifyItems: string; justifySelf: string; @@ -2947,9 +2871,11 @@ interface CSSStyleDeclaration { listStylePosition: string; listStyleType: string; margin: string; + marginBlock: string; marginBlockEnd: string; marginBlockStart: string; marginBottom: string; + marginInline: string; marginInlineEnd: string; marginInlineStart: string; marginLeft: string; @@ -2960,11 +2886,6 @@ interface CSSStyleDeclaration { markerMid: string; markerStart: string; mask: string; - maskComposite: string; - maskImage: string; - maskPosition: string; - maskRepeat: string; - maskSize: string; maskType: string; maxBlockSize: string; maxHeight: string; @@ -2974,8 +2895,14 @@ interface CSSStyleDeclaration { minHeight: string; minInlineSize: string; minWidth: string; + mixBlendMode: string; objectFit: string; objectPosition: string; + offset: string; + offsetAnchor: string; + offsetDistance: string; + offsetPath: string; + offsetRotate: string; opacity: string; order: string; orphans: string; @@ -2995,9 +2922,11 @@ interface CSSStyleDeclaration { overscrollBehaviorX: string; overscrollBehaviorY: string; padding: string; + paddingBlock: string; paddingBlockEnd: string; paddingBlockStart: string; paddingBottom: string; + paddingInline: string; paddingInlineEnd: string; paddingInlineStart: string; paddingLeft: string; @@ -3020,10 +2949,36 @@ interface CSSStyleDeclaration { right: string; rotate: string; rowGap: string; - rubyAlign: string; rubyPosition: string; scale: string; scrollBehavior: string; + scrollMargin: string; + scrollMarginBlock: string; + scrollMarginBlockEnd: string; + scrollMarginBlockStart: string; + scrollMarginBottom: string; + scrollMarginInline: string; + scrollMarginInlineEnd: string; + scrollMarginInlineStart: string; + scrollMarginLeft: string; + scrollMarginRight: string; + scrollMarginTop: string; + scrollPadding: string; + scrollPaddingBlock: string; + scrollPaddingBlockEnd: string; + scrollPaddingBlockStart: string; + scrollPaddingBottom: string; + scrollPaddingInline: string; + scrollPaddingInlineEnd: string; + scrollPaddingInlineStart: string; + scrollPaddingLeft: string; + scrollPaddingRight: string; + scrollPaddingTop: string; + scrollSnapAlign: string; + scrollSnapType: string; + shapeImageThreshold: string; + shapeMargin: string; + shapeOutside: string; shapeRendering: string; stopColor: string; stopOpacity: string; @@ -3044,18 +2999,20 @@ interface CSSStyleDeclaration { textDecoration: string; textDecorationColor: string; textDecorationLine: string; + textDecorationSkipInk: string; textDecorationStyle: string; + textDecorationThickness: string; textEmphasis: string; textEmphasisColor: string; textEmphasisPosition: string; textEmphasisStyle: string; textIndent: string; - textJustify: string; textOrientation: string; textOverflow: string; textRendering: string; textShadow: string; textTransform: string; + textUnderlineOffset: string; textUnderlinePosition: string; top: string; touchAction: string; @@ -3184,7 +3141,6 @@ interface CSSStyleDeclaration { webkitPerspective: string; /** @deprecated */ webkitPerspectiveOrigin: string; - webkitTapHighlightColor: string; /** @deprecated */ webkitTextFillColor: string; /** @deprecated */ @@ -3219,11 +3175,10 @@ interface CSSStyleDeclaration { willChange: string; wordBreak: string; wordSpacing: string; + /** @deprecated */ wordWrap: string; writingMode: string; zIndex: string; - /** @deprecated */ - zoom: string; getPropertyPriority(property: string): string; getPropertyValue(property: string): string; item(index: number): string; @@ -3233,7 +3188,7 @@ interface CSSStyleDeclaration { } declare var CSSStyleDeclaration: { - prototype: CSSStyleDeclaration; + readonly prototype: CSSStyleDeclaration; new(): CSSStyleDeclaration; }; @@ -3244,7 +3199,7 @@ interface CSSStyleRule extends CSSRule { } declare var CSSStyleRule: { - prototype: CSSStyleRule; + readonly prototype: CSSStyleRule; new(): CSSStyleRule; }; @@ -3252,15 +3207,18 @@ declare var CSSStyleRule: { interface CSSStyleSheet extends StyleSheet { readonly cssRules: CSSRuleList; readonly ownerRule: CSSRule | null; + /** @deprecated */ readonly rules: CSSRuleList; + /** @deprecated */ addRule(selector?: string, style?: string, index?: number): number; deleteRule(index: number): void; insertRule(rule: string, index?: number): number; + /** @deprecated */ removeRule(index?: number): void; } declare var CSSStyleSheet: { - prototype: CSSStyleSheet; + readonly prototype: CSSStyleSheet; new(): CSSStyleSheet; }; @@ -3269,10 +3227,23 @@ interface CSSSupportsRule extends CSSConditionRule { } declare var CSSSupportsRule: { - prototype: CSSSupportsRule; + readonly prototype: CSSSupportsRule; new(): CSSSupportsRule; }; +interface CSSTransition extends Animation { + readonly transitionProperty: string; + addEventListener(type: K, listener: (this: CSSTransition, ev: AnimationEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; + addEventListener(type: string, listener: EventListener, options?: boolean | AddEventListenerOptions): void; + removeEventListener(type: K, listener: (this: CSSTransition, ev: AnimationEventMap[K]) => any, options?: boolean | EventListenerOptions): void; + removeEventListener(type: string, listener: EventListener, options?: boolean | EventListenerOptions): void; +} + +declare var CSSTransition: { + readonly prototype: CSSTransition; + new(): CSSTransition; +}; + /** 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. */ interface Cache { add(request: RequestInfo): Promise; @@ -3285,7 +3256,7 @@ interface Cache { } declare var Cache: { - prototype: Cache; + readonly prototype: Cache; new(): Cache; }; @@ -3299,7 +3270,7 @@ interface CacheStorage { } declare var CacheStorage: { - prototype: CacheStorage; + readonly prototype: CacheStorage; new(): CacheStorage; }; @@ -3351,14 +3322,14 @@ interface CanvasGradient { } declare var CanvasGradient: { - prototype: CanvasGradient; + readonly prototype: CanvasGradient; new(): CanvasGradient; }; interface CanvasImageData { - createImageData(sw: number, sh: number): ImageData; + createImageData(sw: number, sh: number, settings?: ImageDataSettings): ImageData; createImageData(imagedata: ImageData): ImageData; - getImageData(sx: number, sy: number, sw: number, sh: number): ImageData; + getImageData(sx: number, sy: number, sw: number, sh: number, settings?: ImageDataSettings): ImageData; putImageData(imagedata: ImageData, dx: number, dy: number): void; putImageData(imagedata: ImageData, dx: number, dy: number, dirtyX: number, dirtyY: number, dirtyWidth: number, dirtyHeight: number): void; } @@ -3369,11 +3340,11 @@ interface CanvasImageSmoothing { } interface CanvasPath { - arc(x: number, y: number, radius: number, startAngle: number, endAngle: number, anticlockwise?: boolean): void; + arc(x: number, y: number, radius: number, startAngle: number, endAngle: number, counterclockwise?: boolean): void; arcTo(x1: number, y1: number, x2: number, y2: number, radius: number): void; bezierCurveTo(cp1x: number, cp1y: number, cp2x: number, cp2y: number, x: number, y: number): void; closePath(): void; - ellipse(x: number, y: number, radiusX: number, radiusY: number, rotation: number, startAngle: number, endAngle: number, anticlockwise?: boolean): void; + ellipse(x: number, y: number, radiusX: number, radiusY: number, rotation: number, startAngle: number, endAngle: number, counterclockwise?: boolean): void; lineTo(x: number, y: number): void; moveTo(x: number, y: number): void; quadraticCurveTo(cpx: number, cpy: number, x: number, y: number): void; @@ -3399,7 +3370,7 @@ interface CanvasPattern { } declare var CanvasPattern: { - prototype: CanvasPattern; + readonly prototype: CanvasPattern; new(): CanvasPattern; }; @@ -3415,7 +3386,7 @@ interface CanvasRenderingContext2D extends CanvasCompositing, CanvasDrawImage, C } declare var CanvasRenderingContext2D: { - prototype: CanvasRenderingContext2D; + readonly prototype: CanvasRenderingContext2D; new(): CanvasRenderingContext2D; }; @@ -3458,27 +3429,14 @@ interface CanvasTransform { interface CanvasUserInterface { drawFocusIfNeeded(element: Element): void; drawFocusIfNeeded(path: Path2D, element: Element): void; - scrollPathIntoView(): void; - scrollPathIntoView(path: Path2D): void; -} - -interface CaretPosition { - readonly offset: number; - readonly offsetNode: Node; - getClientRect(): DOMRect | null; } -declare var CaretPosition: { - prototype: CaretPosition; - new(): CaretPosition; -}; - /** The ChannelMergerNode interface, often used in conjunction with its opposite, ChannelSplitterNode, reunites different mono inputs into a single output. Each input is used to fill a channel of the output. This is useful for accessing each channels separately, e.g. for performing channel mixing where gain must be separately controlled on each channel. */ interface ChannelMergerNode extends AudioNode { } declare var ChannelMergerNode: { - prototype: ChannelMergerNode; + readonly prototype: ChannelMergerNode; new(context: BaseAudioContext, options?: ChannelMergerOptions): ChannelMergerNode; }; @@ -3487,7 +3445,7 @@ interface ChannelSplitterNode extends AudioNode { } declare var ChannelSplitterNode: { - prototype: ChannelSplitterNode; + readonly prototype: ChannelSplitterNode; new(context: BaseAudioContext, options?: ChannelSplitterOptions): ChannelSplitterNode; }; @@ -3504,11 +3462,11 @@ interface CharacterData extends Node, ChildNode, NonDocumentTypeChildNode { } declare var CharacterData: { - prototype: CharacterData; + readonly prototype: CharacterData; new(): CharacterData; }; -interface ChildNode extends Node { +interface ChildNode { /** * Inserts nodes just after node, while replacing strings in nodes with equivalent Text nodes. * @@ -3533,38 +3491,15 @@ interface ChildNode extends Node { replaceWith(...nodes: (Node | string)[]): void; } -interface ClientRect { - bottom: number; - readonly height: number; - left: number; - right: number; - top: number; - readonly width: number; -} - -declare var ClientRect: { - prototype: ClientRect; - new(): ClientRect; -}; - -interface ClientRectList { - readonly length: number; - item(index: number): ClientRect; - [index: number]: ClientRect; -} - -declare var ClientRectList: { - prototype: ClientRectList; - new(): ClientRectList; -}; - interface Clipboard extends EventTarget { + read(): Promise; readText(): Promise; + write(data: ClipboardItems): Promise; writeText(data: string): Promise; } declare var Clipboard: { - prototype: Clipboard; + readonly prototype: Clipboard; new(): Clipboard; }; @@ -3574,10 +3509,20 @@ interface ClipboardEvent extends Event { } declare var ClipboardEvent: { - prototype: ClipboardEvent; + readonly prototype: ClipboardEvent; new(type: string, eventInitDict?: ClipboardEventInit): ClipboardEvent; }; +interface ClipboardItem { + readonly types: ReadonlyArray; + getType(type: string): Promise; +} + +declare var ClipboardItem: { + readonly prototype: ClipboardItem; + new(items: Record, options?: ClipboardItemOptions): ClipboardItem; +}; + /** 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. */ interface CloseEvent extends Event { /** @@ -3595,7 +3540,7 @@ interface CloseEvent extends Event { } declare var CloseEvent: { - prototype: CloseEvent; + readonly prototype: CloseEvent; new(type: string, eventInitDict?: CloseEventInit): CloseEvent; }; @@ -3604,39 +3549,32 @@ interface Comment extends CharacterData { } declare var Comment: { - prototype: Comment; + readonly prototype: Comment; new(data?: string): Comment; }; /** The DOM CompositionEvent represents events that occur due to the user indirectly entering text. */ interface CompositionEvent extends UIEvent { readonly data: string; + /** @deprecated */ + initCompositionEvent(typeArg: string, bubblesArg?: boolean, cancelableArg?: boolean, viewArg?: WindowProxy | null, dataArg?: string): void; } declare var CompositionEvent: { - prototype: CompositionEvent; + readonly prototype: CompositionEvent; new(type: string, eventInitDict?: CompositionEventInit): CompositionEvent; }; -interface ConcatParams extends Algorithm { - algorithmId: Uint8Array; - hash?: string | Algorithm; - partyUInfo: Uint8Array; - partyVInfo: Uint8Array; - privateInfo?: Uint8Array; - publicInfo?: Uint8Array; -} - interface ConstantSourceNode extends AudioScheduledSourceNode { readonly offset: AudioParam; addEventListener(type: K, listener: (this: ConstantSourceNode, ev: AudioScheduledSourceNodeEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; + addEventListener(type: string, listener: EventListener, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: ConstantSourceNode, ev: AudioScheduledSourceNodeEventMap[K]) => any, options?: boolean | EventListenerOptions): void; - removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; + removeEventListener(type: string, listener: EventListener, options?: boolean | EventListenerOptions): void; } declare var ConstantSourceNode: { - prototype: ConstantSourceNode; + readonly prototype: ConstantSourceNode; new(context: BaseAudioContext, options?: ConstantSourceOptions): ConstantSourceNode; }; @@ -3647,7 +3585,7 @@ interface ConvolverNode extends AudioNode { } declare var ConvolverNode: { - prototype: ConvolverNode; + readonly prototype: ConvolverNode; new(context: BaseAudioContext, options?: ConvolverOptions): ConvolverNode; }; @@ -3658,7 +3596,7 @@ interface CountQueuingStrategy extends QueuingStrategy { } declare var CountQueuingStrategy: { - prototype: CountQueuingStrategy; + readonly prototype: CountQueuingStrategy; new(init: QueuingStrategyInit): CountQueuingStrategy; }; @@ -3668,7 +3606,7 @@ interface Credential { } declare var Credential: { - prototype: Credential; + readonly prototype: Credential; new(): Credential; }; @@ -3680,18 +3618,18 @@ interface CredentialsContainer { } declare var CredentialsContainer: { - prototype: CredentialsContainer; + readonly prototype: CredentialsContainer; new(): CredentialsContainer; }; /** Basic cryptography features available in the current context. It allows access to a cryptographically strong random number generator and to cryptographic primitives. */ interface Crypto { readonly subtle: SubtleCrypto; - getRandomValues(array: T): T; + getRandomValues(array: T): T; } declare var Crypto: { - prototype: Crypto; + readonly prototype: Crypto; new(): Crypto; }; @@ -3704,30 +3642,19 @@ interface CryptoKey { } declare var CryptoKey: { - prototype: CryptoKey; + readonly prototype: CryptoKey; new(): CryptoKey; }; -/** The CryptoKeyPair dictionary of the Web Crypto API represents a key pair for an asymmetric cryptography algorithm, also known as a public-key algorithm. */ -interface CryptoKeyPair { - privateKey: CryptoKey; - publicKey: CryptoKey; -} - -declare var CryptoKeyPair: { - prototype: CryptoKeyPair; - new(): CryptoKeyPair; -}; - interface CustomElementRegistry { define(name: string, constructor: CustomElementConstructor, options?: ElementDefinitionOptions): void; - get(name: string): any; + get(name: string): CustomElementConstructor | undefined; upgrade(root: Node): void; - whenDefined(name: string): Promise; + whenDefined(name: string): Promise; } declare var CustomElementRegistry: { - prototype: CustomElementRegistry; + readonly prototype: CustomElementRegistry; new(): CustomElementRegistry; }; @@ -3736,23 +3663,13 @@ interface CustomEvent extends Event { * Returns any custom data event was created with. Typically used for synthetic events. */ readonly detail: T; - initCustomEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, detailArg: T): void; + /** @deprecated */ + initCustomEvent(type: string, bubbles?: boolean, cancelable?: boolean, detail?: T): void; } declare var CustomEvent: { - prototype: CustomEvent; - new(typeArg: string, eventInitDict?: CustomEventInit): CustomEvent; -}; - -/** An error object that contains an error name. */ -interface DOMError { - readonly name: string; - toString(): string; -} - -declare var DOMError: { - prototype: DOMError; - new(): DOMError; + readonly prototype: CustomEvent; + new(type: string, eventInitDict?: CustomEventInit): CustomEvent; }; /** An abnormal event (called an exception) which occurs as a result of calling a method or accessing a property of a web API. */ @@ -3788,7 +3705,7 @@ interface DOMException { } declare var DOMException: { - prototype: DOMException; + readonly prototype: DOMException; new(message?: string, name?: string): DOMException; readonly ABORT_ERR: number; readonly DATA_CLONE_ERR: number; @@ -3827,33 +3744,11 @@ interface DOMImplementation { } declare var DOMImplementation: { - prototype: DOMImplementation; + readonly prototype: DOMImplementation; new(): DOMImplementation; }; 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; @@ -3869,7 +3764,7 @@ interface DOMMatrix extends DOMMatrixReadOnly { } declare var DOMMatrix: { - prototype: DOMMatrix; + readonly prototype: DOMMatrix; new(init?: string | number[]): DOMMatrix; fromFloat32Array(array32: Float32Array): DOMMatrix; fromFloat64Array(array64: Float64Array): DOMMatrix; @@ -3929,7 +3824,7 @@ interface DOMMatrixReadOnly { } declare var DOMMatrixReadOnly: { - prototype: DOMMatrixReadOnly; + readonly prototype: DOMMatrixReadOnly; new(init?: string | number[]): DOMMatrixReadOnly; fromFloat32Array(array32: Float32Array): DOMMatrixReadOnly; fromFloat64Array(array64: Float64Array): DOMMatrixReadOnly; @@ -3952,19 +3847,15 @@ interface DOMParser { } declare var DOMParser: { - prototype: DOMParser; + readonly prototype: DOMParser; new(): DOMParser; }; interface DOMPoint extends DOMPointReadOnly { - w: number; - x: number; - y: number; - z: number; } declare var DOMPoint: { - prototype: DOMPoint; + readonly prototype: DOMPoint; new(x?: number, y?: number, z?: number, w?: number): DOMPoint; fromPoint(other?: DOMPointInit): DOMPoint; }; @@ -3982,7 +3873,7 @@ interface DOMPointReadOnly { } declare var DOMPointReadOnly: { - prototype: DOMPointReadOnly; + readonly prototype: DOMPointReadOnly; new(x?: number, y?: number, z?: number, w?: number): DOMPointReadOnly; fromPoint(other?: DOMPointInit): DOMPointReadOnly; }; @@ -3997,21 +3888,17 @@ interface DOMQuad { } declare var DOMQuad: { - prototype: DOMQuad; + readonly prototype: DOMQuad; new(p1?: DOMPointInit, p2?: DOMPointInit, p3?: DOMPointInit, p4?: DOMPointInit): DOMQuad; fromQuad(other?: DOMQuadInit): DOMQuad; fromRect(other?: DOMRectInit): DOMQuad; }; interface DOMRect extends DOMRectReadOnly { - height: number; - width: number; - x: number; - y: number; } declare var DOMRect: { - prototype: DOMRect; + readonly prototype: DOMRect; new(x?: number, y?: number, width?: number, height?: number): DOMRect; fromRect(other?: DOMRectInit): DOMRect; }; @@ -4026,7 +3913,7 @@ interface DOMRectList { } declare var DOMRectList: { - prototype: DOMRectList; + readonly prototype: DOMRectList; new(): DOMRectList; }; @@ -4043,20 +3930,11 @@ interface DOMRectReadOnly { } declare var DOMRectReadOnly: { - prototype: DOMRectReadOnly; + readonly prototype: DOMRectReadOnly; new(x?: number, y?: number, width?: number, height?: number): DOMRectReadOnly; fromRect(other?: DOMRectInit): DOMRectReadOnly; }; -interface DOMSettableTokenList extends DOMTokenList { - value: string; -} - -declare var DOMSettableTokenList: { - prototype: DOMSettableTokenList; - new(): DOMSettableTokenList; -}; - /** A type returned by some APIs which contains a list of DOMString (strings). */ interface DOMStringList { /** @@ -4075,7 +3953,7 @@ interface DOMStringList { } declare var DOMStringList: { - prototype: DOMStringList; + readonly prototype: DOMStringList; new(): DOMStringList; }; @@ -4085,7 +3963,7 @@ interface DOMStringMap { } declare var DOMStringMap: { - prototype: DOMStringMap; + readonly prototype: DOMStringMap; new(): DOMStringMap; }; @@ -4135,7 +4013,7 @@ interface DOMTokenList { * * Throws an "InvalidCharacterError" DOMException if one of the arguments contains any ASCII whitespace. */ - replace(oldToken: string, newToken: string): void; + replace(token: string, newToken: string): boolean; /** * Returns true if token is in the associated attribute's supported tokens. Returns false otherwise. * @@ -4157,23 +4035,10 @@ interface DOMTokenList { } declare var DOMTokenList: { - prototype: DOMTokenList; + readonly prototype: DOMTokenList; new(): DOMTokenList; }; -interface DataCue extends TextTrackCue { - data: ArrayBuffer; - addEventListener(type: K, listener: (this: DataCue, ev: TextTrackCueEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; - removeEventListener(type: K, listener: (this: DataCue, ev: TextTrackCueEventMap[K]) => any, options?: boolean | EventListenerOptions): void; - removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; -} - -declare var DataCue: { - prototype: DataCue; - new(): DataCue; -}; - /** Used to hold the data that is being dragged during a drag and drop operation. It may hold one or more data items, each of one or more data types. For more information about drag and drop, see HTML Drag and Drop API. */ interface DataTransfer { /** @@ -4223,7 +4088,7 @@ interface DataTransfer { } declare var DataTransfer: { - prototype: DataTransfer; + readonly prototype: DataTransfer; new(): DataTransfer; }; @@ -4245,11 +4110,11 @@ interface DataTransferItem { * Invokes the callback with the string data as the argument, if the drag data item kind is text. */ getAsString(callback: FunctionStringCallback | null): void; - webkitGetAsEntry(): any; + webkitGetAsEntry(): FileSystemEntry | null; } declare var DataTransferItem: { - prototype: DataTransferItem; + readonly prototype: DataTransferItem; new(): DataTransferItem; }; @@ -4268,54 +4133,28 @@ interface DataTransferItemList { * Removes all the entries in the drag data store. */ clear(): void; - item(index: number): DataTransferItem; /** * Removes the indexth entry in the drag data store. */ remove(index: number): void; - [name: number]: DataTransferItem; + [index: number]: DataTransferItem; } declare var DataTransferItemList: { - prototype: DataTransferItemList; + readonly prototype: DataTransferItemList; new(): DataTransferItemList; }; -interface DeferredPermissionRequest { - readonly id: number; - readonly type: MSWebViewPermissionType; - readonly uri: string; - allow(): void; - deny(): void; -} - -declare var DeferredPermissionRequest: { - prototype: DeferredPermissionRequest; - new(): DeferredPermissionRequest; -}; - /** A delay-line; an AudioNode audio-processing module that causes a delay between the arrival of an input data and its propagation to the output. */ interface DelayNode extends AudioNode { readonly delayTime: AudioParam; } declare var DelayNode: { - prototype: DelayNode; + readonly prototype: DelayNode; new(context: BaseAudioContext, options?: DelayOptions): DelayNode; }; -/** Provides information about the amount of acceleration the device is experiencing along all three axes. */ -interface DeviceAcceleration { - readonly x: number | null; - readonly y: number | null; - readonly z: number | null; -} - -declare var DeviceAcceleration: { - prototype: DeviceAcceleration; - new(): DeviceAcceleration; -}; - /** The DeviceMotionEvent provides web developers with information about the speed of changes for the device's position and orientation. */ interface DeviceMotionEvent extends Event { readonly acceleration: DeviceMotionEventAcceleration | null; @@ -4325,9 +4164,8 @@ interface DeviceMotionEvent extends Event { } declare var DeviceMotionEvent: { - prototype: DeviceMotionEvent; + readonly prototype: DeviceMotionEvent; new(type: string, eventInitDict?: DeviceMotionEventInit): DeviceMotionEvent; - requestPermission(): Promise; }; interface DeviceMotionEventAcceleration { @@ -4351,43 +4189,11 @@ interface DeviceOrientationEvent extends Event { } declare var DeviceOrientationEvent: { - prototype: DeviceOrientationEvent; + readonly prototype: DeviceOrientationEvent; new(type: string, eventInitDict?: DeviceOrientationEventInit): DeviceOrientationEvent; - requestPermission(): Promise; -}; - -/** Provides information about the rate at which the device is rotating around all three axes. */ -interface DeviceRotationRate { - readonly alpha: number | null; - readonly beta: number | null; - readonly gamma: number | null; -} - -declare var DeviceRotationRate: { - prototype: DeviceRotationRate; - new(): DeviceRotationRate; }; -interface DhImportKeyParams extends Algorithm { - generator: Uint8Array; - prime: Uint8Array; -} - -interface DhKeyAlgorithm extends KeyAlgorithm { - generator: Uint8Array; - prime: Uint8Array; -} - -interface DhKeyDeriveParams extends Algorithm { - public: CryptoKey; -} - -interface DhKeyGenParams extends Algorithm { - generator: Uint8Array; - prime: Uint8Array; -} - -interface DocumentEventMap extends GlobalEventHandlersEventMap, DocumentAndElementEventHandlersEventMap { +interface DocumentEventMap extends DocumentAndElementEventHandlersEventMap, GlobalEventHandlersEventMap { "fullscreenchange": Event; "fullscreenerror": Event; "pointerlockchange": Event; @@ -4397,7 +4203,7 @@ interface DocumentEventMap extends GlobalEventHandlersEventMap, DocumentAndEleme } /** Any web page loaded in the browser and serves as an entry point into the web page's content, which is the DOM tree. */ -interface Document extends Node, DocumentAndElementEventHandlers, DocumentOrShadowRoot, GlobalEventHandlers, NonElementParentNode, ParentNode, XPathEvaluatorBase { +interface Document extends Node, DocumentAndElementEventHandlers, DocumentOrShadowRoot, FontFaceSource, GlobalEventHandlers, NonElementParentNode, ParentNode, XPathEvaluatorBase { /** * Sets or gets the URL for the current document. */ @@ -4421,7 +4227,7 @@ interface Document extends Node, DocumentAndElementEventHandlers, DocumentOrShad * Retrieves a collection of all applet objects in the document. */ /** @deprecated */ - readonly applets: HTMLCollectionOf; + readonly applets: HTMLCollection; /** * Deprecated. Sets or retrieves a value that indicates the background color behind the object. */ @@ -4461,6 +4267,9 @@ interface Document extends Node, DocumentAndElementEventHandlers, DocumentOrShad * Returns null if the Document is not currently executing a script or SVG script element (e.g., because the running script is an event handler, or a timeout), or if the currently executing script or SVG script element represents a module script. */ readonly currentScript: HTMLOrSVGScriptElement | null; + /** + * Returns the Window object of the active document. + */ readonly defaultView: (WindowProxy & typeof globalThis) | null; /** * Sets or gets a value that indicates whether the document can be edited. @@ -4538,7 +4347,8 @@ interface Document extends Node, DocumentAndElementEventHandlers, DocumentOrShad /** * Contains information about the current URL. */ - location: Location; + get location(): Location; + set location(href: string | Location); onfullscreenchange: ((this: Document, ev: Event) => any) | null; onfullscreenerror: ((this: Document, ev: Event) => any) | null; onpointerlockchange: ((this: Document, ev: Event) => any) | null; @@ -4550,6 +4360,7 @@ interface Document extends Node, DocumentAndElementEventHandlers, DocumentOrShad onreadystatechange: ((this: Document, ev: Event) => any) | null; onvisibilitychange: ((this: Document, ev: Event) => any) | null; readonly ownerDocument: null; + readonly pictureInPictureEnabled: boolean; /** * Return an HTMLCollection of the embed elements in the Document. */ @@ -4583,12 +4394,9 @@ interface Document extends Node, DocumentAndElementEventHandlers, DocumentOrShad * * If node is a document, throws a "NotSupportedError" DOMException or, if node is a shadow root, throws a "HierarchyRequestError" DOMException. */ - adoptNode(source: T): T; + adoptNode(node: T): T; /** @deprecated */ captureEvents(): void; - caretPositionFromPoint(x: number, y: number): CaretPosition | null; - /** @deprecated */ - caretRangeFromPoint(x: number, y: number): Range; /** @deprecated */ clear(): void; /** @@ -4646,6 +4454,7 @@ interface Document extends Node, DocumentAndElementEventHandlers, DocumentOrShad createEvent(eventInterface: "AnimationPlaybackEvent"): AnimationPlaybackEvent; createEvent(eventInterface: "AudioProcessingEvent"): AudioProcessingEvent; createEvent(eventInterface: "BeforeUnloadEvent"): BeforeUnloadEvent; + createEvent(eventInterface: "BlobEvent"): BlobEvent; createEvent(eventInterface: "ClipboardEvent"): ClipboardEvent; createEvent(eventInterface: "CloseEvent"): CloseEvent; createEvent(eventInterface: "CompositionEvent"): CompositionEvent; @@ -4654,21 +4463,18 @@ interface Document extends Node, DocumentAndElementEventHandlers, DocumentOrShad createEvent(eventInterface: "DeviceOrientationEvent"): DeviceOrientationEvent; createEvent(eventInterface: "DragEvent"): DragEvent; createEvent(eventInterface: "ErrorEvent"): ErrorEvent; - createEvent(eventInterface: "Event"): Event; - createEvent(eventInterface: "Events"): Event; createEvent(eventInterface: "FocusEvent"): FocusEvent; - createEvent(eventInterface: "FocusNavigationEvent"): FocusNavigationEvent; + createEvent(eventInterface: "FontFaceSetLoadEvent"): FontFaceSetLoadEvent; + createEvent(eventInterface: "FormDataEvent"): FormDataEvent; createEvent(eventInterface: "GamepadEvent"): GamepadEvent; createEvent(eventInterface: "HashChangeEvent"): HashChangeEvent; createEvent(eventInterface: "IDBVersionChangeEvent"): IDBVersionChangeEvent; createEvent(eventInterface: "InputEvent"): InputEvent; createEvent(eventInterface: "KeyboardEvent"): KeyboardEvent; - createEvent(eventInterface: "ListeningStateChangedEvent"): ListeningStateChangedEvent; createEvent(eventInterface: "MediaEncryptedEvent"): MediaEncryptedEvent; createEvent(eventInterface: "MediaKeyMessageEvent"): MediaKeyMessageEvent; createEvent(eventInterface: "MediaQueryListEvent"): MediaQueryListEvent; - createEvent(eventInterface: "MediaStreamErrorEvent"): MediaStreamErrorEvent; - createEvent(eventInterface: "MediaStreamEvent"): MediaStreamEvent; + createEvent(eventInterface: "MediaRecorderErrorEvent"): MediaRecorderErrorEvent; createEvent(eventInterface: "MediaStreamTrackEvent"): MediaStreamTrackEvent; createEvent(eventInterface: "MessageEvent"): MessageEvent; createEvent(eventInterface: "MouseEvent"): MouseEvent; @@ -4676,42 +4482,29 @@ interface Document extends Node, DocumentAndElementEventHandlers, DocumentOrShad createEvent(eventInterface: "MutationEvent"): MutationEvent; createEvent(eventInterface: "MutationEvents"): MutationEvent; createEvent(eventInterface: "OfflineAudioCompletionEvent"): OfflineAudioCompletionEvent; - createEvent(eventInterface: "OverflowEvent"): OverflowEvent; createEvent(eventInterface: "PageTransitionEvent"): PageTransitionEvent; createEvent(eventInterface: "PaymentMethodChangeEvent"): PaymentMethodChangeEvent; createEvent(eventInterface: "PaymentRequestUpdateEvent"): PaymentRequestUpdateEvent; - createEvent(eventInterface: "PermissionRequestedEvent"): PermissionRequestedEvent; createEvent(eventInterface: "PointerEvent"): PointerEvent; createEvent(eventInterface: "PopStateEvent"): PopStateEvent; createEvent(eventInterface: "ProgressEvent"): ProgressEvent; createEvent(eventInterface: "PromiseRejectionEvent"): PromiseRejectionEvent; createEvent(eventInterface: "RTCDTMFToneChangeEvent"): RTCDTMFToneChangeEvent; createEvent(eventInterface: "RTCDataChannelEvent"): RTCDataChannelEvent; - createEvent(eventInterface: "RTCDtlsTransportStateChangedEvent"): RTCDtlsTransportStateChangedEvent; - createEvent(eventInterface: "RTCErrorEvent"): RTCErrorEvent; - createEvent(eventInterface: "RTCIceCandidatePairChangedEvent"): RTCIceCandidatePairChangedEvent; - createEvent(eventInterface: "RTCIceGathererEvent"): RTCIceGathererEvent; - createEvent(eventInterface: "RTCIceTransportStateChangedEvent"): RTCIceTransportStateChangedEvent; createEvent(eventInterface: "RTCPeerConnectionIceErrorEvent"): RTCPeerConnectionIceErrorEvent; createEvent(eventInterface: "RTCPeerConnectionIceEvent"): RTCPeerConnectionIceEvent; - createEvent(eventInterface: "RTCSsrcConflictEvent"): RTCSsrcConflictEvent; createEvent(eventInterface: "RTCTrackEvent"): RTCTrackEvent; - createEvent(eventInterface: "SVGZoomEvent"): SVGZoomEvent; - createEvent(eventInterface: "SVGZoomEvents"): SVGZoomEvent; createEvent(eventInterface: "SecurityPolicyViolationEvent"): SecurityPolicyViolationEvent; createEvent(eventInterface: "SpeechRecognitionErrorEvent"): SpeechRecognitionErrorEvent; - createEvent(eventInterface: "SpeechRecognitionEvent"): SpeechRecognitionEvent; createEvent(eventInterface: "SpeechSynthesisErrorEvent"): SpeechSynthesisErrorEvent; createEvent(eventInterface: "SpeechSynthesisEvent"): SpeechSynthesisEvent; createEvent(eventInterface: "StorageEvent"): StorageEvent; - createEvent(eventInterface: "TextEvent"): TextEvent; + createEvent(eventInterface: "SubmitEvent"): SubmitEvent; createEvent(eventInterface: "TouchEvent"): TouchEvent; createEvent(eventInterface: "TrackEvent"): TrackEvent; createEvent(eventInterface: "TransitionEvent"): TransitionEvent; createEvent(eventInterface: "UIEvent"): UIEvent; createEvent(eventInterface: "UIEvents"): UIEvent; - createEvent(eventInterface: "VRDisplayEvent"): VRDisplayEvent; - createEvent(eventInterface: "VRDisplayEvent "): VRDisplayEvent ; createEvent(eventInterface: "WebGLContextEvent"): WebGLContextEvent; createEvent(eventInterface: "WheelEvent"): WheelEvent; createEvent(eventInterface: string): Event; @@ -4720,7 +4513,6 @@ interface Document extends Node, DocumentAndElementEventHandlers, DocumentOrShad * @param root The root element or node to start traversing on. * @param whatToShow The type of nodes or elements to appear in the node list * @param filter A custom NodeFilter function to use. For more information, see filter. Use null for no filter. - * @param entityReferenceExpansion A flag that specifies whether entity reference nodes are expanded. */ createNodeIterator(root: Node, whatToShow?: number, filter?: NodeFilter | null): NodeIterator; /** @@ -4741,11 +4533,8 @@ interface Document extends Node, DocumentAndElementEventHandlers, DocumentOrShad * @param root The root element or node to start traversing on. * @param whatToShow The type of nodes or elements to appear in the node list. For more information, see whatToShow. * @param filter A custom NodeFilter function to use. - * @param entityReferenceExpansion A flag that specifies whether entity reference nodes are expanded. */ createTreeWalker(root: Node, whatToShow?: number, filter?: NodeFilter | null): TreeWalker; - /** @deprecated */ - createTreeWalker(root: Node, whatToShow: number, filter: NodeFilter | null, entityReferenceExpansion?: boolean): TreeWalker; /** * Returns the element for the specified x coordinate and the specified y coordinate. * @param x The x-offset @@ -4759,13 +4548,14 @@ interface Document extends Node, DocumentAndElementEventHandlers, DocumentOrShad * @param showUI Display the user interface, defaults to false. * @param value Value to assign. */ + /** @deprecated */ execCommand(commandId: string, showUI?: boolean, value?: string): boolean; /** * Stops document's fullscreen element from being displayed fullscreen and resolves promise when done. */ exitFullscreen(): Promise; + exitPictureInPicture(): Promise; exitPointerLock(): void; - getAnimations(): Animation[]; /** * Returns a reference to the first object with the specified value of the ID attribute. * @param elementId String that specifies the ID value. @@ -4798,7 +4588,7 @@ interface Document extends Node, DocumentAndElementEventHandlers, DocumentOrShad */ getElementsByTagNameNS(namespaceURI: "http://www.w3.org/1999/xhtml", localName: string): HTMLCollectionOf; getElementsByTagNameNS(namespaceURI: "http://www.w3.org/2000/svg", localName: string): HTMLCollectionOf; - getElementsByTagNameNS(namespaceURI: string, localName: string): HTMLCollectionOf; + getElementsByTagNameNS(namespace: string | null, localName: string): HTMLCollectionOf; /** * Returns an object representing the current selection of the document that is loaded into the object displaying a webpage. */ @@ -4807,12 +4597,13 @@ interface Document extends Node, DocumentAndElementEventHandlers, DocumentOrShad * Gets a value indicating whether the object currently has focus. */ hasFocus(): boolean; + hasStorageAccess(): Promise; /** * Returns a copy of node. If deep is true, the copy also includes the node's descendants. * * If node is a document or a shadow root, throws a "NotSupportedError" DOMException. */ - importNode(importedNode: T, deep: boolean): T; + importNode(node: T, deep?: boolean): T; /** * Opens a new window and loads a document specified by a given URL. Also, opens a new window that uses the url parameter and the name parameter to collect the output of the write method and the writeln method. * @param url Specifies a MIME type for the document. @@ -4820,11 +4611,13 @@ interface Document extends Node, DocumentAndElementEventHandlers, DocumentOrShad * @param features Contains a list of items separated by commas. Each item consists of an option and a value, separated by an equals sign (for example, "fullscreen=yes, toolbar=yes"). The following values are supported. * @param replace Specifies whether the existing entry for the document is replaced in the history list. */ - open(url?: string, name?: string, features?: string, replace?: boolean): Document; + open(unused1?: string, unused2?: string): Document; + open(url: string | URL, name: string, features: string): WindowProxy | null; /** * Returns a Boolean value that indicates whether a specified command can be successfully executed using execCommand, given the current state of the document. * @param commandId Specifies a command identifier. */ + /** @deprecated */ queryCommandEnabled(commandId: string): boolean; /** * Returns a Boolean value that indicates whether the specified command is in the indeterminate state. @@ -4835,11 +4628,13 @@ interface Document extends Node, DocumentAndElementEventHandlers, DocumentOrShad * Returns a Boolean value that indicates the current state of the command. * @param commandId String that specifies a command identifier. */ + /** @deprecated */ queryCommandState(commandId: string): boolean; /** * Returns a Boolean value that indicates whether the current command is supported on the current range. * @param commandId Specifies a command identifier. */ + /** @deprecated */ queryCommandSupported(commandId: string): boolean; /** * Returns the current value of the document, range, or current selection for the given command. @@ -4848,6 +4643,7 @@ interface Document extends Node, DocumentAndElementEventHandlers, DocumentOrShad queryCommandValue(commandId: string): string; /** @deprecated */ releaseEvents(): void; + requestStorageAccess(): Promise; /** * Writes one or more HTML expressions to a document in the specified window. * @param content Specifies the text and HTML tags to write. @@ -4859,13 +4655,13 @@ interface Document extends Node, DocumentAndElementEventHandlers, DocumentOrShad */ writeln(...text: string[]): void; addEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; + addEventListener(type: string, listener: EventListener, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void; - removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; + removeEventListener(type: string, listener: EventListener, options?: boolean | EventListenerOptions): void; } declare var Document: { - prototype: Document; + readonly prototype: Document; new(): Document; }; @@ -4880,122 +4676,47 @@ interface DocumentAndElementEventHandlers { oncut: ((this: DocumentAndElementEventHandlers, ev: ClipboardEvent) => any) | null; onpaste: ((this: DocumentAndElementEventHandlers, ev: ClipboardEvent) => any) | null; addEventListener(type: K, listener: (this: DocumentAndElementEventHandlers, ev: DocumentAndElementEventHandlersEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; + addEventListener(type: string, listener: EventListener, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: DocumentAndElementEventHandlers, ev: DocumentAndElementEventHandlersEventMap[K]) => any, options?: boolean | EventListenerOptions): void; - removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; -} - -interface DocumentEvent { - createEvent(eventInterface: "AnimationEvent"): AnimationEvent; - createEvent(eventInterface: "AnimationPlaybackEvent"): AnimationPlaybackEvent; - createEvent(eventInterface: "AudioProcessingEvent"): AudioProcessingEvent; - createEvent(eventInterface: "BeforeUnloadEvent"): BeforeUnloadEvent; - createEvent(eventInterface: "ClipboardEvent"): ClipboardEvent; - createEvent(eventInterface: "CloseEvent"): CloseEvent; - createEvent(eventInterface: "CompositionEvent"): CompositionEvent; - createEvent(eventInterface: "CustomEvent"): CustomEvent; - createEvent(eventInterface: "DeviceMotionEvent"): DeviceMotionEvent; - createEvent(eventInterface: "DeviceOrientationEvent"): DeviceOrientationEvent; - createEvent(eventInterface: "DragEvent"): DragEvent; - createEvent(eventInterface: "ErrorEvent"): ErrorEvent; - createEvent(eventInterface: "Event"): Event; - createEvent(eventInterface: "Events"): Event; - createEvent(eventInterface: "FocusEvent"): FocusEvent; - createEvent(eventInterface: "FocusNavigationEvent"): FocusNavigationEvent; - createEvent(eventInterface: "GamepadEvent"): GamepadEvent; - createEvent(eventInterface: "HashChangeEvent"): HashChangeEvent; - createEvent(eventInterface: "IDBVersionChangeEvent"): IDBVersionChangeEvent; - createEvent(eventInterface: "InputEvent"): InputEvent; - createEvent(eventInterface: "KeyboardEvent"): KeyboardEvent; - createEvent(eventInterface: "ListeningStateChangedEvent"): ListeningStateChangedEvent; - createEvent(eventInterface: "MediaEncryptedEvent"): MediaEncryptedEvent; - createEvent(eventInterface: "MediaKeyMessageEvent"): MediaKeyMessageEvent; - createEvent(eventInterface: "MediaQueryListEvent"): MediaQueryListEvent; - createEvent(eventInterface: "MediaStreamErrorEvent"): MediaStreamErrorEvent; - createEvent(eventInterface: "MediaStreamEvent"): MediaStreamEvent; - createEvent(eventInterface: "MediaStreamTrackEvent"): MediaStreamTrackEvent; - createEvent(eventInterface: "MessageEvent"): MessageEvent; - createEvent(eventInterface: "MouseEvent"): MouseEvent; - createEvent(eventInterface: "MouseEvents"): MouseEvent; - createEvent(eventInterface: "MutationEvent"): MutationEvent; - createEvent(eventInterface: "MutationEvents"): MutationEvent; - createEvent(eventInterface: "OfflineAudioCompletionEvent"): OfflineAudioCompletionEvent; - createEvent(eventInterface: "OverflowEvent"): OverflowEvent; - createEvent(eventInterface: "PageTransitionEvent"): PageTransitionEvent; - createEvent(eventInterface: "PaymentMethodChangeEvent"): PaymentMethodChangeEvent; - createEvent(eventInterface: "PaymentRequestUpdateEvent"): PaymentRequestUpdateEvent; - createEvent(eventInterface: "PermissionRequestedEvent"): PermissionRequestedEvent; - createEvent(eventInterface: "PointerEvent"): PointerEvent; - createEvent(eventInterface: "PopStateEvent"): PopStateEvent; - createEvent(eventInterface: "ProgressEvent"): ProgressEvent; - createEvent(eventInterface: "PromiseRejectionEvent"): PromiseRejectionEvent; - createEvent(eventInterface: "RTCDTMFToneChangeEvent"): RTCDTMFToneChangeEvent; - createEvent(eventInterface: "RTCDataChannelEvent"): RTCDataChannelEvent; - createEvent(eventInterface: "RTCDtlsTransportStateChangedEvent"): RTCDtlsTransportStateChangedEvent; - createEvent(eventInterface: "RTCErrorEvent"): RTCErrorEvent; - createEvent(eventInterface: "RTCIceCandidatePairChangedEvent"): RTCIceCandidatePairChangedEvent; - createEvent(eventInterface: "RTCIceGathererEvent"): RTCIceGathererEvent; - createEvent(eventInterface: "RTCIceTransportStateChangedEvent"): RTCIceTransportStateChangedEvent; - createEvent(eventInterface: "RTCPeerConnectionIceErrorEvent"): RTCPeerConnectionIceErrorEvent; - createEvent(eventInterface: "RTCPeerConnectionIceEvent"): RTCPeerConnectionIceEvent; - createEvent(eventInterface: "RTCSsrcConflictEvent"): RTCSsrcConflictEvent; - createEvent(eventInterface: "RTCTrackEvent"): RTCTrackEvent; - createEvent(eventInterface: "SVGZoomEvent"): SVGZoomEvent; - createEvent(eventInterface: "SVGZoomEvents"): SVGZoomEvent; - createEvent(eventInterface: "SecurityPolicyViolationEvent"): SecurityPolicyViolationEvent; - createEvent(eventInterface: "SpeechRecognitionErrorEvent"): SpeechRecognitionErrorEvent; - createEvent(eventInterface: "SpeechRecognitionEvent"): SpeechRecognitionEvent; - createEvent(eventInterface: "SpeechSynthesisErrorEvent"): SpeechSynthesisErrorEvent; - createEvent(eventInterface: "SpeechSynthesisEvent"): SpeechSynthesisEvent; - createEvent(eventInterface: "StorageEvent"): StorageEvent; - createEvent(eventInterface: "TextEvent"): TextEvent; - createEvent(eventInterface: "TouchEvent"): TouchEvent; - createEvent(eventInterface: "TrackEvent"): TrackEvent; - createEvent(eventInterface: "TransitionEvent"): TransitionEvent; - createEvent(eventInterface: "UIEvent"): UIEvent; - createEvent(eventInterface: "UIEvents"): UIEvent; - createEvent(eventInterface: "VRDisplayEvent"): VRDisplayEvent; - createEvent(eventInterface: "VRDisplayEvent "): VRDisplayEvent ; - createEvent(eventInterface: "WebGLContextEvent"): WebGLContextEvent; - createEvent(eventInterface: "WheelEvent"): WheelEvent; - createEvent(eventInterface: string): Event; + removeEventListener(type: string, listener: EventListener, options?: boolean | EventListenerOptions): void; } /** A minimal document object that has no parent. It is used as a lightweight version of Document that stores a segment of a document structure comprised of nodes just like a standard document. The key difference is that because the document fragment isn't part of the active document tree structure, changes made to the fragment don't affect the document, cause reflow, or incur any performance impact that can occur when changes are made. */ interface DocumentFragment extends Node, NonElementParentNode, ParentNode { - readonly ownerDocument: Document; - getElementById(elementId: string): HTMLElement | null; } declare var DocumentFragment: { - prototype: DocumentFragment; + readonly prototype: DocumentFragment; new(): DocumentFragment; }; interface DocumentOrShadowRoot { + /** + * Returns the deepest element in the document through which or to which key events are being routed. This is, roughly speaking, the focused element in the document. + * + * For the purposes of this API, when a child browsing context is focused, its container is focused in the parent browsing context. For example, if the user moves the focus to a text control in an iframe, the iframe is the element returned by the activeElement API in the iframe's node document. + * + * Similarly, when the focused element is in a different node tree than documentOrShadowRoot, the element returned will be the host that's located in the same node tree as documentOrShadowRoot if documentOrShadowRoot is a shadow-including inclusive ancestor of the focused element, and null if not. + */ readonly activeElement: Element | null; /** * Returns document's fullscreen element. */ readonly fullscreenElement: Element | null; + readonly pictureInPictureElement: Element | null; readonly pointerLockElement: Element | null; /** * Retrieves a collection of styleSheet objects representing the style sheets that correspond to each instance of a link or style object in the document. */ readonly styleSheets: StyleSheetList; - caretPositionFromPoint(x: number, y: number): CaretPosition | null; - /** @deprecated */ - caretRangeFromPoint(x: number, y: number): Range; - elementFromPoint(x: number, y: number): Element | null; - elementsFromPoint(x: number, y: number): Element[]; - getSelection(): Selection | null; + getAnimations(): Animation[]; } interface DocumentTimeline extends AnimationTimeline { } declare var DocumentTimeline: { - prototype: DocumentTimeline; + readonly prototype: DocumentTimeline; new(options?: DocumentTimelineOptions): DocumentTimeline; }; @@ -5008,7 +4729,7 @@ interface DocumentType extends Node, ChildNode { } declare var DocumentType: { - prototype: DocumentType; + readonly prototype: DocumentType; new(): DocumentType; }; @@ -5021,7 +4742,7 @@ interface DragEvent extends MouseEvent { } declare var DragEvent: { - prototype: DragEvent; + readonly prototype: DragEvent; new(type: string, eventInitDict?: DragEventInit): DragEvent; }; @@ -5036,7 +4757,7 @@ interface DynamicsCompressorNode extends AudioNode { } declare var DynamicsCompressorNode: { - prototype: DynamicsCompressorNode; + readonly prototype: DynamicsCompressorNode; new(context: BaseAudioContext, options?: DynamicsCompressorOptions): DynamicsCompressorNode; }; @@ -5045,6 +4766,19 @@ interface EXT_blend_minmax { readonly MIN_EXT: GLenum; } +interface EXT_color_buffer_float { +} + +interface EXT_color_buffer_half_float { + readonly FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT: GLenum; + readonly RGB16F_EXT: GLenum; + readonly RGBA16F_EXT: GLenum; + readonly UNSIGNED_NORMALIZED_EXT: GLenum; +} + +interface EXT_float_blend { +} + /** 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. */ interface EXT_frag_depth { } @@ -5059,6 +4793,13 @@ interface EXT_sRGB { interface EXT_shader_texture_lod { } +interface EXT_texture_compression_rgtc { + readonly COMPRESSED_RED_GREEN_RGTC2_EXT: GLenum; + readonly COMPRESSED_RED_RGTC1_EXT: GLenum; + readonly COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT: GLenum; + readonly COMPRESSED_SIGNED_RED_RGTC1_EXT: GLenum; +} + /** The EXT_texture_filter_anisotropic extension is part of the WebGL API and exposes two constants for anisotropic filtering (AF). */ interface EXT_texture_filter_anisotropic { readonly MAX_TEXTURE_MAX_ANISOTROPY_EXT: GLenum; @@ -5071,7 +4812,7 @@ interface ElementEventMap { } /** Element is the most general base class from which all objects in a Document inherit. It only has methods and properties common to all kinds of elements. More specific classes inherit from Element. */ -interface Element extends Node, Animatable, ChildNode, InnerHTML, NonDocumentTypeChildNode, ParentNode, Slottable { +interface Element extends Node, ARIAMixin, Animatable, ChildNode, InnerHTML, NonDocumentTypeChildNode, ParentNode, Slottable { readonly attributes: NamedNodeMap; /** * Allows for manipulation of element's class content attribute as a set of whitespace-separated tokens through a DOMTokenList object. @@ -5101,6 +4842,7 @@ interface Element extends Node, Animatable, ChildNode, InnerHTML, NonDocumentTyp onfullscreenerror: ((this: Element, ev: Event) => any) | null; outerHTML: string; readonly ownerDocument: Document; + readonly part: DOMTokenList; /** * Returns the namespace prefix. */ @@ -5130,7 +4872,7 @@ interface Element extends Node, Animatable, ChildNode, InnerHTML, NonDocumentTyp */ closest(selector: K): HTMLElementTagNameMap[K] | null; closest(selector: K): SVGElementTagNameMap[K] | null; - closest(selector: string): E | null; + closest(selectors: string): E | null; /** * Returns element's first attribute whose qualified name is qualifiedName, and null if there is no such attribute otherwise. */ @@ -5156,7 +4898,7 @@ interface Element extends Node, Animatable, ChildNode, InnerHTML, NonDocumentTyp getElementsByTagName(qualifiedName: string): HTMLCollectionOf; getElementsByTagNameNS(namespaceURI: "http://www.w3.org/1999/xhtml", localName: string): HTMLCollectionOf; getElementsByTagNameNS(namespaceURI: "http://www.w3.org/2000/svg", localName: string): HTMLCollectionOf; - getElementsByTagNameNS(namespaceURI: string, localName: string): HTMLCollectionOf; + getElementsByTagNameNS(namespace: string | null, localName: string): HTMLCollectionOf; /** * Returns true if element has an attribute whose qualified name is qualifiedName, and false otherwise. */ @@ -5170,14 +4912,13 @@ interface Element extends Node, Animatable, ChildNode, InnerHTML, NonDocumentTyp */ hasAttributes(): boolean; hasPointerCapture(pointerId: number): boolean; - insertAdjacentElement(position: InsertPosition, insertedElement: Element): Element | null; - insertAdjacentHTML(where: InsertPosition, html: string): void; - insertAdjacentText(where: InsertPosition, text: string): void; + insertAdjacentElement(where: InsertPosition, element: Element): Element | null; + insertAdjacentHTML(position: InsertPosition, text: string): void; + insertAdjacentText(where: InsertPosition, data: string): void; /** * Returns true if matching selectors against element's root yields element, and false otherwise. */ matches(selectors: string): boolean; - msGetRegionContent(): any; releasePointerCapture(pointerId: number): void; /** * Removes element's first attribute whose qualified name is qualifiedName. @@ -5219,15 +4960,16 @@ interface Element extends Node, Animatable, ChildNode, InnerHTML, NonDocumentTyp * Returns true if qualifiedName is now present, and false otherwise. */ toggleAttribute(qualifiedName: string, force?: boolean): boolean; + /** @deprecated */ webkitMatchesSelector(selectors: string): boolean; addEventListener(type: K, listener: (this: Element, ev: ElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; + addEventListener(type: string, listener: EventListener, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: Element, ev: ElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void; - removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; + removeEventListener(type: string, listener: EventListener, options?: boolean | EventListenerOptions): void; } declare var Element: { - prototype: Element; + readonly prototype: Element; new(): Element; }; @@ -5252,7 +4994,7 @@ interface ErrorEvent extends Event { } declare var ErrorEvent: { - prototype: ErrorEvent; + readonly prototype: ErrorEvent; new(type: string, eventInitDict?: ErrorEventInit): ErrorEvent; }; @@ -5287,6 +5029,7 @@ interface Event { * Returns true if event was dispatched by the user agent, and false otherwise. */ readonly isTrusted: boolean; + /** @deprecated */ returnValue: boolean; /** @deprecated */ readonly srcElement: EventTarget | null; @@ -5297,7 +5040,7 @@ interface Event { /** * Returns the event's timestamp as the number of milliseconds measured relative to the time origin. */ - readonly timeStamp: number; + readonly timeStamp: DOMHighResTimeStamp; /** * Returns the type of event, e.g. "click", "hashchange", or "submit". */ @@ -5306,6 +5049,7 @@ interface Event { * 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. */ composedPath(): EventTarget[]; + /** @deprecated */ initEvent(type: string, bubbles?: boolean, cancelable?: boolean): void; /** * 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. @@ -5326,7 +5070,7 @@ interface Event { } declare var Event: { - prototype: Event; + readonly prototype: Event; new(type: string, eventInitDict?: EventInit): Event; readonly AT_TARGET: number; readonly BUBBLING_PHASE: number; @@ -5334,10 +5078,6 @@ declare var Event: { readonly NONE: number; }; -interface EventListenerObject { - handleEvent(evt: Event): void; -} - interface EventSourceEventMap { "error": Event; "message": MessageEvent; @@ -5368,14 +5108,14 @@ interface EventSource extends EventTarget { readonly CONNECTING: number; readonly OPEN: number; addEventListener(type: K, listener: (this: EventSource, ev: EventSourceEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; + addEventListener(type: string, listener: EventListener, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: EventSource, ev: EventSourceEventMap[K]) => any, options?: boolean | EventListenerOptions): void; - removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; + removeEventListener(type: string, listener: EventListener, options?: boolean | EventListenerOptions): void; } declare var EventSource: { - prototype: EventSource; - new(url: string, eventSourceInitDict?: EventSourceInit): EventSource; + readonly prototype: EventSource; + new(url: string | URL, eventSourceInitDict?: EventSourceInit): EventSource; readonly CLOSED: number; readonly CONNECTING: number; readonly OPEN: number; @@ -5394,9 +5134,11 @@ interface EventTarget { * * When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed. * + * If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted. + * * The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture. */ - addEventListener(type: string, listener: EventListenerOrEventListenerObject | null, options?: boolean | AddEventListenerOptions): void; + addEventListener(type: string, callback: EventListener | null, options?: AddEventListenerOptions | boolean): void; /** * 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. */ @@ -5404,31 +5146,15 @@ interface EventTarget { /** * Removes the event listener in target's event listener list with the same type, callback, and options. */ - removeEventListener(type: string, callback: EventListenerOrEventListenerObject | null, options?: EventListenerOptions | boolean): void; + removeEventListener(type: string, callback: EventListener | null, options?: EventListenerOptions | boolean): void; } declare var EventTarget: { - prototype: EventTarget; + readonly prototype: EventTarget; new(): EventTarget; }; -interface ExtensionScriptApis { - extensionIdToShortId(extensionId: string): number; - fireExtensionApiTelemetry(functionName: string, isSucceeded: boolean, isSupported: boolean, errorString: string): void; - genericFunction(routerAddress: any, parameters?: string, callbackId?: number): void; - genericSynchronousFunction(functionId: number, parameters?: string): string; - genericWebRuntimeCallout(to: any, from: any, payload: string): void; - getExtensionId(): string; - registerGenericFunctionCallbackHandler(callbackHandler: Function): void; - registerGenericPersistentCallbackHandler(callbackHandler: Function): void; - registerWebRuntimeCallbackHandler(handler: Function): any; -} - -declare var ExtensionScriptApis: { - prototype: ExtensionScriptApis; - new(): ExtensionScriptApis; -}; - +/** @deprecated */ interface External { /** @deprecated */ AddSearchProvider(): void; @@ -5436,8 +5162,9 @@ interface External { IsSearchProviderInstalled(): void; } +/** @deprecated */ declare var External: { - prototype: External; + readonly prototype: External; new(): External; }; @@ -5445,10 +5172,11 @@ declare var External: { interface File extends Blob { readonly lastModified: number; readonly name: string; + readonly webkitRelativePath: string; } declare var File: { - prototype: File; + readonly prototype: File; new(fileBits: BlobPart[], fileName: string, options?: FilePropertyBag): File; }; @@ -5460,7 +5188,7 @@ interface FileList { } declare var FileList: { - prototype: FileList; + readonly prototype: FileList; new(): FileList; }; @@ -5493,43 +5221,147 @@ interface FileReader extends EventTarget { readonly EMPTY: number; readonly LOADING: number; addEventListener(type: K, listener: (this: FileReader, ev: FileReaderEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; + addEventListener(type: string, listener: EventListener, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: FileReader, ev: FileReaderEventMap[K]) => any, options?: boolean | EventListenerOptions): void; - removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; + removeEventListener(type: string, listener: EventListener, options?: boolean | EventListenerOptions): void; } declare var FileReader: { - prototype: FileReader; + readonly prototype: FileReader; new(): FileReader; readonly DONE: number; readonly EMPTY: number; readonly LOADING: number; }; +interface FileSystem { + readonly name: string; + readonly root: FileSystemDirectoryEntry; +} + +declare var FileSystem: { + readonly prototype: FileSystem; + new(): FileSystem; +}; + +interface FileSystemDirectoryEntry extends FileSystemEntry { + createReader(): FileSystemDirectoryReader; + getDirectory(path?: string | null, options?: FileSystemFlags, successCallback?: FileSystemEntryCallback, errorCallback?: ErrorCallback): void; + getFile(path?: string | null, options?: FileSystemFlags, successCallback?: FileSystemEntryCallback, errorCallback?: ErrorCallback): void; +} + +declare var FileSystemDirectoryEntry: { + readonly prototype: FileSystemDirectoryEntry; + new(): FileSystemDirectoryEntry; +}; + +/** @deprecated */ +interface FileSystemDirectoryReader { + /** @deprecated */ + readEntries(successCallback: FileSystemEntriesCallback, errorCallback?: ErrorCallback): void; +} + +/** @deprecated */ +declare var FileSystemDirectoryReader: { + readonly prototype: FileSystemDirectoryReader; + new(): FileSystemDirectoryReader; +}; + +interface FileSystemEntry { + readonly filesystem: FileSystem; + readonly fullPath: string; + readonly isDirectory: boolean; + readonly isFile: boolean; + readonly name: string; + getParent(successCallback?: FileSystemEntryCallback, errorCallback?: ErrorCallback): void; +} + +declare var FileSystemEntry: { + readonly prototype: FileSystemEntry; + new(): FileSystemEntry; +}; + +interface FileSystemFileEntry extends FileSystemEntry { + file(successCallback: FileCallback, errorCallback?: ErrorCallback): void; +} + +declare var FileSystemFileEntry: { + readonly prototype: FileSystemFileEntry; + new(): FileSystemFileEntry; +}; + /** Focus-related events like focus, blur, focusin, or focusout. */ interface FocusEvent extends UIEvent { readonly relatedTarget: EventTarget | null; } declare var FocusEvent: { - prototype: FocusEvent; + readonly prototype: FocusEvent; new(type: string, eventInitDict?: FocusEventInit): FocusEvent; }; -interface FocusNavigationEvent extends Event { - readonly navigationReason: NavigationReason; - readonly originHeight: number; - readonly originLeft: number; - readonly originTop: number; - readonly originWidth: number; - requestFocus(): void; +interface FontFace { + ascentOverride: string; + descentOverride: string; + display: string; + family: string; + featureSettings: string; + lineGapOverride: string; + readonly loaded: Promise; + readonly status: FontFaceLoadStatus; + stretch: string; + style: string; + unicodeRange: string; + variant: string; + variationSettings: string; + weight: string; + load(): Promise; +} + +declare var FontFace: { + readonly prototype: FontFace; + new(family: string, source: string | BinaryData, descriptors?: FontFaceDescriptors): FontFace; +}; + +interface FontFaceSetEventMap { + "loading": Event; + "loadingdone": Event; + "loadingerror": Event; +} + +interface FontFaceSet extends EventTarget { + onloading: ((this: FontFaceSet, ev: Event) => any) | null; + onloadingdone: ((this: FontFaceSet, ev: Event) => any) | null; + onloadingerror: ((this: FontFaceSet, ev: Event) => any) | null; + readonly ready: Promise; + readonly status: FontFaceSetLoadStatus; + check(font: string, text?: string): boolean; + load(font: string, text?: string): Promise; + forEach(callbackfn: (value: FontFace, key: FontFace, parent: FontFaceSet) => void, thisArg?: any): void; + addEventListener(type: K, listener: (this: FontFaceSet, ev: FontFaceSetEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; + addEventListener(type: string, listener: EventListener, options?: boolean | AddEventListenerOptions): void; + removeEventListener(type: K, listener: (this: FontFaceSet, ev: FontFaceSetEventMap[K]) => any, options?: boolean | EventListenerOptions): void; + removeEventListener(type: string, listener: EventListener, options?: boolean | EventListenerOptions): void; +} + +declare var FontFaceSet: { + readonly prototype: FontFaceSet; + new(initialFaces: FontFace[]): FontFaceSet; +}; + +interface FontFaceSetLoadEvent extends Event { + readonly fontfaces: ReadonlyArray; } -declare var FocusNavigationEvent: { - prototype: FocusNavigationEvent; - new(type: string, eventInitDict?: FocusNavigationEventInit): FocusNavigationEvent; +declare var FontFaceSetLoadEvent: { + readonly prototype: FontFaceSetLoadEvent; + new(type: string, eventInitDict?: FontFaceSetLoadEventInit): FontFaceSetLoadEvent; }; +interface FontFaceSource { + readonly fonts: FontFaceSet; +} + /** 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". */ interface FormData { append(name: string, value: string | Blob, fileName?: string): void; @@ -5542,17 +5374,29 @@ interface FormData { } declare var FormData: { - prototype: FormData; + readonly prototype: FormData; new(form?: HTMLFormElement): FormData; }; +interface FormDataEvent extends Event { + /** + * Returns a FormData object representing names and values of elements associated to the target form. Operations on the FormData object will affect form data to be submitted. + */ + readonly formData: FormData; +} + +declare var FormDataEvent: { + readonly prototype: FormDataEvent; + new(type: string, eventInitDict: FormDataEventInit): FormDataEvent; +}; + /** A change in volume. It is an AudioNode audio-processing module that causes a given gain to be applied to the input data before its propagation to the output. A GainNode always has exactly one input and one output, both with the same number of channels. */ interface GainNode extends AudioNode { readonly gain: AudioParam; } declare var GainNode: { - prototype: GainNode; + readonly prototype: GainNode; new(context: BaseAudioContext, options?: GainOptions): GainNode; }; @@ -5561,17 +5405,15 @@ interface Gamepad { readonly axes: ReadonlyArray; readonly buttons: ReadonlyArray; readonly connected: boolean; - readonly hand: GamepadHand; readonly hapticActuators: ReadonlyArray; readonly id: string; readonly index: number; readonly mapping: GamepadMappingType; - readonly pose: GamepadPose | null; - readonly timestamp: number; + readonly timestamp: DOMHighResTimeStamp; } declare var Gamepad: { - prototype: Gamepad; + readonly prototype: Gamepad; new(): Gamepad; }; @@ -5583,7 +5425,7 @@ interface GamepadButton { } declare var GamepadButton: { - prototype: GamepadButton; + readonly prototype: GamepadButton; new(): GamepadButton; }; @@ -5593,38 +5435,20 @@ interface GamepadEvent extends Event { } declare var GamepadEvent: { - prototype: GamepadEvent; + readonly prototype: GamepadEvent; new(type: string, eventInitDict: GamepadEventInit): GamepadEvent; }; /** This Gamepad API interface represents hardware in the controller designed to provide haptic feedback to the user (if available), most commonly vibration hardware. */ interface GamepadHapticActuator { readonly type: GamepadHapticActuatorType; - pulse(value: number, duration: number): Promise; } declare var GamepadHapticActuator: { - prototype: GamepadHapticActuator; + readonly prototype: GamepadHapticActuator; new(): GamepadHapticActuator; }; -/** This Gamepad API interface represents the pose of a WebVR controller at a given timestamp (which includes orientation, position, velocity, and acceleration information.) */ -interface GamepadPose { - readonly angularAcceleration: Float32Array | null; - readonly angularVelocity: Float32Array | null; - readonly hasOrientation: boolean; - readonly hasPosition: boolean; - readonly linearAcceleration: Float32Array | null; - readonly linearVelocity: Float32Array | null; - readonly orientation: Float32Array | null; - readonly position: Float32Array | null; -} - -declare var GamepadPose: { - prototype: GamepadPose; - new(): GamepadPose; -}; - interface GenericTransformStream { readonly readable: ReadableStream; readonly writable: WritableStream; @@ -5633,12 +5457,12 @@ interface GenericTransformStream { /** An object able to programmatically obtain the position of the device. It gives Web content access to the location of the device. This allows a Web site or app to offer customized results based on the user's location. */ interface Geolocation { clearWatch(watchId: number): void; - getCurrentPosition(successCallback: PositionCallback, errorCallback?: PositionErrorCallback, options?: PositionOptions): void; - watchPosition(successCallback: PositionCallback, errorCallback?: PositionErrorCallback, options?: PositionOptions): number; + getCurrentPosition(successCallback: PositionCallback, errorCallback?: PositionErrorCallback | null, options?: PositionOptions): void; + watchPosition(successCallback: PositionCallback, errorCallback?: PositionErrorCallback | null, options?: PositionOptions): number; } declare var Geolocation: { - prototype: Geolocation; + readonly prototype: Geolocation; new(): Geolocation; }; @@ -5653,17 +5477,17 @@ interface GeolocationCoordinates { } declare var GeolocationCoordinates: { - prototype: GeolocationCoordinates; + readonly prototype: GeolocationCoordinates; new(): GeolocationCoordinates; }; interface GeolocationPosition { readonly coords: GeolocationCoordinates; - readonly timestamp: number; + readonly timestamp: DOMTimeStamp; } declare var GeolocationPosition: { - prototype: GeolocationPosition; + readonly prototype: GeolocationPosition; new(): GeolocationPosition; }; @@ -5676,7 +5500,7 @@ interface GeolocationPositionError { } declare var GeolocationPositionError: { - prototype: GeolocationPositionError; + readonly prototype: GeolocationPositionError; new(): GeolocationPositionError; readonly PERMISSION_DENIED: number; readonly POSITION_UNAVAILABLE: number; @@ -5692,7 +5516,6 @@ interface GlobalEventHandlersEventMap { "auxclick": MouseEvent; "beforeinput": InputEvent; "blur": FocusEvent; - "cancel": Event; "canplay": Event; "canplaythrough": Event; "change": Event; @@ -5707,7 +5530,6 @@ interface GlobalEventHandlersEventMap { "drag": DragEvent; "dragend": DragEvent; "dragenter": DragEvent; - "dragexit": Event; "dragleave": DragEvent; "dragover": DragEvent; "dragstart": DragEvent; @@ -5719,6 +5541,7 @@ interface GlobalEventHandlersEventMap { "focus": FocusEvent; "focusin": FocusEvent; "focusout": FocusEvent; + "formdata": FormDataEvent; "gotpointercapture": PointerEvent; "input": Event; "invalid": Event; @@ -5774,6 +5597,10 @@ interface GlobalEventHandlersEventMap { "transitionstart": TransitionEvent; "volumechange": Event; "waiting": Event; + "webkitanimationend": Event; + "webkitanimationiteration": Event; + "webkitanimationstart": Event; + "webkittransitionend": Event; "wheel": WheelEvent; } @@ -5793,7 +5620,6 @@ interface GlobalEventHandlers { * @param ev The focus event. */ onblur: ((this: GlobalEventHandlers, ev: FocusEvent) => any) | null; - oncancel: ((this: GlobalEventHandlers, ev: Event) => any) | null; /** * Occurs when playback is possible, but would require further buffering. * @param ev The event. @@ -5837,7 +5663,6 @@ interface GlobalEventHandlers { * @param ev The drag event. */ ondragenter: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null; - ondragexit: ((this: GlobalEventHandlers, ev: Event) => any) | null; /** * Fires on the target object when the user moves the mouse out of a valid drop target during a drag operation. * @param ev The drag event. @@ -5879,6 +5704,7 @@ interface GlobalEventHandlers { * @param ev The event. */ onfocus: ((this: GlobalEventHandlers, ev: FocusEvent) => any) | null; + onformdata: ((this: GlobalEventHandlers, ev: FormDataEvent) => any) | null; ongotpointercapture: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null; oninput: ((this: GlobalEventHandlers, ev: Event) => any) | null; oninvalid: ((this: GlobalEventHandlers, ev: Event) => any) | null; @@ -5891,6 +5717,7 @@ interface GlobalEventHandlers { * Fires when the user presses an alphanumeric key. * @param ev The event. */ + /** @deprecated */ onkeypress: ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null; /** * Fires when the user releases a key. @@ -5989,7 +5816,6 @@ interface GlobalEventHandlers { * @param ev The event. */ onscroll: ((this: GlobalEventHandlers, ev: Event) => any) | null; - onsecuritypolicyviolation: ((this: GlobalEventHandlers, ev: SecurityPolicyViolationEvent) => any) | null; /** * Occurs when the seek operation ends. * @param ev The event. @@ -6042,11 +5868,15 @@ interface GlobalEventHandlers { * @param ev The event. */ onwaiting: ((this: GlobalEventHandlers, ev: Event) => any) | null; + onwebkitanimationend: ((this: GlobalEventHandlers, ev: Event) => any) | null; + onwebkitanimationiteration: ((this: GlobalEventHandlers, ev: Event) => any) | null; + onwebkitanimationstart: ((this: GlobalEventHandlers, ev: Event) => any) | null; + onwebkittransitionend: ((this: GlobalEventHandlers, ev: Event) => any) | null; onwheel: ((this: GlobalEventHandlers, ev: WheelEvent) => any) | null; addEventListener(type: K, listener: (this: GlobalEventHandlers, ev: GlobalEventHandlersEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; + addEventListener(type: string, listener: EventListener, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: GlobalEventHandlers, ev: GlobalEventHandlersEventMap[K]) => any, options?: boolean | EventListenerOptions): void; - removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; + removeEventListener(type: string, listener: EventListener, options?: boolean | EventListenerOptions): void; } interface HTMLAllCollection { @@ -6070,7 +5900,7 @@ interface HTMLAllCollection { } declare var HTMLAllCollection: { - prototype: HTMLAllCollection; + readonly prototype: HTMLAllCollection; new(): HTMLAllCollection; }; @@ -6123,66 +5953,16 @@ interface HTMLAnchorElement extends HTMLElement, HTMLHyperlinkElementUtils { text: string; type: string; addEventListener(type: K, listener: (this: HTMLAnchorElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; + addEventListener(type: string, listener: EventListener, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: HTMLAnchorElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void; - removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; + removeEventListener(type: string, listener: EventListener, options?: boolean | EventListenerOptions): void; } declare var HTMLAnchorElement: { - prototype: HTMLAnchorElement; + readonly prototype: HTMLAnchorElement; new(): HTMLAnchorElement; }; -interface HTMLAppletElement extends HTMLElement { - /** @deprecated */ - align: string; - /** - * Sets or retrieves a text alternative to the graphic. - */ - /** @deprecated */ - alt: string; - /** - * Sets or retrieves a character string that can be used to implement your own archive functionality for the object. - */ - /** @deprecated */ - archive: string; - /** @deprecated */ - code: string; - /** - * Sets or retrieves the URL of the component. - */ - /** @deprecated */ - codeBase: string; - readonly form: HTMLFormElement | null; - /** - * Sets or retrieves the height of the object. - */ - /** @deprecated */ - height: string; - /** @deprecated */ - hspace: number; - /** - * Sets or retrieves the shape of the object. - */ - /** @deprecated */ - name: string; - /** @deprecated */ - object: string; - /** @deprecated */ - vspace: number; - /** @deprecated */ - width: string; - addEventListener(type: K, listener: (this: HTMLAppletElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; - removeEventListener(type: K, listener: (this: HTMLAppletElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void; - removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; -} - -declare var HTMLAppletElement: { - prototype: HTMLAppletElement; - new(): HTMLAppletElement; -}; - /** Provides special properties and methods (beyond those of the regular object HTMLElement interface it also has available to it by inheritance) for manipulating the layout and presentation of elements. */ interface HTMLAreaElement extends HTMLElement, HTMLHyperlinkElementUtils { /** @@ -6212,26 +5992,26 @@ interface HTMLAreaElement extends HTMLElement, HTMLHyperlinkElementUtils { */ target: string; addEventListener(type: K, listener: (this: HTMLAreaElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; + addEventListener(type: string, listener: EventListener, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: HTMLAreaElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void; - removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; + removeEventListener(type: string, listener: EventListener, options?: boolean | EventListenerOptions): void; } declare var HTMLAreaElement: { - prototype: HTMLAreaElement; + readonly prototype: HTMLAreaElement; new(): HTMLAreaElement; }; /** Provides access to the properties of