Closed slavaleleka closed 1 year ago
somehow the combination of universal selector after combinator and left parenthesis in attribute value causes an error. case 3 below:
describe('left parenthesis in attribute', () => {
// works fine
it('1: simple selector', () => {
const selector = '[data="("]';
expect(document.querySelectorAll(selector).length).toBe(0);
});
// works fine
it('2: inside pseudo-class arg', () => {
const selector = 'body div:not([data="("])';
expect(document.querySelectorAll(selector).length).toBe(0);
});
// fails
it('3: universal selector for pseudo-class after combinator', () => {
const selector = 'body *:not([data="("])';
expect(document.querySelectorAll(selector).length).toBe(0);
});
// works fine
it('4: universal selector for pseudo-class after combinator but no bracket in attr', () => {
const selector = 'body *:not([data="123"])';
expect(document.querySelectorAll(selector).length).toBe(0);
});
});
Error on right parenthesis
)
in attribute value inside pseudo-class argBasic info:
Minimal reproduction case
There is no error with
)
in attribute value inside pseudo-class arg if I check it in browser