Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit d36675e

Browse files
committed
minor fixes
1 parent 8c5fa3a commit d36675e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

‎6-data-storage/03-indexeddb/article.md‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,9 @@ In order to organize that, the `versionchange` event triggers in such case on th
125125

126126
If we don't listen to `versionchange` event and don't close the old connection, then the second, new connection won't be made. The `openRequest` object will emit the `blocked` event instead of `success`. So the second tab won't work.
127127

128-
Here's the code to correctly handle the parallel upgrade:
128+
Here's the code to correctly handle the parallel upgrade.
129+
130+
It installs `onversionchange` handler after the database is opened, that closes the old connection:
129131

130132
```js
131133
let openRequest = indexedDB.open("store", 2);

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /