| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |