alekseykulikov/backbone-offline

Wrap existing code with a closure

mdreizin opened this issue · 2 comments

Hi,

It would be nice to wrap existing code with a closure that uses the following variables: window, _, Backbone.

This approach gives us ability to keep references of original variables and we don't lose them if we try to use "noConflict" function.

((window, _, Backbone) ->
    # Existing code goes here
    return
) window, _, Backbone

Thank you @marat-dreizin good idea, now I'm having a vacation, so I will fix it after 2-3 weeks when I go back.

Thanks @ask11, I'm looking forward to see these changes :)