When I try add an event listener to the invalid event of the document it is not called when I use the default event bubbling like this.
document.addEventListener("invalid", function (e) {
console.log(e.target);
}, false);
When I set the last parameter to true
the event listener is called like expected. Thanks to What is event bubbling and capturing? I think I understand the difference between event capturing and bubbling, but I don't understand how this applies to my case. Why is it making a difference here?