d582ba6a by Michael Richards

Fix typo and code comments for IE conditional.

1 parent ff37fe10
......@@ -73,7 +73,7 @@
if (window.addEventListener) {
return this.el.addEventListener('change', this.publish);
} else {
return this.el.attatchEvent('change', this.publish);
return this.el.attachEvent('change', this.publish);
}
}
};
......
......@@ -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.attatchEvent '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) =>
......