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

Unified Diff: ext/common.js

Issue 29397620: Issue 5055 - Update adblockpluscore dependency to revision d0715e99bd3b and adblockplusui to 8ceaab… (Closed) Base URL: https://hg.adblockplus.org/adblockplus
Patch Set: Show effective selectors in blockable items Created March 29, 2017, 1:27 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 | « dependencies ('k') | lib/child/elemHideEmulation.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ext/common.js
===================================================================
--- a/ext/common.js
+++ b/ext/common.js
@@ -45,16 +45,25 @@
return frames;
}
var EventTarget = global.ext._EventTarget = function(port, windowID)
{
this._port = port;
this._windowID = windowID;
+ this.addListener((payload, sender, resolve) =>
+ {
+ if (payload.type)
+ {
+ let result = this._port._dispatch(payload.type, payload, sender);
+ if (typeof result != "undefined")
+ resolve(result);
+ }
+ });
};
EventTarget.prototype = {
addListener: function(listener)
{
var wrapper = (message, sender) =>
{
if (this._windowID && this._windowID != message.targetID)
return undefined;
« no previous file with comments | « dependencies ('k') | lib/child/elemHideEmulation.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld