Index: extensions/renderer/resources/guest_view/extension_view.js |
diff --git a/extensions/renderer/resources/guest_view/extension_view.js b/extensions/renderer/resources/guest_view/extension_view.js |
index 8ca6dfecd1feebea94c73340f3cb99f3f83d0ebb..6738d1fd6c7386e472ad35c157e304c1af4505ef 100644 |
--- a/extensions/renderer/resources/guest_view/extension_view.js |
+++ b/extensions/renderer/resources/guest_view/extension_view.js |
@@ -20,9 +20,7 @@ ExtensionViewImpl.prototype.__proto__ = GuestViewContainer.prototype; |
ExtensionViewImpl.VIEW_TYPE = 'ExtensionView'; |
ExtensionViewImpl.setupElement = function(proto) { |
- var apiMethods = [ |
- 'navigate' |
- ]; |
+ var apiMethods = ExtensionViewImpl.getApiMethods(); |
GuestViewContainer.forwardApiMethods(proto, apiMethods); |
}; |
@@ -33,10 +31,6 @@ ExtensionViewImpl.prototype.createGuest = function() { |
}.bind(this)); |
}; |
-ExtensionViewImpl.prototype.onElementAttached = function() { |
- this.attributes[ExtensionViewConstants.ATTRIBUTE_SRC].parse(); |
-}; |
- |
ExtensionViewImpl.prototype.buildContainerParams = function() { |
var params = {}; |
for (var i in this.attributes) { |
@@ -51,13 +45,18 @@ ExtensionViewImpl.prototype.handleAttributeMutation = function( |
if (!this.attributes[attributeName]) |
return; |
- // Let the changed attribute handle its own mutation; |
+ // Let the changed attribute handle its own mutation. |
this.attributes[attributeName].maybeHandleMutation(oldValue, newValue); |
}; |
ExtensionViewImpl.prototype.onElementDetached = function() { |
this.guest.destroy(); |
- this.attributes[ExtensionViewConstants.ATTRIBUTE_SRC].reset(); |
+ |
+ // Reset all attributes. |
+ for (var i in this.attributes) { |
+ console.log(this.attributes[i].name); |
Fady Samuel
2015/02/16 19:26:28
Remove this.
apacible
2015/02/17 18:31:26
Done.
|
+ this.attributes[i].reset(); |
+ } |
}; |
GuestViewContainer.registerElement(ExtensionViewImpl); |