From 1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c Mon Sep 17 00:00:00 2001 From: Lorry Tar Creator Date: Tue, 27 Jun 2017 06:07:23 +0000 Subject: webkitgtk-2.16.5 --- Source/WebCore/Modules/websockets/WebSocket.idl | 56 ++++++++++--------------- 1 file changed, 21 insertions(+), 35 deletions(-) (limited to 'Source/WebCore/Modules/websockets/WebSocket.idl') 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 protocols), - Constructor(DOMString url, DOMString protocol), - ConstructorRaisesException, + Conditional=WEB_SOCKETS, + Constructor(USVString url, optional sequence 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); }; -- cgit v1.2.1