Don't use for-in loops on Arrays. Fixes #7817. Thanks to dmethvin.
Conflicts: src/manipulation.js
This commit is contained in:
commit
82ac384b49
|
@ -390,8 +390,8 @@ function cloneCopyEvent(orig, ret) {
|
||||||
curData.events = {};
|
curData.events = {};
|
||||||
|
|
||||||
for ( var type in events ) {
|
for ( var type in events ) {
|
||||||
for ( var handler in events[ type ] ) {
|
for ( var i = 0, l = events[ type ].length; i < l; i++ ) {
|
||||||
jQuery.event.add( this, type, events[ type ][ handler ], events[ type ][ handler ].data );
|
jQuery.event.add( this, type, events[ type ][ i ], events[ type ][ i ].data );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -87,7 +87,7 @@ jQuery.xhr = function( _native ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Apply option prefilters
|
// Apply option prefilters
|
||||||
for (i in prefilters) {
|
for ( i = 0; i < prefilters.length; i++ ) {
|
||||||
prefilters[i](s);
|
prefilters[i](s);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
module("manipulation");
|
module("manipulation");
|
||||||
|
|
||||||
|
// Ensure that an extended Array prototype doesn't break jQuery
|
||||||
|
Array.prototype.arrayProtoFn = function(arg) { throw("arrayProtoFn should not be called"); };
|
||||||
|
|
||||||
var bareObj = function(value) { return value; };
|
var bareObj = function(value) { return value; };
|
||||||
var functionReturningObj = function(value) { return (function() { return value; }); };
|
var functionReturningObj = function(value) { return (function() { return value; }); };
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue