[Bug 15533] Index check in selection.extend() should be done before node type test.

https://www.w3.org/Bugs/Public/show_bug.cgi?id=15533

Aryeh Gregor <ayg@aryeh.name> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #1 from Aryeh Gregor <ayg@aryeh.name> 2012-01-12 17:13:08 UTC ---
Actually, it seems like I should just reference DOM4's "set the start or end"
algorithm for simplicity.  This results in throwing InvalidNodeTypeError first.
 This:

  document.createRange().setStart(document.doctype, -13);

throws InvalidNodeTypeError in Firefox 12.0a1 and Chrome 17 dev, per DOM4; and
IndexSizeError in IE9 and Opera Next 12.00 alpha, not per DOM4.  We should be
consistent and throw InvalidNodeTypeError for extend() just like setStart().

I've changed the spec to reference DOM4's algorithm, which I believe makes the
tests correct:

http://dvcs.w3.org/hg/editing/rev/0ef300a5c14f

Please tell me if this isn't satisfactory.  Thanks!

-- 
Configure bugmail: https://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

Received on Thursday, 12 January 2012 17:17:19 UTC