examples/todo/js/behaviors/todo.js
function(todoEl) {
			var todoId = getClosestTodoId(todoEl),
				editInputEl = todoEl.querySelector('.edit'),
				newTitle = (editInputEl.value).trim();

			todoEl.querySelector('label').textContent = newTitle;
			todosDB.edit(todoId, newTitle);
		}
function(todoEl) {
			var todoId = getClosestTodoId(todoEl),
				editInputEl = todoEl.querySelector('.edit'),
				newTitle = (editInputEl.value).trim();

			todoEl.querySelector('label').textContent = newTitle;
			todosDB.edit(todoId, newTitle);
		}
function ( todoEl ) { var todoId = getClosestTodoId ( todoEl ) , editInputEl = todoEl . querySelector ( '.edit' ) , newTitle = ( editInputEl . value ) . trim ( ) ; todoEl . querySelector ( 'label' ) . textContent = newTitle ; todosDB . edit ( todoId , newTitle ) ; }
Saves the value of the edit input and saves it to the db
@param {HTMLElement} todoEl The todo element to edit
@returns {void}
Saves the value of the edit input and saves it to the db