What is the issue with the DOM Standard?
Quoting @tabatkins in #185:
querySelector() does need to pass an empty list of allowed pseudo-elements, tho, since otherwise you get nonsensical results (there's no way to reflect a pseudo-element as a JS object right now).
Indeed, querySelector() and querySelectorAll() invoke scope-match a selectors string with a selector and the element, but without an empty list of allowed pseudo-elements. Then scope-match a selectors string invokes match a selector against a tree without this empty list, which is defaulted to a list of all pseudo-elements in match a selector against a tree:
[APIs using this algorithm] may optionally provide:
- A list of pseudo-elements that are allowed to show up in the match list. If not specified, this defaults to allowing all pseudo-elements.
So I wonder if:
- the procedures for
querySelector() and querySelectorAll() should invoke scope-match a selectors string with an empty list of allowed pseudo-elements
- scope-match a selectors string should always invoke match a tree against selector with an empty list of allowed pseudo-elements
- match a selector against a tree should default to an empty list of allowed pseudo-elements
- the WHATWG and CSSWG do not want to make a change because there is a plan to return pseudo-elements from
querySelector() and querySelectorAll() in the future
What is the issue with the DOM Standard?
Quoting @tabatkins in #185:
Indeed,
querySelector()andquerySelectorAll()invoke scope-match a selectors string with a selector and the element, but without an empty list of allowed pseudo-elements. Then scope-match a selectors string invokes match a selector against a tree without this empty list, which is defaulted to a list of all pseudo-elements in match a selector against a tree:So I wonder if:
querySelector()andquerySelectorAll()should invoke scope-match a selectors string with an empty list of allowed pseudo-elementsquerySelector()andquerySelectorAll()in the future