mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
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:
@@ -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`
|
||||
|
||||
Reference in New Issue
Block a user