Skip to content

Chapter 8. Onkeypress is deprecated.  #28

Open
@Bers96

Description

@Bers96

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;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions