web-apps/vendor/requirejs/tests/error/errorContinueLocal.html
Maxim Kadushkin 741b10515d webapps added
2016-03-10 21:48:53 -03:00

59 lines
1.7 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<title>require.js: Load Error/Continue Loading Local 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 doneCount = 0;
var master = new doh.Deferred();
function done() {
master.callback(true);
}
requirejs({
waitSeconds: 2,
enforceDefine: true
}, ['a', 'b', 'broken'], function (a, b, broken) {
doh.is("not-a", a.name);
done();
}, function (err) {
if (err.requireModules) {
var id = err.requireModules[0],
config = {paths: {}};
setTimeout(function () {
requirejs(['c', 'd'], function (c, d) {
doh.is('c', c.name);
doh.is('a', c.a.name);
doh.is('d', d.name);
doh.is('b', d.b.name);
done();
});
}, 100);
}
});
doh.register(
"errorContinueLocal",
[
{
name: "errorContinueLocal",
timeout: 5000,
runTest: function () {
return master;
}
}
]
);
doh.run();
</script>
</head>
<body>
<h1>require.js: Load Error/Continue Loading Local Test</h1>
<p>A failure of one module does not mean later loads are broken.</p>
<p>Check console for messages</p>
</body>
</html>