Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Search results

  1. J

    JavaScript Why are there two event listeners? There should be one

    I opened the Developer Tools in Google Chrome, pasted the following code in console and pressed Enter: document.removeEventListener(`keypress`, a1); document.addEventListener(`keypress`, a1); function a1(event){ console.log(`I should have been called only once`); } Then I pressed some key...
  2. J

    JavaScript Extremely weird behavior of the "keyup" event handler. I don't understand anything.

    Guys, I just don't get it. I don't see ANY logics here. Could you help me? function it_makes_no_sense_whatsoever(event){ console.log(event.keyCode); console.log(event.keyСode==37); console.log(event.keyСode===37); console.log(parseInt(event.keyСode)==37)...
Back
Top Bottom