How is PromiseRejectionEvent triggered?

后端 未结 2 405
北恋
北恋 2021-01-19 01:02

I am confused about the following problem:

defined onunhandledrejection

window.onunhandledrejection = event =>{
  event.preventDefaul         


        
2条回答
  •  庸人自扰
    2021-01-19 01:38

    Since test2 is an async function, its result is wrapped in a Promise.

    JavaScript Async Return Value

提交回复
热议问题