forked from cujojs/curl
-
Notifications
You must be signed in to change notification settings - Fork 12
/
underscore.html
53 lines (45 loc) · 941 Bytes
/
underscore.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<!DOCTYPE HTML>
<html>
<head>
<title>underscore test file</title>
<script>
curl = {
baseUrl: '',
paths: {
curl: '../src/curl',
underscore: 'support/underscore-amdjs-1.3.1/underscore'
},
preloads: [
]
};
</script>
<script src="../src/curl.js" type="text/javascript"></script>
<script type="text/javascript">
curl(
['underscore'], // load something or callback will execute asap
function (_) {
try {
// test for one of underscore's last methods
if (typeof _.chain == 'function')
write('SUCCESS: underscore loaded');
else
write('FAILED: underscore not fully loaded');
}
catch (ex) {
write('FAILED: ' + ex.message);
}
},
function (ex) {
write('ERROR: ' + ex.message);
}
);
function write (msg) {
curl('domReady!', function () {
document.body.appendChild(document.createElement('div')).innerHTML = msg;
});
}
</script>
</head>
<body>
</body>
</html>