0

Ho would I go about writing the following function in native Javascript?

this.pwdInput.on("keyup change onpaste", function() {
  let pwdInputVal = $(this).val();

  self.createTests(pwdInputVal);
})
Mark
  • 552
  • 1
  • 6
  • 19

1 Answers1

0

You can try somethind like:

document.getElementById('pwdInput').addEventListener('change', (e) => {
 let pwdInputVal = e.target.value;
  // ...
});

Here I've created handler for change event, you need to do the same for the rest events.

cn007b
  • 16,596
  • 7
  • 59
  • 74