Commit 1fdc0b7f authored by Rick Waldron's avatar Rick Waldron

Replace unknown, mysterious html arg to replaceWith(fn...), with just the current node.

parent e83bc970
...@@ -263,9 +263,12 @@ jQuery.fn.extend({ ...@@ -263,9 +263,12 @@ jQuery.fn.extend({
// Make sure that the elements are removed from the DOM before they are inserted // Make sure that the elements are removed from the DOM before they are inserted
// this can help fix replacing a parent with child elements // this can help fix replacing a parent with child elements
if ( jQuery.isFunction( value ) ) { if ( jQuery.isFunction( value ) ) {
return this.each(function(i) { return this.each(function( index ) {
var self = jQuery(this), old = self.html(); // HTML argument replaced by "this" element
self.replaceWith( value.call( this, i, old ) ); // 1. There were no supporting tests
// 2. There was no internal code relying on this
// 3. There was no documentation of an html argument
jQuery( this ).replaceWith( value.call( this, index, this ) );
}); });
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment