Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit d87b791

Browse files
mcjffldcaitp
authored andcommitted
docs($q): added IE8 warning to promise.catch()
Closes #9987
1 parent bff8041 commit d87b791

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/ng/q.js

+4
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,10 @@
100100
*
101101
* - `catch(errorCallback)` – shorthand for `promise.then(null, errorCallback)`
102102
*
103+
* Because `catch` is a reserved word in JavaScript and reserved keywords are not supported as
104+
* property names by ES3, you'll need to invoke the method like `promise['catch'](callback)` or
105+
* `promise.then(null, errorCallback)` to make your code IE8 and Android 2.x compatible.
106+
*
103107
* - `finally(callback)` – allows you to observe either the fulfillment or rejection of a promise,
104108
* but to do so without modifying the final value. This is useful to release resources or do some
105109
* clean-up that needs to be done whether the promise was rejected or resolved. See the [full

0 commit comments

Comments
 (0)