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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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: