Skip to content

Clarify that deleteDatabase() blocks until open connections close#44350

Open
vamshikrishnaramasamy wants to merge 1 commit into
mdn:mainfrom
vamshikrishnaramasamy:docs/issue-20368-deletedatabase-blocked
Open

Clarify that deleteDatabase() blocks until open connections close#44350
vamshikrishnaramasamy wants to merge 1 commit into
mdn:mainfrom
vamshikrishnaramasamy:docs/issue-20368-deletedatabase-blocked

Conversation

@vamshikrishnaramasamy
Copy link
Copy Markdown
Contributor

Fixes #20368.

The page mentions that open connections receive a versionchange event, but doesn't explain the consequence: the deletion will not complete (and success will not fire) while any connection to the database is still open. This is a common source of confusion — people wait for onsuccess that never comes because a connection is left open.

This expands the existing sentence to spell out that:

  • the deletion stays pending until every connection closes;
  • a blocked event is fired on the request if a connection doesn't close in response to versionchange;
  • closing connections (e.g. via IDBDatabase.close()) lets the deletion proceed.

This matches the spec's database-deletion steps and the behavior @evanstade quoted on the issue.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@vamshikrishnaramasamy vamshikrishnaramasamy requested a review from a team as a code owner June 4, 2026 01:23
@vamshikrishnaramasamy vamshikrishnaramasamy requested review from chrisdavidmills and removed request for a team June 4, 2026 01:23
@github-actions github-actions Bot added Content:WebAPI Web API docs size/s [PR only] 6-50 LoC changed labels Jun 4, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 4, 2026

Preview URLs (1 page)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Content:WebAPI Web API docs size/s [PR only] 6-50 LoC changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

indexedDB.deleteDatabase doc: Mention that deleting a database isn't completed until the upgradeNeeded result is closed

2 participants