mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
Update power-monitor.md
This commit is contained in:
@@ -8,10 +8,9 @@ An example is:
|
||||
|
||||
```javascript
|
||||
var app = require('app');
|
||||
var powerMonitor = require('power-monitor');
|
||||
|
||||
app.on('ready', function() {
|
||||
powerMonitor.on('suspend', function() {
|
||||
require('power-monitor').on('suspend', function() {
|
||||
console.log('The system is going to sleep');
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user