52 lines
1.1 KiB
HTML
52 lines
1.1 KiB
HTML
|
<!DOCTYPE html>
|
||
|
<html>
|
||
|
<head>
|
||
|
<title>require.js: Double Plugin Call Test</title>
|
||
|
<script type="text/javascript" src="../doh/runner.js"></script>
|
||
|
<script type="text/javascript" src="../doh/_browserRunner.js"></script>
|
||
|
<script type="text/javascript" src="../../require.js"></script>
|
||
|
<script>
|
||
|
var master = new doh.Deferred(),
|
||
|
count = 0;
|
||
|
|
||
|
function done() {
|
||
|
count += 1;
|
||
|
if (count === 2) {
|
||
|
master.callback(true);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
doh.register(
|
||
|
"doublePluginCall",
|
||
|
[
|
||
|
{
|
||
|
name: "doublePluginCall",
|
||
|
timeout: 5000,
|
||
|
runTest: function() {
|
||
|
return master;
|
||
|
}
|
||
|
}
|
||
|
]
|
||
|
);
|
||
|
doh.run();
|
||
|
|
||
|
require(['double!foo'], function (foo) {
|
||
|
if (foo === 'x') {
|
||
|
done();
|
||
|
}
|
||
|
});
|
||
|
|
||
|
require(['double!foo'], function (foo) {
|
||
|
if (foo === 'x') {
|
||
|
done();
|
||
|
}
|
||
|
});
|
||
|
|
||
|
</script>
|
||
|
</head>
|
||
|
<body>
|
||
|
<h1>require.js: Double Plugin Call Test</h1>
|
||
|
<p>Check console for messages</p>
|
||
|
</body>
|
||
|
</html>
|