Yes, it is quite possible to trigger preventDefault()
events in the handler async
function
. You only need to make a call before the first await
, because otherwise the event will already occur when the function resumes. The flow of events will continue and do not wait for the promise that the event handler returns.
Bergi source
share