From da78a9e329e272dedb2400b79a3bdeebff387d47 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:42:17 -0500 Subject: initial commit --- files/ko/web/events/chargingchange/index.html | 66 +++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 files/ko/web/events/chargingchange/index.html (limited to 'files/ko/web/events/chargingchange/index.html') 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 +--- +

chargingchange 이벤트battery APIcharging 속성이 변할때 발생 합니다.

+ +

기본 정보

+ +
+
Specification
+
Battery
+
Interface
+
Event
+
Bubbles
+
No
+
Cancelable
+
No
+
Target
+
navigator.battery
+
Default Action
+
None
+
+ +

Properties

+ +

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.

+ + + + + + + + + + + + + + +
PropertyTypeDescription
{{domxref("BatteryManager.charging")}}booleanThe system's battery charging status. Returns true 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 false if the battery is discharging. Read only.
+ +

Example

+ +
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");
+  });
+
+});
+
+ +

관계 된 이벤트

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