globalize.js:动态加载

我正在尝试基于https://github.com/jquery/globalize/blob/master/doc/以高级方式运行的gloablize( https://github.com/jquery/globalize )的简单JS的示例cldr.md。

因此,我创建了一个加载器脚本来加载所有依赖项:

var url = new URL(window.location.href); //STATIC_URL: global variable from base.html $.when( $.getScript( url.origin + STATIC_URL + "js/globalize2/cldrjs/cldr.js" ), $.getScript( url.origin + STATIC_URL + "js/globalize2/cldrjs/cldr/event.js" ), $.getScript( url.origin + STATIC_URL + "js/globalize2/cldrjs/cldr/supplemental.js" ), $.getScript( url.origin + STATIC_URL + "js/globalize2/globalize.js" ), $.getScript( url.origin + STATIC_URL + "js/globalize2/globalize/date.js" ), $.getScript( url.origin + STATIC_URL + "js/globalize2/globalize/number.js" ), $.getScript( url.origin + STATIC_URL + "js/globalize2/globalize/plural.js" ), $.Deferred(function( deferred ){ $( deferred.resolve ); }) ).done(function(){ $.when( $.get( url.origin + STATIC_URL + "js/globalize2/cldr/main/de/ca-gregorian.json" ), $.get( url.origin + STATIC_URL + "js/globalize2/cldr/supplemental/likelySubtags.json" ), $.get( url.origin + STATIC_URL + "js/globalize2/cldr/supplemental/timeData.json" ), $.get( url.origin + STATIC_URL + "js/globalize2/cldr/supplemental/weekData.json" ) ).then(function() { // Normalize $.get results, we only need the JSON, not the request statuses. return [].slice.apply( arguments, [ 0 ] ).map(function( result ) { return result[ 0 ]; }); }).then( Globalize.load ).then(function() { // Your code goes here. }); }); 

就Firebug中所见,所有文件都已正确加载。 但是当涉及Globalize.load步骤时,引用被标记为未定义。

我此刻没有任何错误的线索。 欢迎任何帮助。