Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
20 lines (15 sloc) 463 Bytes
do (Backbone) ->
class Backbone.Binding
constructor: (description) ->
_.extend(this, description)
@initialize(description.args...)
initialize: =>
onModelChange: =>
onCollectionChange: =>
onViewChange: =>
start: =>
@viewModel.on('change:' + @attribute, @onModelChange)
@onModelChange()
stop: =>
@viewModel.off('change:' + @attribute, @onModelChange)
Backbone.Binding.extend = Backbone.Model.extend