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 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 20 October 2015 10:46:06 UTC