W3C home > Mailing lists > Public > www-dom@w3.org > July to September 2006

Re: insertAfter

From: Boris Zbarsky <bzbarsky@mit.edu>
Date: Tue, 05 Sep 2006 01:29:34 -0500
Message-ID: <44FD194E.9020004@mit.edu>
To: Joao Eiras <joao.eiras@gmail.com>
CC: www-dom@w3.org

Joao Eiras wrote:
> This isn't quite correct. There can be no nextSibling.

That's fine.  foo.insertBefore(bar, null) does the same thing as 
foo.appendChild(bar).  See 
http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#ID-952280727 
(and DOM2 Core has identical language):

   "Inserts the node newChild before the existing child node refChild.
    If refChild is null, insert newChild at the end of the list of children."

-Boris
Received on Tuesday, 5 September 2006 06:29:42 GMT

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