3.0 source code
This commit is contained in:
51
OfficeWeb/vendor/requirejs/tests/plugins/double.html
vendored
Normal file
51
OfficeWeb/vendor/requirejs/tests/plugins/double.html
vendored
Normal file
@@ -0,0 +1,51 @@
|
||||
<!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>
|
||||
Reference in New Issue
Block a user