Search code examples
firefoxfirefox-addonfirefox-addon-sdk

How to replace or destroy a tab using the Firefox Add-on SDK?


I did not find anything in the Firefox Add-on SDK (Tab API) that can destroy a tab or replace it with a new tab. I can find the Tab ID, Tab URL, or other identifier. Is there any way to replace or destroy a tab?


Solution

  • Use tab.close(callback).

    What do you mean by replace? If you just want to change the URL, then use tab.url = url.