A quick investigation revealed the following
Forge background scripts on Firefox are implemented as PageWorker scripts. PageWorker scripts run on a hidden page. A consequence of this detail is that
alert()
fails.The
alert
call fails with an error message (quite cryptic for a beginner)At this point you might want to check the Browser Console. If you don't see a message complaining about not being able to call openModalWindow on a hidden window, you probably have not set the logging level.
So, your background script runs just fine. It's the framework that doesn't deliver on its cross-browser promise.