Skip to content

Commit a89c658

Browse files
[FormControlRange] Add naming of setFormControlRange() to Open Questions (#1165)
The redundant naming of setFormControlRange() came up during [spec discussions](https://github.com/whatwg/dom/pull/1404/files#r2380522739), so adding the question to the Explainer.
1 parent ba19187 commit a89c658

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

FormControlRange/explainer.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -581,7 +581,7 @@ It has been [discussed](https://github.com/whatwg/html/issues/11478#issuecomment
581581
Such use cases might also prompt revisiting the current `FormControlRange` name in favor of something broader, such as `ElementRange`, to better reflect its applicability beyond form controls.
582582

583583
## Open Questions
584-
How should `FormControlRange` behave when callers provide reversed offsets (i.e. `startOffset > endOffset`)?
584+
#### How should `FormControlRange` behave when callers provide reversed offsets (i.e. `startOffset > endOffset`)?
585585

586586
Consider the following ideas:
587587
- Throw `IndexSizeError`.
@@ -607,6 +607,8 @@ range.setFormControlRange(input, 4, 0);
607607

608608
Note: With reversed endpoints, DOM `Range` setters collapse them to a single point, whereas `Selection` preserves directionality (anchor/focus). Collapsing is the current interoperable behavior, but alternatives remain open for discussion.
609609

610+
#### Is `setFormControlRange()` redundant with the type name? Would `setRange`, `set`, `setStartAndEnd`, or something else better align with `Range`/`StaticRange` naming?
611+
610612
## References & acknowledgements
611613

612614
Many thanks for valuable feedback and advice from:

0 commit comments

Comments
 (0)