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
57d9dcd4
Commit
57d9dcd4
authored
Jan 07, 2013
by
Oleg
Committed by
Dave Methvin
Jan 08, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use while loop instead of for
parent
58b4994f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
12 deletions
+7
-12
manipulation.js
src/manipulation.js
+7
-12
No files found.
src/manipulation.js
View file @
57d9dcd4
...
@@ -422,16 +422,12 @@ jQuery.extend({
...
@@ -422,16 +422,12 @@ jQuery.extend({
},
},
buildFragment
:
function
(
elems
,
context
,
scripts
,
selection
)
{
buildFragment
:
function
(
elems
,
context
,
scripts
,
selection
)
{
var
elem
,
tmp
,
tag
,
wrap
,
j
,
ll
,
contains
,
var
elem
,
tmp
,
tag
,
wrap
,
contains
,
j
,
fragment
=
context
.
createDocumentFragment
(),
i
=
0
,
i
=
0
,
l
=
elems
.
length
,
fragment
=
context
.
createDocumentFragment
()
,
nodes
=
[];
nodes
=
[];
for
(
;
i
<
l
;
i
++
)
{
while
(
(
elem
=
elems
[
i
++
]
)
||
elem
===
0
)
{
elem
=
elems
[
i
];
if
(
elem
||
elem
===
0
)
{
// Add nodes directly
// Add nodes directly
if
(
jQuery
.
type
(
elem
)
===
"object"
)
{
if
(
jQuery
.
type
(
elem
)
===
"object"
)
{
...
@@ -465,14 +461,13 @@ jQuery.extend({
...
@@ -465,14 +461,13 @@ jQuery.extend({
// Support: Webkit, IE
// Support: Webkit, IE
tmp
.
textContent
=
""
;
tmp
.
textContent
=
""
;
}
}
}
}
}
// Remove wrapper from fragment
// Remove wrapper from fragment
fragment
.
textContent
=
""
;
fragment
.
textContent
=
""
;
for
(
i
=
0
,
l
=
nodes
.
length
;
i
<
l
;
i
++
)
{
i
=
0
;
elem
=
nodes
[
i
];
while
(
(
elem
=
nodes
[
i
++
])
)
{
contains
=
jQuery
.
contains
(
elem
.
ownerDocument
,
elem
);
contains
=
jQuery
.
contains
(
elem
.
ownerDocument
,
elem
);
// #4087 - If origin and destination elements are the same, and this is
// #4087 - If origin and destination elements are the same, and this is
...
@@ -491,9 +486,9 @@ jQuery.extend({
...
@@ -491,9 +486,9 @@ jQuery.extend({
// Capture executables
// Capture executables
if
(
scripts
)
{
if
(
scripts
)
{
for
(
j
=
0
,
ll
=
tmp
.
length
;
j
<
ll
;
j
++
)
{
elem
=
tmp
[
j
];
j
=
0
;
while
(
(
elem
=
tmp
[
j
++
])
)
{
if
(
rscriptType
.
test
(
elem
.
type
||
""
)
)
{
if
(
rscriptType
.
test
(
elem
.
type
||
""
)
)
{
core_push
.
call
(
scripts
,
elem
);
core_push
.
call
(
scripts
,
elem
);
}
}
...
...
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