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

RE: Node.getAttributes and 2 typos

From: Joseph Kesselman <keshlam@us.ibm.com>
Date: Tue, 17 Jul 2001 09:05:20 -0400
To: <www-dom@w3.org>
Message-ID: <OF5A847454.4B5348EE-ON85256A8C.00470883@pok.ibm.com>

>Why it is defined on Node and not Element is another question.

Very deliberate. We wanted the DOM to be fully operable without requiring
that folks downcast from Node. Casts are surprisingly expensive in some
environments, and can be a distraction even when they aren't.

In theory, if you have Node, NodeList, and NamedNodeMap you can retrieve or
modify anything in your main document tree. I've seen some minimalist
subsets of the DOM built on that basis. Of course they weren't
DOM-compliant, but they _were_ DOM-compatable; anything that worked on them
would work on a "real" DOM, though of course the reverse isn't true.

(Is it worth adding this to the FAQ, is it documented in our design
principles somewhere, or is it unnecessary trivia?)

______________________________________
Joe Kesselman  / IBM Research
Received on Tuesday, 17 July 2001 09:05:55 GMT

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