Promise.try()
Limited availability
The Promise.try()
static method returns a promise that takes a callback of any kind (returns or throws, synchronously or asynchronously) and wraps its result in a Promise
.
To learn more, see
Promise.try() at MDN.
Compatibility
- Chrome 128 Released on 2024-08-20
- Chrome Android 128 Released on 2024-08-20
- Edge 128 Released on 2024-08-22
- Firefox ❌ Search for bugs Search for standards position
- Firefox for Android ❌ Search for bugs Search for standards position
- Safari ❌ Search for bugs Search for standards position
- Safari on iOS ❌ Search for bugs Search for standards position
Specifications
- Promise.try, from TC39 (Ecma International).