Last change
on this file since 529 was
483,
checked in by hendrikvanantwerpen, 11 years ago
|
Added Dojo 1.9.3 release.
|
File size:
594 bytes
|
Line | |
---|
1 | define([ |
---|
2 | 'exports', |
---|
3 | 'require', |
---|
4 | '../has' |
---|
5 | ], function(exports, require, has){ |
---|
6 | var defId = has('config-requestProvider'), |
---|
7 | platformId; |
---|
8 | |
---|
9 | if(has('host-browser')){ |
---|
10 | platformId = './xhr'; |
---|
11 | }else if(has('host-node')){ |
---|
12 | platformId = './node'; |
---|
13 | /* TODO: |
---|
14 | }else if(has('host-rhino')){ |
---|
15 | platformId = './rhino'; |
---|
16 | */ |
---|
17 | } |
---|
18 | |
---|
19 | if(!defId){ |
---|
20 | defId = platformId; |
---|
21 | } |
---|
22 | |
---|
23 | exports.getPlatformDefaultId = function(){ |
---|
24 | return platformId; |
---|
25 | }; |
---|
26 | |
---|
27 | exports.load = function(id, parentRequire, loaded, config){ |
---|
28 | require([id == 'platform' ? platformId : defId], function(provider){ |
---|
29 | loaded(provider); |
---|
30 | }); |
---|
31 | }; |
---|
32 | }); |
---|
Note: See
TracBrowser
for help on using the repository browser.