W3C home > Mailing lists > Public > www-dom@w3.org > January to March 2000

Re: Why not Node.insertAfter()?

From: <keshlam@us.ibm.com>
Date: Wed, 8 Mar 2000 13:56:41 -0500
To: Eric Richardson <maxwell@telesoft.com>
cc: DOM <www-dom@w3.org>
Message-ID: <8525689C.00680F86.00@D51MTA03.pok.ibm.com>
> So I guess I should interpret getNextSibling() as the next node at the
> same level as the refChild?

A sibling is a node with the same parent. If you have the document <a><b/>
<c/></a>, b and c both have a as their parent. b is c's previous sibling,
and c is b's next sibling.

If you then issue the operation a.insertbefore(d,null), or
a.appendChild(d), d will become a's last child: <a><b/><c/><d/></a>.

______________________________________
Joe Kesselman  / IBM Research
Received on Wednesday, 8 March 2000 13:56:58 GMT

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