56 lines
1.8 KiB
HTML
56 lines
1.8 KiB
HTML
|
<!DOCTYPE html>
|
||
|
<html>
|
||
|
<head>
|
||
|
<title>require.js: Plugin 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
|
||
|
}, ['a', 'b', 'plug!broken'], function (a, b, broken) {
|
||
|
doh.is("not-a", a.name);
|
||
|
done();
|
||
|
}, function (err) {
|
||
|
if (err.requireModules && err.plugMessage === 'broken') {
|
||
|
setTimeout(function () {
|
||
|
requirejs(['c', 'd', 'plug!nested'], function (c, d, nested) {
|
||
|
doh.is('c', c.name);
|
||
|
doh.is('a', c.a.name);
|
||
|
doh.is('d', d.name);
|
||
|
doh.is('b', d.b.name);
|
||
|
doh.is('nested', nested);
|
||
|
done();
|
||
|
});
|
||
|
}, 100);
|
||
|
}
|
||
|
});
|
||
|
|
||
|
doh.register(
|
||
|
"pluginErrorContinue",
|
||
|
[
|
||
|
{
|
||
|
name: "pluginErrorContinue",
|
||
|
timeout: 5000,
|
||
|
runTest: function () {
|
||
|
return master;
|
||
|
}
|
||
|
}
|
||
|
]
|
||
|
);
|
||
|
doh.run();
|
||
|
</script>
|
||
|
</head>
|
||
|
<body>
|
||
|
<h1>require.js: Plugin Load Error/Continue Loading Local Test</h1>
|
||
|
<p>A failure of one plugin resource load does not mean later loads are broken.</p>
|
||
|
<p>Check console for messages</p>
|
||
|
</body>
|
||
|
</html>
|