- Firefox 3.6.8
- Firebug 1.5.4
I'm trying to write a Firefox extension that uses Firebug. I've gotten up and running with the Firefox extension part but I just can't seem to access Firebug. I've followed various tutorials and dug into the code of other Firebug extensions (such as FirePHP). From what I can tell, this should work (at it's simplest):
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="chrome://implementor/skin/overlay.css" type="text/css"?>
<overlay id="implementor-overlay" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<script>
FBL.ns(function() { with (FBL) {
HelloWorldPanel = function() {}
HelloWorldPanel.prototype = extend(Firebug.Panel,
{
name: "HelloWorld",
title: "Hello World!",
initialize: function() {
Firebug.Panel.initialize.apply(this, arguments);
},
});
Firebug.registerPanel(HelloWorldPanel);
}});
</script>
</overlay>
FBL is always coming back as undefined. If I call "Firebug.Console.log(whatever)", Firebug will also be undefined. If I call it later on (let's say, after a menu item is hit) it will work. It's definitely a loading issue but I can't figure it out.
Thanks.