I'm writing an extension[1]. The user selects a tab (which I remember)
and I would like it to write to exactly that tab's Firebug Console if
it is active.

During activation, I get and store the current window like so [2]:

        var contentWindow = Components.classes['@mozilla.org/appshell/
window-mediator;1']
            .getService(Components.interfaces.nsIWindowMediator);
        remotecontrol.controlledWindow = wm.getMostRecentWindow(
                'navigator:browser'
            ).getBrowser().contentWindow;

So now that I have contentWindow, is it possible to print to exactly
that window's console? How? Firebug.Console.log writes to what happens
to be the current window now, not my stored contentWindow.

I find it challenging to find the definition of Firebug.Console.log
(searching for "log" or "Console" gives very many hits!) and I don't
understand what a "context" is, which makes it uphill.

Thank you for reading this far.

Peter

1: https://addons.mozilla.org/en-US/firefox/addon/remote-control/
2: 
https://github.com/pmorch/FF-Remote-Control/blob/V_0.1/chrome/content/overlay.js#L41

-- 
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.

Reply via email to