W3C home > Mailing lists > Public > public-webapi@w3.org > June 2008

Note for DOM L3 Core SE

From: Travis Leithead <travil@windows.microsoft.com>
Date: Fri, 6 Jun 2008 14:20:09 -0700
To: "public-webapi@w3.org" <public-webapi@w3.org>, Ian Hickson <ian@hixie.ch>
Message-ID: <0003CB8B8FE2154EB50431DB2B8F69C00A307F5F2D@NA-EXMSG-W601.wingroup.windeploy.ntdev.microsoft.com>

While implementing some improvements to getAttribute in IE8, we actually checked in code that is conformant to what the spec says about the return value:

Return Value
The Attr value as a string, or the empty string if that attribute does not have a specified or default value

Once this code was in, we immediately hit app and site compat problems because we always returned a string--an empty string--if the "attribute [did] not have a specified or default value".

As it turns out in practice, all browsers actually implement this a slightly different way: they return the value as a string, or null if the attribute does not have a specified or default value. In other words, if there is no entry for the requested attribute in the NamedNodeMap, then null is returned.

IE8 is being fixed to be conformant with what everyone else has implemented, I just thought I would pass this along to whomever is doing the DOM L3 Core Second Edition so that it might be recorded in that spec, an errata, or so that we can discuss.

Travis Leithead - OM Program Manager - Internet Explorer
Received on Friday, 6 June 2008 21:20:52 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:16:27 UTC