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
d552b944
Commit
d552b944
authored
Dec 19, 2012
by
Oleg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplify jQuery.expando
parent
c3348788
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
25 deletions
+7
-25
manipulation.js
src/manipulation.js
+7
-25
No files found.
src/manipulation.js
View file @
d552b944
...
...
@@ -502,7 +502,6 @@ jQuery.extend({
i
=
0
,
internalKey
=
jQuery
.
expando
,
cache
=
jQuery
.
cache
,
deleteExpando
=
jQuery
.
support
.
deleteExpando
,
special
=
jQuery
.
event
.
special
;
for
(
;
(
elem
=
elems
[
i
])
!=
null
;
i
++
)
{
...
...
@@ -513,37 +512,20 @@ jQuery.extend({
data
=
id
&&
cache
[
id
];
if
(
data
)
{
if
(
data
.
events
)
{
for
(
type
in
data
.
events
)
{
if
(
special
[
type
]
)
{
jQuery
.
event
.
remove
(
elem
,
type
);
for
(
type
in
data
.
events
)
{
if
(
special
[
type
]
)
{
jQuery
.
event
.
remove
(
elem
,
type
);
// This is a shortcut to avoid jQuery.event.remove's overhead
}
else
{
jQuery
.
removeEvent
(
elem
,
type
,
data
.
handle
);
}
// This is a shortcut to avoid jQuery.event.remove's overhead
}
else
{
jQuery
.
removeEvent
(
elem
,
type
,
data
.
handle
);
}
}
// Remove cache only if it was not already removed by jQuery.event.remove
if
(
cache
[
id
]
)
{
delete
cache
[
id
];
// IE does not allow us to delete expando properties from nodes,
// nor does it have a removeAttribute function on Document nodes;
// we must handle all of these cases
if
(
deleteExpando
)
{
delete
elem
[
internalKey
];
}
else
if
(
elem
.
removeAttribute
)
{
elem
.
removeAttribute
(
internalKey
);
}
else
{
elem
[
internalKey
]
=
null
;
}
core_deletedIds
.
push
(
id
);
delete
elem
[
internalKey
];
}
}
}
...
...
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