-
Notifications
You must be signed in to change notification settings - Fork 21
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
Event antiflood #28
base: master
Are you sure you want to change the base?
Event antiflood #28
Conversation
I've found that this version doesn't fully solve issue, It still pretty slow in some cases. #22 worked better. I'll work on this PR. But @rstacruz, @Rich-Harris, I still want your feedback about this implementation. |
Ok, it was simple but painful bug. Now it works good for me and can fully replace #22 |
Last commit 9e8e4de doesn't relate to this PR and may be useful separately. Should protect from such bugs in future. |
Ok, initial idea with patched |
@rstacruz, @Rich-Harris, guys, what about this PR? |
+1 |
Synchronous version of #22 , implementation of #22 (comment) idea.
Decorate (and undecorate)
collection.sync
method to intercept update and receive presync
event (https://github.com/jashkenas/backbone/blob/1.1.2/backbone.js#L863 https://github.com/paulmillr/exoskeleton/blob/0.7.0/exoskeleton.js#L1090)Lock all update events during ajax-driven collection update and then trigger custom update event for all listening
BackboneCollectionWrapper
s.Old synchronous tests approve this patch.