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

[dom3core] getAttribute

From: Anne van Kesteren <annevk@opera.com>
Date: Fri, 18 Nov 2005 23:15:47 +0100
To: "DOM mailing list" <www-dom@w3.org>
Message-ID: <op.s0gislje64w2qv@id-c0020.q42.local>

Currently the DOM Level 3 Core specification (and earlier Core editions of  
the DOM specifications) specifies that the getAttribute method on the  
Element interface return the empty string for unspecified attributes[1].

Opera has implemented this behavior.

However, other browsers return null. Where other browsers are Internet  
Explorer, Firefox, Safari, Konquerer and iCab. As developers typically  
develop against the market leader there is a lot of code like:

  getAttribute('foo') != null

... out there. As "" does not compute to null... Opera will probably  
change its behavior to be in line with the above mentioned browsers. Is  
there a possibility for getting erratum on getAttribute and related  


Anne van Kesteren
Received on Friday, 18 November 2005 22:15:55 UTC

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