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

Unified Diff: tools/dom/docs/docs.json

Issue 12219002: 'Moved all documentation from old .dartdoc files.' (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sdk/lib/html/dartium/html_dartium.dart ('k') | tools/dom/templates/html/dart2js/html_dart2js.darttemplate » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/dom/docs/docs.json
diff --git a/tools/dom/docs/docs.json b/tools/dom/docs/docs.json
index cbc8a7dae1bdb0849f31919bcba8cd05b7951686..dfcda5716b87bc2aa194602b8646bab339291611 100644
--- a/tools/dom/docs/docs.json
+++ b/tools/dom/docs/docs.json
@@ -250,6 +250,44 @@
" */"
]
},
+ "WebSocket": {
+ "comment": [
+ "/**",
+ " * 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.",
+ " */"
+ ]
+ },
"XMLHttpRequest": {
"members": {
"abort": [
« no previous file with comments | « sdk/lib/html/dartium/html_dartium.dart ('k') | tools/dom/templates/html/dart2js/html_dart2js.darttemplate » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698