Core: Drop strundefined variable

This commit is contained in:
Chris Antaki 2014-07-25 12:21:22 -07:00 committed by Oleg Gaidarenko
parent 895ea6887d
commit 29838b6cab
7 changed files with 15 additions and 20 deletions

View File

@ -1,11 +1,10 @@
define([
"../core",
"../var/rnotwhite",
"../var/strundefined",
"../core/access",
"./support",
"../selector"
], function( jQuery, rnotwhite, strundefined, access, support ) {
], function( jQuery, rnotwhite, access, support ) {
var nodeHook, boolHook,
attrHandle = jQuery.expr.attrHandle;
@ -33,7 +32,7 @@ jQuery.extend({
}
// Fallback to prop when attributes are not supported
if ( typeof elem.getAttribute === strundefined ) {
if ( !elem.getAttribute ) {
return jQuery.prop( elem, name, value );
}

View File

@ -1,10 +1,9 @@
define([
"../core",
"../var/rnotwhite",
"../var/strundefined",
"../data/var/dataPriv",
"../core/init"
], function( jQuery, rnotwhite, strundefined, dataPriv ) {
], function( jQuery, rnotwhite, dataPriv ) {
var rclass = /[\t\r\n\f]/g;
@ -128,7 +127,7 @@ jQuery.fn.extend({
}
// Toggle whole class name
} else if ( type === strundefined || type === "boolean" ) {
} else if ( value === undefined || type === "boolean" ) {
if ( this.className ) {
// store className if set
dataPriv.set( this, "__className__", this.className );

View File

@ -101,7 +101,7 @@ var rootjQuery,
// HANDLE: $(function)
// Shortcut for document ready
} else if ( jQuery.isFunction( selector ) ) {
return typeof rootjQuery.ready !== "undefined" ?
return rootjQuery.ready !== undefined ?
rootjQuery.ready( selector ) :
// Execute immediately if ready is not present
selector( jQuery );

View File

@ -1,6 +1,5 @@
define([
"./core",
"./var/strundefined",
"./var/rnotwhite",
"./var/hasOwn",
"./var/slice",
@ -10,7 +9,7 @@ define([
"./core/init",
"./data/accepts",
"./selector"
], function( jQuery, strundefined, rnotwhite, hasOwn, slice, support, dataPriv ) {
], function( jQuery, rnotwhite, hasOwn, slice, support, dataPriv ) {
var
rkeyEvent = /^key/,
@ -72,7 +71,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 && jQuery.event.triggered !== e.type ?
return typeof jQuery !== "undefined" && jQuery.event.triggered !== e.type ?
jQuery.event.dispatch.apply( elem, arguments ) : undefined;
};
}

View File

@ -1,7 +1,9 @@
define([
"../core",
"../var/strundefined"
], function( jQuery, strundefined ) {
"../core"
], function( jQuery ) {
/* exported noGlobal */
/* global noGlobal: false */
var
// Map over jQuery in case of overwrite
@ -25,7 +27,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 ( !noGlobal ) {
window.jQuery = window.$ = jQuery;
}

View File

@ -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 ) {
var docElem = window.document.documentElement;
@ -99,7 +98,7 @@ jQuery.fn.extend({
// Support: BlackBerry 5, iOS 3 (original iPhone)
// If we don't have gBCR, just use 0,0 rather than error
if ( typeof elem.getBoundingClientRect !== strundefined ) {
if ( elem.getBoundingClientRect !== undefined ) {
box = elem.getBoundingClientRect();
}
win = getWindow( doc );

View File

@ -1,3 +0,0 @@
define(function() {
return typeof undefined;
});