Need spec changes to Range and StaticRange to support nodes in different tree?

Open
#169 13 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
html
Domain
api, web-dev

Research direction

Start with the linked StaticRange validity definition and the Range SetStart/SetEnd behavior, then trace how getComposedRanges() is specified across shadow boundaries. Done means the spec records an agreed, internally consistent treatment of cross-tree ranges and answers both questions raised here.

Written by the indexing model from the issue text.

Description

It's unclear to me about how we want to express allowing nodes across the shadow boundary for range in the spec.

The first example is StaticRange has a definition for valid, which specifies this StaticRange is invalid if nodes are in different tree. In the same time, getComposedRanges() would return invalid StaticRanges. Is this expected?

The second example is Range::SetStart and Range::SetEnd would collapse nodes to one point if they are in different trees. Shouldn't we also loose this requirement since we are supporting selection across the boundary?

Dominant language
HTML
Stars
49
Forks
30
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from w3c/selection-api

All issues in w3c/selection-api

Similar issues

More Backend & API Design issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.