mdn/content

versionchange is super important and hardly is given any attention

Open

#26.639 geöffnet am 8. Mai 2023

Auf GitHub ansehen
 (0 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Markdown (22.427 Forks)batch import
Content:WebAPIarea: IndexedDBhelp wanted

Repository-Metriken

Stars
 (8.900 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 7T 3h) (147 gemergte PRs in 30 T)

Beschreibung

MDN URL

https://developer.mozilla.org/en-US/docs/Web/API/IDBDatabase

What specific section or headline is this issue about?

Events/versionchange

What information was incorrect, unhelpful, or incomplete?

onversionchange is critical and if not implemented can lead to user data corruption or loss. Running different versions in different tabs is a problem and the versionchange event solves this. Not a single thing is mentioned about this except some weak verbage of "An event fired when a database structure change was requested."

What did you expect to see?

I expect for this critical user data loss subject to be at least mentioned and even better showing some code supporting good practices for multiple tabs being open.

Do you have any supporting links, references, or citations?

Ivan V. brings focus to this critical topic Handling IndexedDB Upgrade Version Conflict

Do you have anything more you want to share?

The documentation here is pretty weak too. It just casually grazes the subject saying "was requested elsewhere (most probably in another window/tab on the same computer)" https://developer.mozilla.org/en-US/docs/Web/API/IDBDatabase/versionchange_event

MDN metadata

Contributor Guide