Hello everyone!
I've got a minor problem with function init(). The Visual Studio Code says that the onkeypress event is deprecated. Could you tell me please what event should be used instead? As far as I managed to learn the onkeydown event fits best. Loads of thanks in advance!
Here is the snippet of code that I'm talking about:
function init() {
var fireButton = document.getElementById("fireButton");
fireButton.onclick = handleFireButton;
var guessInput = document.getElementById("guessInput");
guessInput.onkeypress = handleKeyPress;
}
Hello everyone! I've got a minor problem with function init(). The Visual Studio Code says that the onkeypress event is deprecated. Could you tell me please what event should be used instead? As far as I managed to learn the onkeydown event fits best. Loads of thanks in advance!
Here is the snippet of code that I'm talking about: function init() { var fireButton = document.getElementById("fireButton"); fireButton.onclick = handleFireButton; var guessInput = document.getElementById("guessInput"); guessInput.onkeypress = handleKeyPress; }