On Aug 24, 8:57 am, ldrm <[email protected]> wrote:
> Hi,
>
> I made a Firefox add-on (actually add-on to Firebug) for my company
> that relies on NetMonitor events (working fine with FB 1.3) but now I
> need to support FB 1.4 too.
>
> As far as I could see, NetMonitor events are fired only if Firebug was
> activated for the Firefox instance. This breaks functionality of my
> add-on as I need to listen for network traffic to specific sites
> without bothering user to open Firebug first.
There must be something else going on here. In 1.4 the user interface
for activation changed and some of the details, but broadly speaking
both 1.3 and 1.4 required the user to allow the site to be debugged
before the net panel analyzes traffic.
Specifically the user must signal that a site is to be debugged by
FIrebug. The signal is different in 1.4, you open Firebug on the URL.
After that action Firebug will be active for the site until the user
pushed "Off", explicitly declining Firebug for the site.
>
> So, I have several questions...
>
> 1. How can I check if Net module (or NetMonitor) is active for a site?
In 1.4 sites are active/inactive, panels are enabled/disabled. So if
the net panel is enabled (Firebug.NetMonitor.isAlwaysEnabled() ==
true) and if the site is active then the net panel will be active.
You can listen for onPanelEnable and onPanelDisable for the net panel
name.
>
> 2. How can I activate Net module from my add-on?
You should not do this. The user should control the enable/disable for
the Net panel and the active/inactive state for a site. As an
extension you should be listening for events from Firebug that signal
an new context is being created (initContext), and taking action for
your feature based on these events.
>
> 3. Is it possible to check and activate Net module for site listening
> "http-on-examine-response" event, without loosing request on which it
> was activated.
? It sounds like you are a victim of the page annotation bug.
Otherwise what you ask does not make sense. Once activated a site
will have a context and all requests will be stored. If page
annotation fails, then the site activation is lost and the requests
also fail to appear. To check this you can run 1.5a21 and see if this
problem goes away.
>
> Thank you for any help you can give.
>
> Regards,
> Rado
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---