diff --git a/baselines/dom.generated.d.ts b/baselines/dom.generated.d.ts index 29182e29f..9831d1467 100644 --- a/baselines/dom.generated.d.ts +++ b/baselines/dom.generated.d.ts @@ -137,15 +137,45 @@ interface AuthenticationExtensionsClientInputs { appid?: string; appidExclude?: string; credProps?: boolean; + largeBlob?: AuthenticationExtensionsLargeBlobInputs; + prf?: AuthenticationExtensionsPRFInputs; uvm?: boolean; } interface AuthenticationExtensionsClientOutputs { appid?: boolean; + appidExclude?: boolean; credProps?: CredentialPropertiesOutput; + largeBlob?: AuthenticationExtensionsLargeBlobOutputs; + prf?: AuthenticationExtensionsPRFOutputs; uvm?: UvmEntries; } +interface AuthenticationExtensionsLargeBlobInputs { + read?: boolean; + write?: ArrayBuffer; +} + +interface AuthenticationExtensionsLargeBlobOutputs { + blob?: ArrayBuffer; + written?: boolean; +} + +interface AuthenticationExtensionsPRFInputs { + eval?: AuthenticationExtensionsPRFValues; + evalByCredential?: Record; +} + +interface AuthenticationExtensionsPRFOutputs { + enabled?: boolean; + results?: AuthenticationExtensionsPRFValues; +} + +interface AuthenticationExtensionsPRFValues { + first: ArrayBuffer; + second?: ArrayBuffer; +} + interface AuthenticatorSelectionCriteria { authenticatorAttachment?: AuthenticatorAttachment; requireResidentKey?: boolean; @@ -166,6 +196,11 @@ interface BlobPropertyBag { type?: string; } +interface BoxQuadOptions { + box?: CSSBoxType; + relativeTo?: GeometryNode; +} + interface ByteLengthChunk { byteLength?: number; } @@ -266,6 +301,11 @@ interface ConstrainVideoFacingModeParameters { ideal?: VideoFacingModeEnum | VideoFacingModeEnum[]; } +interface ConvertCoordinateOptions { + fromBox?: CSSBoxType; + toBox?: CSSBoxType; +} + interface ConvolverOptions extends AudioNodeOptions { buffer?: AudioBuffer | null; disableNormalization?: boolean; @@ -1157,7 +1197,7 @@ interface RTCConfiguration { } interface RTCDTMFToneChangeEventInit extends EventInit { - tone: string; + tone?: string; } interface RTCDataChannelEventInit extends EventInit { @@ -1170,7 +1210,6 @@ interface RTCDataChannelInit { maxRetransmits?: number; negotiated?: boolean; ordered?: boolean; - priority?: RTCPriorityType; protocol?: string; } @@ -1261,7 +1300,7 @@ interface RTCIceParameters { } interface RTCIceServer { - credential?: string | RTCOAuthCredential; + credential?: string; credentialType?: RTCIceCredentialType; urls: string | string[]; username?: string; @@ -1281,6 +1320,11 @@ interface RTCInboundRTPStreamStats extends RTCRTPStreamStats { packetsReceived?: number; } +interface RTCLocalSessionDescriptionInit { + sdp?: string; + type?: RTCSdpType; +} + interface RTCMediaStreamTrackStats extends RTCStats { audioLevel?: number; echoReturnLoss?: number; @@ -1298,13 +1342,7 @@ interface RTCMediaStreamTrackStats extends RTCStats { trackIdentifier?: string; } -interface RTCOAuthCredential { - accessToken: string; - macKey: string; -} - interface RTCOfferAnswerOptions { - voiceActivityDetection?: boolean; } interface RTCOfferOptions extends RTCOfferAnswerOptions { @@ -1321,8 +1359,9 @@ interface RTCOutboundRTPStreamStats extends RTCRTPStreamStats { } interface RTCPeerConnectionIceErrorEventInit extends EventInit { + address?: string | null; errorCode: number; - hostCandidate?: string; + port?: number | null; statusText?: string; url?: string; } @@ -1387,16 +1426,9 @@ interface RTCRtpContributingSource { timestamp: number; } -interface RTCRtpDecodingParameters extends RTCRtpCodingParameters { -} - interface RTCRtpEncodingParameters extends RTCRtpCodingParameters { active?: boolean; - codecPayloadType?: number; - dtx?: RTCDtxStatus; maxBitrate?: number; - maxFramerate?: number; - ptime?: number; scaleResolutionDownBy?: number; } @@ -1429,7 +1461,6 @@ interface RTCRtpParameters { } interface RTCRtpReceiveParameters extends RTCRtpParameters { - encodings: RTCRtpDecodingParameters[]; } interface RTCRtpRtxParameters { @@ -1437,9 +1468,7 @@ interface RTCRtpRtxParameters { } interface RTCRtpSendParameters extends RTCRtpParameters { - degradationPreference?: RTCDegradationPreference; encodings: RTCRtpEncodingParameters[]; - priority?: RTCPriorityType; transactionId: string; } @@ -1461,7 +1490,7 @@ interface RTCRtpUnhandled { interface RTCSessionDescriptionInit { sdp?: string; - type?: RTCSdpType; + type: RTCSdpType; } interface RTCSrtpKeyParam { @@ -1490,10 +1519,6 @@ interface RTCStats { type: RTCStatsType; } -interface RTCStatsEventInit extends EventInit { - report: RTCStatsReport; -} - interface RTCStatsReport { } @@ -1693,6 +1718,7 @@ interface ShadowRootInit { } interface ShareData { + files?: File[]; text?: string; title?: string; url?: string; @@ -1744,6 +1770,10 @@ interface StoreSiteSpecificExceptionsInformation extends StoreExceptionsInformat arrayOfDomainStrings?: string[]; } +interface SubmitEventInit extends EventInit { + submitter?: HTMLElement | null; +} + interface TextDecodeOptions { stream?: boolean; } @@ -1905,7 +1935,7 @@ interface ANGLE_instanced_arrays { readonly VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE: GLenum; } -/** A controller object that allows you to abort one or more DOM requests as and when desired. */ +/** A controller object that allows you to abort one or more Web requests as and when desired. */ interface AbortController { /** * Returns the AbortSignal object associated with this object. @@ -2156,7 +2186,7 @@ declare var ApplicationCache: { 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. */ +/** One of a DOM element's attributes as an object. In most DOM methods, you will directly retrieve the attribute as a string (e.g., Element.getAttribute()), but certain functions (e.g., Element.getAttributeNode()) or means of iterating return Attr types. */ interface Attr extends Node { readonly localName: string; readonly name: string; @@ -2232,7 +2262,7 @@ declare var AudioContext: { new(contextOptions?: AudioContextOptions): AudioContext; }; -/** AudioDestinationNode has no output (as it is the output, no more AudioNode can be linked after it in the audio graph) and one input. The number of channels in the input must be between 0 and the maxChannelCount value or an exception is raised. */ +/** The end destination of an audio graph in a given context — usually the speakers of your device. It can also be the node that will "record" the audio data when used with an OfflineAudioContext. */ interface AudioDestinationNode extends AudioNode { readonly maxChannelCount: number; } @@ -2264,7 +2294,7 @@ declare var AudioListener: { new(): AudioListener; }; -/** A generic interface for representing an audio processing module. Examples include: */ +/** A generic interface for representing an audio processing module. */ interface AudioNode extends EventTarget { channelCount: number; channelCountMode: ChannelCountMode; @@ -2503,7 +2533,7 @@ declare var BiquadFilterNode: { new(context: BaseAudioContext, options?: BiquadFilterOptions): BiquadFilterNode; }; -/** A file-like object of immutable, raw data. Blobs represent data that isn't necessarily in a JavaScript-native format. The File interface is based on Blob, inheriting blob functionality and expanding it to support files on the user's system. */ +/** A blob, which is a file-like object of immutable, raw data; they can be read as text or binary data, or converted into a ReadableStream so its methods can be used for processing the data. */ interface Blob { readonly size: number; readonly type: string; @@ -2632,7 +2662,7 @@ declare var CSSKeyframeRule: { new(): CSSKeyframeRule; }; -/** An object representing a complete set of keyframes for a CSS animation. It corresponds to the contains of a whole @keyframes at-rule. It implements the CSSRule interface with a type value of 7 (CSSRule.KEYFRAMES_RULE). */ +/** An object representing a complete set of keyframes for a CSS animation. It corresponds to the contents of a whole @keyframes at-rule. It implements the CSSRule interface with a type value of 7 (CSSRule.KEYFRAMES_RULE). */ interface CSSKeyframesRule extends CSSRule { readonly cssRules: CSSRuleList; name: string; @@ -2678,6 +2708,16 @@ declare var CSSPageRule: { new(): CSSPageRule; }; +interface CSSPseudoElement extends EventTarget, Animatable, GeometryUtils { + readonly element: Element; + readonly type: string; +} + +declare var CSSPseudoElement: { + prototype: CSSPseudoElement; + new(): CSSPseudoElement; +}; + /** A single CSS rule. There are several types of rules, listed in the Type constants section below. */ interface CSSRule { cssText: string; @@ -3004,6 +3044,7 @@ interface CSSStyleDeclaration { textDecorationColor: string; textDecorationLine: string; textDecorationStyle: string; + textEdge: string; textEmphasis: string; textEmphasisColor: string; textEmphasisPosition: string; @@ -3207,7 +3248,7 @@ declare var CSSStyleRule: { new(): CSSStyleRule; }; -/** A single CSS style sheet. It inherits properties and methods from its parent, StyleSheet. */ +/** A single CSS stylesheet, and lets you inspect and modify the list of rules contained in the stylesheet. */ interface CSSStyleSheet extends StyleSheet { readonly cssRules: CSSRuleList; readonly ownerRule: CSSRule | null; @@ -3610,7 +3651,7 @@ declare var ConvolverNode: { new(context: BaseAudioContext, options?: ConvolverOptions): ConvolverNode; }; -/** This Streams API interface provides a built-in byte length queuing strategy that can be used when constructing streams. */ +/** This Streams API interface provides a built-in chunk counting queuing strategy that can be used when constructing streams. */ interface CountQueuingStrategy extends QueuingStrategy { highWaterMark: number; size(chunk: any): 1; @@ -3654,7 +3695,7 @@ declare var Crypto: { new(): Crypto; }; -/** The CryptoKey dictionary of the Web Crypto API represents a cryptographic key. */ +/** This Web Crypto API interface represents a cryptographic key obtained from one of the SubtleCrypto methods generateKey(), deriveKey(), importKey(), or unwrapKey(). */ interface CryptoKey { readonly algorithm: KeyAlgorithm; readonly extractable: boolean; @@ -3680,9 +3721,9 @@ declare var 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: { @@ -3714,7 +3755,7 @@ declare var DOMError: { new(): DOMError; }; -/** An abnormal event (called an exception) which occurs as a result of calling a method or accessing a property of a web API. */ +/** An abnormal event (called an exception) that occurs as a result of calling a method or accessing a property of a web API. */ interface DOMException { readonly code: number; readonly message: string; @@ -4042,7 +4083,7 @@ declare var DOMStringList: { new(): DOMStringList; }; -/** Used by the dataset HTML attribute to represent data for custom attributes added to elements. */ +/** Used for the HTMLElement.dataset attribute, to represent data for custom attributes added to elements. */ interface DOMStringMap { [name: string]: string | undefined; } @@ -4267,10 +4308,12 @@ declare var DelayNode: { new(context: BaseAudioContext, options?: DelayOptions): DelayNode; }; -/** Provides information about the amount of acceleration the device is experiencing along all three axes. */ interface DeviceAcceleration { + /** @deprecated */ readonly x: number | null; + /** @deprecated */ readonly y: number | null; + /** @deprecated */ readonly z: number | null; } @@ -4329,10 +4372,12 @@ declare var DeviceOrientationEvent: { requestPermission(): Promise; }; -/** Provides information about the rate at which the device is rotating around all three axes. */ interface DeviceRotationRate { + /** @deprecated */ readonly alpha: number | null; + /** @deprecated */ readonly beta: number | null; + /** @deprecated */ readonly gamma: number | null; } @@ -4370,7 +4415,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, GeometryUtils, GlobalEventHandlers, NonElementParentNode, ParentNode, XPathEvaluatorBase { /** * Sets or gets the URL for the current document. */ @@ -4672,7 +4717,6 @@ interface Document extends Node, DocumentAndElementEventHandlers, DocumentOrShad createEvent(eventInterface: "RTCPeerConnectionIceErrorEvent"): RTCPeerConnectionIceErrorEvent; createEvent(eventInterface: "RTCPeerConnectionIceEvent"): RTCPeerConnectionIceEvent; createEvent(eventInterface: "RTCSsrcConflictEvent"): RTCSsrcConflictEvent; - createEvent(eventInterface: "RTCStatsEvent"): RTCStatsEvent; createEvent(eventInterface: "RTCTrackEvent"): RTCTrackEvent; createEvent(eventInterface: "SVGZoomEvent"): SVGZoomEvent; createEvent(eventInterface: "SVGZoomEvents"): SVGZoomEvent; @@ -4682,6 +4726,7 @@ interface Document extends Node, DocumentAndElementEventHandlers, DocumentOrShad createEvent(eventInterface: "SpeechSynthesisErrorEvent"): SpeechSynthesisErrorEvent; createEvent(eventInterface: "SpeechSynthesisEvent"): SpeechSynthesisEvent; createEvent(eventInterface: "StorageEvent"): StorageEvent; + createEvent(eventInterface: "SubmitEvent"): SubmitEvent; createEvent(eventInterface: "TextEvent"): TextEvent; createEvent(eventInterface: "TouchEvent"): TouchEvent; createEvent(eventInterface: "TrackEvent"): TrackEvent; @@ -4921,7 +4966,6 @@ interface DocumentEvent { createEvent(eventInterface: "RTCPeerConnectionIceErrorEvent"): RTCPeerConnectionIceErrorEvent; createEvent(eventInterface: "RTCPeerConnectionIceEvent"): RTCPeerConnectionIceEvent; createEvent(eventInterface: "RTCSsrcConflictEvent"): RTCSsrcConflictEvent; - createEvent(eventInterface: "RTCStatsEvent"): RTCStatsEvent; createEvent(eventInterface: "RTCTrackEvent"): RTCTrackEvent; createEvent(eventInterface: "SVGZoomEvent"): SVGZoomEvent; createEvent(eventInterface: "SVGZoomEvents"): SVGZoomEvent; @@ -4931,6 +4975,7 @@ interface DocumentEvent { createEvent(eventInterface: "SpeechSynthesisErrorEvent"): SpeechSynthesisErrorEvent; createEvent(eventInterface: "SpeechSynthesisEvent"): SpeechSynthesisEvent; createEvent(eventInterface: "StorageEvent"): StorageEvent; + createEvent(eventInterface: "SubmitEvent"): SubmitEvent; createEvent(eventInterface: "TextEvent"): TextEvent; createEvent(eventInterface: "TouchEvent"): TouchEvent; createEvent(eventInterface: "TrackEvent"): TrackEvent; @@ -4944,7 +4989,7 @@ interface DocumentEvent { createEvent(eventInterface: string): Event; } -/** 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. */ +/** 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. */ interface DocumentFragment extends Node, NonElementParentNode, ParentNode { readonly ownerDocument: Document; getElementById(elementId: string): HTMLElement | null; @@ -5053,8 +5098,8 @@ interface ElementEventMap { "fullscreenerror": Event; } -/** 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 { +/** Element is the most general base class from which all element objects (i.e. objects that represent elements) 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, GeometryUtils, InnerHTML, NonDocumentTypeChildNode, ParentNode, Slottable { readonly assignedSlot: HTMLSlotElement | null; readonly attributes: NamedNodeMap; /** @@ -5162,6 +5207,7 @@ interface Element extends Node, Animatable, ChildNode, InnerHTML, NonDocumentTyp */ matches(selectors: string): boolean; msGetRegionContent(): any; + pseudo(type: string): CSSPseudoElement | null; releasePointerCapture(pointerId: number): void; /** * Removes element's first attribute whose qualified name is qualifiedName. @@ -5490,7 +5536,7 @@ declare var FileReader: { readonly LOADING: number; }; -/** Focus-related events like focus, blur, focusin, or focusout. */ +/** Focus-related events, including focus, blur, focusin, and focusout. */ interface FocusEvent extends UIEvent { readonly relatedTarget: EventTarget | null; } @@ -5684,6 +5730,13 @@ declare var GeolocationPositionError: { readonly TIMEOUT: number; }; +interface GeometryUtils { + convertPointFromNode(point: DOMPointInit, from: GeometryNode, options?: ConvertCoordinateOptions): DOMPoint; + convertQuadFromNode(quad: DOMQuadInit, from: GeometryNode, options?: ConvertCoordinateOptions): DOMQuad; + convertRectFromNode(rect: DOMRectReadOnly, from: GeometryNode, options?: ConvertCoordinateOptions): DOMQuad; + getBoxQuads(options?: BoxQuadOptions): DOMQuad[]; +} + interface GlobalEventHandlersEventMap { "abort": UIEvent; "animationcancel": AnimationEvent; @@ -5704,7 +5757,6 @@ interface GlobalEventHandlersEventMap { "drag": DragEvent; "dragend": DragEvent; "dragenter": DragEvent; - "dragexit": Event; "dragleave": DragEvent; "dragover": DragEvent; "dragstart": DragEvent; @@ -5834,7 +5886,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. @@ -6071,7 +6122,7 @@ declare var HTMLAllCollection: { new(): HTMLAllCollection; }; -/** Hyperlink elements and provides special properties and methods (beyond those of the regular HTMLElement object interface that they inherit from) for manipulating the layout and presentation of such elements. */ +/** Hyperlink elements and provides special properties and methods (beyond those of the regular HTMLElement object interface that they inherit from) for manipulating the layout and presentation of such elements. This interface corresponds to element; not to be confused with , which is represented by HTMLLinkElement) */ interface HTMLAnchorElement extends HTMLElement, HTMLHyperlinkElementUtils { /** * Sets or retrieves the character set used to encode the object. @@ -6219,7 +6270,7 @@ declare var HTMLAreaElement: { new(): HTMLAreaElement; }; -/** Provides access to the properties of
element in the DOM; it allows access to and in some cases modification of aspects of the form, as well as access to its component elements. */ +/** A element in the DOM. It allows access to—and, in some cases, modification of—aspects of the form, as well as access to its component elements. */ interface HTMLFormElement extends HTMLElement { /** * Sets or retrieves a list of character encodings for input data that must be accepted by the server processing the form. @@ -6936,7 +6987,7 @@ declare var HTMLHeadElement: { new(): HTMLHeadElement; }; -/** The different heading elements. It inherits methods and properties from the HTMLElement interface. */ +/** The different heading elements,

through

. It inherits methods and properties from the HTMLElement interface. */ interface HTMLHeadingElement extends HTMLElement { /** * Sets or retrieves a value that indicates the table alignment. @@ -7014,6 +7065,7 @@ interface HTMLIFrameElement extends HTMLElement { * Sets or retrieves the height of the object. */ height: string; + loading: string; /** * Sets or retrieves a URI to a long description of the object. */ @@ -7064,7 +7116,7 @@ declare var HTMLIFrameElement: { new(): HTMLIFrameElement; }; -/** Provides special properties and methods for manipulating elements. */ +/** An HTML element, providing the properties and methods used to manipulate image elements. */ interface HTMLImageElement extends HTMLElement { /** * Sets or retrieves how the object is aligned with adjacent text. @@ -7419,7 +7471,7 @@ declare var HTMLLegendElement: { new(): HTMLLegendElement; }; -/** Reference information for external resources and the relationship of those resources to a document and vice-versa. This object inherits all of the properties and methods of the HTMLElement interface. */ +/** Reference information for external resources and the relationship of those resources to a document and vice-versa (corresponds to element; not to be confused with , which is represented by HTMLAnchorElement). This object inherits all of the properties and methods of the HTMLElement interface. */ interface HTMLLinkElement extends HTMLElement, LinkStyle { as: string; /** @@ -7553,7 +7605,7 @@ interface HTMLMediaElementEventMap extends HTMLElementEventMap { "waitingforkey": Event; } -/** Adds to HTMLElement the properties and methods needed to support basic media-related capabilities that are common to audio and video. */ +/** Adds to HTMLElement the properties and methods needed to support basic media-related capabilities that are common to audio and video. */ interface HTMLMediaElement extends HTMLElement { /** * Gets or sets a value that indicates whether to start playing the media automatically. @@ -7624,6 +7676,7 @@ interface HTMLMediaElement extends HTMLElement { * Gets or sets the current playback position, in seconds. */ preload: string; + preservesPitch: boolean; readonly readyState: number; /** * Returns a TimeRanges object that represents the ranges of the current media resource that can be seeked. @@ -7691,6 +7744,7 @@ declare var HTMLMediaElement: { readonly NETWORK_NO_SOURCE: number; }; +/** Provides special properties (beyond those defined on the regular HTMLElement interface it also has available to it by inheritance) for manipulating elements. */ interface HTMLMenuElement extends HTMLElement { /** @deprecated */ compact: boolean; @@ -7965,7 +8019,7 @@ declare var HTMLOptionElement: { new(): HTMLOptionElement; }; -/** HTMLOptionsCollection is an interface representing a collection of HTML option elements (in document order) and offers methods and properties for traversing the list as well as optionally altering its items. This type is returned solely by the "options" property of select. */ +/** This interface inherits the methods of its parent, HTMLCollection. */ interface HTMLOptionsCollection extends HTMLCollectionOf { /** * Returns the number of elements in the collection. @@ -8887,7 +8941,7 @@ declare var HTMLTitleElement: { new(): HTMLTitleElement; }; -/** The HTMLTrackElement */ +/** An HTML element within the DOM. This element can be used as a child of either