Bug Tracker

Ticket #2815 (new bug)

Opened 7 months ago

remove element from XML doc broken & a solution

Reported by: xyplex64 Assigned to: anonymous
Type: bug Priority: minor
Milestone: 1.2.4 Component: core
Version: 1.2.3 Keywords:
Cc: Needs: Review

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 );

} },

Attachments

Note: See TracTickets for help on using tickets.