forked from requirejs/requirejs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfallback.html
More file actions
47 lines (46 loc) · 1.36 KB
/
fallback.html
File metadata and controls
47 lines (46 loc) · 1.36 KB
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
<!DOCTYPE html>
<html>
<head>
<title>require.js: Fallback Test</title>
<script type="text/javascript" src="../../require.js"></script>
<script type="text/javascript" src="../doh/runner.js"></script>
<script type="text/javascript" src="../doh/_browserRunner.js"></script>
<script type="text/javascript">
require({
baseUrl: 'initial',
//Shorter wait so IE 6-8 fails faster.
waitSeconds: 3,
paths: {
//A non-responding server.
'desert': location.protocol + '//' + location.hostname + ':9832/desert'
},
fallback: {
baseUrl: '.',
paths: {
'forest': 'secondary/forest'
}
}
},
['lake', 'forest', 'desert'],
function(lake, forest, desert) {
doh.register(
"fallback",
[
function fallback(t){
t.is("lake", lake.name);
t.is("forest", forest.name);
t.is("desert", desert.name);
}
]
);
doh.run();
}
);
</script>
</head>
<body>
<h1>require.js: Fallback Test</h1>
<p>Test using a fallback config.</p>
<p>Check console for messages</p>
</body>
</html>