aboutsummaryrefslogtreecommitdiff
path: root/files/ja/web/api/navigator/battery
diff options
context:
space:
mode:
Diffstat (limited to 'files/ja/web/api/navigator/battery')
-rw-r--r--files/ja/web/api/navigator/battery/index.html45
1 files changed, 45 insertions, 0 deletions
diff --git a/files/ja/web/api/navigator/battery/index.html b/files/ja/web/api/navigator/battery/index.html
new file mode 100644
index 0000000000..5ab81d5651
--- /dev/null
+++ b/files/ja/web/api/navigator/battery/index.html
@@ -0,0 +1,45 @@
+---
+title: Navigator.battery
+slug: Web/API/Navigator/battery
+tags:
+ - API
+ - Battery
+ - Battery API
+ - Device API
+ - Navigator
+ - Non-standard
+ - Obsolete
+ - Property
+ - Reference
+ - バッテリ
+ - プロパティ
+ - 廃止
+ - 標準外
+translation_of: Web/API/Navigator/battery
+---
+<div>{{ApiRef("Battery API")}}</div>
+
+<p><span class="seoSummary"><strong><code>battery</code></strong> プロパティは読み取り専用で、システムのバッテリの充電レベルや端末が充電中であるかどうかについての情報を提供し、これらのパラメーターが変化したときに発生するイベントを公開する {{DOMxRef("BatteryManager")}} を返します。このインターフェイスは <a href="/ja/docs/Web/API/Battery_Status_API">Battery Status API</a> の早期の草稿で導入されましたが、 {{JSxRef("Promise")}} ベースの {{DOMxRef("Navigator.getBattery","Navigator.getBattery()")}} に置き換えられました。</span></p>
+
+<div class="note">
+<p><code>battery</code> プロパティは非推奨になり、バッテリの {{JSxRef("Promise")}} を返す {{DOMxRef("Navigator.getBattery","Navigator.getBattery()")}} メソッドに置き換えられました。</p>
+</div>
+
+<h2 id="Syntax" name="Syntax">構文</h2>
+
+<pre class="syntaxbox">var battery = navigator.battery;</pre>
+
+<h2 id="Browser_compatibility" name="Browser_compatibility">ブラウザーの互換性</h2>
+
+<div class="hidden">このページの互換性一覧表は構造化データから生成されています。データに協力していただけるのであれば、 <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> をチェックアウトしてプルリクエストを送信してください。</div>
+
+<p>{{Compat("api.Navigator.battery")}}</p>
+
+<h2 id="See_also" name="See_also">関連情報</h2>
+
+<ul>
+ <li>{{DOMxRef("Navigator.getBattery","Navigator.getBattery()")}}</li>
+ <li><a href="/ja/docs/Web/API/Battery_Status_API">Battery Status API</a></li>
+ <li><a class="external" href="http://hacks.mozilla.org/2012/02/using-the-battery-api-part-of-webapi/">Blog post - Using the Battery API</a></li>
+ <li><a class="external" href="http://davidwalsh.name/battery-api" title="http://davidwalsh.name/battery-api">David Walsh on the JavaScript Battery API</a></li>
+</ul>