Sha256: e3e25502315440bd8c161e441a8b4683091da496eec142a5613b61cdc1cc69fc
Contents?: true
Size: 851 Bytes
Versions: 6
Compression:
Stored size: 851 Bytes
Contents
// wrapped by build app define("dojox/lang/async/topic", ["dijit","dojo","dojox"], function(dijit,dojo,dojox){ dojo.provide("dojox.lang.async.topic"); // Source of Deferred for topics (function(){ var d = dojo, topic = dojox.lang.async.topic; topic.from = function(topic){ return function(){ var h, cancel = function(){ if(h){ d.unsubscribe(h); h = null; } }, x = new d.Deferred(cancel); h = d.subscribe(topic, function(){ cancel(); x.callback(arguments); }); return x; }; }; topic.failOn = function(topic){ return function(){ var h, cancel = function(){ if(h){ d.unsubscribe(h); h = null; } }, x = new d.Deferred(cancel); h = d.subscribe(topic, function(evt){ cancel(); x.errback(new Error(arguments)); }); return x; }; }; })(); });
Version data entries
6 entries across 6 versions & 2 rubygems