Firefox扩展:窗口激活/禁用事件 [英] Firefox extension: window activate/deactive event
问题描述
移动Firefox窗口时,停用/激活事件对的最佳/最简单的方法是什么?非常感谢任何提示!
Christian
如果我你可以正确地理解你,你可以使用这个:
window.addEventListener(blur,function(){
/ / mystuff
},false);
而这个:
window.addEventListener(focus,function(){
// mystuff
},false);
in my Firefox extension I try to handle the event when the browser window is activated or deactivated. Adding the events "activate" and "deactivate" to the window does basically work. But noticed that when I move the window, first "deactivate" (when I start moving) and then "activate" (when I finished moving through releasing the mouse key) occurs. For me, the whole time the window is active.
What is the best / simplest way to the "deactivate"/"activate" event pair when moving the Firefox window? Thanks a lot for any tips!
Christian
If I understand you correctly, you can use this:
window.addEventListener("blur",function(){
//mystuff
},false);
and this:
window.addEventListener("focus",function(){
//mystuff
},false);
这篇关于Firefox扩展:窗口激活/禁用事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!