forked from requirejs/requirejs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patherrorChild.html
More file actions
50 lines (46 loc) · 1.34 KB
/
errorChild.html
File metadata and controls
50 lines (46 loc) · 1.34 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
48
49
50
<!DOCTYPE html>
<html>
<head>
<title>require.js: Child Error Catch 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">
var master = new doh.Deferred(),
failed;
function done() {
if (failed) {
master.callback(true);
}
}
define('a', ['missing'], function(m) {
return {};
});
require(['a'], function (a) {
failed = false;
}, function (err) {
failed = true;
});
setTimeout(done, 500);
doh.register(
"errorChild",
[
{
name: "errorChild",
timeout: 1000,
runTest: function () {
return master;
}
}
]
);
doh.run();
</script>
</head>
<body>
<h1>require.js: Child Error Catch Test</h1>
<p>A top level require catches an error generated by a dependency.
<a href="https://github.com/requirejs/requirejs/issues/1265">More info</a>.</p>
<p>Check console for messages</p>
</body>
</html>