Bug 14140 - Use CaretPosition for range boundary points?
Summary: Use CaretPosition for range boundary points?
Alias: None
Product: WebAppsWG
Classification: Unclassified
Component: DOM (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: Anne
QA Contact: public-webapps-bugzilla
Depends on:
Reported: 2011-09-13 13:29 UTC by Anne
Modified: 2012-05-15 10:49 UTC (History)
3 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Anne 2011-09-13 13:29:27 UTC
Should range boundary points have an object representation in the form of http://www.w3.org/TR/cssom-view/#caretposition and should that interface therefore carry a slightly different name?
Comment 1 Aryeh Gregor 2011-09-13 20:38:27 UTC
The semantics of CaretPosition are slightly but significantly different.  For <input> or <textarea> or such, the offset of a CaretPosition (at least as returned by caretPositionFromPoint()) is the offset into the element's value, not its children.

An object representation of a boundary point would have been great to have, because maybe it would have averted insanity like the first argument of Range.compareBoundaryPoints.  But I think it's too late now to usefully add such an interface.  What would we do with it?  There's too much redundancy in Range as it stands.
Comment 2 Anne 2012-05-15 10:49:13 UTC
Nobody seems to care much for this.