You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The methods immediately before and after getGamepads() in the webidl file are present and usable, and I can't see any reason why they would be there but getGamepads() wouldn't. The only difference I can see is that getGamepads() returns a sequence of nullable objects, which I don't see many other examples of. I briefly looked at the web-idl compiler and nothing jumped out at me as handling this case differently, but it's very likely I overlooked something.
Can anyone give my guidance as to why this method would not be present?
The text was updated successfully, but these errors were encountered:
Indeed, this seems to be a duplicate of #1038. I thought I had verified that sequences were supported, since getVRDisplays() was present and it also returned a sequence, but that sequence was wrapped in a Promise, which masked it.
I'm trying to write a library that includes support for gamepads via the Navigator interface. The gamepad object is supported. but navigator.getGamepads() isn't (https://developer.mozilla.org/en-US/docs/Web/API/Navigator/getGamepads). The method is in the webidl file:https://github.com/rustwasm/wasm-bindgen/blob/master/crates/web-sys/webidls/enabled/Navigator.webidl#L167 but it doesn't show up in the docs (https://rustwasm.github.io/wasm-bindgen/api/web_sys/struct.Navigator.html) and trying to use it from my code results in a compilation error, even though I have enabled both the Navigator and Gamepad features in my crate's features.
The methods immediately before and after getGamepads() in the webidl file are present and usable, and I can't see any reason why they would be there but getGamepads() wouldn't. The only difference I can see is that getGamepads() returns a sequence of nullable objects, which I don't see many other examples of. I briefly looked at the web-idl compiler and nothing jumped out at me as handling this case differently, but it's very likely I overlooked something.
Can anyone give my guidance as to why this method would not be present?
The text was updated successfully, but these errors were encountered: