As @MatthijsBlom noted in cmd-johnson/atom-battery-status#19, Atom (through Electron) as well as Browsers (Chrome and older versions of Firefox) support the Battery Status API.
This API provides the navigator.getBattery() method which can be used to obtain information on the battery of the host system.
Since we're already using a multi-provider system based on availability of certain commands/APIs, we can just add another provider using this API.
This also would partially address the issue that node-power-info currently doesn't support windows.
As @MatthijsBlom noted in cmd-johnson/atom-battery-status#19, Atom (through Electron) as well as Browsers (Chrome and older versions of Firefox) support the Battery Status API. This API provides the
navigator.getBattery()
method which can be used to obtain information on the battery of the host system.Since we're already using a multi-provider system based on availability of certain commands/APIs, we can just add another provider using this API.
This also would partially address the issue that node-power-info currently doesn't support windows.