Side navigation
#2815 closed bug (fixed)
Opened May 07, 2008 09:51AM UTC
Closed June 22, 2010 02:46AM UTC
remove element from XML doc broken & a solution
Reported by: | xyplex64 | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 1.2.4 |
Component: | event | Version: | 1.2.3 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
When trying to call remove on an element in an XML doc, IE 6 fails with "Object doesn't support this property or method". The reason it is failing is because of the "Prevent memory leaks" section. This part only applies to HTML DOM documents so I wrapped it in a conditional.
remove: function( selector ) {
if ( !selector || jQuery.filter( selector, [ this ] ).r.length ) {
if (this.documentElement == document)
// Prevent memory leaks
jQuery( "*", this ).add(this).each(function(){
jQuery.event.remove(this);
jQuery.removeData(this);
});
if (this.parentNode)
this.parentNode.removeChild( this );
}
},