aboutsummaryrefslogtreecommitdiff
path: root/files/ko/web/api/batterymanager/charging/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'files/ko/web/api/batterymanager/charging/index.html')
-rw-r--r--files/ko/web/api/batterymanager/charging/index.html117
1 files changed, 117 insertions, 0 deletions
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
+---
+<div>{{APIRef("Battery API")}}</div>
+
+<p>현재 배터리가 충전중인지를 나타내는 Boolean 값 입니다.</p>
+
+<h2 id="문법">문법</h2>
+
+<pre class="syntaxbox">var <em>charging</em> = battery.charging</pre>
+
+<p><code>charging</code> 변수는 배터리가 충전 중인지의 여부를 가져옵니다. 충전중일경우<code> </code><code>true</code>. 이외에는 <code>false </code>를 가리킵니다.</p>
+
+<h2 id="Example" name="Example">예제</h2>
+
+<h3 id="HTML_Content">HTML Content</h3>
+
+<pre class="brush: html">&lt;div id="charging"&gt;(charging state unknown)&lt;/div&gt;</pre>
+
+<h3 id="JavaScript_Content">JavaScript Content</h3>
+
+<pre class="brush: js; highlight:[3]">navigator.getBattery().then(function(battery) {
+
+ var charging = battery.charging;
+
+ document.querySelector('#charging').textContent = charging ;
+});</pre>
+
+<p>{{ EmbedLiveSample('Example') }}</p>
+
+<h2 id="명세">명세</h2>
+
+<table class="standard-table">
+ <thead>
+ <tr>
+ <th scope="col">Specification</th>
+ <th scope="col">Status</th>
+ <th scope="col">Comment</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>{{SpecName("Battery API")}}</td>
+ <td>{{Spec2("Battery API")}}</td>
+ <td>Initial definition</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="브라우저_호환성">브라우저 호환성</h2>
+
+<p>{{CompatibilityTable}}</p>
+
+<div id="compat-desktop">
+<table class="compat-table">
+ <tbody>
+ <tr>
+ <th>Feature</th>
+ <th>Chrome</th>
+ <th>Firefox (Gecko)</th>
+ <th>Internet Explorer</th>
+ <th>Opera</th>
+ <th>Safari</th>
+ </tr>
+ <tr>
+ <td>Basic support</td>
+ <td>{{CompatChrome(39.0)}}</td>
+ <td>{{CompatGeckoDesktop("10")}} {{property_prefix("moz")}}<br>
+ {{CompatGeckoDesktop("16")}}<sup>[1]</sup></td>
+ <td>{{CompatNo}}</td>
+ <td>25</td>
+ <td>{{CompatNo}}</td>
+ </tr>
+ </tbody>
+</table>
+</div>
+
+<div id="compat-mobile">
+<table class="compat-table">
+ <tbody>
+ <tr>
+ <th>Feature</th>
+ <th>Android</th>
+ <th>Android Webview</th>
+ <th>Firefox Mobile (Gecko)</th>
+ <th>IE Mobile</th>
+ <th>Opera Mobile</th>
+ <th>Safari Mobile</th>
+ <th>Chrome for Android</th>
+ </tr>
+ <tr>
+ <td>Basic support</td>
+ <td>{{CompatNo}}</td>
+ <td>{{CompatChrome(40.0)}}</td>
+ <td>{{CompatGeckoMobile("10")}} {{property_prefix("moz")}}<br>
+ {{CompatGeckoMobile("16")}}<sup>[1]</sup></td>
+ <td>{{CompatNo}}</td>
+ <td>25<sup>[2]</sup></td>
+ <td>{{CompatNo}}</td>
+ <td>{{CompatChrome(42.0)}}<sup>[2]</sup></td>
+ </tr>
+ </tbody>
+</table>
+</div>
+
+<p>[1] Disabled by default in Firefox 10.0, but can be enabled setting the preference <code>dom.battery.enabled</code> to <code>true</code>. Starting with Firefox 11.0, <code>mozBattery</code> 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")}}.</p>
+
+<p>[2] Values for {{domxref("BatteryManager.chargingTime")}} and {{domxref("BatteryManager.dischargingTime")}} are always equal to <code>Infinity</code>.</p>
+
+<h2 id="같이_보기">같이 보기</h2>
+
+<ul>
+ <li>{{domxref("BatteryManager")}}</li>
+ <li>{{domxref("Navigator.getBattery")}}</li>
+</ul>