| Index: modules/websockets/WebSocket.idl
|
| diff --git a/modules/websockets/WebSocket.idl b/modules/websockets/WebSocket.idl
|
| index a7a245c9077f6a942760aaf6b54f1fb2f875601d..eeb8cbdb10332751d4167e1309fc4707909a72c5 100644
|
| --- a/modules/websockets/WebSocket.idl
|
| +++ b/modules/websockets/WebSocket.idl
|
| @@ -29,14 +29,22 @@
|
| * 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,
|
| + // FIXME: should be optional union type http://crbug.com/240176
|
| Constructor(DOMString url),
|
| - Constructor(DOMString url, sequence<DOMString> protocols),
|
| Constructor(DOMString url, DOMString protocol),
|
| + Constructor(DOMString url, sequence<DOMString> protocols),
|
| ConstructorCallWith=ExecutionContext,
|
| - GlobalContext=Window&WorkerGlobalScope,
|
| + Exposed=Window&Worker,
|
| RaisesException=Constructor,
|
| + WillBeGarbageCollected,
|
| ] interface WebSocket : EventTarget {
|
| [MeasureAs=WebSocketURL] readonly attribute DOMString URL; // Lowercased .url is the one in the spec, but leaving .URL for compatibility reasons.
|
| readonly attribute DOMString url;
|
| @@ -47,24 +55,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);
|
| };
|
|
|