Skip to content

Use native query selector parser in track_links and track_forms #382

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

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
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant