examples/todo/js/behaviors/todo.js
function(event, element, elementType) {

			if (elementType === 'delete-btn') {
				var todoEl = getClosestTodoElement(element),
					todoId = getClosestTodoId(element);

				moduleEl.querySelector('#todo-list').removeChild(todoEl);
				todosDB.remove(todoId);

				context.broadcast('todoremoved', {
					id: todoId
				});

			}

		}
function(event, element, elementType) {

			if (elementType === 'delete-btn') {
				var todoEl = getClosestTodoElement(element),
					todoId = getClosestTodoId(element);

				moduleEl.querySelector('#todo-list').removeChild(todoEl);
				todosDB.remove(todoId);

				context.broadcast('todoremoved', {
					id: todoId
				});

			}

		}
function ( event , element , elementType ) { if ( elementType === 'delete-btn' ) { var todoEl = getClosestTodoElement ( element ) , todoId = getClosestTodoId ( element ) ; moduleEl . querySelector ( '#todo-list' ) . removeChild ( todoEl ) ; todosDB . remove ( todoId ) ; context . broadcast ( 'todoremoved' , { id : todoId } ) ; } }
Handles all click events for the behavior.
@param {Event} event A DOM-normalized event object.
@param {HTMLElement} element The nearest HTML element with a data-type
attribute specified or null if there is none.
@param {string} elementType The value of data-type for the nearest
element with that attribute specified or null if there is none.
@returns {void}
Handles all click events for the behavior .