Closed siliu1 closed 1 month ago
@mfreed7 FYI.
@mfreed7 FYI.
LGTM! Thanks.
The API has shipped already in webkit, right?
@sefeng211
I think that's a prototype implementation, though, right? The spec hasn't been reviewed by another implementer that I know of. Or perhaps Mozilla did?
Anyway, this seems reasonable. We will now have this pattern three places, getHTML()
, caretPositionFromPoint()
, and here with getComposedRanges()
- it would be good if they all followed the same pattern.
Yeah it's shipped in Webkit. cc @rniwa
Even though Webkit has shipped getComposedRanges, this question is still unanswered. @rniwa @sefeng211 What do you think of this proposal?
Looks reasonable to me
@johanneswilm Can we add this to the agenda for the next Editing WG meeting? I don't have permissions to add the "Agenda+" label.
This seems like a reasonable approach (it's similar to how focus()
takes a parameter dictionary, as well as other APIs). Tagging a few more folks from Apple:
@rniwa @megangardner @annevk @marcoscaceres, any thoughts?
That seems reasonable although it's possible we'd hit some web compatibility issues given we've already shipped this API.
Current spec of
getComposedRanges
API has singleshadowRoots
parameter which is a rest parameter. We should change it to a dictionary that contains an array of shadow roots. Similar to https://html.spec.whatwg.org/#gethtmloptions. It'd be good to be consistent.Proposed change: