[selectors-api] Use case for passing invalid selector (was: Re: [selectors-api] SVG WG Review of Selectors API)

On Mon, 08 Dec 2008 17:26:18 +0100, Lachlan Hunt  
<lachlan.hunt@lachy.id.au> wrote:

>> == Section 6. The NodeSelector Interface
>>
>>>> The caller must pass a valid group of selectors.
>>  That's an authoring requirement, explain how that is applicable?
>
> It seems perfectly applicable for the spec to define how the methods  
> need to be used by conforming applications.  Please explain why you  
> think it is not applicable?

Consider the custom pseudo-classes in http://docs.jquery.com/Selectors

It seems reasonable to me to just try the selector with the Selectors API  
and catch the exception, instead of parsing the argument manually making  
sure it's a valid group of selectors before passing it to the Selectors  
API.

-- 
Simon Pieters
Opera Software

Received on Tuesday, 9 December 2008 11:08:49 UTC