Skip to content

Instantly share code, notes, and snippets.

@JeanSebTr
Last active December 13, 2015 23:38
Show Gist options
  • Save JeanSebTr/4992630 to your computer and use it in GitHub Desktop.
Save JeanSebTr/4992630 to your computer and use it in GitHub Desktop.
(function() {
var modernizr = document.createElement('script');
modernizr.type = 'text/javascript';
modernizr.async = true;
modernizr.src = '//cdn.example.com/Modernizr/applicationcache-cssclasses-history-localstorage-shiv.js';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(modernizr, s);
})();
var _modernizr = [
['history', function(){
/* 'history' is present or polyfill loaded */
}],
function(){
/* last callback: all features present or polyfills loaded */
}
];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment