| OLD | NEW |
| 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 #library("chat.dart"); | 5 library chat; |
| 6 #import("dart:html"); | 6 import 'dart:html'; |
| 7 #import("dart:json"); | 7 import 'dart:json'; |
| 8 | 8 |
| 9 void main() { | 9 void main() { |
| 10 new Chat().start(); | 10 new Chat().start(); |
| 11 } | 11 } |
| 12 | 12 |
| 13 class Chat { | 13 class Chat { |
| 14 void start() { | 14 void start() { |
| 15 Document doc = window.document; | 15 Document doc = window.document; |
| 16 _joinButton = doc.query("#joinButton"); | 16 _joinButton = doc.query("#joinButton"); |
| 17 _leaveButton = doc.query("#leaveButton"); | 17 _leaveButton = doc.query("#leaveButton"); |
| (...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 306 Element _chatSection; | 306 Element _chatSection; |
| 307 InputElement _messageInput; | 307 InputElement _messageInput; |
| 308 Element _messages; | 308 Element _messages; |
| 309 Element _statusText; | 309 Element _statusText; |
| 310 | 310 |
| 311 String _session = null; | 311 String _session = null; |
| 312 int _nextMessage = 0; | 312 int _nextMessage = 0; |
| 313 HttpRequest _pollRequest = null; | 313 HttpRequest _pollRequest = null; |
| 314 | 314 |
| 315 } | 315 } |
| OLD | NEW |