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

Side by Side Diff: sdk/lib/html/dart2js/html_dart2js.dart

Issue 17792002: Fixed old docs for WebSocket. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 5 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
« no previous file with comments | « no previous file | sdk/lib/html/dartium/html_dartium.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /// The Dart HTML library. 1 /// The Dart HTML library.
2 library dart.dom.html; 2 library dart.dom.html;
3 3
4 import 'dart:async'; 4 import 'dart:async';
5 import 'dart:collection'; 5 import 'dart:collection';
6 import 'dart:_collection-dev' hide Symbol; 6 import 'dart:_collection-dev' hide Symbol;
7 import 'dart:html_common'; 7 import 'dart:html_common';
8 import 'dart:indexed_db'; 8 import 'dart:indexed_db';
9 import 'dart:isolate'; 9 import 'dart:isolate';
10 import 'dart:json' as json; 10 import 'dart:json' as json;
(...skipping 22502 matching lines...) Expand 10 before | Expand all | Expand 10 after
22513 * To send data on the WebSocket, use the [send] method. 22513 * To send data on the WebSocket, use the [send] method.
22514 * 22514 *
22515 * if (webSocket != null && webSocket.readyState == WebSocket.OPEN) { 22515 * if (webSocket != null && webSocket.readyState == WebSocket.OPEN) {
22516 * webSocket.send(data); 22516 * webSocket.send(data);
22517 * } else { 22517 * } else {
22518 * print('WebSocket not connected, message $data not sent'); 22518 * print('WebSocket not connected, message $data not sent');
22519 * } 22519 * }
22520 * 22520 *
22521 * To receive data on the WebSocket, register a listener for message events. 22521 * To receive data on the WebSocket, register a listener for message events.
22522 * 22522 *
22523 * webSocket.on.message.add((MessageEvent e) { 22523 * webSocket.onMessage.listen((MessageEvent e) {
22524 * receivedData(e.data); 22524 * receivedData(e.data);
22525 * }); 22525 * });
22526 * 22526 *
22527 * The message event handler receives a [MessageEvent] object 22527 * The message event handler receives a [MessageEvent] object
22528 * as its sole argument. 22528 * as its sole argument.
22529 * You can also define open, close, and error handlers, 22529 * You can also define open, close, and error handlers,
22530 * as specified by [WebSocketEvents]. 22530 * as specified by [WebSocketEvents].
22531 * 22531 *
22532 * For more information, see the 22532 * For more information, see the
22533 * [WebSockets](http://www.dartlang.org/docs/library-tour/#html-websockets) 22533 * [WebSockets](http://www.dartlang.org/docs/library-tour/#html-websockets)
(...skipping 7071 matching lines...) Expand 10 before | Expand all | Expand 10 after
29605 _position = nextPosition; 29605 _position = nextPosition;
29606 return true; 29606 return true;
29607 } 29607 }
29608 _current = null; 29608 _current = null;
29609 _position = _array.length; 29609 _position = _array.length;
29610 return false; 29610 return false;
29611 } 29611 }
29612 29612
29613 T get current => _current; 29613 T get current => _current;
29614 } 29614 }
OLDNEW
« no previous file with comments | « no previous file | sdk/lib/html/dartium/html_dartium.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698