w3c/csswg-drafts

[cssom-view] ShadowRoot should also have elementFromPoint and elementsFromPoint

foolip opened this issue · 5 comments

See #556 (comment) onward.

The Shadow DOM spec used to declare that DocumentOrShadowRoot is extended with elementFromPoint and elementsFromPoint. Here's the latest web archive snapshot that still says so: https://web.archive.org/web/20180228173001/http://www.w3.org/TR/shadow-dom/

It seems that was since changed to a short page that basically just says:

Shadow DOM specification is being incorporated into to the DOM specification, HTML specification, CSS Scoping Module Level 1, UI Events specification, and other relevant specifications.

I guess that was related to WICG/webcomponents#661 but I'm also very confused by where did that definition go.

The only current spec mentioning elementFromPoint and elementsFromPoint that I could find now is the CSSOM View Module draft that specifies them on the Document only.

rniwa commented

We should also add caretPositionFromPoint to ShadowRoot as well.

Supporting shadow DOM content in elementFromPoint/elementsFromPoint came up again during the TAG review for caretPositionFromPoint: w3ctag/design-reviews#949. In terms of API consistency, updating elementFromPoint/elementsFromPoint makes total sense. Do we have any signals about developers wanting this?

Supporting shadow DOM content in elementFromPoint/elementsFromPoint came up again during the TAG review for caretPositionFromPoint: w3ctag/design-reviews#949. In terms of API consistency, updating elementFromPoint/elementsFromPoint makes total sense. Do we have any signals about developers wanting this?

Filed #10992 to cover this.