Created
May 18, 2011 22:16
-
-
Save bryanforbes/979712 to your computer and use it in GitHub Desktop.
async def
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
| define.async(["dep1", "dep2"], function(loaded, dep1, dep2){ | |
| someAsyncOperation(function(){ | |
| loaded({ | |
| /* module definition here */ | |
| }); | |
| }); | |
| }); |
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
| define.async(["./gfx/_base"], function(loaded, _base){ | |
| var gfx = {}; | |
| /* figure out renderer */ | |
| require(["./gfx/" + renderer], function(renderer){ | |
| loaded(gfx); | |
| }); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment