addyosmani/todomvc — pull request #283 by redexp (2012-09-21 18:05:30+00:00)
Title: submit instead of enter key

I added tag around new-todo input field and around each todo.

Pros:
First of all you do not have to listen each key press and compare it with enter. Isntead it onsubmit
No need to create a global constant ENTER_KEY
If you will add "Add" button for new-todo field then no need to add onclick listener for it, because you already listen onsubmit
Last, if you want to send the data associated with todo to the server, it is very easy just submit form with all data and some important extra such as csrf token