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

Re: New DOM Level 2 Working Draft

From: <keshlam@us.ibm.com>
Date: Mon, 27 Sep 1999 12:22:22 -0400
To: steve@rsv.ricoh.com (Stephen R. Savitzky)
cc: Arnaud Le Hors <lehors@w3.org>, www-dom@w3.org
Message-ID: <852567F9.0059EE72.00@D51MTA03.pok.ibm.com>
>So why not just use parentNode like everything else does?

Because an Attr is not a child. Parent/child was defined to be a bidirectional
relationship; if you can get to something via getParent, you can get back via
getFirstChild/getNextSibling. Since the latter relationship doesn't hold for
Attrs, the former really isn't applicable either. Hence the new, one-way,

I suppose one could argue that getOwningElement() should be available on nodes
other than Attr, and on those nodes should equate to getParent. Nobody has
submitted a use case for that.

Joe Kesselman  / IBM Research
Received on Monday, 27 September 1999 12:22:44 UTC

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