Hi John,

> The basic strategy is to add a div element to the web page and a script 
> tag. The script adds window.console.log() functions. These functions 
> place strings on the div as attributes then raise an event on the div. 
> Firebug attached an event listener when it injected the div. The 
> listener peels off the strings to decide what to print in the Console 
> tab of Firebug. In that last step you have to be careful to ensure that 
> you don't run arbitrary code from the page.
> 
> Firebug's actually implementation is regrettably less concise. Rarely, 
> the div injection can interfere with layout. And of course any object 
> you add will collide with identical names used by pages.

It's a pitty. I'll try to check this anyway. I'm concerned about the
performance of these solution (listen for events), knowing that all
messages sent to console.{log|error|warn} are showed extremely slow on
firebug tab. 

Do you think this is a problem of the event listener model or firebug is
doing some additional task that slows down console log?

> Two other tidbits: 1) there is a way to add global objects into the 
> Javascript world that is rarely used (I don't know more about it), but 
> that path requires re-analyzing the security issues. 2) there is work 
> ongoing to make a must less painful solution, so for prototypes I would 
> not invest a lot of time on this part of the solution.

Ok. Cheers!

> jjb
-- 
Francis Brosnan Blazquez <[email protected]>
ASPL

_______________________________________________
dev-tech-network mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-network

Reply via email to