if("WebSocket" in window) {
let ws = new WebSocket(`ws:你的url`);
ws.close();
}