Bad path /boomboom/v2/index.html error message when trying to assign event handlers
it's due to the forms default behaviour which is to reload the page. In this case the error is related to codepen. You need to add the event preventDefault method to your addNewTodo function. You'll need to do this for most form submit events.
function addNewTodo(event) {
event.preventDefault()
// Rest of your add todo code here...
}
I saw a similar issue when I used <form>
tags in Codepen. I switched the <form>
tag to a <div>
tag and the error went away.
Can you try this?
I got the same problem with a form on my codepen.io pen, but it got fixed when i changed button type="submit" to type="button".