Ticket #14001: jquery-iframe-patch.diff
File jquery-iframe-patch.diff, 6.4 KB (added by , 9 years ago) |
---|
-
jquery-1.9.1.js
old new 418 418 419 419 // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443). 420 420 if ( !document.body ) { 421 return setTimeout( jQuery.ready );421 return window.setTimeout( jQuery.ready ); 422 422 } 423 423 424 424 // Remember that the DOM is ready … … 454 454 }, 455 455 456 456 isNumeric: function( obj ) { 457 return ! isNaN( parseFloat(obj) ) &&isFinite( obj );457 return !window.isNaN( window.parseFloat(obj) ) && window.isFinite( obj ); 458 458 }, 459 459 460 460 type: function( obj ) { … … 504 504 }, 505 505 506 506 error: function( msg ) { 507 throw new Error( msg );507 throw new window.Error( msg ); 508 508 }, 509 509 510 510 // data: string of html … … 878 878 }, 879 879 880 880 now: function() { 881 return ( new Date() ).getTime();881 return ( new window.Date() ).getTime(); 882 882 } 883 883 }); 884 884 … … 892 892 // discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15 893 893 if ( document.readyState === "complete" ) { 894 894 // Handle it asynchronously to allow scripts the opportunity to delay ready 895 setTimeout( jQuery.ready );895 window.setTimeout( jQuery.ready ); 896 896 897 897 // Standards-based browsers support DOMContentLoaded 898 898 } else if ( document.addEventListener ) { … … 927 927 // http://javascript.nwbox.com/IEContentLoaded/ 928 928 top.doScroll("left"); 929 929 } catch(e) { 930 return setTimeout( doScrollCheck, 50 );930 return window.setTimeout( doScrollCheck, 50 ); 931 931 } 932 932 933 933 // detach all dom ready events … … 1506 1506 div.style.width = "1px"; 1507 1507 1508 1508 support.reliableMarginRight = 1509 ! parseFloat( ( window.getComputedStyle( marginDiv, null ) || {} ).marginRight );1509 !window.parseFloat( ( window.getComputedStyle( marginDiv, null ) || {} ).marginRight ); 1510 1510 } 1511 1511 1512 1512 if ( typeof div.style.zoom !== core_strundefined ) { … … 1992 1992 type = type || "fx"; 1993 1993 1994 1994 return this.queue( type, function( next, hooks ) { 1995 var timeout = setTimeout( next, time );1995 var timeout = window.setTimeout( next, time ); 1996 1996 hooks.stop = function() { 1997 clearTimeout( timeout );1997 window.clearTimeout( timeout ); 1998 1998 }; 1999 1999 }); 2000 2000 }, … … 2482 2482 var attributeNode = elem.getAttributeNode("tabindex"); 2483 2483 2484 2484 return attributeNode && attributeNode.specified ? 2485 parseInt( attributeNode.value, 10 ) :2485 window.parseInt( attributeNode.value, 10 ) : 2486 2486 rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ? 2487 2487 0 : 2488 2488 undefined; … … 3713 3713 sortOrder, 3714 3714 3715 3715 // Instance-specific data 3716 expando = "sizzle" + -(new Date()),3716 expando = "sizzle" + -(new window.Date()), 3717 3717 preferredDoc = window.document, 3718 3718 support = {}, 3719 3719 dirruns = 0, … … 4418 4418 }; 4419 4419 4420 4420 Sizzle.error = function( msg ) { 4421 throw new Error( "Syntax error, unrecognized expression: " + msg );4421 throw new window.Error( "Syntax error, unrecognized expression: " + msg ); 4422 4422 }; 4423 4423 4424 4424 // Document sorting and removing duplicates … … 6821 6821 6822 6822 // convert relative number strings (+= or -=) to relative numbers. #7345 6823 6823 if ( type === "string" && (ret = rrelNum.exec( value )) ) { 6824 value = ( ret[1] + 1 ) * ret[2] + parseFloat( jQuery.css( elem, name ) );6824 value = ( ret[1] + 1 ) * ret[2] + window.parseFloat( jQuery.css( elem, name ) ); 6825 6825 // Fixes bug #9237 6826 6826 type = "number"; 6827 6827 } … … 6891 6891 6892 6892 // Return, converting to number if forced or a qualifier was provided and val looks numeric 6893 6893 if ( extra === "" || extra ) { 6894 num = parseFloat( val );6894 num = window.parseFloat( val ); 6895 6895 return extra === true || jQuery.isNumeric( num ) ? num || 0 : val; 6896 6896 } 6897 6897 return val; … … 7088 7088 valueIsBorderBox = isBorderBox && ( jQuery.support.boxSizingReliable || val === elem.style[ name ] ); 7089 7089 7090 7090 // Normalize "", auto, and prepare for extra 7091 val = parseFloat( val ) || 0;7091 val = window.parseFloat( val ) || 0; 7092 7092 } 7093 7093 7094 7094 // use the active box-sizing model to add/subtract irrelevant styles … … 7177 7177 get: function( elem, computed ) { 7178 7178 // IE uses filters for opacity 7179 7179 return ropacity.test( (computed && elem.currentStyle ? elem.currentStyle.filter : elem.style.filter) || "" ) ? 7180 ( 0.01 * parseFloat( RegExp.$1 ) ) + "" :7180 ( 0.01 * window.parseFloat( RegExp.$1 ) ) + "" : 7181 7181 computed ? "1" : ""; 7182 7182 }, 7183 7183 … … 7968 7968 } 7969 7969 // Timeout 7970 7970 if ( s.async && s.timeout > 0 ) { 7971 timeoutTimer = setTimeout(function() {7971 timeoutTimer = window.setTimeout(function() { 7972 7972 jqXHR.abort("timeout"); 7973 7973 }, s.timeout ); 7974 7974 } … … 8002 8002 8003 8003 // Clear timeout if it exists 8004 8004 if ( timeoutTimer ) { 8005 clearTimeout( timeoutTimer );8005 window.clearTimeout( timeoutTimer ); 8006 8006 } 8007 8007 8008 8008 // Dereference transport for early garbage collection … … 8605 8605 } else if ( xhr.readyState === 4 ) { 8606 8606 // (IE6 & IE7) if it's in cache and has been 8607 8607 // retrieved directly we need to fire the callback 8608 setTimeout( callback );8608 window.setTimeout( callback ); 8609 8609 } else { 8610 8610 handle = ++xhrId; 8611 8611 if ( xhrOnUnloadAbort ) { … … 8682 8682 8683 8683 // Animations created synchronously will run synchronously 8684 8684 function createFxNow() { 8685 setTimeout(function() {8685 window.setTimeout(function() { 8686 8686 fxNow = undefined; 8687 8687 }); 8688 8688 return ( fxNow = jQuery.now() ); … … 9335 9335 9336 9336 jQuery.fx.start = function() { 9337 9337 if ( !timerId ) { 9338 timerId = setInterval( jQuery.fx.tick, jQuery.fx.interval );9338 timerId = window.setInterval( jQuery.fx.tick, jQuery.fx.interval ); 9339 9339 } 9340 9340 }; 9341 9341 9342 9342 jQuery.fx.stop = function() { 9343 clearInterval( timerId );9343 window.clearInterval( timerId ); 9344 9344 timerId = null; 9345 9345 }; 9346 9346 … … 9421 9421 curTop = curPosition.top; 9422 9422 curLeft = curPosition.left; 9423 9423 } else { 9424 curTop = parseFloat( curCSSTop ) || 0;9425 curLeft = parseFloat( curCSSLeft ) || 0;9424 curTop = window.parseFloat( curCSSTop ) || 0; 9425 curLeft = window.parseFloat( curCSSLeft ) || 0; 9426 9426 } 9427 9427 9428 9428 if ( jQuery.isFunction( options ) ) { … … 9576 9576 9577 9577 // })(); 9578 9578 // Expose jQuery to the global object 9579 window.jQuery = window.$ = jQuery;9579 this.jQuery = this.$ = jQuery; 9580 9580 9581 9581 // Expose jQuery as an AMD module, but only for AMD loaders that 9582 9582 // understand the issues with loading multiple versions of jQuery … … 9594 9594 define( "jquery", [], function () { return jQuery; } ); 9595 9595 } 9596 9596 9597 })( window);9597 })( frameElement && /^loader/.test(frameElement.name) ? parent : this );