Unsupported selectors by querySelectorAll
michaljerabek opened this issue · comments
If a selector is not supported by querySelectorAll
it throws an error and then many of CP don't work. If the code inside c1.onElement
function is wrapped in a try/catch
, everything seems to work better.
Thank you for your feedback!
Do you have a example of a selector that throws?
It's actually more complicated than I thought.
Selector a:not(:hover):not(:focus)
is send to querySelectorAll
as a:not()
and :focus
ends up as an empty string. So my problem is not about unsupported selectors (although this could probably happen) but some selectors are converted into invalid ones.
It is difficult to parse this selector just with a regex.
I leave this issue open, maybe I find a solution sometime.
Ok. Could you consider to add that try/catch
?
Ok, i made a new release.