You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some replies to my "Do you wish it would across Shadow DOM boundaries "question:
In my use case, whether I want it to cross Shadow DOM boundaries would depend on how "thick" the custom elements are. If thin, I wouldn't care. If they encompassed too much in the page, then yeah I'd want a more fine-grained approach.
YES
ABSOLUTELY YES
I'm not sure whether it should cross shadow boundaries on its own. I could maybe see an option, so you had to do work to get through, but didn't need to write your own recursive method.
I think I’d want to be explicit about getting any element from within a shadow root, so maybe if there was an option to include shadow roots.
Absolutely yes! Eventually, it could be a parameter option, like document.elementsFromPoint({ composed: true }) or similar.
I would reiterate that elementFromPoint() could also be expanded in the same way for consistency (and I suspect there are plenty of use cases for that too).
The text was updated successfully, but these errors were encountered:
To clarify: Is the proposal to extend elementFromPoint / elementsFromPoint with an optional options parameter which can contain a list of shadowRoots, similar to what we added to caretPositionFromPoint?
To clarify: Is the proposal to extend elementFromPoint / elementsFromPoint with an optional options parameter which can contain a list of shadowRoots, similar to what we added to caretPositionFromPoint?
I recently asked on Mastodon if folks knew the
element(s)FromPoint()
methods and whether they'd want them to be able to traverse shadow roots: https://mas.to/@patrickbrosset/113236606097090887Some replies to my "Do you wish it would across Shadow DOM boundaries "question:
Note that
caretPositionFromPoint
already works this way: https://developer.mozilla.org/en-US/docs/Web/API/Document/caretPositionFromPoint#shadowrootsAlso, during the TAG review for
caretPositionFromPoint
@LeaVerou said (w3ctag/design-reviews#949 (comment)):The text was updated successfully, but these errors were encountered: