On Aug 12, 12:50 pm, tan <[email protected]> wrote: > Yes, but when I am trying to use eg. jQuery and a graph plugin for > jQuery it does not work. > I have also tried various other libraries, but none of them work in an > Firebug overlay.
Correct, you can't use normal JS libraries in a Firefox overlay, for a number of reasons. We will probably want to come up with a different solution for this kind of Firebug extension, one where we host a new browser element in an object with Firebug.Panel API. But in the meantime you can experiment with jQuery in a panel, but you need to put the code into the panel, not into the overlay. Look at appendStylesheet() calls in chrome.js, that is where Firebug puts style sheets into the panel. Then look at lib.js this.addScript = function(doc, id, src) which does a similar job for js scripts. In your Firebug.Panel code, put the jquery code into the panel. (You should not load it over the network) and your code to call jquery. Add a bit more code to add an event listener on your panelNode for commands from firebug. All of that is source injected into the browser element of Firebug panel. Then to fire that JS, send it events, eg from your panel buttons you create an event and dispatch it to your panel node. This will work, the only question is does you code or jquery interfere with other panels in the page. I guess no. jjb > > tan > > On Aug 8, 5:00 pm, John J Barton <[email protected]> wrote: > > > The data area in Firebug, the main and side panels, are HTML. > > > jjb > > > On Aug 8, 6:09 am, tan <[email protected]> wrote: > > > > Hi > > > > Anyone with experience using a JavaScript graph library in a Fx/Fb > > > extension? > > > > Most of the popular tools seems to not work properly in XUL. > > > I guess it is because of the use of window and document objects > > > > So are there any projects out there? > > > > Thanks in advance for any advice, > > > > tan -- You received this message because you are subscribed to the Google Groups "Firebug" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/firebug?hl=en.
