refactor: ginify powerMonitor (#22751)

This commit is contained in:
Jeremy Apthorp
2020-03-24 09:03:29 -07:00
committed by GitHub
parent aeae0d47bd
commit 07cd70a37e
10 changed files with 216 additions and 176 deletions

View File

@@ -4,22 +4,6 @@
Process: [Main](../glossary.md#main-process)
This module cannot be used until the `ready` event of the `app`
module is emitted.
For example:
```javascript
const { app, powerMonitor } = require('electron')
app.whenReady().then(() => {
powerMonitor.on('suspend', () => {
console.log('The system is going to sleep')
})
})
```
## Events
The `powerMonitor` module emits the following events: