From da78a9e329e272dedb2400b79a3bdeebff387d47 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:42:17 -0500 Subject: initial commit --- .../ko/web/api/batterymanager/charging/index.html | 117 +++++++++++++++++++++ .../web/api/batterymanager/chargingtime/index.html | 74 +++++++++++++ .../api/batterymanager/dischargingtime/index.html | 71 +++++++++++++ files/ko/web/api/batterymanager/index.html | 74 +++++++++++++ 4 files changed, 336 insertions(+) create mode 100644 files/ko/web/api/batterymanager/charging/index.html create mode 100644 files/ko/web/api/batterymanager/chargingtime/index.html create mode 100644 files/ko/web/api/batterymanager/dischargingtime/index.html create mode 100644 files/ko/web/api/batterymanager/index.html (limited to 'files/ko/web/api/batterymanager') diff --git a/files/ko/web/api/batterymanager/charging/index.html b/files/ko/web/api/batterymanager/charging/index.html new file mode 100644 index 0000000000..711a305781 --- /dev/null +++ b/files/ko/web/api/batterymanager/charging/index.html @@ -0,0 +1,117 @@ +--- +title: BatteryManager.charging +slug: Web/API/BatteryManager/charging +translation_of: Web/API/BatteryManager/charging +--- +
{{APIRef("Battery API")}}
+ +

현재 배터리가 충전중인지를 나타내는 Boolean 값 입니다.

+ +

문법

+ +
var charging = battery.charging
+ +

charging 변수는 배터리가 충전 중인지의 여부를 가져옵니다. 충전중일경우 true. 이외에는 false 를 가리킵니다.

+ +

예제

+ +

HTML Content

+ +
<div id="charging">(charging state unknown)</div>
+ +

JavaScript Content

+ +
navigator.getBattery().then(function(battery) {
+
+    var charging = battery.charging;
+
+    document.querySelector('#charging').textContent = charging ;
+});
+ +

{{ EmbedLiveSample('Example') }}

+ +

명세

+ + + + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName("Battery API")}}{{Spec2("Battery API")}}Initial definition
+ +

브라우저 호환성

+ +

{{CompatibilityTable}}

+ +
+ + + + + + + + + + + + + + + + + + + +
FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari
Basic support{{CompatChrome(39.0)}}{{CompatGeckoDesktop("10")}} {{property_prefix("moz")}}
+ {{CompatGeckoDesktop("16")}}[1]
{{CompatNo}}25{{CompatNo}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + +
FeatureAndroidAndroid WebviewFirefox Mobile (Gecko)IE MobileOpera MobileSafari MobileChrome for Android
Basic support{{CompatNo}}{{CompatChrome(40.0)}}{{CompatGeckoMobile("10")}} {{property_prefix("moz")}}
+ {{CompatGeckoMobile("16")}}[1]
{{CompatNo}}25[2]{{CompatNo}}{{CompatChrome(42.0)}}[2]
+
+ +

[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. The Battery API is currently supported on Android, Windows, and Linux with UPower installed. Support for MacOS is available starting with Gecko 18.0 {{geckoRelease("18.0")}}. Firefox also provide support for the deprecated {{domxref("navigator.battery")}}.

+ +

[2] Values for {{domxref("BatteryManager.chargingTime")}} and {{domxref("BatteryManager.dischargingTime")}} are always equal to Infinity.

+ +

같이 보기

+ + diff --git a/files/ko/web/api/batterymanager/chargingtime/index.html b/files/ko/web/api/batterymanager/chargingtime/index.html new file mode 100644 index 0000000000..7b823afb4b --- /dev/null +++ b/files/ko/web/api/batterymanager/chargingtime/index.html @@ -0,0 +1,74 @@ +--- +title: BatteryManager.chargingTime (배터리관리기 충전시간) +slug: Web/API/BatteryManager/chargingTime +tags: + - API + - Battery API + - 목적 + - 참조 +translation_of: Web/API/BatteryManager/chargingTime +--- +
{{obsolete_header}}
+ +

{{APIRef("Battery API")}}

+ +

몇 초 단위로, 배터리가 완전히 충전될 때까지 남은 시간량을 가리킵니다.

+ +
+

반환되는 시간이 정확하더라도, 개인정보보호 정책 사유로 브라우저들이 더 큰 간격(대개 15분)으로 시간량을 반올림합니다.

+
+ +
var time = battery.chargingTime
+ +

반환되는 중에, 건전지가 완전히 충전될 때까지 또는 이미 완전히 충전되어 있다면 0이 될 때까지  time 은 몇 초 뒤에 남게 되는 시간입니다. 이는 {{domxref("BatteryManager")}} object (객체),입니다. 배터리의 전류가 방전되어 있다면, 이 값은 Infinity, 즉 무한 값이 됩니다.

+ +

예제

+ +

HTML 콘텐츠

+ +
<div id="chargingTime">(charging time unknown)</div>
+
+ +

자바언어 콘텐츠

+ +
navigator.getBattery().then(function(battery) {
+
+   var time = battery.chargingTime;
+
+   document.querySelector('#chargingTime').textContent = battery.chargingTime;
+});
+
+ +

{{ EmbedLiveSample('Example', '100%', 30) }}

+ +

설명서

+ + + + + + + + + + + + + + + + +
사양 (설명)상태 (설명)관련 (설명)
{{SpecName("Battery API")}}{{Spec2("Battery API")}}최초 정의
+ +

브라우저 호환성

+ + + +

{{Compat("api.BatteryManager.chargingTime")}}

+ +

같이 보세요

+ + diff --git a/files/ko/web/api/batterymanager/dischargingtime/index.html b/files/ko/web/api/batterymanager/dischargingtime/index.html new file mode 100644 index 0000000000..c7165c7a52 --- /dev/null +++ b/files/ko/web/api/batterymanager/dischargingtime/index.html @@ -0,0 +1,71 @@ +--- +title: BatteryManager.dischargingTime (배터리관리기 방전시간) +slug: Web/API/BatteryManager/dischargingTime +translation_of: Web/API/BatteryManager/dischargingTime +--- +
{{obsolete_header}}
+ +
{{APIRef("Battery API")}}
+ +

몇 초 단위로, 배터리가 완전히 방전될 때까지 남은 시간량을 가리킵니다.

+ +
+

반환되는 시간이 정확하더라도, 개인정보보호 정책 사유로 브라우저들이 더 큰 간격(대개 15분)으로 시간량을 반올림합니다.

+
+ +

Syntax

+ +
var time = battery.dischargingTime
+ +

반환되는 중에, time 은 {{domxref("BatteryManager")}} object(객체)인 battery 가 완전히 방전되고 시스템이 중단되는 몇 초 뒤에 남게 되는 시간입니다.  배터리가 현재 방전되기보다 충전되거나 시스템이 남은 방전 시간을 보고할 수 없다면, 이 값은 무한 값입니다.

+ +

예제

+ +

HTML 콘텐츠

+ +
<div id="dischargingTime">(discharging time unknown)</div>
+
+ +

자바언어 콘텐츠

+ +
navigator.getBattery().then(function(battery) {
+
+    var time = battery.dischargingTime;
+
+    document.querySelector('#dischargingTime').textContent = battery.dischargingTime;
+});
+
+ +

{{ EmbedLiveSample('Example', '100%', 30) }}

+ +

설명서

+ + + + + + + + + + + + + + + + +
사양 (설명)상태 (설명)비고
{{SpecName("Battery API")}}{{Spec2("Battery API")}}최초 정의
+ +

브라우저 호환성

+ + + +

{{Compat("api.BatteryManager.dischargingTime")}}

+ +

같이 보세요

+ + diff --git a/files/ko/web/api/batterymanager/index.html b/files/ko/web/api/batterymanager/index.html new file mode 100644 index 0000000000..13ca755062 --- /dev/null +++ b/files/ko/web/api/batterymanager/index.html @@ -0,0 +1,74 @@ +--- +title: BatteryManager +slug: Web/API/BatteryManager +translation_of: Web/API/BatteryManager +--- +

{{ApiRef()}}

+ +

BatteryManager 인터페이스는 시스템의 배터리 충전 상태에 대한 정보를 확인 하는 방법을 제공합니다.

+ +

{{domxref("window.navigator.battery","navigator.battery")}} 프로퍼티는 Battery Status API와 상호작용 할 수 있는 BatteryManager 인터페이스의 인스턴스를 반환합니다.

+ +

프로퍼티

+ +
+
{{domxref("BatteryManager.charging")}} {{ReadOnlyInline}}
+
배터리가 현재 충전 중인지 여부를 Boolean 값으로 나타냅니다.
+
{{domxref("BatteryManager.chargingTime")}} {{ReadOnlyInline}}
+
배터리가 완전히 충전되기 까지 남은 시간을 초로 표현합니다. 0 이면 이미 배터리의 충전이 완료 된 상황 입니다.
+
{{domxref("BatteryManager.dischargingTime")}} {{ReadOnlyInline}}
+
배터리가 완전히 방전되고 시스템이 중지 될 때까지의 남은 시간을 초로 표현 합니다.
+
{{domxref("BatteryManager.level")}} {{ReadOnlyInline}}
+
배터리의 충전 상태를 0.0 에서 1.0 사이의 값으로 표현 합니다.
+
+ +

이벤트 핸들러

+ +
+
{{domxref("BatteryManager.onchargingchange")}}
+
{{event("chargingchange")}} 이벤트의 핸들러 입니다. 이 이벤트는 배터리 충전 상태가 변경될 때 발생합니다.
+
{{domxref("BatteryManager.onchargingtimechange")}}
+
{{event("chargingtimechange")}} 이벤트의 핸들러 입니다. 이 이벤트는 배터리 충전 시간이 변경될 때 발생합니다.
+
{{domxref("BatteryManager.ondischargingtimechange")}}
+
{{event("dischargingtimechange")}} 이벤트의 핸들러 입니다. 이 이벤트는 배터리 방전 시간이 변경될 때 발생합니다.
+
{{domxref("BatteryManager.onlevelchange")}}
+
{{event("levelchange")}} 이벤트의 핸들러 입니다. 이 이벤트는 배터리 수준 상태가 변경 될 때 발생합니다.
+
+ +

메소드

+ +

Inherited from {{domxref("EventTarget")}}:

+ +

{{domxref("EventTarget")}} 으로 부터 상속을 받습니다:

+ +

{{page("/en-US/docs/Web/API/EventTarget","Methods")}}

+ +

명세

+ + + + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('Battery API')}}{{Spec2('Battery API')}}초기 명세
+ +

브라우저 호환성

+ +

{{Compat("api.BatteryManager")}}

+ +

참고

+ + -- cgit v1.2.3-54-g00ecf