Selectors API changes

20 views
Skip to first unread message

Sean Hogan

unread,
Jan 2, 2012, 6:05:44 AM1/2/12
to base2-js
The current draft of Selectors API Level 2 has some significant
changes you may be interested in. The draft is at
http://dev.w3.org/2006/webapi/selectors-api2/

The major changes are:

1. The proposed element.matchesSelector() has been renamed to
matches()

2. There are two new methods - find() and findAll() - which support
*relative* selectors, such as "> div.foo span" or "+ div.bar span".
Read the spec to get the details.

If you have any comments on these then contact the relevant group
list.

regards,
Sean

Dean Edwards

unread,
Jan 2, 2012, 12:28:09 PM1/2/12
to base...@googlegroups.com, Sean Hogan
On 02/01/2012 11:05, Sean Hogan wrote:
> The current draft of Selectors API Level 2 has some significant
> changes you may be interested in. The draft is at
> http://dev.w3.org/2006/webapi/selectors-api2/
>
> The major changes are:
>
> 1. The proposed element.matchesSelector() has been renamed to
> matches()
>
> 2. There are two new methods - find() and findAll() - which support
> *relative* selectors, such as "> div.foo span" or "+ div.bar span".
> Read the spec to get the details.
>

Thanks for this. I'd already partially implemented the :scope pseudo
class. Hopefully, the spec won't change again.

-dean

Reply all
Reply to author
Forward
0 new messages