diff --git a/src/lib/dom.generated.d.ts b/src/lib/dom.generated.d.ts index f8fd23d0fba6a..753d799299dc9 100644 --- a/src/lib/dom.generated.d.ts +++ b/src/lib/dom.generated.d.ts @@ -777,6 +777,7 @@ interface MediaStreamAudioSourceOptions { interface MediaStreamConstraints { audio?: boolean | MediaTrackConstraints; peerIdentity?: string; + preferCurrentTab?: boolean; video?: boolean | MediaTrackConstraints; } @@ -878,33 +879,19 @@ interface MultiCacheQueryOptions extends CacheQueryOptions { } interface MutationObserverInit { - /** - * Set to a list of attribute local names (without namespace) if not all attribute mutations need to be observed and attributes is true or omitted. - */ + /** Set to a list of attribute local names (without namespace) if not all attribute mutations need to be observed and attributes is true or omitted. */ attributeFilter?: string[]; - /** - * Set to true if attributes is true or omitted and target's attribute value before the mutation needs to be recorded. - */ + /** Set to true if attributes is true or omitted and target's attribute value before the mutation needs to be recorded. */ attributeOldValue?: boolean; - /** - * Set to true if mutations to target's attributes are to be observed. Can be omitted if attributeOldValue or attributeFilter is specified. - */ + /** Set to true if mutations to target's attributes are to be observed. Can be omitted if attributeOldValue or attributeFilter is specified. */ attributes?: boolean; - /** - * Set to true if mutations to target's data are to be observed. Can be omitted if characterDataOldValue is specified. - */ + /** Set to true if mutations to target's data are to be observed. Can be omitted if characterDataOldValue is specified. */ characterData?: boolean; - /** - * Set to true if characterData is set to true or omitted and target's data before the mutation needs to be recorded. - */ + /** Set to true if characterData is set to true or omitted and target's data before the mutation needs to be recorded. */ characterDataOldValue?: boolean; - /** - * Set to true if mutations to target's children are to be observed. - */ + /** Set to true if mutations to target's children are to be observed. */ childList?: boolean; - /** - * Set to true if mutations to not just target, but also target's descendants are to be observed. - */ + /** Set to true if mutations to not just target, but also target's descendants are to be observed. */ subtree?: boolean; } @@ -1094,10 +1081,6 @@ interface PositionOptions { timeout?: number; } -interface PostMessageOptions { - transfer?: any[]; -} - interface ProgressEventInit extends EventInit { lengthComputable?: boolean; loaded?: number; @@ -1455,57 +1438,31 @@ interface RegistrationOptions { } interface RequestInit { - /** - * A BodyInit object or null to set request's body. - */ + /** A BodyInit object or null to set request's body. */ body?: BodyInit | null; - /** - * A string indicating how the request will interact with the browser's cache to set request's cache. - */ + /** A string indicating how the request will interact with the browser's cache to set request's cache. */ cache?: RequestCache; - /** - * A string indicating whether credentials will be sent with the request always, never, or only when sent to a same-origin URL. Sets request's credentials. - */ + /** A string indicating whether credentials will be sent with the request always, never, or only when sent to a same-origin URL. Sets request's credentials. */ credentials?: RequestCredentials; - /** - * A Headers object, an object literal, or an array of two-item arrays to set request's headers. - */ + /** A Headers object, an object literal, or an array of two-item arrays to set request's headers. */ headers?: HeadersInit; - /** - * A cryptographic hash of the resource to be fetched by request. Sets request's integrity. - */ + /** A cryptographic hash of the resource to be fetched by request. Sets request's integrity. */ integrity?: string; - /** - * A boolean to set request's keepalive. - */ + /** A boolean to set request's keepalive. */ keepalive?: boolean; - /** - * A string to set request's method. - */ + /** A string to set request's method. */ method?: string; - /** - * A string to indicate whether the request will use CORS, or will be restricted to same-origin URLs. Sets request's mode. - */ + /** A string to indicate whether the request will use CORS, or will be restricted to same-origin URLs. Sets request's mode. */ mode?: RequestMode; - /** - * A string indicating whether request follows redirects, results in an error upon encountering a redirect, or returns the redirect (in an opaque fashion). Sets request's redirect. - */ + /** A string indicating whether request follows redirects, results in an error upon encountering a redirect, or returns the redirect (in an opaque fashion). Sets request's redirect. */ redirect?: RequestRedirect; - /** - * A string whose value is a same-origin URL, "about:client", or the empty string, to set request's referrer. - */ + /** A string whose value is a same-origin URL, "about:client", or the empty string, to set request's referrer. */ referrer?: string; - /** - * A referrer policy to set request's referrerPolicy. - */ + /** A referrer policy to set request's referrerPolicy. */ referrerPolicy?: ReferrerPolicy; - /** - * An AbortSignal to set request's signal. - */ + /** An AbortSignal to set request's signal. */ signal?: AbortSignal | null; - /** - * Can only be null. Used to disassociate request from any Window. - */ + /** Can only be null. Used to disassociate request from any Window. */ window?: any; } @@ -1664,6 +1621,10 @@ interface StreamPipeOptions { signal?: AbortSignal; } +interface StructuredSerializeOptions { + transfer?: any[]; +} + interface SubmitEventInit extends EventInit { submitter?: HTMLElement | null; } @@ -1791,7 +1752,7 @@ interface WheelEventInit extends MouseEventInit { deltaZ?: number; } -interface WindowPostMessageOptions extends PostMessageOptions { +interface WindowPostMessageOptions extends StructuredSerializeOptions { targetOrigin?: string; } @@ -1877,13 +1838,9 @@ interface ARIAMixin { /** A controller object that allows you to abort one or more DOM requests as and when desired. */ interface AbortController { - /** - * Returns the AbortSignal object associated with this object. - */ + /** Returns the AbortSignal object associated with this object. */ readonly signal: AbortSignal; - /** - * Invoking this method will set this object's AbortSignal's aborted flag and signal to any observers that the associated activity is to be aborted. - */ + /** Invoking this method will set this object's AbortSignal's aborted flag and signal to any observers that the associated activity is to be aborted. */ abort(): void; } @@ -1898,9 +1855,7 @@ interface AbortSignalEventMap { /** A signal object that allows you to communicate with a DOM request (such as a Fetch) and abort it if required via an AbortController object. */ interface AbortSignal extends EventTarget { - /** - * Returns true if this AbortSignal's AbortController has signaled to abort, and false otherwise. - */ + /** Returns true if this AbortSignal's AbortController has signaled to abort, and false otherwise. */ readonly aborted: boolean; onabort: ((this: AbortSignal, ev: Event) => any) | null; addEventListener(type: K, listener: (this: AbortSignal, ev: AbortSignalEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; @@ -1912,28 +1867,19 @@ interface AbortSignal extends EventTarget { declare var AbortSignal: { prototype: AbortSignal; new(): AbortSignal; + // abort(): AbortSignal; }; interface AbstractRange { - /** - * Returns true if range is collapsed, and false otherwise. - */ + /** Returns true if range is collapsed, and false otherwise. */ readonly collapsed: boolean; - /** - * Returns range's end node. - */ + /** Returns range's end node. */ readonly endContainer: Node; - /** - * Returns range's end offset. - */ + /** Returns range's end offset. */ readonly endOffset: number; - /** - * Returns range's start node. - */ + /** Returns range's start node. */ readonly startContainer: Node; - /** - * Returns range's start offset. - */ + /** Returns range's start offset. */ readonly startOffset: number; } @@ -2436,19 +2382,13 @@ interface BroadcastChannelEventMap { } interface BroadcastChannel extends EventTarget { - /** - * Returns the channel name (as passed to the constructor). - */ + /** Returns the channel name (as passed to the constructor). */ readonly name: string; onmessage: ((this: BroadcastChannel, ev: MessageEvent) => any) | null; onmessageerror: ((this: BroadcastChannel, ev: MessageEvent) => any) | null; - /** - * Closes the BroadcastChannel object, opening it up to garbage collection. - */ + /** Closes the BroadcastChannel object, opening it up to garbage collection. */ close(): void; - /** - * Sends the given message to other BroadcastChannel objects set up for this channel. Messages can be structured objects, e.g. nested objects and arrays. - */ + /** Sends the given message to other BroadcastChannel objects set up for this channel. Messages can be structured objects, e.g. nested objects and arrays. */ 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; @@ -3358,9 +3298,7 @@ interface CanvasPathDrawingStyles { /** An opaque object describing a pattern, based on an image, a canvas, or a video, created by the CanvasRenderingContext2D.createPattern() method. */ interface CanvasPattern { - /** - * Sets the transformation matrix that will be used when rendering the pattern during a fill or stroke painting operation. - */ + /** Sets the transformation matrix that will be used when rendering the pattern during a fill or stroke painting operation. */ setTransform(transform?: DOMMatrix2DInit): void; } @@ -3475,9 +3413,7 @@ interface ChildNode extends Node { * Throws a "HierarchyRequestError" DOMException if the constraints of the node tree are violated. */ before(...nodes: (Node | string)[]): void; - /** - * Removes node. - */ + /** Removes node. */ remove(): void; /** * Replaces node with nodes, while replacing strings in nodes with equivalent Text nodes. @@ -3520,22 +3456,16 @@ interface ClipboardItem { declare var ClipboardItem: { prototype: ClipboardItem; - new(items: Record, options?: ClipboardItemOptions): 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 { - /** - * Returns the WebSocket connection close code provided by the server. - */ + /** Returns the WebSocket connection close code provided by the server. */ readonly code: number; - /** - * Returns the WebSocket connection close reason provided by the server. - */ + /** Returns the WebSocket connection close reason provided by the server. */ readonly reason: string; - /** - * Returns true if the connection closed cleanly; false otherwise. - */ + /** Returns true if the connection closed cleanly; false otherwise. */ readonly wasClean: boolean; } @@ -3659,9 +3589,7 @@ declare var CustomElementRegistry: { }; interface CustomEvent extends Event { - /** - * Returns any custom data event was created with. Typically used for synthetic events. - */ + /** Returns any custom data event was created with. Typically used for synthetic events. */ readonly detail: T; /** @deprecated */ initCustomEvent(type: string, bubbles?: boolean, cancelable?: boolean, detail?: T): void; @@ -3673,7 +3601,7 @@ declare var CustomEvent: { }; /** An abnormal event (called an exception) which occurs as a result of calling a method or accessing a property of a web API. */ -interface DOMException { +interface DOMException extends Error { readonly code: number; readonly message: string; readonly name: string; @@ -3967,17 +3895,11 @@ declare var DOMRectReadOnly: { /** A type returned by some APIs which contains a list of DOMString (strings). */ interface DOMStringList { - /** - * Returns the number of strings in strings. - */ + /** Returns the number of strings in strings. */ readonly length: number; - /** - * Returns true if strings contains string, and false otherwise. - */ + /** Returns true if strings contains string, and false otherwise. */ contains(string: string): boolean; - /** - * Returns the string with index index from strings. - */ + /** Returns the string with index index from strings. */ item(index: number): string | null; [index: number]: string; } @@ -3999,9 +3921,7 @@ declare var DOMStringMap: { /** A set of space-separated tokens. Such a set is returned by Element.classList, HTMLLinkElement.relList, HTMLAnchorElement.relList, HTMLAreaElement.relList, HTMLIframeElement.sandbox, or HTMLOutputElement.htmlFor. It is indexed beginning with 0 as with JavaScript Array objects. DOMTokenList is always case-sensitive. */ interface DOMTokenList { - /** - * Returns the number of tokens. - */ + /** Returns the number of tokens. */ readonly length: number; /** * Returns the associated set as string. @@ -4018,13 +3938,9 @@ interface DOMTokenList { * Throws an "InvalidCharacterError" DOMException if one of the arguments contains any ASCII whitespace. */ add(...tokens: string[]): void; - /** - * Returns true if token is present, and false otherwise. - */ + /** Returns true if token is present, and false otherwise. */ contains(token: string): boolean; - /** - * Returns the token with index index. - */ + /** Returns the token with index index. */ item(index: number): string | null; /** * Removes arguments passed, if they are present. @@ -4087,33 +4003,19 @@ interface DataTransfer { * The possible values are "none", "copy", "copyLink", "copyMove", "link", "linkMove", "move", "all", and "uninitialized", */ effectAllowed: "none" | "copy" | "copyLink" | "copyMove" | "link" | "linkMove" | "move" | "all" | "uninitialized"; - /** - * Returns a FileList of the files being dragged, if any. - */ + /** Returns a FileList of the files being dragged, if any. */ readonly files: FileList; - /** - * Returns a DataTransferItemList object, with the drag data. - */ + /** Returns a DataTransferItemList object, with the drag data. */ readonly items: DataTransferItemList; - /** - * Returns a frozen array listing the formats that were set in the dragstart event. In addition, if any files are being dragged, then one of the types will be the string "Files". - */ + /** Returns a frozen array listing the formats that were set in the dragstart event. In addition, if any files are being dragged, then one of the types will be the string "Files". */ readonly types: ReadonlyArray; - /** - * Removes the data of the specified formats. Removes all data if the argument is omitted. - */ + /** Removes the data of the specified formats. Removes all data if the argument is omitted. */ clearData(format?: string): void; - /** - * Returns the specified data. If there is no such data, returns the empty string. - */ + /** Returns the specified data. If there is no such data, returns the empty string. */ getData(format: string): string; - /** - * Adds the specified data. - */ + /** Adds the specified data. */ setData(format: string, data: string): void; - /** - * Uses the given element to update the drag feedback, replacing any previously specified feedback. - */ + /** Uses the given element to update the drag feedback, replacing any previously specified feedback. */ setDragImage(image: Element, x: number, y: number): void; } @@ -4124,21 +4026,13 @@ declare var DataTransfer: { /** One drag data item. During a drag operation, each drag event has a dataTransfer property which contains a list of drag data items. Each item in the list is a DataTransferItem object. */ interface DataTransferItem { - /** - * Returns the drag data item kind, one of: "string", "file". - */ + /** Returns the drag data item kind, one of: "string", "file". */ readonly kind: string; - /** - * Returns the drag data item type string. - */ + /** Returns the drag data item type string. */ readonly type: string; - /** - * Returns a File object, if the drag data item kind is File. - */ + /** Returns a File object, if the drag data item kind is File. */ getAsFile(): File | null; - /** - * Invokes the callback with the string data as the argument, if the drag data item kind is text. - */ + /** Invokes the callback with the string data as the argument, if the drag data item kind is text. */ getAsString(callback: FunctionStringCallback | null): void; webkitGetAsEntry(): FileSystemEntry | null; } @@ -4150,22 +4044,14 @@ declare var DataTransferItem: { /** A list of DataTransferItem objects representing items being dragged. During a drag operation, each DragEvent has a dataTransfer property and that property is a DataTransferItemList. */ interface DataTransferItemList { - /** - * Returns the number of items in the drag data store. - */ + /** Returns the number of items in the drag data store. */ readonly length: number; - /** - * Adds a new entry for the given data to the drag data store. If the data is plain text then a type string has to be provided also. - */ + /** Adds a new entry for the given data to the drag data store. If the data is plain text then a type string has to be provided also. */ add(data: string, type: string): DataTransferItem | null; add(data: File): DataTransferItem | null; - /** - * Removes all the entries in the drag data store. - */ + /** Removes all the entries in the drag data store. */ clear(): void; - /** - * Removes the indexth entry in the drag data store. - */ + /** Removes the indexth entry in the drag data store. */ remove(index: number): void; [index: number]: DataTransferItem; } @@ -4234,9 +4120,7 @@ interface DocumentEventMap extends DocumentAndElementEventHandlersEventMap, Glob /** 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, FontFaceSource, GlobalEventHandlers, NonElementParentNode, ParentNode, XPathEvaluatorBase { - /** - * Sets or gets the URL for the current document. - */ + /** Sets or gets the URL for the current document. */ readonly URL: string; /** * Sets or gets the color of all active links in the document. @@ -4263,26 +4147,18 @@ interface Document extends Node, DocumentAndElementEventHandlers, DocumentOrShad * @deprecated */ bgColor: string; - /** - * Specifies the beginning and end of the document body. - */ + /** Specifies the beginning and end of the document body. */ body: HTMLElement; - /** - * Returns document's encoding. - */ + /** Returns document's encoding. */ readonly characterSet: string; /** * Gets or sets the character set used to encode the object. * @deprecated This is a legacy alias of `characterSet`. */ readonly charset: string; - /** - * Gets a value that indicates whether standards-compliant mode is switched on for the object. - */ + /** Gets a value that indicates whether standards-compliant mode is switched on for the object. */ readonly compatMode: string; - /** - * Returns document's content type. - */ + /** Returns document's content type. */ readonly contentType: string; /** * Returns the HTTP cookies that apply to the Document. If there are no cookies or cookies can't be applied to this resource, the empty string will be returned. @@ -4298,87 +4174,55 @@ 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. - */ + /** 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. - */ + /** Sets or gets a value that indicates whether the document can be edited. */ designMode: string; - /** - * Sets or retrieves a value that indicates the reading order of the object. - */ + /** Sets or retrieves a value that indicates the reading order of the object. */ dir: string; - /** - * Gets an object representing the document type declaration associated with the current document. - */ + /** Gets an object representing the document type declaration associated with the current document. */ readonly doctype: DocumentType | null; - /** - * Gets a reference to the root node of the document. - */ + /** Gets a reference to the root node of the document. */ readonly documentElement: HTMLElement; - /** - * Returns document's URL. - */ + /** Returns document's URL. */ readonly documentURI: string; - /** - * Sets or gets the security domain of the document. - */ + /** Sets or gets the security domain of the document. */ domain: string; - /** - * Retrieves a collection of all embed objects in the document. - */ + /** Retrieves a collection of all embed objects in the document. */ readonly embeds: HTMLCollectionOf; /** * Sets or gets the foreground (text) color of the document. * @deprecated */ fgColor: string; - /** - * Retrieves a collection, in source order, of all form objects in the document. - */ + /** Retrieves a collection, in source order, of all form objects in the document. */ readonly forms: HTMLCollectionOf; /** @deprecated */ readonly fullscreen: boolean; - /** - * Returns true if document has the ability to display elements fullscreen and fullscreen is supported, or false otherwise. - */ + /** Returns true if document has the ability to display elements fullscreen and fullscreen is supported, or false otherwise. */ readonly fullscreenEnabled: boolean; - /** - * Returns the head element. - */ + /** Returns the head element. */ readonly head: HTMLHeadElement; readonly hidden: boolean; - /** - * Retrieves a collection, in source order, of img objects in the document. - */ + /** Retrieves a collection, in source order, of img objects in the document. */ readonly images: HTMLCollectionOf; - /** - * Gets the implementation object of the current document. - */ + /** Gets the implementation object of the current document. */ readonly implementation: DOMImplementation; /** * Returns the character encoding used to create the webpage that is loaded into the document object. * @deprecated This is a legacy alias of `characterSet`. */ readonly inputEncoding: string; - /** - * Gets the date that the page was last modified, if the page supplies one. - */ + /** Gets the date that the page was last modified, if the page supplies one. */ readonly lastModified: string; /** * Sets or gets the color of the document links. * @deprecated */ linkColor: string; - /** - * Retrieves a collection of all a objects that specify the href property and all area objects in the document. - */ + /** Retrieves a collection of all a objects that specify the href property and all area objects in the document. */ readonly links: HTMLCollectionOf; - /** - * Contains information about the current URL. - */ + /** Contains information about the current URL. */ get location(): Location; set location(href: string | Location); onfullscreenchange: ((this: Document, ev: Event) => any) | null; @@ -4393,29 +4237,19 @@ interface Document extends Node, DocumentAndElementEventHandlers, DocumentOrShad onvisibilitychange: ((this: Document, ev: Event) => any) | null; readonly ownerDocument: null; readonly pictureInPictureEnabled: boolean; - /** - * Return an HTMLCollection of the embed elements in the Document. - */ + /** Return an HTMLCollection of the embed elements in the Document. */ readonly plugins: HTMLCollectionOf; - /** - * Retrieves a value that indicates the current state of the object. - */ + /** Retrieves a value that indicates the current state of the object. */ readonly readyState: DocumentReadyState; - /** - * Gets the URL of the location that referred the user to the current page. - */ + /** Gets the URL of the location that referred the user to the current page. */ readonly referrer: string; /** @deprecated */ readonly rootElement: SVGSVGElement | null; - /** - * Retrieves a collection of all script objects in the document. - */ + /** Retrieves a collection of all script objects in the document. */ readonly scripts: HTMLCollectionOf; readonly scrollingElement: Element | null; readonly timeline: DocumentTimeline; - /** - * Contains the title of the document. - */ + /** Contains the title of the document. */ title: string; readonly visibilityState: VisibilityState; /** @@ -4435,9 +4269,7 @@ interface Document extends Node, DocumentAndElementEventHandlers, DocumentOrShad caretRangeFromPoint(x: number, y: number): Range | null; /** @deprecated */ clear(): void; - /** - * Closes an output stream and forces the sent data to display. - */ + /** Closes an output stream and forces the sent data to display. */ close(): void; /** * Creates an attribute object with a specified name. @@ -4445,18 +4277,14 @@ interface Document extends Node, DocumentAndElementEventHandlers, DocumentOrShad */ createAttribute(localName: string): Attr; createAttributeNS(namespace: string | null, qualifiedName: string): Attr; - /** - * Returns a CDATASection node whose data is data. - */ + /** Returns a CDATASection node whose data is data. */ createCDATASection(data: string): CDATASection; /** * Creates a comment object with the specified data. * @param data Sets the comment object's data. */ createComment(data: string): Comment; - /** - * Creates a new document. - */ + /** Creates a new document. */ createDocumentFragment(): DocumentFragment; /** * Creates an instance of the element for the specified tag. @@ -4550,13 +4378,9 @@ interface Document extends Node, DocumentAndElementEventHandlers, DocumentOrShad * @param filter A custom NodeFilter function to use. For more information, see filter. Use null for no filter. */ createNodeIterator(root: Node, whatToShow?: number, filter?: NodeFilter | null): NodeIterator; - /** - * Returns a ProcessingInstruction node whose target is target and data is data. If target does not match the Name production an "InvalidCharacterError" DOMException will be thrown. If data contains "?>" an "InvalidCharacterError" DOMException will be thrown. - */ + /** Returns a ProcessingInstruction node whose target is target and data is data. If target does not match the Name production an "InvalidCharacterError" DOMException will be thrown. If data contains "?>" an "InvalidCharacterError" DOMException will be thrown. */ createProcessingInstruction(target: string, data: string): ProcessingInstruction; - /** - * Returns an empty range object that has both of its boundary points positioned at the beginning of the document. - */ + /** Returns an empty range object that has both of its boundary points positioned at the beginning of the document. */ createRange(): Range; /** * Creates a text string from the specified value. @@ -4585,9 +4409,7 @@ interface Document extends Node, DocumentAndElementEventHandlers, DocumentOrShad * @deprecated */ execCommand(commandId: string, showUI?: boolean, value?: string): boolean; - /** - * Stops document's fullscreen element from being displayed fullscreen and resolves promise when done. - */ + /** Stops document's fullscreen element from being displayed fullscreen and resolves promise when done. */ exitFullscreen(): Promise; exitPictureInPicture(): Promise; exitPointerLock(): void; @@ -4596,9 +4418,7 @@ interface Document extends Node, DocumentAndElementEventHandlers, DocumentOrShad * @param elementId String that specifies the ID value. */ getElementById(elementId: string): HTMLElement | null; - /** - * Returns a HTMLCollection of the elements in the object on which the method was invoked (a document or an element) that have all the classes given by classNames. The classNames argument is interpreted as a space-separated list of classes. - */ + /** Returns a HTMLCollection of the elements in the object on which the method was invoked (a document or an element) that have all the classes given by classNames. The classNames argument is interpreted as a space-separated list of classes. */ getElementsByClassName(classNames: string): HTMLCollectionOf; /** * Gets a collection of objects based on the value of the NAME or ID attribute. @@ -4624,13 +4444,9 @@ 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(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. - */ + /** Returns an object representing the current selection of the document that is loaded into the object displaying a webpage. */ getSelection(): Selection | null; - /** - * Gets a value indicating whether the object currently has focus. - */ + /** Gets a value indicating whether the object currently has focus. */ hasFocus(): boolean; hasStorageAccess(): Promise; /** @@ -4736,15 +4552,11 @@ interface DocumentOrShadowRoot { * 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. - */ + /** 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. - */ + /** 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; getAnimations(): Animation[]; } @@ -4772,9 +4584,7 @@ declare var DocumentType: { /** A DOM event that represents a drag and drop interaction. The user initiates a drag by placing a pointer device (such as a mouse) on the touch surface and then dragging the pointer to a new location (such as another DOM element). Applications are free to interpret a drag and drop interaction in an application-specific way. */ interface DragEvent extends MouseEvent { - /** - * Returns the DataTransfer object for the event. - */ + /** Returns the DataTransfer object for the event. */ readonly dataTransfer: DataTransfer | null; } @@ -4851,84 +4661,54 @@ 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, 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. - */ + /** Allows for manipulation of element's class content attribute as a set of whitespace-separated tokens through a DOMTokenList object. */ readonly classList: DOMTokenList; - /** - * Returns the value of element's class content attribute. Can be set to change it. - */ + /** Returns the value of element's class content attribute. Can be set to change it. */ className: string; readonly clientHeight: number; readonly clientLeft: number; readonly clientTop: number; readonly clientWidth: number; - /** - * Returns the value of element's id content attribute. Can be set to change it. - */ + /** Returns the value of element's id content attribute. Can be set to change it. */ id: string; - /** - * Returns the local name. - */ + /** Returns the local name. */ readonly localName: string; - /** - * Returns the namespace. - */ + /** Returns the namespace. */ readonly namespaceURI: string | null; onfullscreenchange: ((this: Element, ev: Event) => any) | null; onfullscreenerror: ((this: Element, ev: Event) => any) | null; outerHTML: string; readonly ownerDocument: Document; readonly part: DOMTokenList; - /** - * Returns the namespace prefix. - */ + /** Returns the namespace prefix. */ readonly prefix: string | null; readonly scrollHeight: number; scrollLeft: number; scrollTop: number; readonly scrollWidth: number; - /** - * Returns element's shadow root, if any, and if shadow root's mode is "open", and null otherwise. - */ + /** Returns element's shadow root, if any, and if shadow root's mode is "open", and null otherwise. */ readonly shadowRoot: ShadowRoot | null; - /** - * Returns the value of element's slot content attribute. Can be set to change it. - */ + /** Returns the value of element's slot content attribute. Can be set to change it. */ slot: string; - /** - * Returns the HTML-uppercased qualified name. - */ + /** Returns the HTML-uppercased qualified name. */ readonly tagName: string; - /** - * Creates a shadow root for element and returns it. - */ + /** Creates a shadow root for element and returns it. */ attachShadow(init: ShadowRootInit): ShadowRoot; - /** - * Returns the first (starting at element) inclusive ancestor that matches selectors, and null otherwise. - */ + /** Returns the first (starting at element) inclusive ancestor that matches selectors, and null otherwise. */ closest(selector: K): HTMLElementTagNameMap[K] | null; closest(selector: K): SVGElementTagNameMap[K] | 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. - */ + /** Returns element's first attribute whose qualified name is qualifiedName, and null if there is no such attribute otherwise. */ getAttribute(qualifiedName: string): string | null; - /** - * Returns element's attribute whose namespace is namespace and local name is localName, and null if there is no such attribute otherwise. - */ + /** Returns element's attribute whose namespace is namespace and local name is localName, and null if there is no such attribute otherwise. */ getAttributeNS(namespace: string | null, localName: string): string | null; - /** - * Returns the qualified names of all element's attributes. Can contain duplicates. - */ + /** Returns the qualified names of all element's attributes. Can contain duplicates. */ getAttributeNames(): string[]; getAttributeNode(qualifiedName: string): Attr | null; getAttributeNodeNS(namespace: string | null, localName: string): Attr | null; getBoundingClientRect(): DOMRect; getClientRects(): DOMRectList; - /** - * Returns a HTMLCollection of the elements in the object on which the method was invoked (a document or an element) that have all the classes given by classNames. The classNames argument is interpreted as a space-separated list of classes. - */ + /** Returns a HTMLCollection of the elements in the object on which the method was invoked (a document or an element) that have all the classes given by classNames. The classNames argument is interpreted as a space-separated list of classes. */ getElementsByClassName(classNames: string): HTMLCollectionOf; getElementsByTagName(qualifiedName: K): HTMLCollectionOf; getElementsByTagName(qualifiedName: K): HTMLCollectionOf; @@ -4936,34 +4716,22 @@ interface Element extends Node, ARIAMixin, Animatable, ChildNode, InnerHTML, Non getElementsByTagNameNS(namespaceURI: "http://www.w3.org/1999/xhtml", localName: string): HTMLCollectionOf; getElementsByTagNameNS(namespaceURI: "http://www.w3.org/2000/svg", 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. - */ + /** Returns true if element has an attribute whose qualified name is qualifiedName, and false otherwise. */ hasAttribute(qualifiedName: string): boolean; - /** - * Returns true if element has an attribute whose namespace is namespace and local name is localName. - */ + /** Returns true if element has an attribute whose namespace is namespace and local name is localName. */ hasAttributeNS(namespace: string | null, localName: string): boolean; - /** - * Returns true if element has attributes, and false otherwise. - */ + /** Returns true if element has attributes, and false otherwise. */ hasAttributes(): boolean; hasPointerCapture(pointerId: number): boolean; 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. - */ + /** Returns true if matching selectors against element's root yields element, and false otherwise. */ matches(selectors: string): boolean; releasePointerCapture(pointerId: number): void; - /** - * Removes element's first attribute whose qualified name is qualifiedName. - */ + /** Removes element's first attribute whose qualified name is qualifiedName. */ removeAttribute(qualifiedName: string): void; - /** - * Removes element's attribute whose namespace is namespace and local name is localName. - */ + /** Removes element's attribute whose namespace is namespace and local name is localName. */ removeAttributeNS(namespace: string | null, localName: string): void; removeAttributeNode(attr: Attr): Attr; /** @@ -4980,13 +4748,9 @@ interface Element extends Node, ARIAMixin, Animatable, ChildNode, InnerHTML, Non scrollIntoView(arg?: boolean | ScrollIntoViewOptions): void; scrollTo(options?: ScrollToOptions): void; scrollTo(x: number, y: number): void; - /** - * Sets the value of element's first attribute whose qualified name is qualifiedName to value. - */ + /** Sets the value of element's first attribute whose qualified name is qualifiedName to value. */ setAttribute(qualifiedName: string, value: string): void; - /** - * Sets the value of element's attribute whose namespace is namespace and local name is localName to value. - */ + /** Sets the value of element's attribute whose namespace is namespace and local name is localName to value. */ setAttributeNS(namespace: string | null, qualifiedName: string, value: string): void; setAttributeNode(attr: Attr): Attr | null; setAttributeNodeNS(attr: Attr): Attr | null; @@ -5037,68 +4801,40 @@ declare var ErrorEvent: { /** An event which takes place in the DOM. */ interface Event { - /** - * Returns true or false depending on how event was initialized. True if event goes through its target's ancestors in reverse tree order, and false otherwise. - */ + /** Returns true or false depending on how event was initialized. True if event goes through its target's ancestors in reverse tree order, and false otherwise. */ readonly bubbles: boolean; cancelBubble: boolean; - /** - * Returns true or false depending on how event was initialized. Its return value does not always carry meaning, but true can indicate that part of the operation during which event was dispatched, can be canceled by invoking the preventDefault() method. - */ + /** Returns true or false depending on how event was initialized. Its return value does not always carry meaning, but true can indicate that part of the operation during which event was dispatched, can be canceled by invoking the preventDefault() method. */ readonly cancelable: boolean; - /** - * Returns true or false depending on how event was initialized. True if event invokes listeners past a ShadowRoot node that is the root of its target, and false otherwise. - */ + /** Returns true or false depending on how event was initialized. True if event invokes listeners past a ShadowRoot node that is the root of its target, and false otherwise. */ readonly composed: boolean; - /** - * Returns the object whose event listener's callback is currently being invoked. - */ + /** Returns the object whose event listener's callback is currently being invoked. */ readonly currentTarget: EventTarget | null; - /** - * Returns true if preventDefault() was invoked successfully to indicate cancelation, and false otherwise. - */ + /** Returns true if preventDefault() was invoked successfully to indicate cancelation, and false otherwise. */ readonly defaultPrevented: boolean; - /** - * Returns the event's phase, which is one of NONE, CAPTURING_PHASE, AT_TARGET, and BUBBLING_PHASE. - */ + /** Returns the event's phase, which is one of NONE, CAPTURING_PHASE, AT_TARGET, and BUBBLING_PHASE. */ readonly eventPhase: number; - /** - * Returns true if event was dispatched by the user agent, and false otherwise. - */ + /** Returns true if event was dispatched by the user agent, and false otherwise. */ readonly isTrusted: boolean; /** @deprecated */ returnValue: boolean; /** @deprecated */ readonly srcElement: EventTarget | null; - /** - * Returns the object to which event is dispatched (its target). - */ + /** Returns the object to which event is dispatched (its target). */ readonly target: EventTarget | null; - /** - * Returns the event's timestamp as the number of milliseconds measured relative to the time origin. - */ + /** Returns the event's timestamp as the number of milliseconds measured relative to the time origin. */ readonly timeStamp: DOMHighResTimeStamp; - /** - * Returns the type of event, e.g. "click", "hashchange", or "submit". - */ + /** Returns the type of event, e.g. "click", "hashchange", or "submit". */ readonly type: string; - /** - * 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. - */ + /** 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. - */ + /** 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. */ preventDefault(): void; - /** - * Invoking this method prevents event from reaching any registered event listeners after the current one finishes running and, when dispatched in a tree, also prevents event from reaching any other objects. - */ + /** Invoking this method prevents event from reaching any registered event listeners after the current one finishes running and, when dispatched in a tree, also prevents event from reaching any other objects. */ stopImmediatePropagation(): void; - /** - * When dispatched in a tree, invoking this method prevents event from reaching any objects other than the current object. - */ + /** When dispatched in a tree, invoking this method prevents event from reaching any objects other than the current object. */ stopPropagation(): void; readonly AT_TARGET: number; readonly BUBBLING_PHASE: number; @@ -5133,21 +4869,13 @@ interface EventSource extends EventTarget { onerror: ((this: EventSource, ev: Event) => any) | null; onmessage: ((this: EventSource, ev: MessageEvent) => any) | null; onopen: ((this: EventSource, ev: Event) => any) | null; - /** - * Returns the state of this EventSource object's connection. It can have the values described below. - */ + /** Returns the state of this EventSource object's connection. It can have the values described below. */ readonly readyState: number; - /** - * Returns the URL providing the event stream. - */ + /** Returns the URL providing the event stream. */ readonly url: string; - /** - * Returns true if the credentials mode for connection requests to the URL providing the event stream is set to "include", and false otherwise. - */ + /** Returns true if the credentials mode for connection requests to the URL providing the event stream is set to "include", and false otherwise. */ readonly withCredentials: boolean; - /** - * Aborts any instances of the fetch algorithm started for this EventSource object, and sets the readyState attribute to CLOSED. - */ + /** Aborts any instances of the fetch algorithm started for this EventSource object, and sets the readyState attribute to CLOSED. */ close(): void; readonly CLOSED: number; readonly CONNECTING: number; @@ -5184,13 +4912,9 @@ interface EventTarget { * 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, callback: EventListenerOrEventListenerObject | 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. - */ + /** 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. */ dispatchEvent(event: Event): boolean; - /** - * Removes the event listener in target's event listener list with the same type, callback, and options. - */ + /** 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; } @@ -5424,9 +5148,7 @@ declare var 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. - */ + /** 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; } @@ -5628,7 +5350,7 @@ interface GlobalEventHandlersEventMap { "selectionchange": Event; "selectstart": Event; "stalled": Event; - "submit": Event; + "submit": SubmitEvent; "suspend": Event; "timeupdate": Event; "toggle": Event; @@ -5883,7 +5605,7 @@ interface GlobalEventHandlers { * @param ev The event. */ onstalled: ((this: GlobalEventHandlers, ev: Event) => any) | null; - onsubmit: ((this: GlobalEventHandlers, ev: Event) => any) | null; + onsubmit: ((this: GlobalEventHandlers, ev: SubmitEvent) => any) | null; /** * Occurs if the load operation has been intentionally halted. * @param ev The event. @@ -5913,9 +5635,13 @@ interface GlobalEventHandlers { * @param ev The event. */ onwaiting: ((this: GlobalEventHandlers, ev: Event) => any) | null; + /** @deprecated This is a legacy alias of `onanimationend`. */ onwebkitanimationend: ((this: GlobalEventHandlers, ev: Event) => any) | null; + /** @deprecated This is a legacy alias of `onanimationiteration`. */ onwebkitanimationiteration: ((this: GlobalEventHandlers, ev: Event) => any) | null; + /** @deprecated This is a legacy alias of `onanimationstart`. */ onwebkitanimationstart: ((this: GlobalEventHandlers, ev: Event) => any) | null; + /** @deprecated This is a legacy alias of `ontransitionend`. */ 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; @@ -5925,13 +5651,9 @@ interface GlobalEventHandlers { } interface HTMLAllCollection { - /** - * Returns the number of elements in the collection. - */ + /** Returns the number of elements in the collection. */ readonly length: number; - /** - * Returns the item with index index from the collection (determined by tree order). - */ + /** Returns the item with index index from the collection (determined by tree order). */ item(nameOrIndex?: string): HTMLCollection | Element | null; /** * Returns the item with ID or name name from the collection. @@ -5962,9 +5684,7 @@ interface HTMLAnchorElement extends HTMLElement, HTMLHyperlinkElementUtils { */ coords: string; download: string; - /** - * Sets or retrieves the language code of the object. - */ + /** Sets or retrieves the language code of the object. */ hreflang: string; /** * Sets or retrieves the shape of the object. @@ -5973,9 +5693,7 @@ interface HTMLAnchorElement extends HTMLElement, HTMLHyperlinkElementUtils { name: string; ping: string; referrerPolicy: string; - /** - * Sets or retrieves the relationship between the object and the destination of the link. - */ + /** Sets or retrieves the relationship between the object and the destination of the link. */ rel: string; readonly relList: DOMTokenList; /** @@ -5988,13 +5706,9 @@ interface HTMLAnchorElement extends HTMLElement, HTMLHyperlinkElementUtils { * @deprecated */ shape: string; - /** - * Sets or retrieves the window or frame at which to target content. - */ + /** Sets or retrieves the window or frame at which to target content. */ target: string; - /** - * Retrieves or sets the text of the object as a string. - */ + /** Retrieves or sets the text of the object as a string. */ text: string; type: string; addEventListener(type: K, listener: (this: HTMLAnchorElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; @@ -6010,13 +5724,9 @@ declare var HTMLAnchorElement: { /** 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 { - /** - * Sets or retrieves a text alternative to the graphic. - */ + /** Sets or retrieves a text alternative to the graphic. */ alt: string; - /** - * Sets or retrieves the coordinates of the object. - */ + /** Sets or retrieves the coordinates of the object. */ coords: string; download: string; /** @@ -6028,13 +5738,9 @@ interface HTMLAreaElement extends HTMLElement, HTMLHyperlinkElementUtils { referrerPolicy: string; rel: string; readonly relList: DOMTokenList; - /** - * Sets or retrieves the shape of the object. - */ + /** Sets or retrieves the shape of the object. */ shape: string; - /** - * Sets or retrieves the window or frame at which to target content. - */ + /** Sets or retrieves the window or frame at which to target content. */ 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; @@ -6080,13 +5786,9 @@ declare var HTMLBRElement: { /** Contains the base URIĀ for a document. This object inherits all of the properties and methods as described in the HTMLElement interface. */ interface HTMLBaseElement extends HTMLElement { - /** - * Gets or sets the baseline URL on which relative links are based. - */ + /** Gets or sets the baseline URL on which relative links are based. */ href: string; - /** - * Sets or retrieves the window or frame at which to target content. - */ + /** Sets or retrieves the window or frame at which to target content. */ target: string; addEventListener(type: K, listener: (this: HTMLBaseElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; @@ -6133,58 +5835,32 @@ declare var HTMLBodyElement: { /** Provides properties and methods (beyond the regular HTMLElement interface it also has available to it by inheritance) for manipulating