- From: CSS Meeting Bot via GitHub <sysbot+gh@w3.org>
- Date: Wed, 03 Apr 2024 23:16:23 +0000
- To: public-css-archive@w3.org
The CSS Working Group just discussed `[cssom-view] Specify document.caretPositionFromPoint in shadow DOM scenario`, and agreed to the following: * `RESOLVED: add shadowRoots parameter to caretPositionFromPoint, same as getComposedRanges` <details><summary>The full IRC log of that discussion</summary> <fantasai> Liu: This API is defined in cssom-view, and spec doesn't have a definition for behavior in shadow DOM<br> <fantasai> Liu: Existing behavior is [missed]<br> <fantasai> Liu: Other alternatives are to not pierce shadow DOM<br> <fantasai> Liu: Another approach is to add a new parameter with set of shadow roots, and will return positio inside the shadow roots<br> <fantasai> Liu: Gathered feedback from community, and preference is to add parameter and only pierce the specified shadow roots<br> <fantasai> Liu: If this is acceptable, should we adopt?<br> <fantasai> Liu: Firefox's implementation is that the API can pierce the shadow tree, and tree can be open or closed shadow tree<br> <fantasai> mfreed: I'm definitely not a fan of revealing contents of shadow trees, particularly closed ones<br> <fantasai> mfreed: I heard proposed to use getComposedRanges behavior, where if you don't know about the shadow tree you get the shadow host<br> <dandclark> q+<br> <sanketj_> q+<br> <fantasai> astearns: I'm not familiar with these APIs. Is getComposedRanges same pattern as what's proposed here?<br> <fantasai> mfreed: Yes. parameters to say which you know about, and it will pierce those, and give you host for those that you don't<br> <astearns> ack dandclark<br> <fantasai> dandclark: getComposedRanges spec link dropped in the issue doesn't take a parameter<br> <fantasai> dandclark: do browsers implement something else?<br> <fantasai> mfreed: It's only implemented in WebKit, definitely not in Blink yet<br> <fantasai> astearns: Looking at WebIDL there's a parameter, just not in description<br> <fantasai> dandclark: OK<br> <astearns> ack sanketj_<br> <dholbert> q+<br> <fantasai> sanketj_: Seems that Firefox is only one that pierces closed shadow tree, so getComposedRanges addresses that, so +1<br> <astearns> ack dholbert<br> <fantasai> dholbert: With this version of the API, that takes list of shadow roots to pierce, if web developer listed every shadow root in their page they would get existing Firefox behavior?<br> <fantasai> mfreed: yes, but not possible if you don't have reference to the shadow root you can't provide it<br> <fantasai> mfreed: so e.g. closed shadow root, unless you set it up, you can't get it<br> <fantasai> astearns: wrt the spec descriptions, the descriptions don't mention parameters, but the algorithms do process them<br> <fantasai> astearns: Sounds like we're ready to resolve? Any additional comments?<br> <fantasai> astearns: Proposed resolution is that caretPositionFromPoint can follow the getComposedRanges behavior and have a shadowRoots parameter<br> <fantasai> RESOLVED: add shadowRoots parameter to caretPositionFromPoint, same as getComposedRanges<br> </details> -- GitHub Notification of comment by css-meeting-bot Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/9932#issuecomment-2035793983 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Wednesday, 3 April 2024 23:16:24 UTC