Created
June 24, 2011 14:51
-
-
Save xabolcs/1044942 to your computer and use it in GitHub Desktop.
BarTabWebProgressListener.onStateChange vs browser.webNavigation._pauseLoadURI is not a function
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Progress listener that stops the loading of tabs that are opened in | |
* the background and whose contents is loaded by C++ code. This | |
* occurs for instance when the 'browser.tabs.loadDivertedInBackground' | |
* preference is enabled (because links are always opened by docshell code). | |
*/ | |
function BarTabWebProgressListener () {} | |
BarTabWebProgressListener.prototype = { | |
... | |
/*** nsIWebProgressListener ***/ | |
onStateChange: function (aWebProgress, aRequest, aStateFlags, aStatus) { | |
... | |
// panorama switch | |
if (this._tab._tabViewTabItem && | |
this._tab._tabViewTabItem.parent && | |
this._tab._tabViewTabItem.parent._activeTab.tab && | |
this._tab._tabViewTabItem.parent._activeTab.tab == this._tab | |
) { | |
this._tab.removeAttribute("ontab"); | |
// webNavigation.unhook() will call our unhook. | |
browser.webNavigation.unhook(); | |
return; | |
} | |
... | |
} | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment