本文介绍了浏览器窗口最小化/最大化事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





I've written a Firefox extension that need to be notified whenever you minimize/restore the browser window. What JavaScript event browser fires when you minimize/restore browser window?

提前致谢

推荐答案

您应该使用Firefox 8中提供的事件以上。请注意,您需要检查 window.windowState 是否真的发生了变化,之后Firefox 12会在常规调整大小时触发此事件。

You should use the sizemodechange event, available in Firefox 8 and above. Note that you need to check whether window.windowState really changed, before Firefox 12 this event might fire during a regular resize.

这篇关于浏览器窗口最小化/最大化事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

05-28 15:47
查看更多