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
3c1b4280
Commit
3c1b4280
authored
Dec 20, 2012
by
Oleg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Take care of comments
parent
a3ddcc5f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
manipulation.js
src/manipulation.js
+4
-3
No files found.
src/manipulation.js
View file @
3c1b4280
...
@@ -159,7 +159,7 @@ jQuery.fn.extend({
...
@@ -159,7 +159,7 @@ jQuery.fn.extend({
for
(
;
(
elem
=
this
[
i
]
)
!=
null
;
i
++
)
{
for
(
;
(
elem
=
this
[
i
]
)
!=
null
;
i
++
)
{
if
(
elem
.
nodeType
===
1
)
{
if
(
elem
.
nodeType
===
1
)
{
//
Remove element nodes and p
revent memory leaks
//
P
revent memory leaks
jQuery
.
cleanData
(
getAll
(
elem
,
false
)
);
jQuery
.
cleanData
(
getAll
(
elem
,
false
)
);
// Remove any remaining nodes
// Remove any remaining nodes
...
@@ -198,6 +198,8 @@ jQuery.fn.extend({
...
@@ -198,6 +198,8 @@ jQuery.fn.extend({
try
{
try
{
for
(;
i
<
l
;
i
++
)
{
for
(;
i
<
l
;
i
++
)
{
elem
=
this
[
i
]
||
{};
elem
=
this
[
i
]
||
{};
// Remove element nodes and prevent memory leaks
if
(
elem
.
nodeType
===
1
)
{
if
(
elem
.
nodeType
===
1
)
{
jQuery
.
cleanData
(
getAll
(
elem
,
false
)
);
jQuery
.
cleanData
(
getAll
(
elem
,
false
)
);
elem
.
innerHTML
=
value
;
elem
.
innerHTML
=
value
;
...
@@ -374,14 +376,13 @@ jQuery.extend({
...
@@ -374,14 +376,13 @@ jQuery.extend({
inPage
=
jQuery
.
contains
(
elem
.
ownerDocument
,
elem
),
inPage
=
jQuery
.
contains
(
elem
.
ownerDocument
,
elem
),
clone
=
elem
.
cloneNode
(
true
);
clone
=
elem
.
cloneNode
(
true
);
//
IE<=8 does not properly clone detached, unknown element nod
es
//
Fix IE cloning issu
es
if
(
!
jQuery
.
support
.
noCloneChecked
&&
(
elem
.
nodeType
===
1
||
elem
.
nodeType
===
11
)
&&
!
jQuery
.
isXMLDoc
(
elem
)
)
{
if
(
!
jQuery
.
support
.
noCloneChecked
&&
(
elem
.
nodeType
===
1
||
elem
.
nodeType
===
11
)
&&
!
jQuery
.
isXMLDoc
(
elem
)
)
{
// We eschew Sizzle here for performance reasons: http://jsperf.com/getall-vs-sizzle/2
// We eschew Sizzle here for performance reasons: http://jsperf.com/getall-vs-sizzle/2
destElements
=
getAll
(
clone
);
destElements
=
getAll
(
clone
);
srcElements
=
getAll
(
elem
);
srcElements
=
getAll
(
elem
);
// Fix IE cloning issues
for
(
i
=
0
;
(
node
=
srcElements
[
i
])
!=
null
;
++
i
)
{
for
(
i
=
0
;
(
node
=
srcElements
[
i
])
!=
null
;
++
i
)
{
// Ensure that the destination node is not null; Fixes #9587
// Ensure that the destination node is not null; Fixes #9587
if
(
destElements
[
i
]
)
{
if
(
destElements
[
i
]
)
{
...
...
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