d582ba6a by Michael Richards

Fix typo and code comments for IE conditional.

1 parent ff37fe10
...@@ -73,7 +73,7 @@ ...@@ -73,7 +73,7 @@
73 if (window.addEventListener) { 73 if (window.addEventListener) {
74 return this.el.addEventListener('change', this.publish); 74 return this.el.addEventListener('change', this.publish);
75 } else { 75 } else {
76 return this.el.attatchEvent('change', this.publish); 76 return this.el.attachEvent('change', this.publish);
77 } 77 }
78 } 78 }
79 }; 79 };
......
...@@ -56,13 +56,12 @@ class Rivets.Binding ...@@ -56,13 +56,12 @@ class Rivets.Binding
56 @set Rivets.config.adapter.read @model, @keypath 56 @set Rivets.config.adapter.read @model, @keypath
57 57
58 if @type in bidirectionals 58 if @type in bidirectionals
59 59 # Check to see if addEventListener is available.
60 #Check to see if addEventListener is available
61 if window.addEventListener 60 if window.addEventListener
62 @el.addEventListener 'change', @publish 61 @el.addEventListener 'change', @publish
63 else 62 else
64 # Assume we are in IE and attach the event 63 # Assume we are in IE and use attachEvent.
65 @el.attatchEvent 'change', @publish 64 @el.attachEvent 'change', @publish
66 65
67 # Publishes the value currently set on the input element back to the model. 66 # Publishes the value currently set on the input element back to the model.
68 publish: (e) => 67 publish: (e) =>
......