Closed slavaleleka closed 1 year ago
describe('pseudo-class :is() ', () => { it('1: no arg', () => { const selector = 'div > *:is()'; expect(document.querySelectorAll(selector).length).toBe(0); }); it('2: invalid arg', () => { const selector = 'div > *:is(1)'; expect(document.querySelectorAll(selector).length).toBe(0); }); it('3: invalid arg', () => { const selector = 'div > *:is(id="123")'; expect(document.querySelectorAll(selector).length).toBe(0); }); });
All three cases are throwing error but should not since :is() takes forgiving-selector-list as argument so invalid selectors should be skipped with no error. Also no error is thrown when I check these selectors in browser
:is()
@slavaleleka None of the three cases you outlined above is throwing error using current release 2.2.3. So I believe this issue can be closed.
Basic info:
Minimal reproduction case
All three cases are throwing error but should not since
:is()
takes forgiving-selector-list as argument so invalid selectors should be skipped with no error. Also no error is thrown when I check these selectors in browser