W3C home > Mailing lists > Public > public-webapps@w3.org > January to March 2012

Re: Element.matchesSelector vs. Element. matches

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Tue, 20 Mar 2012 23:51:52 -0400
Message-ID: <4F695058.8040105@mit.edu>
To: public-webapps@w3.org
On 3/20/12 10:38 PM, Bronislav Klučka wrote:
>
> Hello,
>
> Why there are 2 similar functionalities for selector matching?

Because you're reading two versions of the same spec and the spec 
changed sometime between those versions.

> http://dev.w3.org/2006/webapi/selectors-api2/#matches
> boolean matches(DOMString selectors, optional (Element or
> sequence<Node>)? refNodes);

This is the new version.

> http://www.w3.org/TR/selectors-api2/#matchtesting
> boolean matchesSelector(in DOMString selectors, in optional any refNodes]);

This is the old version.

-Boris
Received on Wednesday, 21 March 2012 03:52:21 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:50 GMT