Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(631)

Side by Side Diff: lib/html/doc/interface/WebSocket.dartdoc

Issue 11090010: Remove explicit interface versions of dartdoc files. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 /// @domName WebSocket 5 /// @domName WebSocket
6 /** 6 /**
7 * Use the WebSocket interface to connect to a WebSocket, 7 * Use the WebSocket interface to connect to a WebSocket,
8 * and to send and receive data on that WebSocket. 8 * and to send and receive data on that WebSocket.
9 * 9 *
10 * To use a WebSocket in your web app, first create a WebSocket object, 10 * To use a WebSocket in your web app, first create a WebSocket object,
(...skipping 19 matching lines...) Expand all
30 * as its sole argument. 30 * as its sole argument.
31 * You can also define open, close, and error handlers, 31 * You can also define open, close, and error handlers,
32 * as specified by [WebSocketEvents]. 32 * as specified by [WebSocketEvents].
33 * 33 *
34 * For more information, see the 34 * For more information, see the
35 * [WebSockets](http://www.dartlang.org/docs/library-tour/#html-websockets) 35 * [WebSockets](http://www.dartlang.org/docs/library-tour/#html-websockets)
36 * section of the library tour and 36 * section of the library tour and
37 * [Introducing WebSockets](http://www.html5rocks.com/en/tutorials/websockets/ba sics/), 37 * [Introducing WebSockets](http://www.html5rocks.com/en/tutorials/websockets/ba sics/),
38 * an HTML5Rocks.com tutorial. 38 * an HTML5Rocks.com tutorial.
39 */ 39 */
40 interface WebSocket extends EventTarget default _WebSocketFactoryProvider { 40 abstract class WebSocket implements EventTarget {
41 41
42 WebSocket(String url); 42 factory WebSocket(String url) => _WebSocketFactoryProvider.createWebSocket(url );
43 43
44 /** 44 /**
45 * @domName EventTarget.addEventListener, EventTarget.removeEventListener, Eve ntTarget.dispatchEvent 45 * @domName EventTarget.addEventListener, EventTarget.removeEventListener, Eve ntTarget.dispatchEvent
46 */ 46 */
47 WebSocketEvents get on(); 47 WebSocketEvents get on;
48 48
49 static final int CLOSED = 3; 49 static const int CLOSED = 3;
50 50
51 static final int CLOSING = 2; 51 static const int CLOSING = 2;
52 52
53 static final int CONNECTING = 0; 53 static const int CONNECTING = 0;
54 54
55 static final int OPEN = 1; 55 static const int OPEN = 1;
56 56
57 /** @domName WebSocket.URL */ 57 /** @domName WebSocket.URL */
58 final String URL; 58 abstract String get URL;
59 59
60 /** @domName WebSocket.binaryType */ 60 /** @domName WebSocket.binaryType */
61 String binaryType; 61 String binaryType;
62 62
63 /** @domName WebSocket.bufferedAmount */ 63 /** @domName WebSocket.bufferedAmount */
64 final int bufferedAmount; 64 abstract int get bufferedAmount;
65 65
66 /** @domName WebSocket.extensions */ 66 /** @domName WebSocket.extensions */
67 final String extensions; 67 abstract String get extensions;
68 68
69 /** @domName WebSocket.protocol */ 69 /** @domName WebSocket.protocol */
70 final String protocol; 70 abstract String get protocol;
71 71
72 /** @domName WebSocket.readyState */ 72 /** @domName WebSocket.readyState */
73 final int readyState; 73 abstract int get readyState;
74 74
75 /** @domName WebSocket.url */ 75 /** @domName WebSocket.url */
76 final String url; 76 abstract String get url;
77 77
78 /** @domName WebSocket.addEventListener */ 78 /** @domName WebSocket.addEventListener */
79 void $dom_addEventListener(String type, EventListener listener, [bool useCaptu re]); 79 void $dom_addEventListener(String type, EventListener listener, [bool useCaptu re]);
80 80
81 /** @domName WebSocket.close */ 81 /** @domName WebSocket.close */
82 void close([int code, String reason]); 82 void close([int code, String reason]);
83 83
84 /** @domName WebSocket.dispatchEvent */ 84 /** @domName WebSocket.dispatchEvent */
85 bool $dom_dispatchEvent(Event evt); 85 bool $dom_dispatchEvent(Event evt);
86 86
87 /** @domName WebSocket.removeEventListener */ 87 /** @domName WebSocket.removeEventListener */
88 void $dom_removeEventListener(String type, EventListener listener, [bool useCa pture]); 88 void $dom_removeEventListener(String type, EventListener listener, [bool useCa pture]);
89 89
90 /** @domName WebSocket.send */ 90 /** @domName WebSocket.send */
91 bool send(String data); 91 void send(data);
92 } 92 }
93 93
94 interface WebSocketEvents extends Events { 94 abstract class WebSocketEvents implements Events {
95 95
96 EventListenerList get close(); 96 EventListenerList get close;
97 97
98 EventListenerList get error(); 98 EventListenerList get error;
99 99
100 EventListenerList get message(); 100 EventListenerList get message;
101 101
102 EventListenerList get open(); 102 EventListenerList get open;
103 } 103 }
OLDNEW
« no previous file with comments | « lib/html/doc/interface/WebKitNamedFlow.dartdoc ('k') | lib/html/doc/interface/WheelEvent.dartdoc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698