Connect to self signed cert websocket server


I am making 8 ball pool game and i have websocket server with self signed ssl certificate. Pc export works just fine but web export does not. Is there way to bypass this like in nodejs you can set “{rejectUnauthorized: false}” header. Im using the websocket extension from the extension library. Thanks!