Today’s goal was to persist the state of a todo list using local storage.
‘Preserve log’ in Chrome’s console is handy. It keeps messages that may flash on the screen too quickly and lets you know if the page has been refreshed/changed.
Event delegation is where you listen for events an element that will exist at page load. It is useful because the element can pass events to future child items - in our case a checkbox on a list item that has been dynamically added.
The source is available at github and the live version is here.