OLD | NEW |
1 | 1 |
2 class WebSocketJS implements WebSocket native "*WebSocket" { | 2 class WebSocketJs extends DOMTypeJs implements WebSocket native "*WebSocket" { |
3 WebSocket(String url) native; | 3 WebSocket(String url) native; |
4 | 4 |
5 | 5 |
6 static final int CLOSED = 3; | 6 static final int CLOSED = 3; |
7 | 7 |
8 static final int CLOSING = 2; | 8 static final int CLOSING = 2; |
9 | 9 |
10 static final int CONNECTING = 0; | 10 static final int CONNECTING = 0; |
11 | 11 |
12 static final int OPEN = 1; | 12 static final int OPEN = 1; |
13 | 13 |
14 String get URL() native "return this.URL;"; | 14 String get URL() native "return this.URL;"; |
15 | 15 |
16 String get binaryType() native "return this.binaryType;"; | 16 String get binaryType() native "return this.binaryType;"; |
17 | 17 |
18 void set binaryType(String value) native "this.binaryType = value;"; | 18 void set binaryType(String value) native "this.binaryType = value;"; |
19 | 19 |
20 int get bufferedAmount() native "return this.bufferedAmount;"; | 20 int get bufferedAmount() native "return this.bufferedAmount;"; |
21 | 21 |
22 String get extensions() native "return this.extensions;"; | 22 String get extensions() native "return this.extensions;"; |
23 | 23 |
24 String get protocol() native "return this.protocol;"; | 24 String get protocol() native "return this.protocol;"; |
25 | 25 |
26 int get readyState() native "return this.readyState;"; | 26 int get readyState() native "return this.readyState;"; |
27 | 27 |
28 void addEventListener(String type, EventListener listener, [bool useCapture =
null]) native; | 28 void addEventListener(String type, EventListener listener, [bool useCapture =
null]) native; |
29 | 29 |
30 void close([int code = null, String reason = null]) native; | 30 void close([int code = null, String reason = null]) native; |
31 | 31 |
32 bool dispatchEvent(EventJS evt) native; | 32 bool dispatchEvent(EventJs evt) native; |
33 | 33 |
34 void removeEventListener(String type, EventListener listener, [bool useCapture
= null]) native; | 34 void removeEventListener(String type, EventListener listener, [bool useCapture
= null]) native; |
35 | 35 |
36 bool send(String data) native; | 36 bool send(String data) native; |
37 | |
38 var dartObjectLocalStorage; | |
39 | |
40 String get typeName() native; | |
41 } | 37 } |
OLD | NEW |