Correct app-command name of APPCOMMAND_MEDIA_PLAY_PAUSE (#12408)
* correct app-command name * add compatibility with old app-command name * add temporary compatibility with old app-command name * add a comment saying that media-play_pause is deprecated * fix lint
This commit is contained in:
parent
b842a4b133
commit
7c2303c758
2 changed files with 19 additions and 1 deletions
|
@ -23,6 +23,19 @@ let windowA = new BrowserWindow(optionsA)
|
|||
// Replace with
|
||||
let optionsB = {webPreferences: {enableBlinkFeatures: ''}}
|
||||
let windowB = new BrowserWindow(optionsB)
|
||||
|
||||
// Deprecated
|
||||
window.on('app-command', (e, cmd) => {
|
||||
if (cmd === 'media-play_pause') {
|
||||
// do something
|
||||
}
|
||||
})
|
||||
// Replace with
|
||||
window.on('app-command', (e, cmd) => {
|
||||
if (cmd === 'media-play-pause') {
|
||||
// do something
|
||||
}
|
||||
})
|
||||
```
|
||||
|
||||
## `clipboard`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue