docs: correct powerSaveBlocker.stop(id)
return type (#39320)
doc: correct powerSaveBlocker.stop return type
This commit is contained in:
parent
303b707fbf
commit
7686d1c379
2 changed files with 4 additions and 1 deletions
|
@ -49,6 +49,8 @@ is used.
|
||||||
|
|
||||||
Stops the specified power save blocker.
|
Stops the specified power save blocker.
|
||||||
|
|
||||||
|
Returns `boolean` - Whether the specified `powerSaveBlocker` has been stopped.
|
||||||
|
|
||||||
### `powerSaveBlocker.isStarted(id)`
|
### `powerSaveBlocker.isStarted(id)`
|
||||||
|
|
||||||
* `id` Integer - The power save blocker id returned by `powerSaveBlocker.start`.
|
* `id` Integer - The power save blocker id returned by `powerSaveBlocker.start`.
|
||||||
|
|
|
@ -904,7 +904,8 @@ app.whenReady().then(() => {
|
||||||
const id = powerSaveBlocker.start('prevent-display-sleep');
|
const id = powerSaveBlocker.start('prevent-display-sleep');
|
||||||
console.log(powerSaveBlocker.isStarted(id));
|
console.log(powerSaveBlocker.isStarted(id));
|
||||||
|
|
||||||
powerSaveBlocker.stop(id);
|
const stopped = powerSaveBlocker.stop(id);
|
||||||
|
console.log(`The powerSaveBlocker is ${stopped ? 'stopped' : 'not stopped'}`);
|
||||||
|
|
||||||
// protocol
|
// protocol
|
||||||
// https://github.com/electron/electron/blob/main/docs/api/protocol.md
|
// https://github.com/electron/electron/blob/main/docs/api/protocol.md
|
||||||
|
|
Loading…
Reference in a new issue