From 870334be3f58507c05bfc72f3edbe5db10af4caf Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 2 Apr 2013 20:06:16 +0400 Subject: remove dojo uncompressed files --- lib/dojo/promise/tracer.js.uncompressed.js | 85 ------------------------------ 1 file changed, 85 deletions(-) delete mode 100644 lib/dojo/promise/tracer.js.uncompressed.js (limited to 'lib/dojo/promise/tracer.js.uncompressed.js') diff --git a/lib/dojo/promise/tracer.js.uncompressed.js b/lib/dojo/promise/tracer.js.uncompressed.js deleted file mode 100644 index b5380cc32..000000000 --- a/lib/dojo/promise/tracer.js.uncompressed.js +++ /dev/null @@ -1,85 +0,0 @@ -define("dojo/promise/tracer", [ - "../_base/lang", - "./Promise", - "../Evented" -], function(lang, Promise, Evented){ - "use strict"; - - // module: - // dojo/promise/tracer - - /*===== - return { - // summary: - // Trace promise fulfillment. - // description: - // Trace promise fulfillment. Calling `.trace()` or `.traceError()` on a - // promise enables tracing. Will emit `resolved`, `rejected` or `progress` - // events. - - on: function(type, listener){ - // summary: - // Subscribe to traces. - // description: - // See `dojo/Evented#on()`. - // type: String - // `resolved`, `rejected`, or `progress` - // listener: Function - // The listener is passed the traced value and any arguments - // that were used with the `.trace()` call. - } - }; - =====*/ - - var evented = new Evented; - var emit = evented.emit; - evented.emit = null; - // Emit events asynchronously since they should not change the promise state. - function emitAsync(args){ - setTimeout(function(){ - emit.apply(evented, args); - }, 0); - } - - Promise.prototype.trace = function(){ - // summary: - // Trace the promise. - // description: - // Tracing allows you to transparently log progress, - // resolution and rejection of promises, without affecting the - // promise itself. Any arguments passed to `trace()` are - // emitted in trace events. See `dojo/promise/tracer` on how - // to handle traces. - // returns: dojo/promise/Promise - // The promise instance `trace()` is called on. - - var args = lang._toArray(arguments); - this.then( - function(value){ emitAsync(["resolved", value].concat(args)); }, - function(error){ emitAsync(["rejected", error].concat(args)); }, - function(update){ emitAsync(["progress", update].concat(args)); } - ); - return this; - }; - - Promise.prototype.traceRejected = function(){ - // summary: - // Trace rejection of the promise. - // description: - // Tracing allows you to transparently log progress, - // resolution and rejection of promises, without affecting the - // promise itself. Any arguments passed to `trace()` are - // emitted in trace events. See `dojo/promise/tracer` on how - // to handle traces. - // returns: dojo/promise/Promise - // The promise instance `traceRejected()` is called on. - - var args = lang._toArray(arguments); - this.otherwise(function(error){ - emitAsync(["rejected", error].concat(args)); - }); - return this; - }; - - return evented; -}); -- cgit v1.2.3