I am building a password strength measure tool. Obviously, I need to assess the password every time it changes (onkeyup does the trick in almost every case). Except…
Modern browsers offer to autogenerate passwords.
If a user accepts a browser-generated password, how do I capture that event? It's not a keyup (obviously). But, it's also not a change event. How do I detect acceptance of the system-generated password so I can update the password strength measure?
Try using 'input' eventListner on the password field.
field.addEvenlistener('input', ()=>{
//do something
})