diff options
Diffstat (limited to 'src/ng/q.js')
| -rw-r--r-- | src/ng/q.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/ng/q.js b/src/ng/q.js index e3c64645..307dc1b4 100644 --- a/src/ng/q.js +++ b/src/ng/q.js @@ -93,12 +93,16 @@ * * - `catch(errorCallback)` – shorthand for `promise.then(null, errorCallback)` * - * - `always(callback)` – allows you to observe either the fulfillment or rejection of a promise, + * - `finally(callback)` – allows you to observe either the fulfillment or rejection of a promise, * but to do so without modifying the final value. This is useful to release resources or do some * clean-up that needs to be done whether the promise was rejected or resolved. See the [full * specification](https://github.com/kriskowal/q/wiki/API-Reference#promisefinallycallback) for * more information. * + * Because `finally` is a reserved word in JavaScript and reserved keywords are not supported as + * property names by ES3, you'll need to invoke the method like `promise['finally'](callback)` to + * make your code IE8 compatible. + * * # Chaining promises * * Because calling the `then` method of a promise returns a new derived promise, it is easily possible @@ -274,7 +278,7 @@ function qFactory(nextTick, exceptionHandler) { return this.then(null, callback); }, - always: function(callback) { + "finally": function(callback) { function makePromise(value, resolved) { var result = defer(); |
