[whatwg] Attribute for holding private data for scripting

Jonas Sicking jonas at sicking.cc
Tue Apr 10 23:42:12 PDT 2007


>> Here's a page I constructed, and tested on Firefox:
>>
>> http://intertwingly.net/stories/2007/04/10/test.html
>>
>> This page is meant to be served as application/xhtml+xml.
>>
>> Can you test it and see what results you get?  Then lets discuss further.
> 
> In Safari 2.0.4: Processed as HTML, it says "data" and then "". 
> Processed as XHTML, it says "null" and then "data".
> In Opera 9.00: Processed as HTML, it says "data" and then "null". 
> Processed as XHTML, it says "null" and then "data".
> In Firefox 2.0.0.3: Processed as HTML, it says "data" and then "". 
> Processed as XHTML, it says "data" and then "data".
> In IE/Mac 5.2: Processed as HTML, it says "data" and the second alert 
> does not appear. Processed as XHTML, neither alert appears.
> 
> It looks like Firefox's XHTML implementation already has the 
> getAttribute extension I suggested of handling QNames.

Firefox is AFAICT the one following spec here. The spec says that 
getAttribute in a namespaced document should return the node with the 
given qname.

Though I thought we returned null when getAttributeNS failed, but it 
appears we only do that for getAttribute.

/ Jonas



More information about the whatwg mailing list