New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
$("*") fails with Maximum call stack size exceeded #3704
Comments
However, On Edge it takes 2 minutes 15 seconds to give an answer, but it does return. On Firefox it runs almost instantaneously. Seems like this is an issue independent of jQuery? |
Jquery should not fail with stack exceeded at least. |
Look at the repro case I gave above. This fails in Chrome as well, no jQuery at all. Type it into your console.
|
However, this seems to work... var elems = document.querySelectorAll('*');
var arr = [];
for (var i = 0, len = elems.length; i < len; i++) {
arr.push(elems[i]);
} Let's talk in the meeting. |
We're going to try dropping |
Moved to Sizzle issue: jquery/sizzle#403 |
Using apply creates new arguments, which eventually exceed the size of the stack. The for loop does not place the results in the argument list and thus keeps the stack smaller :) |
Open this html file.
https://mega.nz/#!qphByIrJ!72ksYS6ceoQw8KYUwKjb03K2DiMfKjQNh6HKYoAuKJQ
Simple code of $("*") fails with:
While document.querySelectorAll("*") works as expected.
The text was updated successfully, but these errors were encountered: