Skip to content

Commit

Permalink
Revert "samples: event.keyCode is deprecated, use new .code API (ya…
Browse files Browse the repository at this point in the history
…rgs#2125)"

This reverts commit 0bb49c3.
  • Loading branch information
phamhongtuyen95 committed Mar 11, 2023
1 parent 2b6ba31 commit 76ea1cc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion example/yargs.html
Expand Up @@ -35,7 +35,7 @@
const input = document.getElementById('input');
const output = document.getElementById('output');
input.addEventListener('keydown', event => {
if (event.key === "Enter" || event.code === "Enter" || event.keyCode === 13) { // Enter.
if (event.keyCode === 13) { // Enter.
const argv = yargs.parse(input.value, (err, argv, _output) => {
if (output) {
output.value += `\n${_output}`;
Expand Down

0 comments on commit 76ea1cc

Please sign in to comment.