W3C home > Mailing lists > Public > www-dom@w3.org > October to December 1999

Re: DOM L2 comments, various

From: Arnaud Le Hors <lehors@w3.org>
Date: Tue, 05 Oct 1999 16:35:43 +0200
Message-ID: <37FA0CBF.8008CA18@w3.org>
To: www-dom@w3.org
John Cowan wrote:
> Just because an object implements Attr is no guarantee
> that it is an attribute.

Is this because in your implementation the same class is used for
different types of nodes? I bet it is. I used to do the same. Basically
all the HTML*Element interfaces were implemented on the same class. But
I finally decided that it was a bug in my implementation to make
instanceof unreliable. Think about it. If instanceof(Attr) returns true,
it'd better be an Attr node, or your users will get very confused.
Received on Tuesday, 5 October 1999 10:36:04 UTC

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