So, I want to remove an input element before user submit the form. I know JS normally is synchronous, but there are situation that it could act asynchronous.
My question is, is my code guarantee to remove the input element before submit? Thank you!
form.addEventListener("submit",removeElement(e));
function removeElement(e){
return function(){
e.remove();
}
}