Sha256: f8f0036a9fa3a6521e7a838e9e4a23389bc12ef24df567ecce9b17fb7d1f55a9

Contents?: true

Size: 821 Bytes

Versions: 6

Compression:

Stored size: 821 Bytes

Contents

// wrapped by build app
define("dojox/lang/async/timeout", ["dijit","dojo","dojox"], function(dijit,dojo,dojox){
dojo.provide("dojox.lang.async.timeout");

// Source of Deferred for timeouts

(function(){
	var d = dojo, timeout = dojox.lang.async.timeout;

	timeout.from = function(ms){
		return function(){
			var h, cancel = function(){
					if(h){
						clearTimeout(h);
						h = null;
					}
				},
				x = new d.Deferred(cancel);
			h = setTimeout(function(){
				cancel();
				x.callback(ms);
			}, ms);
			return x;
		};
	};

	timeout.failOn = function(ms){
		return function(){
			var h, cancel = function(){
					if(h){
						clearTimeout(h);
						h = null;
					}
				},
				x = new d.Deferred(cancel);
			h = setTimeout(function(){
				cancel();
				x.errback(ms);
			}, ms);
			return x;
		};
	};
})();
});

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
dojox-rails-0.11.0 vendor/assets/javascripts/lang/async/timeout.js.uncompressed.js
dojo-rails-0.9.4 vendor/assets/javascripts/dojox/lang/async/timeout.js.uncompressed.js
dojo-rails-0.9.3 vendor/assets/javascripts/dojox/lang/async/timeout.js.uncompressed.js
dojo-rails-0.9.2 vendor/assets/javascripts/dojox/lang/async/timeout.js.uncompressed.js
dojo-rails-0.9.1 vendor/assets/javascripts/dojox/lang/async/timeout.js.uncompressed.js
dojo-rails-0.9.0 vendor/assets/javascripts/dojox/lang/async/timeout.js.uncompressed.js