Quick and easy question for Firefox add-on developers

I follow the instructions here to create a development environment for firefox: https://blog.mozilla.com/addons/2009/01/28/how-to-develop-a-firefox-extension/

and everything works fine.

On the page, as you can see, there is one instruction:

Direct the Firefox extension directory to the extension

Instead of constantly preparing and reinstalling your extension, an easy way is to add a pointer from your Firefox extension directory to your code. To do this, you must first find your profile directory: ...

And it works great too!

My question is:

When I make changes to the JS file in the dev directory, do I need to restart FF for the changes to take effect? Because when I create the extension in Chrome, there is a simple link that says β€œreload” and clicks that reloads the extension without having to restart the browser ... is there such a function for FF?

Thanks!
R

+4
source share
2 answers

Extension expansion extension has the ability to reload chrome. To do this, you must restart the extension without restarting Firefox.

+2
source

It really depends on the javascript files. XPCOM components and JavaScript modules are loaded only once, and you inevitably need to restart them when changing them. JavaScript files loaded with <script> tags are only valid for a loadable window. Opening a new window will load a new copy of the script. All this will work only if the -purgecaches command line -purgecaches is specified as people already noted.

0
source

All Articles