An HTML textarea has two event listeners attached to it:
elTextarea.addEventListener('keydown', keyDown)
elTextarea.addEventListener('input', inputEvent)
Is it certain that the keyDown()
function will be called prior to inputEvent()
?
According to the W3C
the order is keydown
, beforeinput
, input
, keyup
.