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

Add events to upgrade & blocking callbacks #282

Merged
merged 4 commits into from Sep 21, 2022
Merged

Conversation

jakearchibald
Copy link
Owner

No description provided.

Copy link

@iflan iflan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm giving the LGTM because I think the changes here are fine, but the blocked callback could be improved as well.

if (blocking) db.addEventListener('versionchange', () => blocking());
if (blocking) {
db.addEventListener('versionchange', (event) =>
blocking(event.oldVersion, event.newVersion, event),
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! Typescript types it as a simple event, so I missed it.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jakearchibald jakearchibald merged commit 204a7ea into main Sep 21, 2022
@jakearchibald jakearchibald deleted the add-update-event branch September 21, 2022 10:50
@jakearchibald
Copy link
Owner Author

Published as 7.1.0!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants