开发者

Unresponsive JavaScript popups. Can I disable them from my website?

开发者 https://www.devze.com 2023-01-02 21:38 出处:网络
Is there any way to disable browsers popups about long running scripts (i.e. in Firefox and Safari) directly from the website?

Is there any way to disable browsers popups about long running scripts (i.e. in Firefox and Safari) directly from the website?

开发者_如何学编程(And not from the browser settings)


Only by breaking the long running script into pieces.

See my answer to Show javascript execution progress for a solution for this.


Since you mentioned Firefox and Safari, you may want to use Web Workers (Firefox 3.5 and Safari 4). Execution of Web Workers happens in a separate process, and does not block the UI thread:

  • Mozilla Dev Center: Using web workers
  • John Resig: Computing with JavaScript Web Workers
0

精彩评论

暂无评论...
验证码 换一张
取 消