1 <h2 id="usage">Usage</h2> 2 3 <p> 4 By default, 5 operating systems dim the screen when users are inactive 6 and eventually suspend the system. 7 With the power API, 8 an app or extension can keep the system awake. 9 </p> 10 11 <p> 12 Using this API, 13 you can specify the 14 $ref:Level to which power management is disabled. 15 The <code>"system"</code> level keeps the system active, 16 but allows the screen to be dimmed or turned off. 17 For example, 18 a communication app can continue to receive messages 19 while the screen is off. 20 The <code>"display"</code> level keeps the screen and system active. 21 E-book and presentation apps, for example, 22 can keep the screen and system active 23 while users read. 24 </p> 25 26 <p> 27 When a user has more than one app or extension active, 28 each with its own power level, 29 the highest-precedence level takes effect; 30 <code>"display"</code> always takes precendence 31 over <code>"system"</code>. 32 For example, 33 if app A asks for <code>"system"</code> power management, 34 and app B asks for <code>"display"</code>, 35 <code>"display"</code> is used until app B 36 is unloaded or releases its request. 37 If app A is still active, 38 <code>"system"</code> is then used. 39 </p> 40