Open foolip opened 3 years ago
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 https://github.com/WICG/webcomponents/issues/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.
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
: https://github.com/w3ctag/design-reviews/issues/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 forcaretPositionFromPoint
: w3ctag/design-reviews#949. In terms of API consistency, updatingelementFromPoint
/elementsFromPoint
makes total sense. Do we have any signals about developers wanting this?
Filed https://github.com/w3c/csswg-drafts/issues/10992 to cover this.
https://drafts.csswg.org/cssom-view/#extensions-to-the-document-interface defines
elementFromPoint
andelementsFromPoint
methods onDocument
, but Chromium, Gecko and WebKit all have these members in theDocumentOrShadowRoot
mixin: https://chromium.googlesource.com/chromium/src/+/5aded22f34131a7d136f7fff2b6b28b8387ad961/third_party/blink/renderer/core/dom/document_or_shadow_root.idl https://hg.mozilla.org/mozilla-central/file/a2507ffc9d4db5109a491d91f4c4c1e5a8dd0e2e/dom/webidl/DocumentOrShadowRoot.webidl https://trac.webkit.org/browser/webkit/trunk/Source/WebCore/dom/DocumentOrShadowRoot.idl?rev=271743The net effect is that they're on
ShadowRoot
, not justDocument
, but that no spec seems to capture this.cc @annevk @mfreed7 @rniwa