Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
J
jquery
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
夏彬
jquery
Commits
82ac384b
Commit
82ac384b
authored
Dec 23, 2010
by
Colin Snover
Browse files
Options
Browse Files
Download
Plain Diff
Don't use for-in loops on Arrays. Fixes #7817. Thanks to dmethvin.
Conflicts: src/manipulation.js
parents
f28c774f
acab4ab0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
3 deletions
+6
-3
manipulation.js
src/manipulation.js
+2
-2
xhr.js
src/xhr.js
+1
-1
manipulation.js
test/unit/manipulation.js
+3
-0
No files found.
src/manipulation.js
View file @
82ac384b
...
@@ -390,8 +390,8 @@ function cloneCopyEvent(orig, ret) {
...
@@ -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
);
}
}
}
}
}
}
...
...
src/xhr.js
View file @
82ac384b
...
@@ -87,7 +87,7 @@ jQuery.xhr = function( _native ) {
...
@@ -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
);
}
}
...
...
test/unit/manipulation.js
View file @
82ac384b
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
;
});
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment