I'm wondering if anyone has had any experience in saving开发者_如何学运维 the model, .sync, with a persistent auto-save (localStorage) AND a full save/confirm (RESTful JSON request).
I've been using the backbone-localstorage adapter that overrides the default behaviour but I was wondering if there is a more elegant way than just adding a switch in a custom sync function.
function autoSave(model) {
    model.sync = localStorageSync;
    model.save();
    delete model.sync;
}
No need to change Backbone.sync
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论