Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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