Skip to content
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

Adapt IDBTransaction & IDBDatabase events to the new event structure #15006

Merged
merged 1 commit into from
Feb 16, 2022

Conversation

teoli2003
Copy link
Contributor

@teoli2003 teoli2003 commented Feb 16, 2022

Part of #14578.

Per the new guideline: https://github.com/mdn/browser-compat-data/blob/main/docs/data-guidelines.md#dom-events-eventname_event

Events affected:
On IDBTransaction: abort_event and error_event are bubbling, complete_event not.
On IDBDatabase: close_event and versionchange_event events.

Content work: mdn/content#13040
A reviewer checklist is available.

  • Confirm existence or create _event feature (follow the guideline)
  • Reconcile data in on event handler feature with _event feature (e.g., copy relevant notes over)
  • Remove _on feature
  • Set mdn_url for _event feature
  • Set spec_url for _event feature
  • Set descriptionfor _eventfeature
  • Run npm run fix to fix sorting, if needed
  • Run npm test
  • Open PR, including a link to or copy of the reviewer checklist below
  • Comment or edit PR description with a link to _event feature source if it's not in the diff

@github-actions github-actions bot added the data:api 🐇 Compat data for Web APIs. https://developer.mozilla.org/docs/Web/API label Feb 16, 2022
@Elchi3 Elchi3 merged commit d212c01 into mdn:main Feb 16, 2022
@saschanaz
Copy link
Contributor

saschanaz commented Mar 11, 2022

I'm not sure I understand this, why remove IDBDatabase.abort_event and IDBDatabase.error_event? Which fields correspond to those events now?

Opened #15345.

@queengooborg
Copy link
Collaborator

Coming from #15345, I did a little digging into this and found that the IDBDatabase has event handlers for abort and error -- see https://w3c.github.io/IndexedDB/#database-interface. I believe that we should keep abort_event and error_event subfeatures on the IDBDatabase interface as a result. @Elchi3 @teoli2003, what do you think?

@teoli2003
Copy link
Contributor Author

I agree that what we do for bubbling events may not be optimal. I'm thinking of writing down the use cases. Something like:
"As a web developer, I want to be able to know if I have to set up the event handler on object X or on its container Y"
and so on.

There are likely other use cases, though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
data:api 🐇 Compat data for Web APIs. https://developer.mozilla.org/docs/Web/API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants