Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
brainfood
/
rivets
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
f3f69322
authored
2012-08-06 17:19:45 +0100
by
Philip Harrison
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Bind/unbind "on" event for oldIE
1 parent
d6871d9c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
src/rivets.coffee
src/rivets.coffee
View file @
f3f6932
...
...
@@ -153,18 +153,20 @@ 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.
el
.
detachEvent
event
,
fn
event
=
"on"
+
event
el
.
detachEvent
event
,
fn
# Returns the current input value for the specified element.
getInputValue
=
(
el
)
->
...
...
Please
register
or
sign in
to post a comment