Hi,
Using Firebug with Chromebug, any console logging goes to the console
for the context in question - which is handy as it stops a single
context's console becoming too polluted.
However, I'm wondering if there is an easy way of programatically
logging to a single context's console?
I ask as I've got several dialogs that I switch between, each with
their own console.log() calls. To inspect output from each of them, I
need to constantly switch between contexts.
I've tried various things, including playing around with "cd", but
couldn't find any obvious way of doing this. What I have right now is
the following method which returns the console for browser.xul, no
matter which of my dialogs or prefwindows I run the code from:
function getTopConsole() {
var w = window;
while (w.opener != null) w = w.opener;
return w.console;
}
With that function available, I can call getTopConsole().log(...),
etc, and have the output go to one console - saving me the need to
switch contexts many times.
Is there an easier way to to do this that I've overlooked? If not, and
it's the sort of thing others would find handy, would adding 'global'
logging functions be out of the question (e.g. console.logGlobal(...),
etc) ?
Thanks!
Dan
--
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.