docs: correct powerSaveBlocker.stop(id) return type (#39331)

doc: correct powerSaveBlocker.stop return type

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
This commit is contained in:
trop[bot]
2023-08-02 14:53:47 +02:00
committed by GitHub
parent 762ce69066
commit d3d5b8e161
2 changed files with 4 additions and 1 deletions

View File

@@ -49,6 +49,8 @@ is used.
Stops the specified power save blocker.
Returns `boolean` - Whether the specified `powerSaveBlocker` has been stopped.
### `powerSaveBlocker.isStarted(id)`
* `id` Integer - The power save blocker id returned by `powerSaveBlocker.start`.

View File

@@ -899,7 +899,8 @@ app.whenReady().then(() => {
const id = powerSaveBlocker.start('prevent-display-sleep');
console.log(powerSaveBlocker.isStarted(id));
powerSaveBlocker.stop(id);
const stopped = powerSaveBlocker.stop(id);
console.log(`The powerSaveBlocker is ${stopped ? 'stopped' : 'not stopped'}`);
// protocol
// https://github.com/electron/electron/blob/main/docs/api/protocol.md