Created
April 19, 2013 01:19
-
-
Save ajbeaven/5417456 to your computer and use it in GitHub Desktop.
Showing how Modernizr.Load calls the complete() function weirdly. Run in ie7 to see the problem.
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 () { | |
Modernizr.load([ | |
{ | |
test: Modernizr.json, | |
nope: ['js/vendor/polyfills/json3.js'], | |
complete: function() { | |
alert('json3 loaded: json ' + (window.JSON ? 'exists' : 'doesn\'t exist')); | |
} | |
}, | |
{ | |
complete: function () { | |
alert('All completed: json ' + (window.JSON ? 'exists' : 'does\'t exist')); | |
} | |
} | |
]); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment