onrejectionhandled
特性为
WindowEventHandlers
混合
EventHandler
为处理
rejectionhandled
events. These events are raised when
Promise
s are rejected.
window.addEventListener("rejectionhandled", function(event) { ... });
window.onrejectionhandled = function(event) { ...};
window.onrejectionhandled = function(e) {
console.log(e.reason);
}
| 规范 | 状态 | 注释 |
|---|---|---|
|
HTML 实时标准
The definition of 'onrejectionhandled' in that specification. |
实时标准 | 初始定义。 |
| 桌面 | 移动 | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
onrejectionhandled
|
Chrome 49 | Edge ≤79 |
Firefox
69
|
IE No | Opera 36 | Safari 11 | WebView Android 49 | Chrome Android 49 |
Firefox Android
68
Disabled
|
Opera Android No | Safari iOS 11.3 | Samsung Internet Android 5.0 |
完整支持
不支持
见实现注意事项。
用户必须明确启用此特征。