diff --git a/baselines/dom.generated.d.ts b/baselines/dom.generated.d.ts index 2db5c6695..647f72f1c 100644 --- a/baselines/dom.generated.d.ts +++ b/baselines/dom.generated.d.ts @@ -1921,6 +1921,9 @@ interface AbortController { declare var AbortController: { prototype: AbortController; + /** + * Returns a new controller whose signal is set to a newly created AbortSignal object. + */ new(): AbortController; }; @@ -2127,12 +2130,29 @@ interface ApplicationCache extends EventTarget { onprogress: ((this: ApplicationCache, ev: ProgressEvent) => any) | null; /** @deprecated */ onupdateready: ((this: ApplicationCache, ev: Event) => any) | null; + /** + * Returns the current status of the application cache, as given by the constants defined below. + */ /** @deprecated */ readonly status: number; + /** + * Cancels the application cache download process. + * + * This method is intended to be used by web application showing their own caching progress UI, in case the user wants to stop the update (e.g. because bandwidth is limited). + */ /** @deprecated */ abort(): void; /** @deprecated */ swapCache(): void; + /** + * Invokes the application cache download process. + * + * Throws an "InvalidStateError" DOMException if there is no application cache to update. + * + * Calling this method is not usually necessary, as user agents will generally take care of updating application caches automatically. + * + * The method can be useful in situations such as long-lived applications. For example, a web mail application might stay open in a browser tab for weeks at a time. Such an application could want to test for updates each day. + */ /** @deprecated */ update(): void; readonly CHECKING: number; @@ -3277,14 +3297,23 @@ interface CanvasDrawImage { interface CanvasDrawPath { beginPath(): void; + /** + * Further constrains the clipping region to the current default path or the given path, using the given fill rule to determine what points are in the path. + */ clip(fillRule?: CanvasFillRule): void; clip(path: Path2D, fillRule?: CanvasFillRule): void; + /** + * Fills the subpaths of the current default path or the given path with the current fill style, obeying the given fill rule. + */ fill(fillRule?: CanvasFillRule): void; fill(path: Path2D, fillRule?: CanvasFillRule): void; isPointInPath(x: number, y: number, fillRule?: CanvasFillRule): boolean; isPointInPath(path: Path2D, x: number, y: number, fillRule?: CanvasFillRule): boolean; isPointInStroke(x: number, y: number): boolean; isPointInStroke(path: Path2D, x: number, y: number): boolean; + /** + * Strokes the subpaths of the current default path or the given path with the current stroke style. + */ stroke(): void; stroke(path: Path2D): void; } @@ -3298,6 +3327,11 @@ interface CanvasFillStrokeStyles { } interface CanvasFilters { + /** + * Returns the current filter. + * + * Can be set, to change the filter. Values that cannot be parsed as a value are ignored. + */ filter: string; } @@ -3330,14 +3364,27 @@ interface CanvasImageSmoothing { } interface CanvasPath { + /** + * Adds points to the subpath such that the arc described by the circumference of the circle described by the arguments, starting at the given start angle and ending at the given end angle, going in the given direction (defaulting to clockwise), is added to the path, connected to the previous point by a straight line. + * + * Throws an "IndexSizeError" DOMException if the given radius is negative. + */ arc(x: number, y: number, radius: number, startAngle: number, endAngle: number, anticlockwise?: 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; + /** + * Adds points to the subpath such that the arc described by the circumference of the ellipse described by the arguments, starting at the given start angle and ending at the given end angle, going in the given direction (defaulting to clockwise), is added to the path, connected to the previous point by a straight line. + * + * Throws an "IndexSizeError" DOMException if the given radius is negative. + */ ellipse(x: number, y: number, radiusX: number, radiusY: number, rotation: number, startAngle: number, endAngle: number, anticlockwise?: boolean): void; lineTo(x: number, y: number): void; moveTo(x: number, y: number): void; quadraticCurveTo(cpx: number, cpy: number, x: number, y: number): void; + /** + * Adds a new closed subpath to the path, representing the given rectangle. + */ rect(x: number, y: number, w: number, h: number): void; } @@ -3372,6 +3419,9 @@ interface CanvasRect { /** The CanvasRenderingContext2D interface, part of the Canvas API, provides the 2D rendering context for the drawing surface of a element. It is used for drawing shapes, text, images, and other objects. */ interface CanvasRenderingContext2D extends CanvasCompositing, CanvasDrawImage, CanvasDrawPath, CanvasFillStrokeStyles, CanvasFilters, CanvasImageData, CanvasImageSmoothing, CanvasPath, CanvasPathDrawingStyles, CanvasRect, CanvasShadowStyles, CanvasState, CanvasText, CanvasTextDrawingStyles, CanvasTransform, CanvasUserInterface { + /** + * Returns the canvas element. + */ readonly canvas: HTMLCanvasElement; } @@ -3388,7 +3438,13 @@ interface CanvasShadowStyles { } interface CanvasState { + /** + * Pops the top state on the stack, restoring the context to that state. + */ restore(): void; + /** + * Pushes the current state onto the stack. + */ save(): void; } @@ -3399,7 +3455,19 @@ interface CanvasText { } interface CanvasTextDrawingStyles { + /** + * Returns the current directionality. + * + * Can be set, to change the directionality. The possible values and their meanings are given below. Other values are ignored. The default is "inherit". + */ direction: CanvasDirection; + /** + * Returns the current font settings. + * + * Can be set, to change the font. The syntax is the same as for the CSS 'font' property; values that cannot be parsed as CSS font values are ignored. + * + * Relative keywords and lengths are computed relative to the font of the canvas element. + */ font: string; textAlign: CanvasTextAlign; textBaseline: CanvasTextBaseline; @@ -3408,11 +3476,23 @@ interface CanvasTextDrawingStyles { interface CanvasTransform { getTransform(): DOMMatrix; resetTransform(): void; + /** + * Changes the current transformation matrix to apply a rotation transformation with the given characteristics. The angle is in radians. + */ rotate(angle: number): void; + /** + * Changes the current transformation matrix to apply a scaling transformation with the given characteristics. + */ scale(x: number, y: number): void; setTransform(a: number, b: number, c: number, d: number, e: number, f: number): void; setTransform(transform?: DOMMatrix2DInit): void; + /** + * Changes the current transformation matrix to apply the matrix given by the arguments as described below. + */ transform(a: number, b: number, c: number, d: number, e: number, f: number): void; + /** + * Changes the current transformation matrix to apply a translation transformation with the given characteristics. + */ translate(x: number, y: number): void; } @@ -3566,6 +3646,9 @@ interface Comment extends CharacterData { declare var Comment: { prototype: Comment; + /** + * Returns a new Comment node whose data is data. + */ new(data?: string): Comment; }; @@ -3702,6 +3785,9 @@ interface CustomEvent extends Event { declare var CustomEvent: { prototype: CustomEvent; + /** + * Works analogously to the constructor for Event except that the eventInitDict argument now allows for setting the detail attribute too. + */ new(typeArg: string, eventInitDict?: CustomEventInit): CustomEvent; }; @@ -3918,6 +4004,9 @@ interface DOMParser { declare var DOMParser: { prototype: DOMParser; + /** + * Constructs a new DOMParser object. + */ new(): DOMParser; }; @@ -4846,6 +4935,9 @@ interface Document extends Node, DocumentAndElementEventHandlers, DocumentOrShad declare var Document: { prototype: Document; + /** + * Returns a new document. + */ new(): Document; }; @@ -4954,6 +5046,9 @@ interface DocumentFragment extends Node, NonElementParentNode, ParentNode { declare var DocumentFragment: { prototype: DocumentFragment; + /** + * Returns a new DocumentFragment node. + */ new(): DocumentFragment; }; @@ -5312,6 +5407,9 @@ interface Event { declare var Event: { prototype: Event; + /** + * Returns a new event whose type attribute value is set to type. The eventInitDict argument allows for setting the bubbles and cancelable attributes via object members of the same name. + */ new(type: string, eventInitDict?: EventInit): Event; readonly AT_TARGET: number; readonly BUBBLING_PHASE: number; @@ -5394,6 +5492,9 @@ interface EventTarget { declare var EventTarget: { prototype: EventTarget; + /** + * Creates a new EventTarget object, which can be used by developers to dispatch and listen for events. + */ new(): EventTarget; }; @@ -6498,6 +6599,9 @@ declare var HTMLDataElement: { /** Provides special properties (beyond the HTMLElement object interface it also has available to it by inheritance) to manipulate elements and their content. */ interface HTMLDataListElement extends HTMLElement { + /** + * Returns an HTMLCollection of the option elements of the datalist element. + */ readonly options: HTMLCollectionOf; addEventListener(type: K, listener: (this: HTMLDataListElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; @@ -6526,7 +6630,15 @@ declare var HTMLDetailsElement: { interface HTMLDialogElement extends HTMLElement { open: boolean; returnValue: string; + /** + * Closes the dialog element. + * + * The argument, if provided, provides a return value. + */ close(returnValue?: string): void; + /** + * Displays the dialog element. + */ show(): void; showModal(): void; addEventListener(type: K, listener: (this: HTMLDialogElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; @@ -6655,12 +6767,18 @@ declare var HTMLEmbedElement: { /** Provides special properties and methods (beyond the regular HTMLElement interface it also has available to it by inheritance) for manipulating the layout and presentation of
elements. */ interface HTMLFieldSetElement extends HTMLElement { disabled: boolean; + /** + * Returns an HTMLCollection of the form controls in the element. + */ readonly elements: HTMLCollection; /** * Retrieves a reference to the form that the object is embedded in. */ readonly form: HTMLFormElement | null; name: string; + /** + * Returns the string "fieldset". + */ readonly type: string; /** * Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as "this is a required field". The result is that the user sees validation messages without actually submitting. @@ -6974,17 +7092,70 @@ declare var HTMLHtmlElement: { }; interface HTMLHyperlinkElementUtils { + /** + * Returns the hyperlink's URL's fragment (includes leading "#" if non-empty). + * + * Can be set, to change the URL's fragment (ignores leading "#"). + */ hash: string; + /** + * Returns the hyperlink's URL's host and port (if different from the default port for the scheme). + * + * Can be set, to change the URL's host and port. + */ host: string; + /** + * Returns the hyperlink's URL's host. + * + * Can be set, to change the URL's host. + */ hostname: string; + /** + * Returns the hyperlink's URL. + * + * Can be set, to change the URL. + */ href: string; toString(): string; + /** + * Returns the hyperlink's URL's origin. + */ readonly origin: string; + /** + * Returns the hyperlink's URL's password. + * + * Can be set, to change the URL's password. + */ password: string; + /** + * Returns the hyperlink's URL's path. + * + * Can be set, to change the URL's path. + */ pathname: string; + /** + * Returns the hyperlink's URL's port. + * + * Can be set, to change the URL's port. + */ port: string; + /** + * Returns the hyperlink's URL's scheme. + * + * Can be set, to change the URL's scheme. + */ protocol: string; + /** + * Returns the hyperlink's URL's query (includes leading "?" if non-empty). + * + * Can be set, to change the URL's query (ignores leading "?"). + */ search: string; + /** + * Returns the hyperlink's URL's username. + * + * Can be set, to change the URL's username. + */ username: string; } @@ -7221,6 +7392,9 @@ interface HTMLInputElement extends HTMLElement { * Sets or retrieves the height of the object. */ height: number; + /** + * When set, overrides the rendering of checkbox controls so that the current value is not visible. + */ indeterminate: boolean; readonly labels: NodeListOf | null; /** @@ -7381,6 +7555,9 @@ declare var HTMLLIElement: { /** Gives access to properties specific to