Getting the gBrowser object in Firefox
Okies finally I have succumb and decided to do a Firefox add-on or extension to save open tabs that have documents/images inside, cause I am lazy to go one by one and save them.
So first step, try and get the tab browsers elements in the browser. In Firefox, there is a gBrowser object that if you can get it will help you to get all the browser tabs and their uris.
For the documentation, the only way that you can use gBrowser directly is that if you are under the scope of browser.xul when you are doing overlays. So for other windows like dialogs and sidebars, you will need to use window.opener.getBrowser method to get to the gBrowser object. If you look at the documentation for the window object, there is no mention of the getBrowser method, seems like the docs need some updating.
Look at the Getting access to the browser in the Tabbed Browser section of the MDC, you will find the various different methods for getting a gBrowser object.
Tags: firefoxYou can comment below, or link to this permanent URL from your own site.