Skip to content
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

web-input输入事件最多是44次? #18

Open
workkk98 opened this issue May 7, 2021 · 1 comment
Open

web-input输入事件最多是44次? #18

workkk98 opened this issue May 7, 2021 · 1 comment

Comments

@workkk98
Copy link
Owner

workkk98 commented May 7, 2021

转自: https://www.zhihu.com/question/362096226/answer/945234293

document.body.addEventListener('click', () => {
  (() => {
    let i = 0;
    let max = 45;
    let f = ()=> {
      ++i;
      let p = document.createElement('p');
      p.onclick = ()=> f();
      if (i < max) {
        p.click();
      } else {
        Promise.resolve().then(() => console.log('end'));
       }
    };
    return f;
  })()();
});

// Used to throw an exception before we exceed the C++ stack and crash.
// This limit was arrived at arbitrarily. crbug.com/449744const int kMaxRecursionDepth = 44;

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

No branches or pull requests

1 participant