progress.js 610 B

123456789101112131415161718192021222324
  1. /** @license MIT License (c) copyright 2010-2014 original author or authors */
  2. /** @author Brian Cavalier */
  3. /** @author John Hann */
  4. (function(define) { 'use strict';
  5. define(function() {
  6. return function progress(Promise) {
  7. /**
  8. * @deprecated
  9. * Register a progress handler for this promise
  10. * @param {function} onProgress
  11. * @returns {Promise}
  12. */
  13. Promise.prototype.progress = function(onProgress) {
  14. return this.then(void 0, void 0, onProgress);
  15. };
  16. return Promise;
  17. };
  18. });
  19. }(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(); }));