-
Notifications
You must be signed in to change notification settings - Fork 679
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
Make the plugin easier to use together with other plugins. #12
Conversation
…ction with other backbone plugins which might also override Backbone.sync.
The reason is that the storage keeps a cache of keys in local storage. If something is removed from the localStorage but not from that cache it would create a ghost entry.
I've since reworked the test suite and fixed two bugs. So hows it, would you pull from me here? |
…the name of the library.
Allow Backbone.LocalStorage to mock window.localStorage
Would love to pull this. It's become stale since I pulled a few requests in. Could you fix it? |
…orage Conflicts: backbone.localStorage.js tests/test.js
That should fix it. Some remarks: I tried to stay away from defining global objects or extending objects that I don't own more than necessary (i.e. I would prefer Backbone.LocalStorage.sync instead of Backbone.localSync). That way it is much clearer where the function comes from when examining things in the debugger. |
Hey, how is it, can you merge it now? I would hate to have this sit for another month and then to rework the thing again to make it fit your code. |
1 similar comment
Hey, how is it, can you merge it now? I would hate to have this sit for another month and then to rework the thing again to make it fit your code. |
@jeromegn do you plan to merge this one? |
Make the plugin easier to use together with other plugins.
I was reluctant because of the change in API, but I think the changes are right. Now let's hope people read the docs and don't just copy the Todos example app's code. |
Add another reference to sync method so it is easier to use in conjunction with other backbone plugins which might also override Backbone.sync.