| 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 19753 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 19764 Iterable<String> get values { | 19764 Iterable<String> get values { |
| 19765 final values = []; | 19765 final values = []; |
| 19766 forEach((k, v) => values.add(v)); | 19766 forEach((k, v) => values.add(v)); |
| 19767 return values; | 19767 return values; |
| 19768 } | 19768 } |
| 19769 | 19769 |
| 19770 int get length => $dom_length; | 19770 int get length => $dom_length; |
| 19771 | 19771 |
| 19772 bool get isEmpty => $dom_key(0) == null; | 19772 bool get isEmpty => $dom_key(0) == null; |
| 19773 | 19773 |
| 19774 bool get isNotEmpty => !isEmpty; |
| 19775 |
| 19774 @JSName('length') | 19776 @JSName('length') |
| 19775 @DomName('Storage.length') | 19777 @DomName('Storage.length') |
| 19776 @DocsEditable | 19778 @DocsEditable |
| 19777 final int $dom_length; | 19779 final int $dom_length; |
| 19778 | 19780 |
| 19779 @JSName('clear') | 19781 @JSName('clear') |
| 19780 @DomName('Storage.clear') | 19782 @DomName('Storage.clear') |
| 19781 @DocsEditable | 19783 @DocsEditable |
| 19782 void $dom_clear() native; | 19784 void $dom_clear() native; |
| 19783 | 19785 |
| (...skipping 5078 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 24862 } | 24864 } |
| 24863 | 24865 |
| 24864 /** | 24866 /** |
| 24865 * Returns true if there is no {key, value} pair in the map. | 24867 * Returns true if there is no {key, value} pair in the map. |
| 24866 */ | 24868 */ |
| 24867 bool get isEmpty { | 24869 bool get isEmpty { |
| 24868 return length == 0; | 24870 return length == 0; |
| 24869 } | 24871 } |
| 24870 | 24872 |
| 24871 /** | 24873 /** |
| 24874 * Returns true if there is at least one {key, value} pair in the map. |
| 24875 */ |
| 24876 bool get isNotEmpty => !isEmpty; |
| 24877 |
| 24878 /** |
| 24872 * Checks to see if the node should be included in this map. | 24879 * Checks to see if the node should be included in this map. |
| 24873 */ | 24880 */ |
| 24874 bool _matches(Node node); | 24881 bool _matches(Node node); |
| 24875 } | 24882 } |
| 24876 | 24883 |
| 24877 /** | 24884 /** |
| 24878 * Wrapper to expose [Element.attributes] as a typed map. | 24885 * Wrapper to expose [Element.attributes] as a typed map. |
| 24879 */ | 24886 */ |
| 24880 class _ElementAttributeMap extends _AttributeMap { | 24887 class _ElementAttributeMap extends _AttributeMap { |
| 24881 | 24888 |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 25008 } | 25015 } |
| 25009 }); | 25016 }); |
| 25010 return values; | 25017 return values; |
| 25011 } | 25018 } |
| 25012 | 25019 |
| 25013 int get length => keys.length; | 25020 int get length => keys.length; |
| 25014 | 25021 |
| 25015 // TODO: Use lazy iterator when it is available on Map. | 25022 // TODO: Use lazy iterator when it is available on Map. |
| 25016 bool get isEmpty => length == 0; | 25023 bool get isEmpty => length == 0; |
| 25017 | 25024 |
| 25025 bool get isNotEmpty => !isEmpty; |
| 25026 |
| 25018 // Helpers. | 25027 // Helpers. |
| 25019 String _attr(String key) => 'data-$key'; | 25028 String _attr(String key) => 'data-$key'; |
| 25020 bool _matches(String key) => key.startsWith('data-'); | 25029 bool _matches(String key) => key.startsWith('data-'); |
| 25021 String _strip(String key) => key.substring(5); | 25030 String _strip(String key) => key.substring(5); |
| 25022 } | 25031 } |
| 25023 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 25032 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 25024 // for details. All rights reserved. Use of this source code is governed by a | 25033 // for details. All rights reserved. Use of this source code is governed by a |
| 25025 // BSD-style license that can be found in the LICENSE file. | 25034 // BSD-style license that can be found in the LICENSE file. |
| 25026 | 25035 |
| 25027 | 25036 |
| (...skipping 4245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 29273 _position = nextPosition; | 29282 _position = nextPosition; |
| 29274 return true; | 29283 return true; |
| 29275 } | 29284 } |
| 29276 _current = null; | 29285 _current = null; |
| 29277 _position = _array.length; | 29286 _position = _array.length; |
| 29278 return false; | 29287 return false; |
| 29279 } | 29288 } |
| 29280 | 29289 |
| 29281 T get current => _current; | 29290 T get current => _current; |
| 29282 } | 29291 } |
| OLD | NEW |