33 lines
839 B
HTML
33 lines
839 B
HTML
<html>
|
|
<head>
|
|
<script type="text/javascript" src="../../../dojo.js"></script>
|
|
<script type="text/javascript">
|
|
// TODO: add tests to check dojo.ready, dojo.config.addOnLoad, require.ready, and priority queue
|
|
require(["dojo/ready"], function(ready){
|
|
var
|
|
check1, check2, check3,
|
|
someObject = {},
|
|
someInstance = {
|
|
someMethod:function() { check3 = 2;}
|
|
};
|
|
ready(function() { check1= 1; });
|
|
ready(someObject, function() { check2= this; });
|
|
ready(someInstance, "someMethod");
|
|
require(["dojo", "doh"], function(dojo, doh) {
|
|
dojo.ready(function() {
|
|
doh.register("t", [
|
|
function(t){
|
|
t.is(check1, 1);
|
|
t.is(check2, someObject);
|
|
t.is(check3, 2);
|
|
}
|
|
]);
|
|
doh.runOnLoad();
|
|
});
|
|
});
|
|
</script>
|
|
</head>
|
|
<body>
|
|
</body>
|
|
</html>
|