HTML and CSS Reference
In-Depth Information
FIGURE 10-9 The user now clicks the New button to be able to create a new task.
The Cancel button will simply close up the editor. You need to register and create a handler for the
button. You register the button in the usual way shown here:
document.getElementById("buttonCancel").addEventListener("click", TodoList.
Here's the required implementation:
TodoList.cancelTaskClick = function () {
var editor = document.getElementById("editor-container"); = "none";
So much for the graphical changes; you're now ready for the more engaging task of populating
the list view with any Task files found in the local storage.
retrieving current tasks
Ideally, you want to populate the list view with all available tasks when the application starts up. For
this to happen, you add the following call as the final instruction in the TodoList.init method:
Search WWH ::

Custom Search