Index: chrome/renderer/resources/extensions/browser_tag.js |
diff --git a/chrome/renderer/resources/extensions/browser_tag.js b/chrome/renderer/resources/extensions/browser_tag.js |
index bd0b8bd11d8c9af628ae468b6bedce7dd8e8057f..362ebea154313565dfbf0977853de2ced78ef992 100644 |
--- a/chrome/renderer/resources/extensions/browser_tag.js |
+++ b/chrome/renderer/resources/extensions/browser_tag.js |
@@ -73,7 +73,11 @@ function BrowserTag(node) { |
BrowserTag.prototype.handleMutation_ = function(mutation) { |
switch (mutation.attributeName) { |
case 'src': |
- this.objectNode_.postMessage(this.node_.getAttribute('src')); |
+ // We need to set .src directly on the shadow element so that |
+ // BrowserPluginBindings catches this as src attribute mutation. The |
+ // bindings would catch 'SetAttribute' method call with src as argument |
+ // otherwise. |
+ this.objectNode_.src = this.node_.getAttribute('src'); |
break; |
default: |
this.copyAttribute_(mutation.attributeName); |