Detect URL changes in Firefox add-on SDK (multiprocess)

84 Views Asked by At

I'm developing my first add-on with Add-on SDK, jpm (because I need to support old versions of Firefox)

I need to track URL changes in address bar, I found that such thing can be done with using of a nsIWebProgressListener interface.

I found this solution: Detect tab URL change inside a Firefox add-on, but it does not work on multiprocess Firefox (Electrolysis), because it uses incompatible tabs/utils API.

Fragment of code:

tabs.on('open', function(newTab) {
    var lowLevel = viewFor(newTab);
    var browser = getBrowserForTab(lowLevel);
    browser.addProgressListener(progressListener);
});

Function getBrowserForTab is not compatible with e10s, and does not work properly.

What can I do?

0

There are 0 best solutions below