Changeset 2422
- Timestamp:
- 12/04/07 17:46:11 (5 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
lang/javascript/jquery-deferred/jquery-deferred.js
r2418 r2422 78 78 * This cancels self callback chain. 79 79 */ 80 function Deferred () { 81 if (this instanceof Deferred) { 82 this.init.apply(this); 83 } else { 84 return new Deferred(); 85 } 86 } 80 function Deferred () { return (this instanceof Deferred) ? this.init(this) : new Deferred() } 87 81 Deferred.prototype = { 88 82 init : function () { … … 92 86 }; 93 87 this._next = null; 88 return this; 94 89 }, 95 90 … … 101 96 cancel : function () { 102 97 (this.canceller || function () {})(); 103 this.init();98 return this.init(); 104 99 }, 105 100 … … 126 121 }, 0); 127 122 } 123 return this; 128 124 } 129 125 };
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)