]> khamidou — GitHub mirrors - electron.git/commitdiff
Standardize power-monitor
authorJessica Lord <jlord@github.com>
Sat, 29 Aug 2015 04:37:07 +0000 (21:37 -0700)
committerJessica Lord <jlord@github.com>
Sat, 29 Aug 2015 04:37:07 +0000 (21:37 -0700)
docs/api/power-monitor.md

index 4643110f35bbad3684df817e732f64e079c7183d..c9a33cc1a1284185c13b7c52fff9a32be9b27036 100644 (file)
@@ -1,10 +1,10 @@
 # power-monitor
 
-The `power-monitor` module is used to monitor the power state change. You can
-only use it on the main process. You should not use this module until the `ready` 
-event of `app` module gets emitted.
+The `power-monitor` module is used to monitor power state changes. You can
+only use it on the main process. You should not use this module until the `ready`
+event of the `app` module is emitted.
 
-An example is:
+For example:
 
 ```javascript
 var app = require('app');
@@ -16,18 +16,22 @@ app.on('ready', function() {
 });
 ```
 
-## Event: suspend
+## Events
+
+The `power-monitor` module emits the following events:
+
+### Event: 'suspend'
 
 Emitted when the system is suspending.
 
-## Event: resume
+### Event: 'resume'
 
 Emitted when system is resuming.
 
-## Event: on-ac
+### Event: 'on-ac'
 
 Emitted when the system changes to AC power.
 
-## Event: on-battery
+### Event: 'on-battery'
 
 Emitted when system changes to battery power.