aboutsummaryrefslogtreecommitdiff
path: root/files/ko/web/events/chargingchange/index.html
diff options
context:
space:
mode:
authorPeter Bengtsson <mail@peterbe.com>2020-12-08 14:42:17 -0500
committerPeter Bengtsson <mail@peterbe.com>2020-12-08 14:42:17 -0500
commitda78a9e329e272dedb2400b79a3bdeebff387d47 (patch)
treee6ef8aa7c43556f55ddfe031a01cf0a8fa271bfe /files/ko/web/events/chargingchange/index.html
parent1109132f09d75da9a28b649c7677bb6ce07c40c0 (diff)
downloadtranslated-content-da78a9e329e272dedb2400b79a3bdeebff387d47.tar.gz
translated-content-da78a9e329e272dedb2400b79a3bdeebff387d47.tar.bz2
translated-content-da78a9e329e272dedb2400b79a3bdeebff387d47.zip
initial commit
Diffstat (limited to 'files/ko/web/events/chargingchange/index.html')
-rw-r--r--files/ko/web/events/chargingchange/index.html66
1 files changed, 66 insertions, 0 deletions
diff --git a/files/ko/web/events/chargingchange/index.html b/files/ko/web/events/chargingchange/index.html
new file mode 100644
index 0000000000..e957315849
--- /dev/null
+++ b/files/ko/web/events/chargingchange/index.html
@@ -0,0 +1,66 @@
+---
+title: chargingchange
+slug: Web/Events/chargingchange
+tags:
+ - Event
+ - events
+translation_of: Archive/Events/chargingchange
+---
+<p><code>chargingchange</code> 이벤트<code>는 </code><a href="/en-US/docs/DOM/window.navigator.battery">battery API</a> 의 <code>charging 속성이 변할때 발생 합니다.</code></p>
+
+<h2 id="기본_정보">기본 정보</h2>
+
+<dl>
+ <dt style="float: left; text-align: right; width: 120px;">Specification</dt>
+ <dd style="margin: 0 0 0 120px;"><a class="external" href="https://dvcs.w3.org/hg/dap/raw-file/tip/battery/Overview.html">Battery</a></dd>
+ <dt style="float: left; text-align: right; width: 120px;">Interface</dt>
+ <dd style="margin: 0 0 0 120px;">Event</dd>
+ <dt style="float: left; text-align: right; width: 120px;">Bubbles</dt>
+ <dd style="margin: 0 0 0 120px;">No</dd>
+ <dt style="float: left; text-align: right; width: 120px;">Cancelable</dt>
+ <dd style="margin: 0 0 0 120px;">No</dd>
+ <dt style="float: left; text-align: right; width: 120px;">Target</dt>
+ <dd style="margin: 0 0 0 120px;"><code>navigator.battery</code></dd>
+ <dt style="float: left; text-align: right; width: 120px;">Default Action</dt>
+ <dd style="margin: 0 0 0 120px;">None</dd>
+</dl>
+
+<h2 id="Properties" name="Properties">Properties</h2>
+
+<p>The event callback doesn't receive any event objects, but properties can be read from the {{domxref("BatteryManager")}} object received from the {{domxref("navigator.getBattery")}} method.</p>
+
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <td class="header">Property</td>
+ <td class="header">Type</td>
+ <td class="header">Description</td>
+ </tr>
+ <tr>
+ <td>{{domxref("BatteryManager.charging")}}</td>
+ <td>boolean</td>
+ <td>The system's battery charging status. Returns <code>true</code> if the battery is charging, if the state of the system's battery is not determinable, or if no battery is attached to the system. Returns <code>false</code> if the battery is discharging. Read only.</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Example" name="Example">Example</h2>
+
+<pre class="brush: js">navigator.getBattery().then(function(battery) {
+
+ console.log("Battery charging? " + battery.charging ? "Yes" : "No");
+
+ battery.addEventListener('chargingchange', function() {
+ console.log("Battery charging? " + battery.charging ? "Yes" : "No");
+ });
+
+});
+</pre>
+
+<h2 id="관계_된_이벤트">관계 된 이벤트</h2>
+
+<ul>
+ <li>{{Event("chargingtimechange")}}</li>
+ <li>{{Event("dischargingtimechange")}}</li>
+ <li>{{Event("levelchange")}}</li>
+</ul>