A flight component for the HTML5 Battery API