aboutsummaryrefslogtreecommitdiff
path: root/files/ja/web/api/window/gamepadconnected_event
diff options
context:
space:
mode:
authorPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
committerPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
commit33058f2b292b3a581333bdfb21b8f671898c5060 (patch)
tree51c3e392513ec574331b2d3f85c394445ea803c6 /files/ja/web/api/window/gamepadconnected_event
parent8b66d724f7caf0157093fb09cfec8fbd0c6ad50a (diff)
downloadtranslated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.gz
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.bz2
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.zip
initial commit
Diffstat (limited to 'files/ja/web/api/window/gamepadconnected_event')
-rw-r--r--files/ja/web/api/window/gamepadconnected_event/index.html85
1 files changed, 85 insertions, 0 deletions
diff --git a/files/ja/web/api/window/gamepadconnected_event/index.html b/files/ja/web/api/window/gamepadconnected_event/index.html
new file mode 100644
index 0000000000..0aeeaa4b2a
--- /dev/null
+++ b/files/ja/web/api/window/gamepadconnected_event/index.html
@@ -0,0 +1,85 @@
+---
+title: gamepadconnected
+slug: Web/API/Window/gamepadconnected_event
+translation_of: Web/API/Window/gamepadconnected_event
+---
+<p><code>gamepadconnected</code> イベントは、<span id="result_box" lang="ja"><span>ゲームパッドが接続されたことをブラウザが検出したとき、またはゲームパッドのボタン/軸が初めて使用されたときに発生します。</span></span></p>
+
+<h2 id="一般的な情報">一般的な情報</h2>
+
+<dl>
+ <dt style="float: left; text-align: right; width: 120px;">仕様</dt>
+ <dd style="margin: 0 0 0 120px;"><a class="external" href="http://www.w3.org/TR/gamepad/#the-gamepadconnected-event">Gamepad</a></dd>
+ <dt style="float: left; text-align: right; width: 120px;">インターフェース</dt>
+ <dd style="margin: 0 0 0 120px;">Event</dd>
+ <dt style="float: left; text-align: right; width: 120px;">バブリング</dt>
+ <dd style="margin: 0 0 0 120px;">No</dd>
+ <dt style="float: left; text-align: right; width: 120px;">キャンセル可能</dt>
+ <dd style="margin: 0 0 0 120px;">No</dd>
+ <dt style="float: left; text-align: right; width: 120px;">対象</dt>
+ <dd style="margin: 0 0 0 120px;">DefaultView (<code>&lt;window&gt;</code>)</dd>
+ <dt style="float: left; text-align: right; width: 120px;">標準の動作</dt>
+ <dd style="margin: 0 0 0 120px;">None</dd>
+</dl>
+
+<h2 id="属性">属性</h2>
+
+<table class="standard-table">
+ <thead>
+ <tr>
+ <th scope="col">Property</th>
+ <th scope="col">Type</th>
+ <th scope="col">Description</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td><code>target</code> {{readonlyInline}}</td>
+ <td>{{domxref("EventTarget")}}</td>
+ <td>The event target (the topmost target in the DOM tree).</td>
+ </tr>
+ <tr>
+ <td><code>type</code> {{readonlyInline}}</td>
+ <td>{{domxref("DOMString")}}</td>
+ <td>The type of event.</td>
+ </tr>
+ <tr>
+ <td><code>bubbles</code> {{readonlyInline}}</td>
+ <td>{{jsxref("Boolean")}}</td>
+ <td>Whether the event normally bubbles or not.</td>
+ </tr>
+ <tr>
+ <td><code>cancelable</code> {{readonlyInline}}</td>
+ <td>{{jsxref("Boolean")}}</td>
+ <td>Whether the event is cancellable or not.</td>
+ </tr>
+ <tr>
+ <td><code>gamepad</code> {{readonlyInline}}</td>
+ <td>{{domxref("Gamepad")}}</td>
+ <td>The single gamepad attribute provides access to the associated gamepad data for this event.</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="例">例</h2>
+
+<pre class="brush:js;">// Note that the API is still vendor-prefixed in browsers implementing it
+window.addEventListener("gamepadconnected", function( event ) {
+
+ // All buttons and axes values can be accessed through
+ event.gamepad;
+
+});
+</pre>
+
+<h2 id="関連するイベント">関連するイベント</h2>
+
+<ul>
+ <li><a href="https://developer.mozilla.org/en-US/docs/Web/Reference/Events/gamepaddisconnected">gamepaddisconnected</a></li>
+</ul>
+
+<h2 id="参照">参照</h2>
+
+<ul>
+ <li><a href="/ja/docs/Web/API/Gamepad_API/Using_the_Gamepad_API">Gamepad API の利用</a></li>
+</ul>