I am working on a firefox extension that gets the html content from the current tab in the browser. Majority of the processing takes place in popup.js file which is embedded in the popup UI that is displayed on clicking the toolbar icon for the extension. Due to this, the performance of the extension suffers and occasionally I see a spinning wheel while capturing. Is there a way I could move this processing to the background? I am loading a script using the loadFrameScript api when the capture button is clicked.
Is there any such thing as background page in Firefox extensions like in chrome and Safari? If no, please suggest a way to optimize this.