{"json_modified": "2016-10-02T22:43:58.429064", "uuid": "1f1573c2-f3ce-4b9d-8198-65329e8a0557", "title": "Navigator.getBattery()", "url": "/en-US/docs/Web/API/Navigator/getBattery", "tags": ["API", "Device API", "Reference", "getBattery", "Navigator", "Battery API", "Method"], "translations": [{"uuid": "164a3cea-3bd3-4635-9566-84d291842c84", "title": "Navigator.getBattery()", "url": "/zh-CN/docs/Web/API/Navigator/getBattery", "tags": [], "summary": "getBattery()\u65b9\u6cd5\u63d0\u4f9b\u4e86\u7cfb\u7edf\u7684\u7535\u91cf\u4fe1\u606f\uff0c\u8fd4\u56de\u4e00\u4e2abattery\u7684promise\u5bf9\u8c61\uff0c\u7136\u540eresolve\u540e\u5f97\u5230
BatteryManager
\u5bf9\u8c61\uff0c\u5b83\u63d0\u4f9b\u4e86\u4e00\u4e9b\u65b0\u7684\u4e8b\u4ef6\uff0c\u4ee5\u53ca\u65b9\u6cd5\u4f9b\u60a8\u76d1\u63a7\u7535\u6c60\u7684\u72b6\u6001\u3002\u8fd9\u4e2a\u65b9\u6cd5\u5b9e\u73b0\u4e86Battery Status API\u00a0\uff08\u67e5\u770b\u66f4\u591a\u7ec6\u8282\u4ee5\u53ca\u4f7f\u7528\u65b9\u6cd5\u548c\u5b9e\u4f8b\u4ee3\u7801\uff09", "localization_tags": ["inprogress"], "locale": "zh-CN", "last_edit": "2015-10-11T23:15:37", "review_tags": []}], "modified": "2016-10-02T22:43:58", "label": "Navigator.getBattery()", "localization_tags": [], "locale": "en-US", "id": 130945, "last_edit": "2016-09-03T15:39:28", "summary": "The getBattery()
method provides information about the system's battery, returns a battery promise, which is resolved in a BatteryManager
object providing also some new events you can handle to monitor the battery status.. This implements the Battery Status API; see that documentation for additional details, a guide to using the API, and sample code.", "sections": [{"id": "Quick_Links", "title": null}, {"id": "Syntax", "title": "Syntax"}, {"id": "Return_value", "title": "Return value"}, {"id": "Example", "title": "Example"}, {"id": "Specifications", "title": "Specifications"}, {"id": "Browser_compatibility", "title": "Browser compatibility"}, {"id": "See_also", "title": "See also"}], "slug": "Web/API/Navigator/getBattery", "review_tags": []}