开发者

How do I make the unresponsive script warning come up?

开发者 https://www.devze.com 2022-12-23 07:03 出处:网络
I am making a firefox extension and I have a manual script entry box. I don\'t want the script to hang the browser when it is run. How can I make an unresponsive script error popup come up if the scri

I am making a firefox extension and I have a manual script entry box. I don't want the script to hang the browser when it is run. How can I make an unresponsive script error popup come up if the script runs for lon开发者_StackOverflowger than a second.


This is controlled by the user by entering about:config in Firefox, and changing the dom.max_script_run_time value.


The long running script prompt cannot be controlled in that way. Firefox automatically shows it after a certain number of JS operations have been done without returning control (it's something around 30 seconds on average).

0

精彩评论

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

关注公众号