Re: Selectors: hooks needed by DOM

On Wed, Mar 19, 2014 at 7:02 PM, Tab Atkins Jr. <jackalmage@gmail.com> wrote:
> Scope-contained selectors can't match *any part* of their selector
> outside of the scope.  Absolutizing the selector doesn't help here.

I'm not using scope-contained. Is that for <style scoped>?


Thanks for your guidance. I think these methods are now correctly
defined, review welcome:

* http://dom.spec.whatwg.org/#dom-parentnode-query
* http://dom.spec.whatwg.org/#dom-parentnode-queryselector
* http://dom.spec.whatwg.org/#dom-element-matches


Based on this work, I have the following feedback on the Selectors standard:

 * "scoping root" is a defined term, but "scoping method" is not.
* I don't understand why there is a specific API-entry point for
matching selectors against a tree. It seems that should just be one
algorithm.
* The API-entry point does not explicitly reference the main matching algorithm.
* Also, I found the terminology confusing. :scope being determined by
reference elements rather than the scoping root did not really help.
Maybe we can name elements matching :scope the ":scope elements"?


-- 
http://annevankesteren.nl/

Received on Thursday, 20 March 2014 10:59:06 UTC