removeEventListener

Bun

Symbol

WebSocket.removeEventListener

removeEventListener<K extends keyof WebSocketEventMap>(type: K, listener: (this: WebSocket, ev: WebSocketEventMap[K]) => any, options?: boolean | EventListenerOptions): void

Removes an event listener previously registered with addEventListener()

@param type

A case-sensitive string representing the event type to remove

@param listener

The function to remove from the event target

@param options

An options object that specifies characteristics about the event listener

removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void

Removes the event listener in target's event listener list with the same type, callback, and options.

MDN Reference