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
f5110cde
Commit
f5110cde
authored
Jan 26, 2013
by
Timmy Willison
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor updates. All parameters of an internal function are for internal use only.
parent
a5c33fe1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
12 deletions
+12
-12
data.js
src/data.js
+12
-12
No files found.
src/data.js
View file @
f5110cde
var
rbrace
=
/
(?:\{[\s\S]
*
\}
|
\[[\s\S]
*
\])
$/
,
rmultiDash
=
/
([
A-Z
])
/g
;
function
internalData
(
elem
,
name
,
data
,
pvt
/* Internal Use Only */
)
{
function
internalData
(
elem
,
name
,
data
,
pvt
)
{
if
(
!
jQuery
.
acceptData
(
elem
)
)
{
return
;
}
...
...
@@ -95,7 +95,7 @@ function internalData( elem, name, data, pvt /* Internal Use Only */ ){
return
ret
;
}
function
internalRemoveData
(
elem
,
name
,
pvt
/* For internal use only */
)
{
function
internalRemoveData
(
elem
,
name
,
pvt
)
{
if
(
!
jQuery
.
acceptData
(
elem
)
)
{
return
;
}
...
...
@@ -205,18 +205,18 @@ jQuery.extend({
},
data
:
function
(
elem
,
name
,
data
)
{
return
internalData
(
elem
,
name
,
data
,
false
);
return
internalData
(
elem
,
name
,
data
);
},
removeData
:
function
(
elem
,
name
)
{
return
internalRemoveData
(
elem
,
name
,
false
);
return
internalRemoveData
(
elem
,
name
);
},
// For internal use only.
_data
:
function
(
elem
,
name
,
data
)
{
return
internalData
(
elem
,
name
,
data
,
true
);
},
_removeData
:
function
(
elem
,
name
)
{
return
internalRemoveData
(
elem
,
name
,
true
);
},
...
...
@@ -304,12 +304,12 @@ function dataAttr( elem, key, data ) {
if
(
typeof
data
===
"string"
)
{
try
{
data
=
data
===
"true"
?
true
:
data
===
"false"
?
false
:
data
===
"null"
?
null
:
// Only convert to a number if it doesn't change the string
+
data
+
""
===
data
?
+
data
:
rbrace
.
test
(
data
)
?
jQuery
.
parseJSON
(
data
)
:
data
;
data
===
"false"
?
false
:
data
===
"null"
?
null
:
// Only convert to a number if it doesn't change the string
+
data
+
""
===
data
?
+
data
:
rbrace
.
test
(
data
)
?
jQuery
.
parseJSON
(
data
)
:
data
;
}
catch
(
e
)
{}
// Make sure we set the data so it isn't changed later
...
...
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