}
// Toggle whole class name
- } else if ( type === "undefined" || type === "boolean" ) {
+ } else if ( type === core_strundefined || type === "boolean" ) {
if ( this.className ) {
// store className if set
jQuery._data( this, "__className__", this.className );
}
// Fallback to prop when attributes are not supported
- if ( typeof elem.getAttribute === "undefined" ) {
+ if ( typeof elem.getAttribute === core_strundefined ) {
return jQuery.prop( elem, name, value );
}
// In IE9+, Flash objects don't have .getAttribute (#12945)
// Support: IE9+
- if ( typeof elem.getAttribute !== "undefined" ) {
+ if ( typeof elem.getAttribute !== core_strundefined ) {
ret = elem.getAttribute( name );
}
// The deferred used on DOM ready
readyList,
+ // Support: IE9
+ // For `typeof xmlNode.method` instead of `xmlNode.method !== undefined`
+ core_strundefined = typeof undefined,
+
// Use the correct document accordingly with window argument (sandbox)
document = window.document,
location = window.location,
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 !== "undefined" && (!e || jQuery.event.triggered !== e.type) ?
+ return typeof jQuery !== core_strundefined && (!e || jQuery.event.triggered !== e.type) ?
jQuery.event.dispatch.apply( eventHandle.elem, arguments ) :
undefined;
};
if ( match ) {
elem.type = match[ 1 ];
-
} else {
elem.removeAttribute("type");
}
// If we don't have gBCR, just use 0,0 rather than error
// BlackBerry 5, iOS 3 (original iPhone)
- if ( typeof elem.getBoundingClientRect !== "undefined" ) {
+ if ( typeof elem.getBoundingClientRect !== core_strundefined ) {
box = elem.getBoundingClientRect();
}
win = getWindow( doc );