Proposed errata for DOM2 Range regarding insertNode()

DOM2 Traversal and Range has a number of problems, and really needs a 
rewrite. However, in the absence of the resources to do that, I realised 
that we could settle for releasing some errata. Arguably we as a working 
group have somewhat the authority to do that, so here's a proposal for a 
simple errata for DOM2 Range. If this works process out well, I'll see if 
there are other things in DOM2 we should errata sooner rather than waiting 
for wholesale DOM3 or DOM4 updates.

DOM2 Range says of the insertNode() method that "A node may be inserted 
into a Range using the following method". However, if the range is 
collapsed, according to a strict reading of the specification, calling 
insertNode() actually inserts the node _after_ the range. I propose that 
we change the spec to explicitly say that if you call insertNode() on a 
collapsed range, the end point offset is increased by one, as if the node 
was inserted before the end point, which I believe to be the intent of the 
specification. This is implemented by Opera and WebKit already, and is 
tested by Acid3.

If the working group chair will forgive me, I suggest we set a deadline of 
May 21st (a week from today) at which point if there have been no 
objections raised we go ahead and make the change to the DOM2 errata.

Cheers,
-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

Received on Wednesday, 14 May 2008 08:39:56 UTC