W3C home > Mailing lists > Public > www-svg@w3.org > December 2008

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

From: Simon Pieters <simonp@opera.com>
Date: Tue, 09 Dec 2008 12:08:01 +0100
To: "Lachlan Hunt" <lachlan.hunt@lachy.id.au>, "Doug Schepers" <schepers@w3.org>
Cc: "public-webapps@w3.org" <public-webapps@w3.org>, www-svg <www-svg@w3.org>
Message-ID: <op.ulv6jnwlidj3kv@hp-a0a83fcd39d2>

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 GMT

This archive was generated by hypermail 2.3.1 : Friday, 8 March 2013 15:54:41 GMT