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

Unified Diff: ext/background.js

Issue 29370947: Issue 3138 - Improve how context menu "block element" handles iframes (Closed)
Patch Set: Use messaging instead of requiring the info module Created Oct. 19, 2017, 10:52 a.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 | « composer.postload.js ('k') | lib/filterComposer.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ext/background.js
diff --git a/ext/background.js b/ext/background.js
index 69e05ca89c1e96349c9386065957f2e086683e28..84065388fee2a8db0d9b9743f2500dcd21757ede 100644
--- a/ext/background.js
+++ b/ext/background.js
@@ -95,9 +95,12 @@
return frame.url;
}
},
- sendMessage(message, responseCallback)
+ sendMessage(message, responseCallback, frameId)
{
- browser.tabs.sendMessage(this.id, message, responseCallback);
+ let options = {};
+ if (typeof frameId != "undefined")
+ options.frameId = frameId;
+ browser.tabs.sendMessage(this.id, message, options, responseCallback);
}
};
@@ -453,7 +456,7 @@
contexts: item.contexts,
onclick(info, tab)
{
- item.onclick(new Page(tab));
+ item.onclick(new Page(tab), info);
}
});
});
« no previous file with comments | « composer.postload.js ('k') | lib/filterComposer.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld