From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- .../api/window/gamepadconnected_event/index.html | 85 ++++++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 files/ja/web/api/window/gamepadconnected_event/index.html (limited to 'files/ja/web/api/window/gamepadconnected_event') 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 +--- +

gamepadconnected イベントは、ゲームパッドが接続されたことをブラウザが検出したとき、またはゲームパッドのボタン/軸が初めて使用されたときに発生します。

+ +

一般的な情報

+ +
+
仕様
+
Gamepad
+
インターフェース
+
Event
+
バブリング
+
No
+
キャンセル可能
+
No
+
対象
+
DefaultView (<window>)
+
標準の動作
+
None
+
+ +

属性

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PropertyTypeDescription
target {{readonlyInline}}{{domxref("EventTarget")}}The event target (the topmost target in the DOM tree).
type {{readonlyInline}}{{domxref("DOMString")}}The type of event.
bubbles {{readonlyInline}}{{jsxref("Boolean")}}Whether the event normally bubbles or not.
cancelable {{readonlyInline}}{{jsxref("Boolean")}}Whether the event is cancellable or not.
gamepad {{readonlyInline}}{{domxref("Gamepad")}}The single gamepad attribute provides access to the associated gamepad data for this event.
+ +

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

関連するイベント

+ + + +

参照

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