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

Thanks Lachlan,

It is clear that the snippet you suggest can be used to determine whether document has a member with the name "querySelector".

However, consider the following: Gecko has both members "bindingDocuments" and "loadBindingDocument" on its document object, but it doesn't support XBL 2.0 that can be verified by querying implementation for feature "XBL" (thanks to XBL 2.0 specification that requires feature "XBL" to be published and accessible through "featuring" interface)

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. 

And what if I want to run my, "conforming" implementation as long as the UA I am running in doesn't "conform"?

As far as I know, all the DOM interfaces are combined into specifications with "feature" strings assigned, while "Selectors API" [because of some reason] doesn't follow the principle creating a bad precedent in behavior inconsistency that will produce inconstancy in application code.

Hope there is some sense in my passage.

Sergey/




----- Original Message ----
From: Lachlan Hunt <lachlan.hunt@lachy.id.au>
To: Sergey <castonet@yahoo.co.uk>
Cc: public-webapi@w3.org
Sent: Thursday, 14 February, 2008 2:36:17 PM
Subject: Re: [selectors-api] What DOM feature "Selectors API" belongs to?

Sergey 
wrote:
> 
Building 
forward-compatible 
applications 
(as 
well 
as 
technology 
> 
implementations 
in 
browsers) 
require 
knowledge 
of 
what 
DOM 
feature 
> 
"Selectors 
API" 
is 
to 
belong 
to.

This 
specification 
intentionally 
does 
not 
specify 
a 
feature 
string 
for 
use 
with 
hasFeature() 
because 
it 
is 
unnecessary.  
There 
already 
exists 
a 
better 
alternative 
detection 
method 
that 
can 
be 
used 
to 
test 
for 
feature 
support:

if 
(document.querySelector) 
{
  
 
// 
Supported
} 
else 
{
  
 
// 
Not 
suported
}

No 
change 
has 
been 
made 
to 
the 
specification.

Please 
see 
the 
latest 
version 
of 
the 
spec 
in 
CVS 
to 
review 
the 
changes.
http://dev.w3.org/2006/webapi/selectors-api/

Please 
let 
me 
know 
if 
you 
are 
not 
satisified 
with 
this 
response.

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





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

Received on Thursday, 14 February 2008 15:11:34 UTC