Index: Source/modules/websockets/WebSocket.idl |
diff --git a/Source/modules/websockets/WebSocket.idl b/Source/modules/websockets/WebSocket.idl |
index 14dcf902313c6fa795d57ede6913d277a7081d12..2c9eb2d2c15dd6f32219cd33bf7aa0afcee82864 100644 |
--- a/Source/modules/websockets/WebSocket.idl |
+++ b/Source/modules/websockets/WebSocket.idl |
@@ -29,6 +29,12 @@ |
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
+// http://dev.w3.org/html5/websockets/#websocket |
+// http://www.whatwg.org/specs/web-apps/current-work/multipage/network.html#websocket |
+ |
+// FIXME: use BinaryType in binaryType |
+enum BinaryType { "blob", "arraybuffer" }; |
+ |
[ |
ActiveDOMObject, |
Constructor(DOMString url), |
@@ -48,24 +54,21 @@ |
const unsigned short CLOSING = 2; |
const unsigned short CLOSED = 3; |
readonly attribute unsigned short readyState; |
- |
readonly attribute unsigned long bufferedAmount; |
// networking |
- attribute EventHandler onopen; |
- attribute EventHandler onmessage; |
- attribute EventHandler onerror; |
- attribute EventHandler onclose; |
- |
- [TreatReturnedNullStringAs=Undefined] readonly attribute DOMString protocol; |
+ attribute EventHandler onopen; |
+ attribute EventHandler onerror; |
+ attribute EventHandler onclose; |
[TreatReturnedNullStringAs=Undefined] readonly attribute DOMString extensions; |
+ [TreatReturnedNullStringAs=Undefined] readonly attribute DOMString protocol; |
+ [RaisesException] void close([Clamp] optional unsigned short code, optional DOMString reason); |
- attribute DOMString binaryType; |
- |
+ // messaging |
+ attribute EventHandler onmessage; |
+ attribute DOMString binaryType; |
+ [RaisesException] void send(DOMString data); |
+ [RaisesException] void send(Blob data); |
[RaisesException] void send(ArrayBuffer data); |
[RaisesException] void send(ArrayBufferView data); |
- [RaisesException] void send(Blob data); |
- [RaisesException] void send(DOMString data); |
- |
- [RaisesException] void close([Clamp] optional unsigned short code, optional DOMString reason); |
}; |