delay

delays a code from executing at runtime. The method waits for the specified number of milliseconds and then executes the specified code

number delay(function code, [object owner,array params,number delay] );

Parameters

codefunctionthe code you want to delay
ownerobjectan object that the this keyword refers to
paramsarrayan array of callback parameters
delaynumberthe delay in milisecods. By default, 1 millisecond

Returns

numberthe timeout id (can be used by the clearTimeout() method )

Example

webix.delay(function(){
    do_something();
});
//or
webix.delay(function(a, b){
    //a == 1
    //b == "abc"
    //this == dtable
    do_something();
}, dtable, [1, "abc"], 100);

Back to top