Permalink
Browse files

Core: Drop strundefined variable

  • Loading branch information...
ChrisAntaki authored and markelog committed Jul 25, 2014
1 parent 895ea68 commit 29838b6cab6f2e508f3e9692f32918c72b1a504b
Showing with 15 additions and 20 deletions.
  1. +2 −3 src/attributes/attr.js
  2. +2 −3 src/attributes/classes.js
  3. +1 −1 src/core/init.js
  4. +2 −3 src/event.js
  5. +6 −4 src/exports/global.js
  6. +2 −3 src/offset.js
  7. +0 −3 src/var/strundefined.js
View
@@ -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 ) {

This comment has been minimized.

Show comment
Hide comment
@markelog

markelog Sep 2, 2014

Member

This fails in IE9-10 :-(, for xml fragments

@markelog

markelog Sep 2, 2014

Member

This fails in IE9-10 :-(, for xml fragments

This comment has been minimized.

Show comment
Hide comment
@dmethvin

dmethvin Sep 2, 2014

Member

/me shakes fist ... XML FRAGMENTS!

@dmethvin

dmethvin Sep 2, 2014

Member

/me shakes fist ... XML FRAGMENTS!

This comment has been minimized.

Show comment
Hide comment

This comment has been minimized.

Show comment
Hide comment
@ChrisAntaki

ChrisAntaki Sep 2, 2014

Contributor

Good catch @markelog !

@ChrisAntaki

ChrisAntaki Sep 2, 2014

Contributor

Good catch @markelog !

return jQuery.prop( elem, name, value );
}
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -1,3 +0,0 @@
define(function() {
return typeof undefined;
});

0 comments on commit 29838b6

Please sign in to comment.