Skip to content

Fixing explanations of onsuccess/onerror listeners for IndexedDB #40025

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

afonyaa
Copy link

@afonyaa afonyaa commented Jun 22, 2025

Description

The paragraph that aimed to be fixed contained 2 issues:

  1. Logical error: there is no 'success'/'error' events on DOM event type property, according to official specification https://html.spec.whatwg.org/multipage/indices.html#events-2

  2. The explanation text was just hard to read and focus, so it is a bit simplified and more concised

Motivation

I made this change, so the developers do not be confused with unexpected 'error' / 'success' DOM event types

Additional details

https://html.spec.whatwg.org/multipage/indices.html#events-2

The paragraph that aimed to be fixed contained:
1. Logical error: there is no 'success'/'error' events on  DOM event type property, according to official specification https://html.spec.whatwg.org/multipage/indices.html#events-2

2. The explanation text was just hard to read and focus, so it is a bit simplified and more concised
@afonyaa afonyaa requested a review from a team as a code owner June 22, 2025 15:44
@afonyaa afonyaa requested review from wbamberg and removed request for a team June 22, 2025 15:44
@github-actions github-actions bot added Content:WebAPI Web API docs size/xs [PR only] 0-5 LoC changed labels Jun 22, 2025
Copy link
Contributor

github-actions bot commented Jun 22, 2025

Preview URLs

Flaws (2)

URL: /en-US/docs/Web/API/IndexedDB_API/Using_IndexedDB
Title: Using IndexedDB
Flaw count: 2

  • macros:
    • Macro produces link /en-US/docs/Web/API/IndexedDB_API/Basic_Concepts_Behind_IndexedDB which is a redirect
    • Macro produces link /en-US/docs/Web/API/IndexedDB_API/Browser_storage_limits_and_eviction_criteria which is a redirect

(comment last updated: 2025-06-24 15:06:51)

@wbamberg
Copy link
Collaborator

wbamberg commented Jun 23, 2025

Description

The paragraph that aimed to be fixed contained 2 issues:

  1. Logical error: there is no 'success'/'error' events on DOM event type property

The text doesn't say that though, it says that the success event is an Event whose type is "success", which is correct:

To fire a success event at a request, run these steps:

Let event be the result of creating an event using Event.

Set event’s type attribute to "success".

(from https://w3c.github.io/IndexedDB/#fire-success-event)

However I do agree that the existing text is confusing and wrong in other ways (specifically, there is no onsuccess() function: onsuccess is an attribute whose value is an anonymous function).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@afonyaa afonyaa requested a review from wbamberg June 24, 2025 07:55
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/xs [PR only] 0-5 LoC changed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants