dojox/timing/_base (version 1.10)

See the dojox/timing/_base reference documentation for more information.

Method Summary

  • doLater(conditional,context,interval) Check if a parameter is ready, and if not, "do later". doLater will ping the parameter until it evaluates to something (truthy).
  • Timer(interval) Timer object executes an "onTick()" method repeatedly at a specified interval. repeatedly at a given interval.

Methods

doLater(conditional,context,interval)

Check if a parameter is ready, and if not, "do later". doLater will ping the parameter until it evaluates to something (truthy). It thens calls the caller with original arguments, using the supplied context or window.

dojox.timing.doLater(conditional) is testing if the call should be done later. So it returns true if the param is false.

Parameter Type Description
conditional anything

Can be a property that eventually gets set, or an expression, method... anything that can be evaluated.

context Object
Optional

The namespace where the call originated. Defaults to global and anonymous functions

interval Number
Optional

Poll time to check conditional in Milliseconds

Examples

Example 1

setTimeout(function(){
      if(dojox.timing.doLater(app.ready)){return;}
      console.log("Code is ready! anonymous.function SUCCESS")
  },700);
Timer(interval)
Defined by dojox/timing/_base

Timer object executes an "onTick()" method repeatedly at a specified interval. repeatedly at a given interval.

Parameter Type Description
interval int

Interval between function calls, in milliseconds.

Error in the documentation? Can’t find what you are looking for? Let us know!