At which point is an IndexedDB request or transaction sent

后端 未结 2 973
孤街浪徒
孤街浪徒 2021-01-21 21:51

from the examples provided here and here

They show creating a request and then attaching the onerror and onsuccess handlers after the request

2条回答
  •  鱼传尺愫
    2021-01-21 22:01

    Could it be that if the request is quick enough would the handlers not be attached and therefore not trigger

    Nope, you don't have to worry about that. The event is queued up and only fired when control returns to script next time, at which point your handlers will have been assigned.

提交回复
热议问题