my.offUnhandledRejection
Unlisten for the unhandledrejection event.
Sample code
copy
//.js
App({
onShow(options) {
const handleRejection = (res) => {
console.log(res.reason);
console.log(res.promise);
}
my.onUnhandledRejection(handleRejection);
my.offUnhandledRejection(handleRejection);
}
})
Parameters
Property | Type | Description |
callback | Function | The unhandledrejection event is triggered when a JavaScript |