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([ define([
"../core", "../core",
"../var/rnotwhite", "../var/rnotwhite",
"../var/strundefined",
"../core/access", "../core/access",
"./support", "./support",
"../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;
@ -33,7 +32,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 ( !elem.getAttribute ) {
return jQuery.prop( elem, name, value ); return jQuery.prop( elem, name, value );
} }

View File

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

View File

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

View File

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

View File

@ -1,7 +1,9 @@
define([ define([
"../core", "../core"
"../var/strundefined" ], function( jQuery ) {
], function( jQuery, strundefined ) {
/* exported noGlobal */
/* global noGlobal: false */
var var
// Map over jQuery in case of overwrite // Map over jQuery in case of overwrite
@ -25,7 +27,7 @@ jQuery.noConflict = function( deep ) {
// Expose jQuery and $ identifiers, even in AMD // Expose jQuery and $ identifiers, even in AMD
// (#7102#comment:10, https://github.com/jquery/jquery/pull/557) // (#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 ( !noGlobal ) {
window.jQuery = window.$ = jQuery; window.jQuery = window.$ = jQuery;
} }

View File

@ -1,6 +1,5 @@
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([
"./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 ) {
var docElem = window.document.documentElement; var docElem = window.document.documentElement;
@ -99,7 +98,7 @@ jQuery.fn.extend({
// Support: BlackBerry 5, iOS 3 (original iPhone) // Support: BlackBerry 5, iOS 3 (original iPhone)
// 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
if ( typeof elem.getBoundingClientRect !== strundefined ) { if ( elem.getBoundingClientRect !== undefined ) {
box = elem.getBoundingClientRect(); box = elem.getBoundingClientRect();
} }
win = getWindow( doc ); win = getWindow( doc );

View File

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