Gamepad.mapping
特性为
Gamepad
interface returns a string indicating whether the browser has remapped the controls on the device to a known layout.
Currently there is only one supported known layout–the
standard gamepad
. If the browser is able to map controls on the device to that layout the
映射
property will be set to the string
standard
.
readonly attribute DOMString mapping;
var gp = navigator.getGamepads()[0]; console.log(gp.mapping);
A
string
.
| 规范 | 状态 | 注释 |
|---|---|---|
|
Gamepad
The definition of 'Gamepad.mapping' in that specification. |
工作草案 | 初始定义 |
| 桌面 | 移动 | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
映射
|
Chrome
35
|
Edge 12 |
Firefox
29
|
IE No |
Opera
22
|
Safari 10.1 | WebView Android No |
Chrome Android
35
|
Firefox Android 32 |
Opera Android
22
|
Safari iOS 10.3 |
Samsung Internet Android
4.0
|
完整支持
不支持
用户必须明确启用此特征。
要求使用供应商前缀或不同名称。