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
48ca4e77
authored
2012-07-10 00:13:53 -0400
by
Chad Hietala
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Check for window.addEventListener
1 parent
3e12fd20
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
src/rivets.coffee
src/rivets.coffee
View file @
48ca4e7
...
...
@@ -56,7 +56,13 @@ class Rivets.Binding
@
set
Rivets
.
config
.
adapter
.
read
@
model
,
@
keypath
if
@
type
in
bidirectionals
#Check to see if addEventListener is available
if
window
.
addEventListener
@
el
.
addEventListener
'change'
,
@
publish
else
# Assume we are in IE and attach the event
@
el
.
attatchEvent
'change'
,
@
publish
# Publishes the value currently set on the input element back to the model.
publish
:
(
e
)
=>
...
...
Please
register
or
sign in
to post a comment