(e)
| 45 | } |
| 46 | |
| 47 | function deleteTodo(e){ |
| 48 | const item = e.target; |
| 49 | |
| 50 | if(item.classList[0] === 'trash-btn'){ |
| 51 | const todo = item.parentElement; |
| 52 | todo.classList.add('fade-away'); |
| 53 | |
| 54 | todo.addEventListener('transitionend', e => { |
| 55 | todo.remove(); |
| 56 | }); |
| 57 | } |
| 58 | |
| 59 | if(item.classList[0] === 'complete-btn'){ |
| 60 | const todo = item.parentElement; |
| 61 | const todoItem = todo.querySelector('.todo-item'); |
| 62 | todoItem.classList.toggle('completed'); |
| 63 | |
| 64 | } |
| 65 | } |
nothing calls this directly
no outgoing calls
no test coverage detected