Skip to content

Commit 229f8c3

Browse files
committed
refactor(view): use method ref instead of method name
1 parent aa76b5b commit 229f8c3

File tree

4 files changed

+9
-10
lines changed

4 files changed

+9
-10
lines changed

lib/bundle.js

+5-6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"scripts": {
1212
"start": "http-server",
1313
"build": "browserify src/app.js -t 6to5ify -o lib/bundle.js",
14-
"watch": "watchify src/app.js -t 6to5ify -o lib/bundle.js",
14+
"watch": "watchify src/app.js -d -t 6to5ify -o lib/bundle.js",
1515
"test": "mocha test/*.js"
1616
},
1717
"directories": {

src/todo-item-view.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ class TodoItemView extends View {
1313
`);
1414
// *Define the DOM events specific to an item.*
1515
this.events = {
16-
'click input': 'toggleComplete',
17-
'click .removeBtn': 'removeItem'
16+
'click input': this.toggleComplete,
17+
'click .removeBtn': this.removeItem
1818
};
1919
super(options);
2020

test/app-e2e-test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ function addTodo(text) {
88
browser.click('.todoBtn');
99
}
1010
describe("app-test", function () {
11-
var text = 'todo test';
11+
var text = 'todo text';
1212
before(injectBrowser());
1313
beforeEach(function () {
1414
browser = this.browser;

0 commit comments

Comments
 (0)