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
d086aa16
Commit
d086aa16
authored
Dec 19, 2012
by
Oleg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use jQuery.merge only if it really necessary
parent
d552b944
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
manipulation.js
src/manipulation.js
+3
-3
No files found.
src/manipulation.js
View file @
d086aa16
...
@@ -295,7 +295,7 @@ jQuery.fn.extend({
...
@@ -295,7 +295,7 @@ jQuery.fn.extend({
// Keep references to cloned scripts for later restoration
// Keep references to cloned scripts for later restoration
if
(
hasScripts
)
{
if
(
hasScripts
)
{
jQuery
.
merge
(
scripts
,
getAll
(
node
,
"script"
)
);
core_push
.
apply
(
scripts
,
getAll
(
node
,
"script"
)
);
}
}
}
}
...
@@ -427,7 +427,7 @@ jQuery.extend({
...
@@ -427,7 +427,7 @@ jQuery.extend({
if
(
elem
||
elem
===
0
)
{
if
(
elem
||
elem
===
0
)
{
// Add nodes directly
// Add nodes directly
if
(
jQuery
.
type
(
elem
)
===
"object"
)
{
if
(
jQuery
.
type
(
elem
)
===
"object"
)
{
jQuery
.
merge
(
ret
,
elem
.
nodeType
?
[
elem
]
:
elem
);
core_push
.
apply
(
ret
,
elem
.
nodeType
?
[
elem
]
:
elem
);
// Convert non-html into a text node
// Convert non-html into a text node
}
else
if
(
!
rhtml
.
test
(
elem
)
)
{
}
else
if
(
!
rhtml
.
test
(
elem
)
)
{
...
@@ -450,7 +450,7 @@ jQuery.extend({
...
@@ -450,7 +450,7 @@ jQuery.extend({
tmp
=
tmp
.
lastChild
;
tmp
=
tmp
.
lastChild
;
}
}
jQuery
.
merge
(
ret
,
tmp
.
childNodes
);
core_push
.
apply
(
ret
,
tmp
.
childNodes
);
// Fix #12392 for WebKit and IE > 9
// Fix #12392 for WebKit and IE > 9
tmp
.
textContent
=
""
;
tmp
.
textContent
=
""
;
...
...
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