diff --git a/extensions.html b/extensions.html index c91d6aa..cc34b99 100644 --- a/extensions.html +++ b/extensions.html @@ -334,6 +334,116 @@
+ This enum defines the type of light indicators supported by gamepads. +
+ ++ enum GamepadLightIndicatorType { + "on-off", + "rgb" + }; ++ +
+ This represents the color of a light indicator. +
+ ++ dictionary GamepadLightColor { + octet red = 0; + octet green = 0; + octet blue = 0; + }; ++ +
on-off
light indicator that indicates ON.
+ on-off
light indicator that indicates ON.
+ on-off
light indicator that indicates ON.
+ + This interface defines a light indicator. +
+ ++ [Exposed=Window, SecureContext] + interface GamepadLightIndicator { + readonly attribute GamepadLightIndicatorType type; + + Promise<undefined> setColor(GamepadLightColor color); + }; ++ +
+ Sets the color of a light indicator, or sets the light indicator to ON + or OFF. +
+ +
+ For on-off
light indicators, one or more non zero values
+ denotes the light indicator is on, whereas a zero value for all
+ components indicates the light indicator is off.
+
+ For RGB light indicators, one or more non zero values specify the + color of the light indicator, whereas all zero values indicate the + light indicator is OFF. +
+ +
+ The returned Promise will resolve true
when setting the
+ color has succeeded, and will reject the device API error code on
+ failure.
+
null
.
+ null