aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorColin Snover <github.com@zetafleet.com>2010-12-22 18:31:33 -0600
committerColin Snover <github.com@zetafleet.com>2010-12-22 18:32:33 -0600
commit82ac384b494258e17e2856ee2259475ecb0174ca (patch)
tree9fecb0dfe8dc76ed09b80192f9d81f9b44621989 /src
parentf28c774f2cde004a33aefc28306d995c599d963b (diff)
parentacab4ab0e50fadacb106468b1449643b9a03826b (diff)
downloadjquery-82ac384b494258e17e2856ee2259475ecb0174ca.tar.gz
jquery-82ac384b494258e17e2856ee2259475ecb0174ca.zip
Don't use for-in loops on Arrays. Fixes #7817. Thanks to dmethvin.
Conflicts: src/manipulation.js
Diffstat (limited to 'src')
-rw-r--r--src/manipulation.js4
-rw-r--r--src/xhr.js2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/manipulation.js b/src/manipulation.js
index 3b9aa1462..5f4b15dd9 100644
--- a/src/manipulation.js
+++ b/src/manipulation.js
@@ -390,8 +390,8 @@ function cloneCopyEvent(orig, ret) {
curData.events = {};
for ( var type in events ) {
- for ( var handler in events[ type ] ) {
- jQuery.event.add( this, type, events[ type ][ handler ], events[ type ][ handler ].data );
+ for ( var i = 0, l = events[ type ].length; i < l; i++ ) {
+ jQuery.event.add( this, type, events[ type ][ i ], events[ type ][ i ].data );
}
}
}
diff --git a/src/xhr.js b/src/xhr.js
index 57903e046..4896e6cb6 100644
--- a/src/xhr.js
+++ b/src/xhr.js
@@ -87,7 +87,7 @@ jQuery.xhr = function( _native ) {
}
// Apply option prefilters
- for (i in prefilters) {
+ for ( i = 0; i < prefilters.length; i++ ) {
prefilters[i](s);
}