Skip to content

Instantly share code, notes, and snippets.

@DavidSpriggs
Created June 3, 2014 19:04
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DavidSpriggs/23be54f54e449ba2c326 to your computer and use it in GitHub Desktop.
Save DavidSpriggs/23be54f54e449ba2c326 to your computer and use it in GitHub Desktop.
dojo async plugin
/*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]);
}
}
};
});
/*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