You should be able to do anything Firebug can doe from an Firebug
extension (since both are Firefox extensions).

Part of the security system in Firefox is a "wrapper" around web
pages. Unfortunately this wrapper has a seriously undesirable
property: write operations on the wrapper don't always write-operate
on the page and you get no feedback to let you know.

jjb

On Dec 9, 10:50 am, "Adam Peller" <[EMAIL PROTECTED]> wrote:
> Hi John.
>
> Okay, you just gave me answers to what I've been trying to deduce
> myself, and I've yet to master the extension dev cycle -- the
> dev.mozilla article mentions putting a ref file under some guid from
> the install.rdf, which does not seem to exist, etc.
>
> I was hoping to be able to add certain functionality to the page (I
> acknowledge the security risk to doing this) without directly
> modifying firebug.  I was basically trying to mimic what was done in
> firebug.js/consoleAPI.js, but I may have missed something.  If it were
> a security issue, I would have expected an exception, but it just
> modified the window element without any impact.  I'm not sure I
> understand what's going on.
>
> So my experiment to modify the page from an extension is not going to
> work.  I'll start hacking directly on firebug.
>
> -Adam
>
> On Tue, Dec 9, 2008 at 12:18 PM, John J Barton
>
> <[EMAIL PROTECTED]> wrote:
>
> > I suggest you read the console.js/commandLine.js code first. You
> > basically can't write into the page from the extension.
>
> > For dev cycle you will want to link your source directory from the
> > extension directory for your dev profile. The readme.txt is a good
> > place to start....
> >http://code.google.com/p/fbug/source/browse/branches/readme.txt
>
> > jjb
>
> > On Dec 9, 9:10 am, "Adam Peller" <[EMAIL PROTECTED]> wrote:
> >> Hi Cougar :)
>
> >> Well, I'm writing a FF3 extension that adds a panel to Firebug, based
> >> on the FirePHP example.  Firebug.Module has a method called
> >> watchWindow, and firebug.js apparenly can add properties directly to
> >> win (like the "console" object) so I was merely trying to do the same.
> >>  Calling the wrappedObject doesn't seem to work.  I'd sprinkle some
> >> alerts in there to see if there even is a wrapped object, but the dev
> >> cycle is painfully slow for me thus far.  I know I shouldn't be doing
> >> this, but I'm re-installing the plugin. (The instructions for working
> >> around this method are not clear to me)  Why is it that the
> >> 'uninstall' only seems to work about 1 time out of every 10 times I try?
>
> >> -Adam
>
> >> On Tue, Dec 9, 2008 at 1:17 AM, LiuCougar <[EMAIL PROTECTED]> wrote:
> >> > Hi peller :)
>
> >> > I think you are talking about extension for FF3
>
> >> > change it to this:
> >> >   watchWindow: function(context, win){
> >> >               win.wrappedJSObject.testing="123";
> >> >   }
>
> >> > and it should work just fine
>
> >> > liucougar
>
> >> > On Mon, Dec 8, 2008 at 22:01, Adam Peller <[EMAIL PROTECTED]> wrote:
>
> >> >> I am a n00b at extensions writing.  I took the simple Test Panel demo
> >> >> and tried adding the following code to the FirebugTestExtension
> >> >> module:
>
> >> >>    watchWindow: function(context, win){
> >> >>                win.testing="123";
> >> >>    }
>
> >> >> I've confirmed in my extension code (with alerts -- dump didn't seem
> >> >> to send anything to my MacOS terminal window) that the method is
> >> >> getting called and win.testing is being set, each time a window is
> >> >> created.  However, from the page, window.testing is undefined.
>
> >> >> What am I missing?  Is this a different window reference than the one
> >> >> that is my global?
>
> >> > --
> >> > 生于忧患,死于安乐
> >> > "People's characters are strengthened through struggle against
> >> > difficulties; they are weakened by comfort."
> >> > - Old Chinese adage
--~--~---------~--~----~------------~-------~--~----~
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