b6875ad49b
renamed a few occurances of "web page" to "renderer" renamed a few files that had "browser" in their name to "main-process" note that there are still many occurances of web page.
20 lines
377 B
Markdown
20 lines
377 B
Markdown
# power-monitor
|
|
|
|
The `power-monitor` module is used to monitor the power state change. You can
|
|
only use it on the main process.
|
|
|
|
An example is:
|
|
|
|
```javascript
|
|
require('power-monitor').on('suspend', function() {
|
|
console.log('The system is going to sleep');
|
|
});
|
|
```
|
|
|
|
## Event: suspend
|
|
|
|
Emitted when the system is suspending.
|
|
|
|
## Event: resume
|
|
|
|
Emitted when system is resuming.
|