Questions tagged [firefox-addon-restartless]

A restartless or bootstrapped Firefox add-on is an add-on that does not require restarting the browser in order to install, enable, disable or remove it. Restartless add-ons, however, have some limitations, such as no support for XUL overlays.

A restartless or bootstrapped Firefox add-on is an add-on that does not require restarting the browser in order to install, enable, disable or remove it. Restartless add-ons, however, have some limitations, such as no support for XUL overlays.

Some add-on types, such as dictionaries, are always restartless.

81 questions
2
votes
2 answers

Can I load custom jsm modules in bootstrap.js of a restartless add-on?

I'm trying to load a custom module in a restartless add-on, using the following: chrome/content/modules/Test.jsm: var EXPORTED_SYMBOLS = [ 'Test' ]; let Test = {}; chrome.manifest: content test chrome/content/ bootstrap.js: const Cu =…
Codifier
  • 354
  • 1
  • 14
2
votes
1 answer

Replication of Form method with loadOneTab

If I dynamically insert a form object into a page, submit and remove the form and it works fine. Here is an example of the form code:
erosman
  • 7,094
  • 7
  • 27
  • 46
2
votes
1 answer

Unloading lazy getters in boostrap addons?

At the top of my bootstrap.js I define a bunch of lazyGetters, instead of a JSM: const myServices = {}; Cu.import('resource://gre/modules/XPCOMUtils.jsm'); XPCOMUtils.defineLazyGetter(myServices, 'sss', function(){ return…
Noitidart
  • 35,443
  • 37
  • 154
  • 323
2
votes
1 answer

Adding StyleSheets to Firefox Bootstrapped Addon

Accordion to Using the Stylesheet Service Above mentioned document also states: loadAndRegisterSheet fails if CSS contains #id. '#' must be percent-encoded, details see bug 659650. The bag report was made on 2011-05-25. Is it still a bug or has it…
erosman
  • 7,094
  • 7
  • 27
  • 46
2
votes
1 answer

Is Components.utils.unload asynchronous in Firefox bootstrapped extensions?

I noticed an occasional error logged on disabling the bootstrapped addon. function shutdown: function shutdown(data, reason) { forEachOpenWindow(unloadFromWindow); Services.wm.removeListener(WindowListener); …
erosman
  • 7,094
  • 7
  • 27
  • 46
2
votes
3 answers

Equivalent of simple storage API for restartless firefox extension

Is there an equivalent to this API or a way to call it from a restartless extension? I need to store a few strings between browser sessions. I have found this but it seems too complicated for simple string storage. Does the SS API use the same thing…
2
votes
2 answers

Working asynchronously with jsctypes in restartless extension

I have a small bootstrapped extension that loads a dll file at startup() and holds it in a global variable. I don't know exactly how to use this properly maybe you will correct me on this, but I'm more interested in knowing if the functions I use…
2
votes
1 answer

How to use TextEncoder and TextDecoder from bootstrap addon

Following OS.file example it uses TextEncoder however from bootstrap scope this is not available. https://developer.mozilla.org/en-US/docs/JavaScript_OS.File/OS.File_for_the_main_thread#Example.3A_Read_the_contents_of_a_file_as_text Only way I could…
Noitidart
  • 35,443
  • 37
  • 154
  • 323
2
votes
2 answers

custom protocol handlers in bootstrapped firefox addon

I am writing a bootstrap Firefox addon and need to register a new protocol/schema handler (e.g. foo:somthing). I have looked all over and I only see ways to do this using chrome.manifest, which bootstrapped add-ons cannot use. So, does anyone know…
Robbie Wxyz
  • 7,671
  • 2
  • 32
  • 47
1
vote
1 answer

maxVersion of Firefox Add-on is not enforced?

I have a Firefox add-on (not distributed via AOD) that was supposed to be active (in that version) only with Firefox up to version 50, cf. This snippet is from my install.rdf:
1
vote
1 answer

Is using a while loop a good waiting strategy in a Firefox Restartless Extension?

I have a bootstrapped extension which interacts with the chrome part of Firefox (i.e. even before the content loads), and needs to query an SQLite database for some check. I would prefer a sync call. But, since a sync call is bad in terms of…
1
vote
0 answers

Access nsIDOMChromeWindow from Services.jsm or similar, for XUL to Add-ons-SDK migration

Migrating an old Add-on from XUL to Add-ons-SDK in preparation for WebExtensions. Would still like to support some older browsers with this add-on, so that is why I am not jumping right to WebExtensions. What I'd like to do is control minimize,…
1
vote
3 answers

Simple storage not persisting data between sessions

I'm trying to use the simplestorage from my extension, but I can't retrieve values between browser sessions. Here's the thing: From my main code, I created a value this way: var ss = require("sdk/simple-storage"); ss.storage.foo = [{id:"bar1",…
gal007
  • 6,911
  • 8
  • 47
  • 70
1
vote
1 answer

Initial tab doesn't fire open, ready events

I'm build an SDK Firefox Add-on that is supposed to read a tab's URL and parse it. To this end, I'm listening to the 'ready' event in lib/main.js, var tabs = require('sdk/tabs'); tabs.on('open', function(tab){ tab.on('ready', function(tab){ …
1
vote
1 answer

Firefox for Android Extension: How to trigger event on every page load?

I am trying to write a Firefox extension for Android that will fire an event every time the web page changes. It is monitoring which URLs are being loaded (all URLs) and the contents of the page loaded (via DOM inspection). My problem is that the…
tommed
  • 1,521
  • 2
  • 19
  • 33