On Tue, Jul 28, 2009 at 17:48, johnjbarton<[email protected]> wrote: > > How are Greasemonkey scripts added to the web page?
Well, i guess that in order to be accurate one must answer they are not "added" to the web page. They are executed in a sandbox built around a XPCNWrapper of the page's window: var safeWin = new XPCNativeWrapper(window); var sandbox = new Components.utils.Sandbox(safeWin); sandbox.__proto__ = safeWin; Components.utils.evalInSandbox(scriptSourceCode, sandbox); As of now, there is nowhere FB could grab a reference to such a sandbox or the running script source code. However, i'm thinking about providing them (script source+sandbox) to FB somehow from the GM code. As i see it so far, i'd like to be able to browse the running GM scripts source code from FB scripts tab, as well as poke around in these scripts sandboxes in the FB console tab after a cd(sandbox). In a perfect world, i'd love to achieve that via a simple FB extension included in the GM add-on, but it probably is over-optimistic... :-) -- Olivier --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
