bbc15037 by Michael Richards

Add an unbind function to the on-* binder so that it's event handler is removed when unbinding.

1 parent 6b45002c
...@@ -358,6 +358,10 @@ Rivets.binders = ...@@ -358,6 +358,10 @@ Rivets.binders =
358 358
359 "on-*": 359 "on-*":
360 function: true 360 function: true
361
362 unbind: (el) ->
363 Rivets.Util.unbindEvent el, @args[0], @handler if @handler
364
361 routine: (el, value) -> 365 routine: (el, value) ->
362 binding = this 366 binding = this
363 Rivets.Util.unbindEvent el, @args[0], @handler if @handler 367 Rivets.Util.unbindEvent el, @args[0], @handler if @handler
......