Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(823)

Unified Diff: chrome/renderer/resources/extensions/web_view.js

Issue 11377089: browser-plugin: Send a JSON string for the detail data with the events. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/renderer/browser_plugin/browser_plugin.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/resources/extensions/web_view.js
diff --git a/chrome/renderer/resources/extensions/web_view.js b/chrome/renderer/resources/extensions/web_view.js
index 65582f2fa6471e2c774f68d77168d3b6c89b9c3f..fcfbe1345528630d40d6dcd6e4e75bc3e287bcf3 100644
--- a/chrome/renderer/resources/extensions/web_view.js
+++ b/chrome/renderer/resources/extensions/web_view.js
@@ -157,8 +157,9 @@ WebView.prototype.setupEvent_ = function(eventname, attribs) {
var node = this.node_;
this.objectNode_.addEventListener('-internal-' + eventname, function(e) {
var evt = new Event(eventname);
+ var detail = e.detail ? JSON.parse(e.detail) : {};
attribs.forEach(function(attribname) {
- evt[attribname] = e.detail[attribname];
+ evt[attribname] = detail[attribname];
});
node.dispatchEvent(evt);
});
« no previous file with comments | « no previous file | content/renderer/browser_plugin/browser_plugin.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698