Re: [selectors-api] What DOM feature "Selectors API" belongs to?

Sam,

>> 
And 
as 
for 
Safari. 
Yes, 
it 
does 
have 
document.querySelector, 
but!  
>> 
because 
of 
some 
reason 
it 
doesn't 
have 
DocumentSelector/ 
>> 
ElementSelector 
objects 
exposed, 
it 
doesn't 
return 
StaticNodeList  
>> 
from 
document.querySelectorAll, 
so, 
the 
question 
is 
- 
does 
it 
now  
>> 
support 
"Selectors 
API"? 
Your 
answer 
is 
"yes". 
mine, 
according 
to  
>> 
your 
specification 
- 
no.

> I 
am 
curious 
as 
to 
why 
think 
there 
should 
be 
DocumentSelector/ 
> ElementSelector 
objects 
exposed 
in 
a 
conforming 
UA.  
The 
spec 
states:

I was likely misled by Gecko that exposes objects 
containing interfaces implementations, such as, for example, "EventTarget" or 
"DocumentEvent" from DOM-Events spec.


>> 
Objects 
implementing 
the 
Document 
interface, 
as 
defined 
in 
DOM 
Level  
>> 
3 
Core, 
must 
also 
implement 
the 
DocumentSelector 
interface. 
Likewise  
>> 
objects 
implementing 
the 
Element 
interface, 
as 
defined 
in 
DOM 
Level  
>> 
3 
Core, 
must 
also 
implement 
the 
ElementSelector 
interface.

> Regarding 
the 
returning 
a 
StaticNodeList, 
the 
implementation 
in 
Safari  
> returns 
an 
object 
that 
implements 
the 
StaticNodeList 
interface, 
though  
> that 
happens 
to 
be 
the 
same 
as 
the 
NodeList 
interface.  
One 
potential  
> issue 
here 
is 
that 
we 
don't 
expose 
a 
StaticNodeList 
constructor 
on 
the  
> window 
(window.StaticNodeList) 
but 
instead 
use 
the 
NodeList's  
> constructor.

Probably, I just called "javascript:alert(document.querySelectorAll('html'))" and saw "[object NodeList]".


> All 
that 
said, 
if 
there 
was 
a 
feature 
string 
for 
the 
Selectors 
API, 
as  
> it 
stands 
now, 
WebKit 
would 
not 
return 
true 
as 
we 
don't 
fully 
support  
> the 
specification 
yet 
in 
that 
we 
don't 
support 
the 
NSResolver 
versions  
> of 
the 
query 
functions.

Have also noticed that, guess you'll soon add it!?

Sergey/





      __________________________________________________________
Sent from Yahoo! Mail - a smarter inbox http://uk.mail.yahoo.com

Received on Thursday, 14 February 2008 21:47:10 UTC