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

Unified Diff: sdk/lib/html/doc/interface/WebSocket.dartdoc

Issue 11691009: Moved most of html lib generating scripts into tools. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sdk/lib/html/doc/interface/UIEvent.dartdoc ('k') | sdk/lib/html/docs/html_docs.json » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/html/doc/interface/WebSocket.dartdoc
diff --git a/sdk/lib/html/doc/interface/WebSocket.dartdoc b/sdk/lib/html/doc/interface/WebSocket.dartdoc
deleted file mode 100644
index 19385524f0971aa32730d7bfe5dc25e490fc7bad..0000000000000000000000000000000000000000
--- a/sdk/lib/html/doc/interface/WebSocket.dartdoc
+++ /dev/null
@@ -1,103 +0,0 @@
-// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-/// @domName WebSocket
-/**
- * Use the WebSocket interface to connect to a WebSocket,
- * and to send and receive data on that WebSocket.
- *
- * To use a WebSocket in your web app, first create a WebSocket object,
- * passing the WebSocket URL as an argument to the constructor.
- *
- * var webSocket = new WebSocket('ws://127.0.0.1:1337/ws');
- *
- * To send data on the WebSocket, use the [send] method.
- *
- * if (webSocket != null && webSocket.readyState == WebSocket.OPEN) {
- * webSocket.send(data);
- * } else {
- * print('WebSocket not connected, message $data not sent');
- * }
- *
- * To receive data on the WebSocket, register a listener for message events.
- *
- * webSocket.on.message.add((MessageEvent e) {
- * receivedData(e.data);
- * });
- *
- * The message event handler receives a [MessageEvent] object
- * as its sole argument.
- * You can also define open, close, and error handlers,
- * as specified by [WebSocketEvents].
- *
- * For more information, see the
- * [WebSockets](http://www.dartlang.org/docs/library-tour/#html-websockets)
- * section of the library tour and
- * [Introducing WebSockets](http://www.html5rocks.com/en/tutorials/websockets/basics/),
- * an HTML5Rocks.com tutorial.
- */
-abstract class WebSocket implements EventTarget {
-
- factory WebSocket(String url) => _WebSocketFactoryProvider.createWebSocket(url);
-
- /**
- * @domName EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent
- */
- WebSocketEvents get on;
-
- static const int CLOSED = 3;
-
- static const int CLOSING = 2;
-
- static const int CONNECTING = 0;
-
- static const int OPEN = 1;
-
- /** @domName WebSocket.URL */
- abstract String get URL;
-
- /** @domName WebSocket.binaryType */
- String binaryType;
-
- /** @domName WebSocket.bufferedAmount */
- abstract int get bufferedAmount;
-
- /** @domName WebSocket.extensions */
- abstract String get extensions;
-
- /** @domName WebSocket.protocol */
- abstract String get protocol;
-
- /** @domName WebSocket.readyState */
- abstract int get readyState;
-
- /** @domName WebSocket.url */
- abstract String get url;
-
- /** @domName WebSocket.addEventListener */
- void $dom_addEventListener(String type, EventListener listener, [bool useCapture]);
-
- /** @domName WebSocket.close */
- void close([int code, String reason]);
-
- /** @domName WebSocket.dispatchEvent */
- bool $dom_dispatchEvent(Event evt);
-
- /** @domName WebSocket.removeEventListener */
- void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]);
-
- /** @domName WebSocket.send */
- void send(data);
-}
-
-abstract class WebSocketEvents implements Events {
-
- EventListenerList get close;
-
- EventListenerList get error;
-
- EventListenerList get message;
-
- EventListenerList get open;
-}
« no previous file with comments | « sdk/lib/html/doc/interface/UIEvent.dartdoc ('k') | sdk/lib/html/docs/html_docs.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698