samdutton/simpl — pull request #54 by leops (2014-11-03 10:30:30+00:00)
Title: Update the battery example to match the spec

In the latest version of the Battery Status API draft (http://www.w3.org/TR/battery-status/), a BatteryManager object is obtained by calling `navigator.getBattery()` , which return a promise resolving into the object. This version of the draft is the one currently implemented in Chrome >= 38, and this PR adds should make the battery example compatible with these changes (while retaining backward compatibility with the old `navigator.battery`).