Line | |
---|
1 | <html> |
---|
2 | <head> |
---|
3 | <script type="text/javascript" src="../../../dojo.js"></script> |
---|
4 | <script type="text/javascript"> |
---|
5 | // TODO: add tests to check dojo.ready, dojo.config.addOnLoad, require.ready, and priority queue |
---|
6 | require(["dojo/ready"], function(ready){ |
---|
7 | var |
---|
8 | check1, check2, check3, |
---|
9 | someObject = {}, |
---|
10 | someInstance = { |
---|
11 | someMethod:function() { check3 = 2;} |
---|
12 | }; |
---|
13 | ready(function() { check1= 1; }); |
---|
14 | ready(someObject, function() { check2= this; }); |
---|
15 | ready(someInstance, "someMethod"); |
---|
16 | require(["dojo", "doh"], function(dojo, doh) { |
---|
17 | dojo.ready(function() { |
---|
18 | doh.register("t", [ |
---|
19 | function(t){ |
---|
20 | t.is(check1, 1); |
---|
21 | t.is(check2, someObject); |
---|
22 | t.is(check3, 2); |
---|
23 | } |
---|
24 | ]); |
---|
25 | doh.runOnLoad(); |
---|
26 | }); |
---|
27 | }); |
---|
28 | </script> |
---|
29 | </head> |
---|
30 | <body> |
---|
31 | </body> |
---|
32 | </html> |
---|
Note: See
TracBrowser
for help on using the repository browser.