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
e086c228
Commit
e086c228
authored
Nov 04, 2011
by
Rick Waldron
Committed by
Dave Methvin
Nov 06, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
User internalKey instead of jQuery.expando. Fixes #10675
parent
262c32a7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
data.js
src/data.js
+7
-7
No files found.
src/data.js
View file @
e086c228
...
@@ -46,7 +46,7 @@ jQuery.extend({
...
@@ -46,7 +46,7 @@ jQuery.extend({
// Only defining an ID for JS objects if its cache already exists allows
// Only defining an ID for JS objects if its cache already exists allows
// the code to shortcut on the same path as a DOM node with no cache
// the code to shortcut on the same path as a DOM node with no cache
id
=
isNode
?
elem
[
jQuery
.
expando
]
:
elem
[
jQuery
.
expando
]
&&
jQuery
.
expando
,
id
=
isNode
?
elem
[
internalKey
]
:
elem
[
internalKey
]
&&
internalKey
,
isEvents
=
name
===
"events"
;
isEvents
=
name
===
"events"
;
// Avoid doing any more work than we need to when trying to get data on an
// Avoid doing any more work than we need to when trying to get data on an
...
@@ -59,9 +59,9 @@ jQuery.extend({
...
@@ -59,9 +59,9 @@ jQuery.extend({
// Only DOM nodes need a new unique ID for each element since their data
// Only DOM nodes need a new unique ID for each element since their data
// ends up in the global cache
// ends up in the global cache
if
(
isNode
)
{
if
(
isNode
)
{
elem
[
jQuery
.
expando
]
=
id
=
++
jQuery
.
uuid
;
elem
[
internalKey
]
=
id
=
++
jQuery
.
uuid
;
}
else
{
}
else
{
id
=
jQuery
.
expando
;
id
=
internalKey
;
}
}
}
}
...
@@ -144,7 +144,7 @@ jQuery.extend({
...
@@ -144,7 +144,7 @@ jQuery.extend({
cache
=
isNode
?
jQuery
.
cache
:
elem
,
cache
=
isNode
?
jQuery
.
cache
:
elem
,
// See jQuery.data for more information
// See jQuery.data for more information
id
=
isNode
?
elem
[
jQuery
.
expando
]
:
jQuery
.
expando
;
id
=
isNode
?
elem
[
internalKey
]
:
internalKey
;
// If there is already no cache entry for this object, there is no
// If there is already no cache entry for this object, there is no
// purpose in continuing
// purpose in continuing
...
@@ -214,11 +214,11 @@ jQuery.extend({
...
@@ -214,11 +214,11 @@ jQuery.extend({
// nor does it have a removeAttribute function on Document nodes;
// nor does it have a removeAttribute function on Document nodes;
// we must handle all of these cases
// we must handle all of these cases
if
(
jQuery
.
support
.
deleteExpando
)
{
if
(
jQuery
.
support
.
deleteExpando
)
{
delete
elem
[
jQuery
.
expando
];
delete
elem
[
internalKey
];
}
else
if
(
elem
.
removeAttribute
)
{
}
else
if
(
elem
.
removeAttribute
)
{
elem
.
removeAttribute
(
jQuery
.
expando
);
elem
.
removeAttribute
(
internalKey
);
}
else
{
}
else
{
elem
[
jQuery
.
expando
]
=
null
;
elem
[
internalKey
]
=
null
;
}
}
}
}
},
},
...
...
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