Created
May 25, 2014 05:00
-
-
Save jpalala/54ffde736f6d5a5702dc to your computer and use it in GitHub Desktop.
modernizer_script_beginners
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
yApp = { | |
init: function() { | |
} | |
} | |
Modernizr.load({ | |
test: Modernizr.geolocation && Modernizr.fontface && Modernizr.canvas && Modernizr.cssgradients, | |
yep : 'geo.js', | |
nope: ['geo-polyfill.js','presentational-polyfill.js', 'presentational.css'] | |
}, | |
// Functional polyfills | |
{ | |
// This just has to be truthy | |
test : Modernizr.websockets && window.JSON, | |
// socket-io.js and json2.js | |
nope : 'functional-polyfills.js', | |
// You can also give arrays of resources to load. | |
both : [ 'app.js', 'extra.js' ], | |
complete : function () { | |
// Run this after everything in this group has downloaded | |
// and executed, as well everything in all previous groups | |
myApp.init(); | |
} | |
}, | |
}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment