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
d582ba6a
authored
2012-07-09 21:56:06 -0700
by
Michael Richards
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Fix typo and code comments for IE conditional.
1 parent
ff37fe10
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
5 deletions
lib/rivets.js
src/rivets.coffee
lib/rivets.js
View file @
d582ba6
...
...
@@ -73,7 +73,7 @@
if
(
window
.
addEventListener
)
{
return
this
.
el
.
addEventListener
(
'change'
,
this
.
publish
);
}
else
{
return
this
.
el
.
atta
t
chEvent
(
'change'
,
this
.
publish
);
return
this
.
el
.
attachEvent
(
'change'
,
this
.
publish
);
}
}
};
...
...
src/rivets.coffee
View file @
d582ba6
...
...
@@ -56,13 +56,12 @@ class Rivets.Binding
@
set
Rivets
.
config
.
adapter
.
read
@
model
,
@
keypath
if
@
type
in
bidirectionals
#Check to see if addEventListener is available
# 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
.
atta
t
chEvent
'change'
,
@
publish
# Assume we are in IE and
use attachEvent.
@
el
.
attachEvent
'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