negation selector with both type and and subclass selector returns exception
Reported by
daniel.y...@gmail.com,
Dec 13
|
||
Issue description
UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36
Steps to reproduce the problem:
1. Open devtools console.
2. Enter: $(":not(label.selected)")
3. Press return.
What is the expected behavior?
Returns undefined or an element.
What went wrong?
Throws exception:
Uncaught DOMException: Failed to execute 'closest' on 'Element': ':not(label.selected)' is not a valid selector.
Did this work before? N/A
Does this work in other browsers? Yes
Chrome version: 70.0.3538.110 Channel: n/a
OS Version: OS X 10.13.6
Flash Version:
This worked in Safari. Did not try in any other browser.
,
Dec 14
Chrome matches CSS Selectors Level 3 specification: https://www.w3.org/TR/selectors-3/#negation The negation pseudo-class, :not(X), is a functional notation taking a simple selector [...] as an argument. A simple selector is ***either*** [emphasis mine] a type selector, universal selector, attribute selector, class selector, ID selector, or pseudo-class. Safari apparently implemented the [subset of] Level 4, which is not yet finalized.
,
Dec 15
Closing as per comment 2. |
||
►
Sign in to add a comment |
||
Comment 1 by susan.boorgula@chromium.org
, Dec 14