Access host capabilities
Returns the capabilities advertised by the host during handshake. Use this to check if features like logging or server tools are supported.
Host capabilities or undefined if not yet connected
function CapabilitiesDisplay() { const capabilities = useHostCapabilities(); return ( <div> <p>Logging: {capabilities?.logging ? "Supported" : "Not supported"}</p> <p>Open Links: {capabilities?.openLinks ? "Supported" : "Not supported"}</p> </div> );} Copy
function CapabilitiesDisplay() { const capabilities = useHostCapabilities(); return ( <div> <p>Logging: {capabilities?.logging ? "Supported" : "Not supported"}</p> <p>Open Links: {capabilities?.openLinks ? "Supported" : "Not supported"}</p> </div> );}
Access host capabilities
Returns the capabilities advertised by the host during handshake. Use this to check if features like logging or server tools are supported.