Learn localStorage by Building a Todo App - Step 7

Tell us what’s happening:

Your event listener’s callback function should call the showModal() method on the confirmCloseDialog element.

Your code so far

<!-- file: index.html -->

// add click event to the close task form button
closeTaskFormBtn.addEventListener("click", function() {
  // show the confirmation modal
  confirmCloseDialog.showModal();
});

/* file: styles.css */

/* file: script.js */
// User Editable Region


// add click event to the close task form button
closeTaskFormBtn.addEventListener("click", function() {
  // show the confirmation modal
  confirmCloseDialog.showModal();
});


// User Editable Region

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Safari/537.36

Challenge Information:

Learn localStorage by Building a Todo App - Step 7

Your callback syntax is incorrect. Refer back to the event listener you wrote for openTaskFormBtn.