This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
Selection.setBaseAndExtent is not defined in a standard, but it exists in WebKit and is used on the web. We should consider specifying it for compatibility. I was unable to find documentation, but there is a use case below. http://stackoverflow.com/questions/985272/jquery-selecting-text-in-an-element-akin-to-highlighting-with-your-mouse
Proposed text, based on the text for collapse(): void setBaseAndExtent (Node baseNode, unsigned long baseOffset, Node extentNode, unsigned long extentOffset); The method must throw an IndexSizeError exception if offset is negative or longer than node's length ([DOM4]). Otherwise, it must create a new range, set ([DOM4]) its start to (baseNode, baseOffset) and its and end to (extentNode, extentOffset), and set the context object's range to the newly-created range.
Added in https://github.com/w3c/selection-api/commit/6f65ef0a55dfe60d8fce687e6b7dc6b103ae965f.