f3f69322 by Philip Harrison

Bind/unbind "on" event for oldIE

1 parent d6871d9c
......@@ -153,17 +153,19 @@ class Rivets.View
bindEvent = (el, event, fn) ->
# Check to see if addEventListener is available.
if window.addEventListener
el.addEventListener event, fn
el.addEventListener event, fn, false
else
# Assume we are in IE and use attachEvent.
event = "on" + event
el.attachEvent event, fn
unbindEvent = (el, event, fn) ->
# Check to see if addEventListener is available.
if window.removeEventListener
el.removeEventListener event, fn
el.removeEventListener event, fn, false
else
# Assume we are in IE and use attachEvent.
event = "on" + event
el.detachEvent event, fn
# Returns the current input value for the specified element.
......