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

Unified Diff: ext/content.js

Issue 29573083: Issue 5028 - Use browser namespace (Closed) Base URL: https://hg.adblockplus.org/adblockplusui/
Patch Set: Add polyfill.js to README.md Created Oct. 17, 2017, 12:35 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 | « ext/common.js ('k') | firstRun.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ext/content.js
===================================================================
--- a/ext/content.js
+++ b/ext/content.js
@@ -56,20 +56,20 @@
messageQueue.push(message);
else
backgroundFrame.contentWindow.postMessage(message, "*");
}
};
/* Polyfills */
- if (!("runtime" in chrome))
- chrome.runtime = {};
+ if (!("runtime" in browser))
+ browser.runtime = {};
- chrome.runtime.sendMessage = (message, responseCallback) =>
+ browser.runtime.sendMessage = (message, responseCallback) =>
{
let messageId = ++maxMessageId;
ext.backgroundPage._sendRawMessage({
type: "message",
messageId,
payload: message
});
« no previous file with comments | « ext/common.js ('k') | firstRun.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld