]> source.dussan.org Git - jquery.git/commitdiff
Core: Drop strundefined variable
authorChris Antaki <ChrisAntaki@gmail.com>
Fri, 25 Jul 2014 19:21:22 +0000 (12:21 -0700)
committerOleg Gaidarenko <markelog@gmail.com>
Tue, 2 Sep 2014 16:29:10 +0000 (20:29 +0400)
src/attributes/attr.js
src/attributes/classes.js
src/core/init.js
src/event.js
src/exports/global.js
src/offset.js
src/var/strundefined.js [deleted file]

index facdd411a4d5b0650bb5ea2bca793b74d919f20d..b627fe888946df3cbc3ba80b1b53ed0163b66681 100644 (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 );
                }
 
index c6178246bfc83f1c2c6623639e7e6e46e5b6d1df..c8d1393f0b422a93311a3f43baee924c812682b3 100644 (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 );
index e49196a9699cffaf191adfc79ed9834f890d1165..50f310c567f34521dc1b4fb48c699a9b532998f2 100644 (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 );
index 7336f4d9b44cbb629b9a511bd9660a39c7722962..6183f703d4d767d86c630adf1f0f74c06efec730 100644 (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;
                        };
                }
index 6513287c639869f66012fbd713b16701c5906412..1db41449d2ea842fbdbe27880c6816c5cf3b6cb2 100644 (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;
 }
 
index cc6ffb40120a2043a9ca1f9937de3287d0af8f83..fa51f1803ca4dff71aec52aa110d17243bb1f9e4 100644 (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 );
diff --git a/src/var/strundefined.js b/src/var/strundefined.js
deleted file mode 100644 (file)
index 04e16b0..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-define(function() {
-       return typeof undefined;
-});