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

RE: Recent questions about document traversal

From: <keshlam@us.ibm.com>
Date: Thu, 16 Sep 1999 13:05:42 -0400 (EDT)
To: www-dom@w3.org
Message-ID: <852567EE.005DDBFC.00@D51MTA03.pok.ibm.com>
> What is the correct behavior when the current node is deleted?

The TreeWalker follows its current node. Asking for the parent returns its
parent (or other ancestor, if the parent is filtered out, or null if none can be
found) at the time you ask the question.

Our shorthand term for this is "pure current-node semantics" -- all operations
are performed in terms of the current state of the current node, and the current
node doesn't change until you take an action that causes the TreeWalker to
select another current node. It's almost like having a reference directly to
that node, but with the TreeWalker's navigation methods.

(John already said this, but: There's no such thing as "deletion" in the DOM. A
node can be removed from its context, but continues to exist until/unless
implementation-specific actions are taken to destroy it... and those actions are
ouside the DOM's scope. Use the term "removal" to avoid confusion. Yes, early
drafts of the Traversal chapter made the same mistake!)

Joe Kesselman  / IBM Research
Received on Friday, 17 September 1999 03:30:29 UTC

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