Created
January 13, 2012 15:02
-
-
Save davglass/1606825 to your computer and use it in GitHub Desktop.
YUI 3.3.0 FF 9 Duplicate Script Loading Patch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
/* | |
* This patch fixes an issue with Y.Get in 3.2.0 & 3.3.0 | |
* where it fails to know when a CSS file is loaded in FF 9+. | |
* Since it fails to know when the load of the CSS file | |
* has completed, it creates a race condition that | |
* forces the scripts to be attached again. | |
*/ | |
if (typeof YUI_config === 'undefined') { | |
YUI_config = {}; | |
} | |
var originalGecko; | |
YUI_config.onProgress = function() { | |
var Y = this; | |
originalGecko = Y.UA.gecko; | |
if (originalGecko > 8) { | |
Y.UA.gecko = false; | |
} | |
}; | |
YUI_config.onEnd = function() { | |
var Y = this; | |
if (originalGecko) { | |
Y.UA.gecko = originalGecko; | |
} | |
} | |
}()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment