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

Unified Diff: lib/filterComposer.js

Issue 29752571: Noissue - Removed background.js (Closed)
Patch Set: Created April 14, 2018, 12: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 | « background.js ('k') | metadata.chrome » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/filterComposer.js
===================================================================
--- a/lib/filterComposer.js
+++ b/lib/filterComposer.js
@@ -312,6 +312,22 @@
});
});
+port.on("forward", (msg, sender) =>
kzar 2018/04/16 11:08:22 If this is no longer a generic message, it's name
+{
+ let targetPage;
+ if (msg.targetPageId)
+ targetPage = ext.getPage(msg.targetPageId);
+ else
+ targetPage = sender.page;
+ if (targetPage)
+ {
+ msg.payload.sender = sender.page.id;
+ if (msg.expectsResponse)
+ return new Promise(targetPage.sendMessage.bind(targetPage, msg.payload));
+ targetPage.sendMessage(msg.payload);
+ }
+});
+
ext.pages.onLoading.addListener(page =>
{
// When tabs start loading we send them a message to ensure that the state
« no previous file with comments | « background.js ('k') | metadata.chrome » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld