4

I am trying to close my websocket via:

socket.close();

However I get the error on Safari 5.0.4:

TypeError: Result of expression 'socket.close' [undefined] is not a function.

How can I properly close my web socket?

1
  • Run console.dir(socket) in Safari's developer tools. That will tell you what methods are defined on the socket object... Commented Apr 4, 2011 at 22:48

1 Answer 1

13

socket.disconnect() worked. yay.

Sign up to request clarification or add additional context in comments.

2 Comments

I like that you returned to answer in case anyone else has the same question. You get an upvote :)
returning to answer is proper SO etiquette :)

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.