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

Unified Diff: popup.js

Issue 29565717: Issue 5832 - Use runtime.onMessage directly in popup (Closed) Base URL: https://hg.adblockplus.org/adblockpluschrome/
Patch Set: Created Oct. 5, 2017, 1:39 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 | « popup.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: popup.js
===================================================================
--- a/popup.js
+++ b/popup.js
@@ -38,32 +38,32 @@
{
return new Promise(resolve =>
{
function onMessage(message, sender)
{
if (message.type == "composer.ready" && sender.page &&
sender.page.id == tab.id)
{
- ext.onMessage.removeListener(onMessage);
+ chrome.runtime.onMessage.removeListener(onMessage);
resolve();
}
}
- ext.onMessage.addListener(onMessage);
+ chrome.runtime.onMessage.addListener(onMessage);
chrome.runtime.sendMessage({
type: "composer.isPageReady",
pageId: tab.id
},
ready =>
{
if (ready)
{
- ext.onMessage.removeListener(onMessage);
+ chrome.runtime.onMessage.removeListener(onMessage);
resolve();
}
});
});
}
function onLoad()
{
« no previous file with comments | « popup.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld