Form submit event not firing

in Uncategorised


Consider the following code: ``` form.addEventListener('submit', function(e) { console.log(e); debugger; }); ``` If none of the above trigger, this may be because you're submitting the form via the javascript [`submit()` method](https://developer.mozilla.org/en-US/docs/Web/API/HTMLFormElement/submit). From the MDN documentation: > No submit event is raised. In particular, the form's onsubmit event handler is not run.
#javascript