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 UTC

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