WebSocketFactoryclass WebSocketFactory {static private detectEnvironment;static private dynamicRequire; static createWebSocket(url: string | URL, protocols?: string | string[]): WebSocketLike;static getWebSocketConstructor(): WebSocket;static isWebSocketSupported(): boolean;}§Static Properties§detectEnvironment[src]§dynamicRequire[src]Dynamic require that works in both CJS and ESM environments Bulletproof against strict ESM environments where require might not be in scope §Static Methods§createWebSocket(url: string | URL, protocols?: string | string[]): WebSocketLike[src]§getWebSocketConstructor(): WebSocket[src]§isWebSocketSupported(): boolean[src]