OLD | NEW |
1 library html; | 1 library html; |
2 | 2 |
3 import 'dart:async'; | 3 import 'dart:async'; |
4 import 'dart:collection'; | 4 import 'dart:collection'; |
5 import 'dart:html_common'; | 5 import 'dart:html_common'; |
6 import 'dart:indexed_db'; | 6 import 'dart:indexed_db'; |
7 import 'dart:isolate'; | 7 import 'dart:isolate'; |
8 import 'dart:json' as json; | 8 import 'dart:json' as json; |
9 import 'dart:math'; | 9 import 'dart:math'; |
10 import 'dart:svg' as svg; | 10 import 'dart:svg' as svg; |
(...skipping 21053 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
21064 /// @domName WebKitNamedFlow.removeEventListener; @docsEditable true | 21064 /// @domName WebKitNamedFlow.removeEventListener; @docsEditable true |
21065 @JSName('removeEventListener') | 21065 @JSName('removeEventListener') |
21066 void $dom_removeEventListener(String type, EventListener listener, [bool useCa
pture]) native; | 21066 void $dom_removeEventListener(String type, EventListener listener, [bool useCa
pture]) native; |
21067 } | 21067 } |
21068 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 21068 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
21069 // for details. All rights reserved. Use of this source code is governed by a | 21069 // for details. All rights reserved. Use of this source code is governed by a |
21070 // BSD-style license that can be found in the LICENSE file. | 21070 // BSD-style license that can be found in the LICENSE file. |
21071 | 21071 |
21072 | 21072 |
21073 /// @domName WebSocket; @docsEditable true | 21073 /// @domName WebSocket; @docsEditable true |
| 21074 @SupportedBrowser(SupportedBrowser.CHROME) |
| 21075 @SupportedBrowser(SupportedBrowser.FIREFOX) |
| 21076 @SupportedBrowser(SupportedBrowser.IE, '10') |
| 21077 @SupportedBrowser(SupportedBrowser.SAFARI) |
21074 class WebSocket extends EventTarget native "*WebSocket" { | 21078 class WebSocket extends EventTarget native "*WebSocket" { |
21075 | 21079 |
21076 ///@docsEditable true | 21080 ///@docsEditable true |
21077 factory WebSocket(String url) => WebSocket._create(url); | 21081 factory WebSocket(String url) => WebSocket._create(url); |
21078 static WebSocket _create(String url) => JS('WebSocket', 'new WebSocket(#)', ur
l); | 21082 static WebSocket _create(String url) => JS('WebSocket', 'new WebSocket(#)', ur
l); |
21079 | 21083 |
| 21084 /** |
| 21085 * Checks if this type is supported on the current platform |
| 21086 */ |
| 21087 static bool get supported => JS('bool', 'typeof window.WebSocket != "undefined
"'); |
| 21088 |
21080 /// @domName EventTarget.addEventListener, EventTarget.removeEventListener, Ev
entTarget.dispatchEvent; @docsEditable true | 21089 /// @domName EventTarget.addEventListener, EventTarget.removeEventListener, Ev
entTarget.dispatchEvent; @docsEditable true |
21081 WebSocketEvents get on => | 21090 WebSocketEvents get on => |
21082 new WebSocketEvents(this); | 21091 new WebSocketEvents(this); |
21083 | 21092 |
21084 static const int CLOSED = 3; | 21093 static const int CLOSED = 3; |
21085 | 21094 |
21086 static const int CLOSING = 2; | 21095 static const int CLOSING = 2; |
21087 | 21096 |
21088 static const int CONNECTING = 0; | 21097 static const int CONNECTING = 0; |
21089 | 21098 |
(...skipping 5838 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
26928 _position = nextPosition; | 26937 _position = nextPosition; |
26929 return true; | 26938 return true; |
26930 } | 26939 } |
26931 _current = null; | 26940 _current = null; |
26932 _position = _array.length; | 26941 _position = _array.length; |
26933 return false; | 26942 return false; |
26934 } | 26943 } |
26935 | 26944 |
26936 T get current => _current; | 26945 T get current => _current; |
26937 } | 26946 } |
OLD | NEW |