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

resume property for blocked events #1

Open
brettz9 opened this issue Apr 1, 2016 · 2 comments
Open

resume property for blocked events #1

brettz9 opened this issue Apr 1, 2016 · 2 comments

Comments

@brettz9
Copy link
Contributor

brettz9 commented Apr 1, 2016

Hi,

I'm not in particular need of this since I'm working more with db.js, but just in examining your nicely modular projects, I thought I'd share a novelty I added to db.js for blocked connections that you might find of use.

Within the db.js open request (and the delete one which also has a couple of other browser bug workarounds you may be interested in), you should see a resume property we add to the onblocked error object so that the user can, as per our README open docs, recover from a blocked event with a promise catch followed by a then.

@alekseykulikov
Copy link
Contributor

This resume feature is really nice, thank you for sharing!

@brettz9
Copy link
Contributor Author

brettz9 commented Apr 2, 2016

Sure... If versionchange handlers have already been set up and if they close their own connections, there will be no blocked event, so by using best practice, there shouldn't be too much of a need for this, I think but if one wants to control the behaviors at the point of making the open request, it may come in handy.

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

No branches or pull requests

2 participants