From 835e8c4ae39f09d11ad42d24e0210bebfa8e8320 Mon Sep 17 00:00:00 2001
From: Chris Antaki <ChrisAntaki@gmail.com>
Date: Sun, 27 Jul 2014 13:20:19 -0700
Subject: Core: Drop strundefined variable

Ref 29838b6cab6f2e508f3e9692f32918c72b1a504b
Closes gh-1628
---
 src/attributes/attr.js    | 5 ++---
 src/attributes/classes.js | 5 ++---
 src/effects/support.js    | 5 ++---
 src/event.js              | 7 +++----
 src/exports/global.js     | 7 +++----
 src/manipulation.js       | 9 ++++-----
 src/offset.js             | 5 ++---
 src/support.js            | 5 ++---
 src/var/strundefined.js   | 3 ---
 9 files changed, 20 insertions(+), 31 deletions(-)
 delete mode 100644 src/var/strundefined.js

(limited to 'src')

diff --git a/src/attributes/attr.js b/src/attributes/attr.js
index 6152680c0..4d8abf320 100644
--- a/src/attributes/attr.js
+++ b/src/attributes/attr.js
@@ -1,12 +1,11 @@
 define([
 	"../core",
 	"../var/rnotwhite",
-	"../var/strundefined",
 	"../core/access",
 	"./support",
 	"./val",
 	"../selector"
-], function( jQuery, rnotwhite, strundefined, access, support ) {
+], function( jQuery, rnotwhite, access, support ) {
 
 var nodeHook, boolHook,
 	attrHandle = jQuery.expr.attrHandle,
@@ -37,7 +36,7 @@ jQuery.extend({
 		}
 
 		// Fallback to prop when attributes are not supported
-		if ( typeof elem.getAttribute === strundefined ) {
+		if ( typeof elem.getAttribute === "undefined" ) {
 			return jQuery.prop( elem, name, value );
 		}
 
diff --git a/src/attributes/classes.js b/src/attributes/classes.js
index a7b423035..8a1ac8d8c 100644
--- a/src/attributes/classes.js
+++ b/src/attributes/classes.js
@@ -1,9 +1,8 @@
 define([
 	"../core",
 	"../var/rnotwhite",
-	"../var/strundefined",
 	"../core/init"
-], function( jQuery, rnotwhite, strundefined ) {
+], function( jQuery, rnotwhite ) {
 
 var rclass = /[\t\r\n\f]/g;
 
@@ -127,7 +126,7 @@ jQuery.fn.extend({
 				}
 
 			// Toggle whole class name
-			} else if ( type === strundefined || type === "boolean" ) {
+			} else if ( type === "undefined" || type === "boolean" ) {
 				if ( this.className ) {
 					// store className if set
 					jQuery._data( this, "__className__", this.className );
diff --git a/src/effects/support.js b/src/effects/support.js
index 3ef7261d5..c3ba17b5f 100644
--- a/src/effects/support.js
+++ b/src/effects/support.js
@@ -1,7 +1,6 @@
 define([
-	"../var/strundefined",
 	"../var/support"
-], function( strundefined, support ) {
+], function( support ) {
 
 (function() {
 	var shrinkWrapBlocksVal;
@@ -31,7 +30,7 @@ define([
 
 		// Support: IE6
 		// 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
 			div.style.cssText =
 				// Support: Firefox<29, Android 2.3
diff --git a/src/event.js b/src/event.js
index 88911936c..8c4543cb5 100644
--- a/src/event.js
+++ b/src/event.js
@@ -1,6 +1,5 @@
 define([
 	"./core",
-	"./var/strundefined",
 	"./var/rnotwhite",
 	"./var/hasOwn",
 	"./var/slice",
@@ -9,7 +8,7 @@ define([
 	"./core/init",
 	"./data/accepts",
 	"./selector"
-], function( jQuery, strundefined, rnotwhite, hasOwn, slice, support ) {
+], function( jQuery, rnotwhite, hasOwn, slice, support ) {
 
 var rformElems = /^(?:input|select|textarea)$/i,
 	rkeyEvent = /^key/,
@@ -70,7 +69,7 @@ jQuery.event = {
 			eventHandle = elemData.handle = function( e ) {
 				// Discard the second event of a jQuery.event.trigger() and
 				// 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 ) :
 					undefined;
 			};
@@ -681,7 +680,7 @@ jQuery.removeEvent = document.removeEventListener ?
 			// #8545, #7054, preventing memory leaks for custom events in IE6-8
 			// detachEvent needed property on element, by name of that event,
 			// to properly expose it to GC
-			if ( typeof elem[ name ] === strundefined ) {
+			if ( typeof elem[ name ] === "undefined" ) {
 				elem[ name ] = null;
 			}
 
diff --git a/src/exports/global.js b/src/exports/global.js
index 8eee5bb7f..137f5e26b 100644
--- a/src/exports/global.js
+++ b/src/exports/global.js
@@ -1,7 +1,6 @@
 define([
-	"../core",
-	"../var/strundefined"
-], function( jQuery, strundefined ) {
+	"../core"
+], function( jQuery ) {
 
 var
 	// Map over jQuery in case of overwrite
@@ -25,7 +24,7 @@ jQuery.noConflict = function( deep ) {
 // Expose jQuery and $ identifiers, even in
 // AMD (#7102#comment:10, https://github.com/jquery/jquery/pull/557)
 // and CommonJS for browser emulators (#13566)
-if ( typeof noGlobal === strundefined ) {
+if ( typeof noGlobal === "undefined" ) {
 	window.jQuery = window.$ = jQuery;
 }
 
diff --git a/src/manipulation.js b/src/manipulation.js
index 48333b8ba..a13fdd0ed 100644
--- a/src/manipulation.js
+++ b/src/manipulation.js
@@ -1,6 +1,5 @@
 define([
 	"./core",
-	"./var/strundefined",
 	"./var/concat",
 	"./var/push",
 	"./var/deletedIds",
@@ -13,7 +12,7 @@ define([
 	"./traversing",
 	"./selector",
 	"./event"
-], function( jQuery, strundefined, concat, push, deletedIds, access, rcheckableType, support ) {
+], function( jQuery, concat, push, deletedIds, access, rcheckableType, support ) {
 
 function createSafeFragment( document ) {
 	var list = nodeNames.split( "|" ),
@@ -71,9 +70,9 @@ wrapMap.th = wrapMap.td;
 function getAll( context, tag ) {
 	var elems, elem,
 		i = 0,
-		found = typeof context.getElementsByTagName !== strundefined ?
+		found = typeof context.getElementsByTagName !== "undefined" ?
 			context.getElementsByTagName( tag || "*" ) :
-			typeof context.querySelectorAll !== strundefined ?
+			typeof context.querySelectorAll !== "undefined" ?
 				context.querySelectorAll( tag || "*" ) :
 				undefined;
 
@@ -458,7 +457,7 @@ jQuery.extend({
 						if ( deleteExpando ) {
 							delete elem[ internalKey ];
 
-						} else if ( typeof elem.removeAttribute !== strundefined ) {
+						} else if ( typeof elem.removeAttribute !== "undefined" ) {
 							elem.removeAttribute( internalKey );
 
 						} else {
diff --git a/src/offset.js b/src/offset.js
index 954ab8add..0200dd64e 100644
--- a/src/offset.js
+++ b/src/offset.js
@@ -1,6 +1,5 @@
 define([
 	"./core",
-	"./var/strundefined",
 	"./core/access",
 	"./css/var/rnumnonpx",
 	"./css/curCSS",
@@ -10,7 +9,7 @@ define([
 	"./core/init",
 	"./css",
 	"./selector" // contains
-], function( jQuery, strundefined, access, rnumnonpx, curCSS, addGetHookIf, support ) {
+], function( jQuery, access, rnumnonpx, curCSS, addGetHookIf, support ) {
 
 // BuildExclude
 curCSS = curCSS.curCSS;
@@ -104,7 +103,7 @@ jQuery.fn.extend({
 
 		// If we don't have gBCR, just use 0,0 rather than error
 		// BlackBerry 5, iOS 3 (original iPhone)
-		if ( typeof elem.getBoundingClientRect !== strundefined ) {
+		if ( typeof elem.getBoundingClientRect !== "undefined" ) {
 			box = elem.getBoundingClientRect();
 		}
 		win = getWindow( doc );
diff --git a/src/support.js b/src/support.js
index 4728be812..49cbd2a21 100644
--- a/src/support.js
+++ b/src/support.js
@@ -1,11 +1,10 @@
 define([
 	"./core",
-	"./var/strundefined",
 	"./var/support",
 	"./core/init", // Needed for hasOwn support test
 	// This is listed as a dependency for build order, but it's still optional in builds
 	"./core/ready"
-], function( jQuery, strundefined, support ) {
+], function( jQuery, support ) {
 
 // Support: IE<9
 // Iteration over object's inherited properties before its own
@@ -36,7 +35,7 @@ jQuery(function() {
 	container.style.cssText = "position:absolute;border:0;width:0;height:0;top:0;left:-9999px";
 	body.appendChild( container ).appendChild( div );
 
-	if ( typeof div.style.zoom !== strundefined ) {
+	if ( typeof div.style.zoom !== "undefined" ) {
 		// Support: IE<8
 		// Check if natively block-level elements act like inline-block
 		// elements when setting their display to 'inline' and giving
diff --git a/src/var/strundefined.js b/src/var/strundefined.js
deleted file mode 100644
index 04e16b03e..000000000
--- a/src/var/strundefined.js
+++ /dev/null
@@ -1,3 +0,0 @@
-define(function() {
-	return typeof undefined;
-});
-- 
cgit v1.2.3