Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chapter 8. Onkeypress is deprecated. #28

Open
Bers96 opened this issue Jul 26, 2024 · 0 comments
Open

Chapter 8. Onkeypress is deprecated. #28

Bers96 opened this issue Jul 26, 2024 · 0 comments

Comments

@Bers96
Copy link

Bers96 commented Jul 26, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant