Re: [selectors-api] Test Suite Missing tests for Namespace Selectors

Alexey Proskuryakov wrote:
> 12.03.2009, в 17:19, Lachlan Hunt написал(а):
> 
>> WebKit has a bug with the "|foo" selector.
>>
>> http://software.hixie.ch/utilities/js/live-dom-viewer/saved/28
>>
>> Opera and Firefox pass
> 
> This is actually a difference in createElementNS(null, "p") vs. 
> createElementNS("", "p") behavior. I don't know whose bug it is, but in 
> Firefox and Opera, empty and null namespace arguments both result in 
> null namespace for the created element.
> 
> When createElement(null, "p") is used, this test passes in WebKit, too.

DOM 3 Core states [1]:

   "In programming languages where empty strings can be differentiated
    from null, empty strings, when given as a namespace URI, are
    converted to null"

So, if I understand correctly, createElementNS("", "p") is effectively 
the same as createElementNS(null, "p").

Interestingly, though, Opera has the opposite bug.  We fail when null is 
passed instead of "".

[1] 
http://www.w3.org/TR/DOM-Level-3-Core/core.html#Namespaces-Considerations

-- 
Lachlan Hunt - Opera Software
http://lachy.id.au/
http://www.opera.com/

Received on Thursday, 12 March 2009 15:02:56 UTC