summaryrefslogtreecommitdiffstats
path: root/chromium/third_party/WebKit/Source/modules/websockets/WebSocket.idl
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/third_party/WebKit/Source/modules/websockets/WebSocket.idl')
-rw-r--r--chromium/third_party/WebKit/Source/modules/websockets/WebSocket.idl37
1 files changed, 21 insertions, 16 deletions
diff --git a/chromium/third_party/WebKit/Source/modules/websockets/WebSocket.idl b/chromium/third_party/WebKit/Source/modules/websockets/WebSocket.idl
index b5a4ca9494b..eeb8cbdb103 100644
--- a/chromium/third_party/WebKit/Source/modules/websockets/WebSocket.idl
+++ b/chromium/third_party/WebKit/Source/modules/websockets/WebSocket.idl
@@ -29,16 +29,24 @@
* 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 {
- readonly attribute DOMString URL; // Lowercased .url is the one in the spec, but leaving .URL for compatibility reasons.
+ [MeasureAs=WebSocketURL] readonly attribute DOMString URL; // Lowercased .url is the one in the spec, but leaving .URL for compatibility reasons.
readonly attribute DOMString url;
// ready state
@@ -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);
};