dojox/timing/doLater.js

  • Provides:

    • dojox.timing.doLater
  • dojox.timing.doLater

    • type
      Function
    • parameters:
      • conditional: (typeof anything)
        Can be a property that eventually gets set, or
        an expression, method... anything that can be
        evaluated.
      • context: (typeof Object )
        Object
        The namespace where the call originated.
        Defaults to global and anonymous functions
      • interval: (typeof Number )
        Number
        Poll time to check conditional in Milliseconds
    • source: [view]
       if(conditional){ return false; } // Boolean
       var callback = dojox.timing.doLater.caller,
        args = dojox.timing.doLater.caller.arguments;
       interval = interval || 100;
       context = context || dojo.global;

       
       setTimeout(function(){
        callback.apply(context, args);
       },interval);
       return true; // Boolean
    • summary
      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.
    • description
      dojox.timing.doLater(conditional) is testing if the call
      should be done later. So it returns
      true if the param is false.
      arguments:
    • returns
      Boolean
    • example
      
       setTimeout(function(){
       		if(dojox.timing.doLater(app.ready)){return;}
       		console.log("Code is ready! anonymous.function SUCCESS")
       	},700);
  • dojox.timing

    • type
      Object
    • summary
  • dojox

    • type
      Object
    • summary