Hi:-)
I am currently using a bootstrapped extension, which lazy loads a bunch of modules. I want to experiment and write a WebExtension version, but I have some questions.
-
How am I going to bootstrap the extension? Right now there’s a bootstrap.js file. If I want to move to WebExtensions, I need to create a manifest.json. UPDATE: Wladimir created a nice post Using WebExtensions APIs in a “classic” extension | Almost Secure, which I guess is the answer to my question.
-
How am I going to lazy load multiple background files? In the bootstrapped version I use XPCOMUtils.defineLazyModuleGetter to lazy load different jsm modules, so I’m trying to find a similar way for WebExtensions. Easiest way I found is adding all scripts in the background section of manifest.json. But this loads them all at once. Do you have any suggestions?
-
What’s the chrome:// URL format for the different files? With bootstrapped extensions, there’s a chrome manifest, thus I can use chrome://MY_EXTENSION/content/FILE. What’s the equivalent format for WebExtensions?
These are some first questions that came to my mind.
Related to this post:
So, based on this, new question is born:-) What are the options for bootstrapped extensions? Switch to Add-on SDK? If that’s the option, how easy it is to switch from bootstrap extension to Add-on SDK?
Thanks,
Panagiota