The Intel Power Web API provides a web app with JavaScript access to information about the device's power and battery state.
For instance, in combination with other information about the device, a web app might use connection information to request a video stream which is approprate for the device's current bandwidth capability. A web app may determine that current signal strength is not sufficient for the app to function appropriatly for the desired user experience - and may prompt the user re-orient the device or move closer to a wireless access point.
Unfortunately the app requires a manual browser plugin and a program to be installed on your PC, so it's not exactly seamless. You only have to confirm a dozen dialog boxes and agree to standard terms, but it's a shame this computer information isn't automatically available. More info at http://software.intel.com/sites/whatif/webapis/api/power/
Tweet