Can I use gBrowser.selectedBrowser.addProgressLisnter in e10s?

We are trying to port our add-on to message manager and frame scripts. Previously, our add-on used gBrowser.addProgressListener () and nsIWebProgressListener.onStateChange () along with the browser .webProgress.isLoadingDocument to monitor network activity.

The question is, can I keep using browser.addProgressListener and browser.webProgres.isLoadingDocument in future versions of Firefox, or using webProgress from within a script frame is the best way to do this? Maybe I should use a different technique?

For some reason, it doesn't work reliably in Firefox 36.0a1, so I thought I should move the code into the script frame. Namely frame docShell is QI-ed for webProgress to add a progress listener there. It also doesn't work in all cases, so I'm guessing it's just a bug in 36.0a1.

By "not working reliably" I mean that onStateChange () is not called when I try to navigate through the browser.loadURI () method when a blank page is loaded on the current tab. Also webProgress from the frame script sometimes "forgets" to send STATE_STOP to onStateChange ().

+3


source to share





All Articles