Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

window.navigator.battery

요약

battery 객체는 시스템의 배터리 충전 상태에 대한 정보를 제공합니다. 배터리의 충전 상태가 변화할때 발생하는 이벤트에 대한 처리도 가능 합니다. 이 객체는 Battery Status API 의 구현입니다. 보다 자세한 내용, API, 샘플 코드 등은 문서를 참고 해 주세요.

문법

var battery = window.navigator.battery;

navigator.batteryBatteryManager 객체 입니다.

명세

Specification Status Comment
Battery Status API Working Draft Last Call Working Draft.

브라우저 호환

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support 38 Supports the deprecated navigator.battery.
10 (10) moz [1]
16 (16) (without prefix) [2]
Not supported 25 Not supported
Feature Android Chrome for Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support Not supported 39 [3]

Supports the deprecated navigator.battery
10.0 (10) moz [1]
16.0 (16) (without prefix) [2]

Not supported 25 [3] Not supported

Notes

[1] Disabled by default in Firefox 10.0, but can be enabled setting the preference dom.battery.enabled to true. Starting with Firefox 11.0, mozBattery is enabled by default.

[2] The Battery API is currently supported on Android, Windows, and Linux with UPower installed. Support for MacOS is available starting with Gecko 18.0 (Firefox 18.0 / Thunderbird 18.0 / SeaMonkey 2.15).

[3] Values for BatteryManager.chargingTime and BatteryManager.dischargingTime are always equal to Infinity.

참고

문서 태그 및 공헌자

 이 페이지의 공헌자: fscholz, khalid32, Cho.Eun, teoli, oohii
 최종 변경: khalid32,