I'm using native methods provided by WebSocket API.
I'm wondering if I need to remove event listeners because removeEventListener
method is not mentioned in the link nor in the MDN example code for websockets.
I'm using event methods like this:
const ws = new WebSocket(url);
ws.onopen = () => {}
In addition I'm wondering if I need to remove event listeners if I'm closing the connection with ws.close()
method I suppose it will remove the listeners anyway as it's cleaning up.