You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some internal mathbox functions query Mathbox's DOM using invalid CSS selector queries.
For example:
Edit Mathbox source at https://gitgud.io/unconed/mathbox/-/blob/master/src/model/model.js#L322 to console.log its first argument, a css selector query.
Rebuild, and load examples/test/rtt.html
You will find that one of the queries logged to console is the string
I suspect Mathbox has always made these invalid queries, and the css-selection library cssauron tolerated them fine: it would just return false since no elements matched these invalid selectors. These invalid queries seem not to be causing any bugs.
I discovered this while working on replacing cssauron with css-select. The new library, css-select, is a bit stricter in that it throws errors when passed invalid css selectors. This error-throwing behavior seems desirable to me. (For one thing, it's consistent with the browser-native Element.querySelector API.)
Embracing the new error-throwing behavior probably requires preventing Mathbox internal functions from making these invalid CSS queries.
The text was updated successfully, but these errors were encountered:
Some internal mathbox functions query Mathbox's DOM using invalid CSS selector queries.
For example:
https://gitgud.io/unconed/mathbox/-/blob/master/src/model/model.js#L322
toconsole.log
its first argument, a css selector query.examples/test/rtt.html
You will find that one of the queries logged to console is the string
which is clearly not a valid css selector query.
Do we care?
Probably not right now.
I suspect Mathbox has always made these invalid queries, and the css-selection library
cssauron
tolerated them fine: it would just returnfalse
since no elements matched these invalid selectors. These invalid queries seem not to be causing any bugs.I discovered this while working on replacing
cssauron
withcss-select
. The new library,css-select
, is a bit stricter in that it throws errors when passed invalid css selectors. This error-throwing behavior seems desirable to me. (For one thing, it's consistent with the browser-nativeElement.querySelector
API.)Embracing the new error-throwing behavior probably requires preventing Mathbox internal functions from making these invalid CSS queries.
The text was updated successfully, but these errors were encountered: