Yes and no.
From a practical perspective, it's a pretty safe bet that all browsers will process a change
before a submit
(barring calls directly triggered by JavaScript).
document.querySelector('form').addEventListener('submit', e => { console.log('submit'); e.preventDefault(); });
document.querySelector('input').addEventListener('change', () => console.log('change'));
<form>
<input>
</form>
That said, there isn't any specific specification that requires this behavior. The closest is probably the HTML 5 Draft Spec Event Loop, but it doesn't seem to specify anything about the order of form events.
All that said, I'd probably avoid on anything that super-explicitly required that change
fired before submit
. I assume it would be for validation. I would probably have the submit
function call the validation function itself without calling change
.