W3C home > Mailing lists > Public > www-dom@w3.org > October to December 2000

Re: range boundary point update after insertion

From: Joseph Kesselman <keshlam@us.ibm.com>
Date: Fri, 1 Dec 2000 13:05:25 -0500
To: tng@ca.ibm.com
Cc: www-dom@w3.org
Message-ID: <OFC75E5666.F6889B9E-ON852569A8.0062D3E0@pok.ibm.com>

CAVEAT: I haven't rechecked the Range spec, so I could be wrong... but I
think what we intended was that after an insertion into the middle of a
range, the range should still cover everything that it used to cover plus
the inserted data.

So for your example:

   <root>hello</root>

   Range:
     start container: hello
     start offset: 1
     end container: root
     end offset: 1

followed by rangeA.insertNode(foo), I would expect

   <root>h<foo/>ello</root>

   Range:
     start container: h
     start offset: 1
     end container: root
     end offset: 3

______________________________________
Joe Kesselman  / IBM Research
Received on Friday, 1 December 2000 13:05:34 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:13:48 GMT