Created
March 26, 2011 21:47
-
-
Save stevelacey/888668 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Constructor(in DOMString url, in optional DOMString protocols)] | |
[Constructor(in DOMString url, in optional DOMString[] protocols)] | |
interface WebSocket { | |
readonly attribute DOMString url; | |
// ready state | |
const unsigned short CONNECTING = 0; | |
const unsigned short OPEN = 1; | |
const unsigned short CLOSING = 2; | |
const unsigned short CLOSED = 3; | |
readonly attribute unsigned short readyState; | |
readonly attribute unsigned long bufferedAmount; | |
// networking | |
attribute Function onopen; | |
attribute Function onmessage; | |
attribute Function onerror; | |
attribute Function onclose; | |
readonly attribute DOMString protocol; | |
void send(in DOMString data); | |
void close(); | |
}; | |
WebSocket implements EventTarget; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment