English 中文(简体)
扩展:用户关闭浏览器时采取紧急行动
原标题:Firefox Extension: Execute action when user closes the browser

I have an extension with a sidebar, when the user close the sidebar a method is called. I need to diference when the user close the sidebar than when he closes the browser.

pseudo Code:

if (userClosedBrowser){
 //do something
}else if(userClosedSidebar){
 //do something else
}
问题回答

你可以听取“公平适用”观察员专题的发言。 或者,如果你想要停止戒律,你可以听说“请求豁免”。





相关问题
Accessing an iFrame s dom from a Firefox Extension

I ve spent a long time trying different things to get this to work but nothing does and documentation is not helping much. I m trying to populate a form inside an iframe that I dynamically inject ...

Google Analytics to track FireFox extension use

I m developing a Firefox extension and would like to track its use with google analytics, but I can t get it working. I ve tried manually calling a function from ga.js, but that didn t work for some ...

Accessing tabs on Firefox with a C++ XPCOM extension

What XPCOM interfaces should I use to detect opening, closing and switching of tabs and also get their associated URL from a firefox extension? I have seen instances of code that manage tabs in JS, ...

Open links in new tab in Firefox

I am developing an Firefox extension. How can all the links on a webpage to be opened in a new tab?

Rendering web page as thumbnail

I asked this question earlier, since I am a little new to Firefox extension development, the canvas thing for Firefox went a little over my head. Apologies for reposting this again. with the first ...

热门标签