在 IDBOpenDBRequest
上分派(dispatch)的 “error”
类型事件(即 open
和 deleteDatabase
)被描述为冒泡有何意义?它们应该冒泡到窗口
还是不会真正去任何地方?*
(还有一个额外的问题,在非标准 webkitGetDatabaseNames
上执行类似“气泡”的“错误”事件,如果是这样,在哪里?)
* The spec状态:
The firing of "success" or "error" events do not follow the normal steps to fire a success event or fire an error event as there is no active transaction at the time when they fire.
最佳答案
这是一个规范问题:
https://github.com/w3c/IndexedDB/issues/86
这似乎是规范中的“复制/粘贴”错误,但是当集成 window.onerror (以及工作人员中相应的全局错误 Hook 等)时,它会很重要。 Firefox 已经实现了。
Chrome 是唯一实现非标准 webkitGetDatabaseNames
且尚未实现全局错误报告的浏览器,因此它们不会去任何地方。
关于indexeddb - `IDBOpenDBRequest` "error"事件在哪里冒泡?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40165909/