Chromium Code Reviews| 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 362ebea154313565dfbf0977853de2ced78ef992..911acca2cfb188dc2217acd1b86cd24e75e21b52 100644 |
| --- a/chrome/renderer/resources/extensions/browser_tag.js |
| +++ b/chrome/renderer/resources/extensions/browser_tag.js |
| @@ -51,10 +51,17 @@ function BrowserTag(node) { |
| this.node_, |
| {attributes: true, attributeFilter: BROWSER_TAG_ATTRIBUTES}); |
| + var objectNode = this.objectNode_; |
|
Mihai Parparita -not on Chrome
2012/10/12 22:26:55
As mentioned in the other review, you shouldn't ne
lazyboy
2012/10/12 23:30:43
Hmmm, I think I'm one level too deep to do that.
'
Mihai Parparita -not on Chrome
2012/10/13 00:12:44
Ah, yes, you're right. LGTM as is.
|
| // Expose getters and setters for the attributes. |
| BROWSER_TAG_ATTRIBUTES.forEach(function(attributeName) { |
| Object.defineProperty(this.node_, attributeName, { |
| get: function() { |
| + if (attributeName == 'src') { |
| + // Always read src attribute from the plugin <object> since: a) It can |
| + // have different value when empty src is set. b) BrowserPlugin |
| + // updates its src attribute on guest-initiated navigations. |
| + return objectNode.src; |
| + } |
| var value = node.getAttribute(attributeName); |
| var numericValue = parseInt(value, 10); |
| return isNaN(numericValue) ? value : numericValue; |