Created
June 3, 2014 19:04
-
-
Save DavidSpriggs/23be54f54e449ba2c326 to your computer and use it in GitHub Desktop.
dojo async plugin
This file contains 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
/*global dojoConfig */ | |
define(function() { | |
var cb = '_asyncApiLoaderCallback'; | |
return { | |
load: function(param, req, loadCallback) { | |
if (!cb) { | |
return; | |
} else { | |
dojoConfig[cb] = function() { | |
delete dojoConfig[cb]; | |
cb = null; | |
loadCallback(); | |
}; | |
require([param + '&callback=dojoConfig.' + cb]); | |
} | |
} | |
}; | |
}); |
This file contains 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
/*global google */ | |
define([ | |
'plugins/async!//maps.google.com/maps/api/js?v=3&sensor=false' | |
], function(.... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment