Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Revert "Revert "Fix IE leaks caused by ._fireEvent circular reference""

This reverts commit 14f5deb.
  • Loading branch information...
commit 86611beefad82d50a9b2a9b19647d39ede914c1c 1 parent 14f5deb
@kentaromiura authored
Showing with 10 additions and 1 deletion.
  1. +10 −1 Source/Element/Element.js
View
11 Source/Element/Element.js
@@ -800,6 +800,7 @@ var formProps = {input: 'checked', option: 'selected', textarea: 'value'};
Element.implement({
destroy: function(){
+ if(! this.getElementsByTagName) return null; //textNode
var children = clean(this).getElementsByTagName('*');
Array.each(children, clean);
Element.dispose(this);
@@ -807,11 +808,12 @@ Element.implement({
},
empty: function(){
- Array.from(this.childNodes).each(Element.dispose);
+ Array.from(this.childNodes).each(Element.destroy);
return this;
},
dispose: function(){
+ this._fireEvent = null;
return (this.parentNode) ? this.parentNode.removeChild(this) : this;
},
@@ -949,6 +951,13 @@ Element.Properties.html = {
};
+// fix for IE leak on Element.set('text','')
+Element.Properties.text = {
+ set: function(text){
+ Element.prototype.empty.call(this).setProperty('text',text);
+ }
+}
+
var supportsHTML5Elements, supportsTableInnerHTML, supportsTRInnerHTML;
/*<ltIE9>*/
Please sign in to comment.
Something went wrong with that request. Please try again.