diff --git a/baselines/dom.generated.d.ts b/baselines/dom.generated.d.ts index 457ab59da..679d0cd35 100644 --- a/baselines/dom.generated.d.ts +++ b/baselines/dom.generated.d.ts @@ -4394,13 +4394,6 @@ interface Document extends Node, DocumentAndElementEventHandlers, DocumentOrShad * @param filter A custom NodeFilter function to use. */ createTreeWalker(root: Node, whatToShow?: number, filter?: NodeFilter | null): TreeWalker; - /** - * Returns the element for the specified x coordinate and the specified y coordinate. - * @param x The x-offset - * @param y The y-offset - */ - elementFromPoint(x: number, y: number): Element | null; - elementsFromPoint(x: number, y: number): Element[]; /** * Executes a command on the current document, current selection, or the given range. * @param commandId String that specifies the command to execute. This command can be any of the command identifiers that can be executed in script. @@ -4558,6 +4551,13 @@ interface DocumentOrShadowRoot { 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; + /** + * Returns the element for the specified x coordinate and the specified y coordinate. + * @param x The x-offset + * @param y The y-offset + */ + elementFromPoint(x: number, y: number): Element | null; + elementsFromPoint(x: number, y: number): Element[]; getAnimations(): Animation[]; } @@ -13348,7 +13348,6 @@ declare var SubtleCrypto: { /** The textual content of Element or Attr. If an element has no markup within its content, it has a single child implementing Text that contains the element's text. However, if the element contains markup, it is parsed into information items and Text nodes that form its children. */ interface Text extends CharacterData, Slottable { - readonly assignedSlot: HTMLSlotElement | null; /** Returns the combined data of all direct Text node siblings. */ readonly wholeText: string; /** Splits data at the given offset and returns the remainder as Text node. */ diff --git a/inputfiles/addedTypes.jsonc b/inputfiles/addedTypes.jsonc index 8c9c80aa5..ebbbcb860 100644 --- a/inputfiles/addedTypes.jsonc +++ b/inputfiles/addedTypes.jsonc @@ -29,6 +29,26 @@ ] } }, + "DocumentOrShadowRoot": { + // Manually moved from Document + // See https://github.com/w3c/csswg-drafts/issues/5886 and https://github.com/w3c/csswg-drafts/issues/556 + "methods": { + "method": { + "elementFromPoint": { + "name": "elementFromPoint", + "overrideSignatures": [ + "elementFromPoint(x: number, y: number): Element | null" + ] + }, + "elementsFromPoint": { + "name": "elementsFromPoint", + "overrideSignatures": [ + "elementsFromPoint(x: number, y: number): Element[]" + ] + } + } + } + }, "GlobalEventHandlers": { "events": { "event": [ @@ -581,8 +601,7 @@ ] } } - }, - + } }, "EventListenerObject": { "name": "EventListenerObject", @@ -595,7 +614,7 @@ ] } } - }, + } }, "Document": { "methods": { @@ -748,18 +767,6 @@ ] } }, - "Text": { - "name": "Text", - "properties": { - "property": { - "assignedSlot": { - "name": "assignedSlot", - "readonly": true, - "overrideType": "HTMLSlotElement | null" - } - } - } - }, "TextTrackList": { "events": { "event": [ diff --git a/inputfiles/comments.json b/inputfiles/comments.json index f14b0a1da..0ed7935e6 100644 --- a/inputfiles/comments.json +++ b/inputfiles/comments.json @@ -2,6 +2,13 @@ "mixins": { "mixin": { "DocumentOrShadowRoot": { + "methods": { + "method": { + "elementFromPoint": { + "comment": "Returns the element for the specified x coordinate and the specified y coordinate.\n@param x The x-offset\n@param y The y-offset" + } + } + }, "properties": { "property": { "styleSheets": { @@ -752,9 +759,6 @@ "execCommand": { "comment": "Executes a command on the current document, current selection, or the given range.\n@param commandId String that specifies the command to execute. This command can be any of the command identifiers that can be executed in script.\n@param showUI Display the user interface, defaults to false.\n@param value Value to assign." }, - "elementFromPoint": { - "comment": "Returns the element for the specified x coordinate and the specified y coordinate.\n@param x The x-offset\n@param y The y-offset" - }, "write": { "comment": "Writes one or more HTML expressions to a document in the specified window.\n@param content Specifies the text and HTML tags to write." }, diff --git a/inputfiles/removedTypes.jsonc b/inputfiles/removedTypes.jsonc index ef3fc22de..704481291 100644 --- a/inputfiles/removedTypes.jsonc +++ b/inputfiles/removedTypes.jsonc @@ -64,6 +64,14 @@ } }, "Document": { + "methods": { + "method": { + // Manually moved to DocumentOrShadowRoot + // See https://github.com/w3c/csswg-drafts/issues/5886 and https://github.com/w3c/csswg-drafts/issues/556 + "elementFromPoint": null, + "elementsFromPoint": null + } + }, "implements": ["GeometryUtils"] }, "Element": {