Skip to content

Commit 835e8c4

Browse files
ChrisAntakimarkelog
authored andcommitted
Core: Drop strundefined variable
Ref 29838b6 Closes gh-1628
1 parent b59b819 commit 835e8c4

File tree

9 files changed

+20
-31
lines changed

9 files changed

+20
-31
lines changed

src/attributes/attr.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
define([
22
"../core",
33
"../var/rnotwhite",
4-
"../var/strundefined",
54
"../core/access",
65
"./support",
76
"./val",
87
"../selector"
9-
], function( jQuery, rnotwhite, strundefined, access, support ) {
8+
], function( jQuery, rnotwhite, access, support ) {
109

1110
var nodeHook, boolHook,
1211
attrHandle = jQuery.expr.attrHandle,
@@ -37,7 +36,7 @@ jQuery.extend({
3736
}
3837

3938
// Fallback to prop when attributes are not supported
40-
if ( typeof elem.getAttribute === strundefined ) {
39+
if ( typeof elem.getAttribute === "undefined" ) {
4140
return jQuery.prop( elem, name, value );
4241
}
4342

src/attributes/classes.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
define([
22
"../core",
33
"../var/rnotwhite",
4-
"../var/strundefined",
54
"../core/init"
6-
], function( jQuery, rnotwhite, strundefined ) {
5+
], function( jQuery, rnotwhite ) {
76

87
var rclass = /[\t\r\n\f]/g;
98

@@ -127,7 +126,7 @@ jQuery.fn.extend({
127126
}
128127

129128
// Toggle whole class name
130-
} else if ( type === strundefined || type === "boolean" ) {
129+
} else if ( type === "undefined" || type === "boolean" ) {
131130
if ( this.className ) {
132131
// store className if set
133132
jQuery._data( this, "__className__", this.className );

src/effects/support.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
define([
2-
"../var/strundefined",
32
"../var/support"
4-
], function( strundefined, support ) {
3+
], function( support ) {
54

65
(function() {
76
var shrinkWrapBlocksVal;
@@ -31,7 +30,7 @@ define([
3130

3231
// Support: IE6
3332
// Check if elements with layout shrink-wrap their children
34-
if ( typeof div.style.zoom !== strundefined ) {
33+
if ( typeof div.style.zoom !== "undefined" ) {
3534
// Reset CSS: box-sizing; display; margin; border
3635
div.style.cssText =
3736
// Support: Firefox<29, Android 2.3

src/event.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
define([
22
"./core",
3-
"./var/strundefined",
43
"./var/rnotwhite",
54
"./var/hasOwn",
65
"./var/slice",
@@ -9,7 +8,7 @@ define([
98
"./core/init",
109
"./data/accepts",
1110
"./selector"
12-
], function( jQuery, strundefined, rnotwhite, hasOwn, slice, support ) {
11+
], function( jQuery, rnotwhite, hasOwn, slice, support ) {
1312

1413
var rformElems = /^(?:input|select|textarea)$/i,
1514
rkeyEvent = /^key/,
@@ -70,7 +69,7 @@ jQuery.event = {
7069
eventHandle = elemData.handle = function( e ) {
7170
// Discard the second event of a jQuery.event.trigger() and
7271
// when an event is called after a page has unloaded
73-
return typeof jQuery !== strundefined && (!e || jQuery.event.triggered !== e.type) ?
72+
return typeof jQuery !== "undefined" && (!e || jQuery.event.triggered !== e.type) ?
7473
jQuery.event.dispatch.apply( eventHandle.elem, arguments ) :
7574
undefined;
7675
};
@@ -681,7 +680,7 @@ jQuery.removeEvent = document.removeEventListener ?
681680
// #8545, #7054, preventing memory leaks for custom events in IE6-8
682681
// detachEvent needed property on element, by name of that event,
683682
// to properly expose it to GC
684-
if ( typeof elem[ name ] === strundefined ) {
683+
if ( typeof elem[ name ] === "undefined" ) {
685684
elem[ name ] = null;
686685
}
687686

src/exports/global.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
define([
2-
"../core",
3-
"../var/strundefined"
4-
], function( jQuery, strundefined ) {
2+
"../core"
3+
], function( jQuery ) {
54

65
var
76
// Map over jQuery in case of overwrite
@@ -25,7 +24,7 @@ jQuery.noConflict = function( deep ) {
2524
// Expose jQuery and $ identifiers, even in
2625
// AMD (#7102#comment:10, https://github.com/jquery/jquery/pull/557)
2726
// and CommonJS for browser emulators (#13566)
28-
if ( typeof noGlobal === strundefined ) {
27+
if ( typeof noGlobal === "undefined" ) {
2928
window.jQuery = window.$ = jQuery;
3029
}
3130

src/manipulation.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
define([
22
"./core",
3-
"./var/strundefined",
43
"./var/concat",
54
"./var/push",
65
"./var/deletedIds",
@@ -13,7 +12,7 @@ define([
1312
"./traversing",
1413
"./selector",
1514
"./event"
16-
], function( jQuery, strundefined, concat, push, deletedIds, access, rcheckableType, support ) {
15+
], function( jQuery, concat, push, deletedIds, access, rcheckableType, support ) {
1716

1817
function createSafeFragment( document ) {
1918
var list = nodeNames.split( "|" ),
@@ -71,9 +70,9 @@ wrapMap.th = wrapMap.td;
7170
function getAll( context, tag ) {
7271
var elems, elem,
7372
i = 0,
74-
found = typeof context.getElementsByTagName !== strundefined ?
73+
found = typeof context.getElementsByTagName !== "undefined" ?
7574
context.getElementsByTagName( tag || "*" ) :
76-
typeof context.querySelectorAll !== strundefined ?
75+
typeof context.querySelectorAll !== "undefined" ?
7776
context.querySelectorAll( tag || "*" ) :
7877
undefined;
7978

@@ -458,7 +457,7 @@ jQuery.extend({
458457
if ( deleteExpando ) {
459458
delete elem[ internalKey ];
460459

461-
} else if ( typeof elem.removeAttribute !== strundefined ) {
460+
} else if ( typeof elem.removeAttribute !== "undefined" ) {
462461
elem.removeAttribute( internalKey );
463462

464463
} else {

src/offset.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
define([
22
"./core",
3-
"./var/strundefined",
43
"./core/access",
54
"./css/var/rnumnonpx",
65
"./css/curCSS",
@@ -10,7 +9,7 @@ define([
109
"./core/init",
1110
"./css",
1211
"./selector" // contains
13-
], function( jQuery, strundefined, access, rnumnonpx, curCSS, addGetHookIf, support ) {
12+
], function( jQuery, access, rnumnonpx, curCSS, addGetHookIf, support ) {
1413

1514
// BuildExclude
1615
curCSS = curCSS.curCSS;
@@ -104,7 +103,7 @@ jQuery.fn.extend({
104103

105104
// If we don't have gBCR, just use 0,0 rather than error
106105
// BlackBerry 5, iOS 3 (original iPhone)
107-
if ( typeof elem.getBoundingClientRect !== strundefined ) {
106+
if ( typeof elem.getBoundingClientRect !== "undefined" ) {
108107
box = elem.getBoundingClientRect();
109108
}
110109
win = getWindow( doc );

src/support.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
define([
22
"./core",
3-
"./var/strundefined",
43
"./var/support",
54
"./core/init", // Needed for hasOwn support test
65
// This is listed as a dependency for build order, but it's still optional in builds
76
"./core/ready"
8-
], function( jQuery, strundefined, support ) {
7+
], function( jQuery, support ) {
98

109
// Support: IE<9
1110
// Iteration over object's inherited properties before its own
@@ -36,7 +35,7 @@ jQuery(function() {
3635
container.style.cssText = "position:absolute;border:0;width:0;height:0;top:0;left:-9999px";
3736
body.appendChild( container ).appendChild( div );
3837

39-
if ( typeof div.style.zoom !== strundefined ) {
38+
if ( typeof div.style.zoom !== "undefined" ) {
4039
// Support: IE<8
4140
// Check if natively block-level elements act like inline-block
4241
// elements when setting their display to 'inline' and giving

src/var/strundefined.js

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)