source: Dev/branches/rest-dojo-ui/client/dijit/tests/delay.js @ 256

Last change on this file since 256 was 256, checked in by hendrikvanantwerpen, 13 years ago

Reworked project structure based on REST interaction and Dojo library. As
soon as this is stable, the old jQueryUI branch can be removed (it's
kept for reference).

File size: 452 bytes
Line 
1// module:
2//              dijit/tests/delay.js
3// summary:
4//              AMD plugin that waits a specified number of ms before "loading".
5//              Used to delay execution of callbacks registered by dojo.ready().
6//              (Used by _testCommon.html)
7//
8//              Usage: ready(1, function(){ require(["dijit/tests/delay!300"]); });
9define({
10        load: function(delay, req, loaded){
11                setTimeout(function(){
12                        loaded(1);
13                }, delay);
14        },
15        dynamic: 1,
16        normalize: function(id){
17                return id;
18        }
19});
Note: See TracBrowser for help on using the repository browser.