Change event listener for WebSocket to 'addEventListener'