chore: fix lint:js-in-markdown script (#38260)
This commit is contained in:
parent
0149ae72e6
commit
eeb1e7d499
26 changed files with 1078 additions and 586 deletions
|
@ -84,11 +84,11 @@ renderer process using the [addEventListener() API][addEventListener-api].
|
|||
```javascript fiddle='docs/fiddles/features/keyboard-shortcuts/web-apis|focus=renderer.js'
|
||||
const handleKeyPress = (event) => {
|
||||
// You can put code here to handle the keypress.
|
||||
document.getElementById("last-keypress").innerText = event.key;
|
||||
console.log(`You pressed ${event.key}`);
|
||||
document.getElementById('last-keypress').innerText = event.key
|
||||
console.log(`You pressed ${event.key}`)
|
||||
}
|
||||
|
||||
window.addEventListener('keyup', handleKeyPress, true);
|
||||
window.addEventListener('keyup', handleKeyPress, true)
|
||||
```
|
||||
|
||||
> Note: the third parameter `true` indicates that the listener will always receive
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue