Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: lib/aardvark.js

Issue 29327605: Issue 3071 - Element Hiding Helper broken in Thunderbird/SeaMonkey Mail (Closed)
Patch Set: Created Sept. 14, 2015, 6:22 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/aardvark.js
===================================================================
--- a/lib/aardvark.js
+++ b/lib/aardvark.js
@@ -587,41 +587,45 @@ let Aardvark = exports.Aardvark =
return false;
},
select: function(elem)
{
if (!elem)
return false;
+ let browser = this.browser;
+ if ("selectedBrowser" in browser) // tabbrowser element
+ browser = browser.selectedBrowser;
+
let messageId = ++messageCounter;
let callback = (message) =>
{
let response = message.data;
if (response.messageId != messageId)
return;
- this.browser.selectedBrowser.messageManager.removeMessageListener(
+ browser.messageManager.removeMessageListener(
"ElemHideHelper:GetNodeInfo:Response",
callback
);
if (!response.nodeData)
return;
this.window.openDialog("chrome://elemhidehelper/content/composer.xul",
"_blank", "chrome,centerscreen,resizable,dialog=no", response);
this.quit();
};
- this.browser.selectedBrowser.messageManager.addMessageListener(
+ browser.messageManager.addMessageListener(
"ElemHideHelper:GetNodeInfo:Response",
callback
);
- this.browser.selectedBrowser.messageManager.sendAsyncMessage(
+ browser.messageManager.sendAsyncMessage(
"ElemHideHelper:GetNodeInfo",
messageId,
{
element: elem
}
);
return false;
},
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld