- From: Kyaw Tun <kyawtun@yathit.com>
- Date: Wed, 9 Oct 2013 23:06:13 +0800
- To: Webapps WG <public-webapps@w3.org>
Received on Wednesday, 9 October 2013 15:06:44 UTC
An application receive blocked event on IndexedDB database instance when another app open the database with a newer version. The receiving application must close the connection so that other tab receive open success event. Otherwise database open request will be pending. Most developer are unaware of the fact and hard to figure out the reason. My suggestion is to make close method as default operation of blocked event. For that app, that require to save data should listen blocked event and invoke preventDefault() and finally close the connection. After connection was closed, any transaction request will throw InvalidStateError just like closePending flag is set. The final effect is the same, but this time, developer can figure out the problem. Best, Kyaw
Received on Wednesday, 9 October 2013 15:06:44 UTC