开发者

How do I make the unresponsive script warning come up?

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜