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
Current getComposedRanges API has single shadowRoots parameter which is a rest parameter. We propose changing it to a dictionary that contains an array of shadow roots to be consistent with other shadow DOM API:
We would also like to add selectionRoot. This argument "scopes" the selection, so that the returned selection endpoints are always descendants of element.
Further, we need to re-evaluate API changes for the Range and StaticRange interface, to support nodes in different tree. Either we need to update existing definitions or we might need to add new interfaces. Help us resolve these discussions.
dizhang168
changed the title
Change Selection getComposedRanges's shadowRoots parameter from rest parameter to a dictionary
Selection API: getComposedRanges
Aug 2, 2024
We are positive with the API. The parameter changes were talked in TPAC 2024 and it was positive from the Working Group. We still have some discussions about whether we should use Composed Tree or Flat Tree for the Selection API, though I don't think they'll necessarily to impact the shape of getComposedRanges. So we are good.
Request for Mozilla Position on an Emerging Web Specification
@
-mention GitHub accounts): @dizhang168 @mfreed7 @siliu1Other information
Current getComposedRanges API has single shadowRoots parameter which is a rest parameter. We propose changing it to a dictionary that contains an array of shadow roots to be consistent with other shadow DOM API:
We would also like to add
selectionRoot
. This argument "scopes" the selection, so that the returned selection endpoints are always descendants of element.Proposed change:
Further, we need to re-evaluate API changes for the Range and StaticRange interface, to support nodes in different tree. Either we need to update existing definitions or we might need to add new interfaces. Help us resolve these discussions.
See:
Changes to Range, StaticRange: w3c/selection-api#169
Change getComposedRanges’ parameter to a dictionary: w3c/selection-api#176
Change getComposedRanges to have selectionRoot parameter: w3c/selection-api#180
Main: w3c/selection-api#161
The text was updated successfully, but these errors were encountered: