diff --git a/crates/net/src/websocket/futures.rs b/crates/net/src/websocket/futures.rs index ef8de17b..e4ff94ea 100644 --- a/crates/net/src/websocket/futures.rs +++ b/crates/net/src/websocket/futures.rs @@ -199,6 +199,11 @@ impl WebSocket { }) } + /// Provides a reference to the JS `WebSocket` instance wrapped by this struct. + pub fn inner(&self) -> &web_sys::WebSocket { + &self.ws + } + /// Closes the websocket. /// /// See the [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/WebSocket/close#parameters)