Skip to main content

discover_capabilities

Function discover_capabilities 

Source
pub async fn discover_capabilities() -> Result<BrowserCapabilities, JsValue>
Expand description

Probe the current window without requesting an XR session or sensor stream.

Both XR modes are queried independently. An unsupported mode is false; a rejected query is false with a labelled diagnostic in xr_error.

§Errors

Returns a JavaScript error when no browser window/document exists or a required global cannot be read. Optional WebGL/XR failures remain in the returned capability snapshot so other observations are still usable.