Skip to content

Conversation

pistvan
Copy link

@pistvan pistvan commented Jun 15, 2023

The old query selector parsing logic in _.dom_query's internal getElementsBySelector method is (not) a bit of mess: it works for many cases, but cannot resolve any combined selector such as div.foo.bar or a.btn[href="#"] (not to mention data attributes containing a hyphen, see #62).

This piece of code has not been changed in the last 7 years, and I'm wondering whether document.querySelectorAll could be used here, since these days browsers are all support that, I think. (anyway, according to CanIUse.com, it had very good support in 2016 as well.)

@pistvan pistvan changed the title Use native query selectors when use track_links and track_forms Use native query selector parser in track_links and track_forms Jun 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant