This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
Recent versions of Mozilla, WebKit and Opera all include an extend() method of their Selection objects, implemented (as far as I can tell) identically. I suggest HTML5 should specify this method, for two reasons: 1. It is a de facto standard among the more standards-compliant browsers 2. Vitally, it provides a mechanism for programmatically creating a backwards (i.e. where the focus point comes before the anchor point within the document) selection, which otherwise can be created by the user by dragging "backwards" but not programmatically.
I'm doing this next. Apparently it's more complicated than it looks, but we'll see.
Spec: http://html5.org/specs/dom-range.html#dom-selection-extend Tests: http://aryeh.name/spec/dom-range/test/selection-extend.html This spec isn't currently in W3C space, but that's a detail, so I'll call it FIXED.