Accessing httpRequestObserver in 1.8 Extensions

27 views
Skip to first unread message

Nathan Mische

unread,
Aug 10, 2011, 9:04:09 PM8/10/11
to fir...@googlegroups.com
Hi,

I'm trying to update my extension to work with Firebug 1.8. In Firebug 1.7 my extension used httpRequestObserver as exposed via FBL.httpObserver to set custom headers. In Firebug 1.8 I can't seem to figure out how to access that module.  I also see there seems to be an new implementation HttpRequestObserver in /content/firebug/net/requestObserver.js so I'm not sure if I should be using that or the httpRequestObserver in /modules/firebug-http-observer.js. Any input on how I should proceed would be greatly appreciated.

Thanks,

--Nathan Mische


Jan Honza Odvarko

unread,
Aug 11, 2011, 1:37:00 AM8/11/11
to Firebug
On Aug 11, 3:04 am, Nathan Mische <nmis...@gmail.com> wrote:
> I'm trying to update my extension to work with Firebug 1.8. In Firebug 1.7
> my extension used httpRequestObserver as exposed via FBL.httpObserver to set
> custom headers.
One option is to file a bug and request to expose the firebug/net/
requestObserver.js module through Firebug namespace hierarchy again
(i.e. FBL.httpObserver)

But this would be only a temporary solution since we are working on
APIs that allow extensions to use AMD style just like Firebug does
now. See below

> In Firebug 1.8 I can't seem to figure out how to access that
> module.  I also see there seems to be an new implementation
> HttpRequestObserver in /content/firebug/net/requestObserver.js so I'm not
> sure if I should be using that or the httpRequestObserver in
> /modules/firebug-http-observer.js. Any input on how I should proceed would
> be greatly appreciated.
I have created an example of Firebug extension (HelloAMD) that is
based on AMD and so is able to load any Firebug modules. This way you
could load firebug/net/requestObserver module and access its APIs

Here is the example:
http://code.google.com/p/fbug/source/browse/#svn%2Fexamples%2Ffirebug1.9%2FHelloAMD

Firebug support for AMD style APIs is still work in progress and we
appreciate feedback from developers about how we could improve it.

Honza

>
> Thanks,
>
> --Nathan Mische

Nathan Mische

unread,
Aug 11, 2011, 9:08:44 AM8/11/11
to fir...@googlegroups.com
I've opened issue 4733, http://code.google.com/p/fbug/issues/detail?id=4733, to expose this module via the Firebug namespace.

I did read a few of the threads on the new AMD style and took a look at the HelloAMD example. Unfortunately I don't have the resources to update my extension to the new API at this time.

Thanks,

--Nathan


--
You received this message because you are subscribed to the Google Groups "Firebug" group.
To post to this group, send email to fir...@googlegroups.com.
To unsubscribe from this group, send email to firebug+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/firebug?hl=en.


Reply all
Reply to author
Forward
0 new messages