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

Unified Diff: chrome/ext/background.js

Issue 29370947: Issue 3138 - Improve how context menu "block element" handles iframes (Closed)
Patch Set: Created Jan. 10, 2017, 6:36 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 | « no previous file | composer.postload.js » ('j') | composer.postload.js » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/ext/background.js
diff --git a/chrome/ext/background.js b/chrome/ext/background.js
index 4681ec08bb0fbf200b337c74cd8d33e09d754c26..adb89347f07ba9b48e74fcc6b89dbcd1b05c0df5 100644
--- a/chrome/ext/background.js
+++ b/chrome/ext/background.js
@@ -46,9 +46,12 @@
return frame.url;
}
},
- sendMessage: function(message, responseCallback)
+ sendMessage: function(message, responseCallback, frameId)
{
- chrome.tabs.sendMessage(this.id, message, responseCallback);
+ let options = {};
+ if (frameId != undefined)
Sebastian Noack 2017/01/11 18:15:11 Please use typeof to check for undefined, like we
kzar 2017/01/12 07:24:04 Whoops, Done.
+ options.frameId = frameId;
Sebastian Noack 2017/01/11 18:15:11 This isn't supported in Microsoft Edge. Regardless
kzar 2017/01/12 07:24:04 Damn, looking at the docs it seems like you're rig
+ chrome.tabs.sendMessage(this.id, message, options, responseCallback);
}
};
@@ -328,7 +331,7 @@
contexts: item.contexts,
onclick: function(info, tab)
{
- item.onclick(new Page(tab));
+ item.onclick(new Page(tab), info);
}
});
});
« no previous file with comments | « no previous file | composer.postload.js » ('j') | composer.postload.js » ('J')

Powered by Google App Engine
This is Rietveld