Ensure getWebsocketReadyState is only called when loaded