The chrome.system.powerSource API allows Chrome Kiosk Apps to query the state of connected power sources.
The chrome.system.powerSource API allows Chrome Kiosk Apps to query the state of connected power sources. * available since Chrome 69 * https://developer.chrome.com/apps/system.powerSource
(get-power-source-info)
Requests information on attached power sources.
This function returns a core.async channel of type promise-chan
which eventually receives a result value.
Signature of the result value put on the channel is [power-source-info] where:
|power-source-info| - https://developer.chrome.com/apps/system.powerSource#property-callback-powerSourceInfo.
In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.
https://developer.chrome.com/apps/system.powerSource#method-getPowerSourceInfo.
Requests information on attached power sources. This function returns a core.async channel of type `promise-chan` which eventually receives a result value. Signature of the result value put on the channel is [power-source-info] where: |power-source-info| - https://developer.chrome.com/apps/system.powerSource#property-callback-powerSourceInfo. In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error. https://developer.chrome.com/apps/system.powerSource#method-getPowerSourceInfo.
(request-status-update)
Requests a power source status update. Resulting power source status updates are observable using 'onPowerChanged'.
https://developer.chrome.com/apps/system.powerSource#method-requestStatusUpdate.
Requests a power source status update. Resulting power source status updates are observable using 'onPowerChanged'. https://developer.chrome.com/apps/system.powerSource#method-requestStatusUpdate.
(tap-all-events chan)
Taps all valid non-deprecated events in chromex.app.system.power-source namespace.
Taps all valid non-deprecated events in chromex.app.system.power-source namespace.
(tap-on-power-changed-events channel & args)
Event for changes in the set of connected power sources.
Events will be put on the |channel| with signature [::on-power-changed [power-source-info]] where:
|power-source-info| - https://developer.chrome.com/apps/system.powerSource#property-onPowerChanged-powerSourceInfo.
Note: |args| will be passed as additional parameters into Chrome event's .addListener call.
https://developer.chrome.com/apps/system.powerSource#event-onPowerChanged.
Event for changes in the set of connected power sources. Events will be put on the |channel| with signature [::on-power-changed [power-source-info]] where: |power-source-info| - https://developer.chrome.com/apps/system.powerSource#property-onPowerChanged-powerSourceInfo. Note: |args| will be passed as additional parameters into Chrome event's .addListener call. https://developer.chrome.com/apps/system.powerSource#event-onPowerChanged.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close