UNPKG

can

Version:

MIT-licensed, client-side, JavaScript framework that makes building rich web applications easy.

33 lines (32 loc) 807 B
<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>