diff options
author | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-06-27 06:07:23 +0000 |
---|---|---|
committer | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-06-27 06:07:23 +0000 |
commit | 1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch) | |
tree | 46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/WebCore/Modules/websockets/WebSocket.idl | |
parent | 32761a6cee1d0dee366b885b7b9c777e67885688 (diff) | |
download | WebKitGtk-tarball-master.tar.gz |
webkitgtk-2.16.5HEADwebkitgtk-2.16.5master
Diffstat (limited to 'Source/WebCore/Modules/websockets/WebSocket.idl')
-rw-r--r-- | Source/WebCore/Modules/websockets/WebSocket.idl | 56 |
1 files changed, 21 insertions, 35 deletions
diff --git a/Source/WebCore/Modules/websockets/WebSocket.idl b/Source/WebCore/Modules/websockets/WebSocket.idl index 59de969b9..d71ed2b86 100644 --- a/Source/WebCore/Modules/websockets/WebSocket.idl +++ b/Source/WebCore/Modules/websockets/WebSocket.idl @@ -30,22 +30,18 @@ */ [ - GlobalContext=DOMWindow&WorkerGlobalScope, - EnabledAtRuntime, - Conditional=WEB_SOCKETS, ActiveDOMObject, - Constructor(DOMString url), - Constructor(DOMString url, sequence<DOMString> protocols), - Constructor(DOMString url, DOMString protocol), - ConstructorRaisesException, + Conditional=WEB_SOCKETS, + Constructor(USVString url, optional sequence<DOMString> protocols = []), + Constructor(USVString url, DOMString protocol), + ConstructorMayThrowException, ConstructorCallWith=ScriptExecutionContext, - EventTarget, - JSNoStaticTables, -] interface WebSocket { - readonly attribute DOMString URL; // Lowercased .url is the one in the spec, but leaving .URL for compatibility reasons. - readonly attribute DOMString url; + EnabledAtRuntime, + Exposed=(Window,Worker), +] interface WebSocket : EventTarget { + readonly attribute USVString URL; // Lowercased .url is the one in the spec, but leaving .URL for compatibility reasons. + readonly attribute USVString url; - // ready state const unsigned short CONNECTING = 0; const unsigned short OPEN = 1; const unsigned short CLOSING = 2; @@ -54,30 +50,20 @@ readonly attribute unsigned long bufferedAmount; - // networking - attribute EventListener onopen; - attribute EventListener onmessage; - attribute EventListener onerror; - attribute EventListener onclose; - - [TreatReturnedNullStringAs=Undefined] readonly attribute DOMString protocol; - [TreatReturnedNullStringAs=Undefined] readonly attribute DOMString extensions; + attribute EventHandler onopen; + attribute EventHandler onmessage; + attribute EventHandler onerror; + attribute EventHandler onclose; - attribute DOMString binaryType; + readonly attribute DOMString? protocol; + readonly attribute DOMString? extensions; - [RaisesException] void send(ArrayBuffer data); - [RaisesException] void send(ArrayBufferView data); - [RaisesException] void send(Blob data); - [RaisesException] void send(DOMString data); + [SetterMayThrowException] attribute DOMString binaryType; - [RaisesException] void close([Clamp] optional unsigned short code, optional DOMString reason); + [MayThrowException] void send(ArrayBuffer data); + [MayThrowException] void send(ArrayBufferView data); + [MayThrowException] void send(Blob data); + [MayThrowException] void send(USVString data); - // EventTarget interface - void addEventListener(DOMString type, - EventListener listener, - optional boolean useCapture); - void removeEventListener(DOMString type, - EventListener listener, - optional boolean useCapture); - [RaisesException] boolean dispatchEvent(Event evt); + [MayThrowException] void close([Clamp] optional unsigned short code, optional DOMString reason); }; |