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
835e8c4a
Commit
835e8c4a
authored
Jul 27, 2014
by
Chris Antaki
Committed by
Oleg Gaidarenko
Sep 02, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Core: Drop strundefined variable
Ref 29838b6cab6f2e508f3e9692f32918c72b1a504b Closes gh-1628
parent
b59b819f
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
20 additions
and
31 deletions
+20
-31
attr.js
src/attributes/attr.js
+2
-3
classes.js
src/attributes/classes.js
+2
-3
support.js
src/effects/support.js
+2
-3
event.js
src/event.js
+3
-4
global.js
src/exports/global.js
+3
-4
manipulation.js
src/manipulation.js
+4
-5
offset.js
src/offset.js
+2
-3
support.js
src/support.js
+2
-3
strundefined.js
src/var/strundefined.js
+0
-3
No files found.
src/attributes/attr.js
View file @
835e8c4a
define
([
define
([
"../core"
,
"../core"
,
"../var/rnotwhite"
,
"../var/rnotwhite"
,
"../var/strundefined"
,
"../core/access"
,
"../core/access"
,
"./support"
,
"./support"
,
"./val"
,
"./val"
,
"../selector"
"../selector"
],
function
(
jQuery
,
rnotwhite
,
strundefined
,
access
,
support
)
{
],
function
(
jQuery
,
rnotwhite
,
access
,
support
)
{
var
nodeHook
,
boolHook
,
var
nodeHook
,
boolHook
,
attrHandle
=
jQuery
.
expr
.
attrHandle
,
attrHandle
=
jQuery
.
expr
.
attrHandle
,
...
@@ -37,7 +36,7 @@ jQuery.extend({
...
@@ -37,7 +36,7 @@ jQuery.extend({
}
}
// Fallback to prop when attributes are not supported
// Fallback to prop when attributes are not supported
if
(
typeof
elem
.
getAttribute
===
strundefined
)
{
if
(
typeof
elem
.
getAttribute
===
"undefined"
)
{
return
jQuery
.
prop
(
elem
,
name
,
value
);
return
jQuery
.
prop
(
elem
,
name
,
value
);
}
}
...
...
src/attributes/classes.js
View file @
835e8c4a
define
([
define
([
"../core"
,
"../core"
,
"../var/rnotwhite"
,
"../var/rnotwhite"
,
"../var/strundefined"
,
"../core/init"
"../core/init"
],
function
(
jQuery
,
rnotwhite
,
strundefined
)
{
],
function
(
jQuery
,
rnotwhite
)
{
var
rclass
=
/
[\t\r\n\f]
/g
;
var
rclass
=
/
[\t\r\n\f]
/g
;
...
@@ -127,7 +126,7 @@ jQuery.fn.extend({
...
@@ -127,7 +126,7 @@ jQuery.fn.extend({
}
}
// Toggle whole class name
// Toggle whole class name
}
else
if
(
type
===
strundefined
||
type
===
"boolean"
)
{
}
else
if
(
type
===
"undefined"
||
type
===
"boolean"
)
{
if
(
this
.
className
)
{
if
(
this
.
className
)
{
// store className if set
// store className if set
jQuery
.
_data
(
this
,
"__className__"
,
this
.
className
);
jQuery
.
_data
(
this
,
"__className__"
,
this
.
className
);
...
...
src/effects/support.js
View file @
835e8c4a
define
([
define
([
"../var/strundefined"
,
"../var/support"
"../var/support"
],
function
(
s
trundefined
,
s
upport
)
{
],
function
(
support
)
{
(
function
()
{
(
function
()
{
var
shrinkWrapBlocksVal
;
var
shrinkWrapBlocksVal
;
...
@@ -31,7 +30,7 @@ define([
...
@@ -31,7 +30,7 @@ define([
// Support: IE6
// Support: IE6
// Check if elements with layout shrink-wrap their children
// Check if elements with layout shrink-wrap their children
if
(
typeof
div
.
style
.
zoom
!==
strundefined
)
{
if
(
typeof
div
.
style
.
zoom
!==
"undefined"
)
{
// Reset CSS: box-sizing; display; margin; border
// Reset CSS: box-sizing; display; margin; border
div
.
style
.
cssText
=
div
.
style
.
cssText
=
// Support: Firefox<29, Android 2.3
// Support: Firefox<29, Android 2.3
...
...
src/event.js
View file @
835e8c4a
define
([
define
([
"./core"
,
"./core"
,
"./var/strundefined"
,
"./var/rnotwhite"
,
"./var/rnotwhite"
,
"./var/hasOwn"
,
"./var/hasOwn"
,
"./var/slice"
,
"./var/slice"
,
...
@@ -9,7 +8,7 @@ define([
...
@@ -9,7 +8,7 @@ define([
"./core/init"
,
"./core/init"
,
"./data/accepts"
,
"./data/accepts"
,
"./selector"
"./selector"
],
function
(
jQuery
,
strundefined
,
rnotwhite
,
hasOwn
,
slice
,
support
)
{
],
function
(
jQuery
,
rnotwhite
,
hasOwn
,
slice
,
support
)
{
var
rformElems
=
/^
(?:
input|select|textarea
)
$/i
,
var
rformElems
=
/^
(?:
input|select|textarea
)
$/i
,
rkeyEvent
=
/^key/
,
rkeyEvent
=
/^key/
,
...
@@ -70,7 +69,7 @@ jQuery.event = {
...
@@ -70,7 +69,7 @@ jQuery.event = {
eventHandle
=
elemData
.
handle
=
function
(
e
)
{
eventHandle
=
elemData
.
handle
=
function
(
e
)
{
// Discard the second event of a jQuery.event.trigger() and
// Discard the second event of a jQuery.event.trigger() and
// when an event is called after a page has unloaded
// when an event is called after a page has unloaded
return
typeof
jQuery
!==
strundefined
&&
(
!
e
||
jQuery
.
event
.
triggered
!==
e
.
type
)
?
return
typeof
jQuery
!==
"undefined"
&&
(
!
e
||
jQuery
.
event
.
triggered
!==
e
.
type
)
?
jQuery
.
event
.
dispatch
.
apply
(
eventHandle
.
elem
,
arguments
)
:
jQuery
.
event
.
dispatch
.
apply
(
eventHandle
.
elem
,
arguments
)
:
undefined
;
undefined
;
};
};
...
@@ -681,7 +680,7 @@ jQuery.removeEvent = document.removeEventListener ?
...
@@ -681,7 +680,7 @@ jQuery.removeEvent = document.removeEventListener ?
// #8545, #7054, preventing memory leaks for custom events in IE6-8
// #8545, #7054, preventing memory leaks for custom events in IE6-8
// detachEvent needed property on element, by name of that event,
// detachEvent needed property on element, by name of that event,
// to properly expose it to GC
// to properly expose it to GC
if
(
typeof
elem
[
name
]
===
strundefined
)
{
if
(
typeof
elem
[
name
]
===
"undefined"
)
{
elem
[
name
]
=
null
;
elem
[
name
]
=
null
;
}
}
...
...
src/exports/global.js
View file @
835e8c4a
define
([
define
([
"../core"
,
"../core"
"../var/strundefined"
],
function
(
jQuery
)
{
],
function
(
jQuery
,
strundefined
)
{
var
var
// Map over jQuery in case of overwrite
// Map over jQuery in case of overwrite
...
@@ -25,7 +24,7 @@ jQuery.noConflict = function( deep ) {
...
@@ -25,7 +24,7 @@ jQuery.noConflict = function( deep ) {
// Expose jQuery and $ identifiers, even in
// Expose jQuery and $ identifiers, even in
// AMD (#7102#comment:10, https://github.com/jquery/jquery/pull/557)
// AMD (#7102#comment:10, https://github.com/jquery/jquery/pull/557)
// and CommonJS for browser emulators (#13566)
// and CommonJS for browser emulators (#13566)
if
(
typeof
noGlobal
===
strundefined
)
{
if
(
typeof
noGlobal
===
"undefined"
)
{
window
.
jQuery
=
window
.
$
=
jQuery
;
window
.
jQuery
=
window
.
$
=
jQuery
;
}
}
...
...
src/manipulation.js
View file @
835e8c4a
define
([
define
([
"./core"
,
"./core"
,
"./var/strundefined"
,
"./var/concat"
,
"./var/concat"
,
"./var/push"
,
"./var/push"
,
"./var/deletedIds"
,
"./var/deletedIds"
,
...
@@ -13,7 +12,7 @@ define([
...
@@ -13,7 +12,7 @@ define([
"./traversing"
,
"./traversing"
,
"./selector"
,
"./selector"
,
"./event"
"./event"
],
function
(
jQuery
,
strundefined
,
concat
,
push
,
deletedIds
,
access
,
rcheckableType
,
support
)
{
],
function
(
jQuery
,
concat
,
push
,
deletedIds
,
access
,
rcheckableType
,
support
)
{
function
createSafeFragment
(
document
)
{
function
createSafeFragment
(
document
)
{
var
list
=
nodeNames
.
split
(
"|"
),
var
list
=
nodeNames
.
split
(
"|"
),
...
@@ -71,9 +70,9 @@ wrapMap.th = wrapMap.td;
...
@@ -71,9 +70,9 @@ wrapMap.th = wrapMap.td;
function
getAll
(
context
,
tag
)
{
function
getAll
(
context
,
tag
)
{
var
elems
,
elem
,
var
elems
,
elem
,
i
=
0
,
i
=
0
,
found
=
typeof
context
.
getElementsByTagName
!==
strundefined
?
found
=
typeof
context
.
getElementsByTagName
!==
"undefined"
?
context
.
getElementsByTagName
(
tag
||
"*"
)
:
context
.
getElementsByTagName
(
tag
||
"*"
)
:
typeof
context
.
querySelectorAll
!==
strundefined
?
typeof
context
.
querySelectorAll
!==
"undefined"
?
context
.
querySelectorAll
(
tag
||
"*"
)
:
context
.
querySelectorAll
(
tag
||
"*"
)
:
undefined
;
undefined
;
...
@@ -458,7 +457,7 @@ jQuery.extend({
...
@@ -458,7 +457,7 @@ jQuery.extend({
if
(
deleteExpando
)
{
if
(
deleteExpando
)
{
delete
elem
[
internalKey
];
delete
elem
[
internalKey
];
}
else
if
(
typeof
elem
.
removeAttribute
!==
strundefined
)
{
}
else
if
(
typeof
elem
.
removeAttribute
!==
"undefined"
)
{
elem
.
removeAttribute
(
internalKey
);
elem
.
removeAttribute
(
internalKey
);
}
else
{
}
else
{
...
...
src/offset.js
View file @
835e8c4a
define
([
define
([
"./core"
,
"./core"
,
"./var/strundefined"
,
"./core/access"
,
"./core/access"
,
"./css/var/rnumnonpx"
,
"./css/var/rnumnonpx"
,
"./css/curCSS"
,
"./css/curCSS"
,
...
@@ -10,7 +9,7 @@ define([
...
@@ -10,7 +9,7 @@ define([
"./core/init"
,
"./core/init"
,
"./css"
,
"./css"
,
"./selector"
// contains
"./selector"
// contains
],
function
(
jQuery
,
strundefined
,
access
,
rnumnonpx
,
curCSS
,
addGetHookIf
,
support
)
{
],
function
(
jQuery
,
access
,
rnumnonpx
,
curCSS
,
addGetHookIf
,
support
)
{
// BuildExclude
// BuildExclude
curCSS
=
curCSS
.
curCSS
;
curCSS
=
curCSS
.
curCSS
;
...
@@ -104,7 +103,7 @@ jQuery.fn.extend({
...
@@ -104,7 +103,7 @@ jQuery.fn.extend({
// If we don't have gBCR, just use 0,0 rather than error
// If we don't have gBCR, just use 0,0 rather than error
// BlackBerry 5, iOS 3 (original iPhone)
// BlackBerry 5, iOS 3 (original iPhone)
if
(
typeof
elem
.
getBoundingClientRect
!==
strundefined
)
{
if
(
typeof
elem
.
getBoundingClientRect
!==
"undefined"
)
{
box
=
elem
.
getBoundingClientRect
();
box
=
elem
.
getBoundingClientRect
();
}
}
win
=
getWindow
(
doc
);
win
=
getWindow
(
doc
);
...
...
src/support.js
View file @
835e8c4a
define
([
define
([
"./core"
,
"./core"
,
"./var/strundefined"
,
"./var/support"
,
"./var/support"
,
"./core/init"
,
// Needed for hasOwn support test
"./core/init"
,
// Needed for hasOwn support test
// This is listed as a dependency for build order, but it's still optional in builds
// This is listed as a dependency for build order, but it's still optional in builds
"./core/ready"
"./core/ready"
],
function
(
jQuery
,
s
trundefined
,
s
upport
)
{
],
function
(
jQuery
,
support
)
{
// Support: IE<9
// Support: IE<9
// Iteration over object's inherited properties before its own
// Iteration over object's inherited properties before its own
...
@@ -36,7 +35,7 @@ jQuery(function() {
...
@@ -36,7 +35,7 @@ jQuery(function() {
container
.
style
.
cssText
=
"position:absolute;border:0;width:0;height:0;top:0;left:-9999px"
;
container
.
style
.
cssText
=
"position:absolute;border:0;width:0;height:0;top:0;left:-9999px"
;
body
.
appendChild
(
container
).
appendChild
(
div
);
body
.
appendChild
(
container
).
appendChild
(
div
);
if
(
typeof
div
.
style
.
zoom
!==
strundefined
)
{
if
(
typeof
div
.
style
.
zoom
!==
"undefined"
)
{
// Support: IE<8
// Support: IE<8
// Check if natively block-level elements act like inline-block
// Check if natively block-level elements act like inline-block
// elements when setting their display to 'inline' and giving
// elements when setting their display to 'inline' and giving
...
...
src/var/strundefined.js
deleted
100644 → 0
View file @
b59b819f
define
(
function
()
{
return
typeof
undefined
;
});
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