0

I want to create firefox extension using both bootstrap and chrome/content. When I've installed this extension first time, firefox ignored the components and overlays. And then I've turn off and turn on boostrap functionality and extension worked well. I've read here https://developer.mozilla.org/en-US/docs/Extensions/Bootstrapped_extensions that this is normal. But I can't understand how to make extension with both functionality at once.

Sorry for my bad English. I'll try to explain better if you want. Any help will be appreciate

p.s. As I've read here https://stackoverflow.com/a/11031908/1735150 there is no way to use both bootstrap and overlays. But why is it working? And how I can include js file in bootstrap?

Answer

How to change script location on firefox addon?

Community
  • 1
  • 1
Andrei Nikolaev
  • 113
  • 2
  • 13

1 Answers1

3

You need to do what an overlay would do by hand in bootstrap.js, that is, dynamically create, add and modify elements in the UI.

But why are do you want to keep compatibility with both restartless and non-restartless? For older versions of Firefox? I'm afraid this is going to be a maintainance nightmare...

Jonathan Protzenko
  • 1,709
  • 8
  • 13
  • Thanks for your answer. Can u advise me how to include js file to page through bootstrap.js? in overlay I've done it by gBrowser.addEventListener("DOMContentLoaded" ..) and creating – Andrei Nikolaev Dec 19 '12 at 19:49