OLD | NEW |
1 /** | 1 /** |
2 * A simple tree API that results from parsing html. Intended to be compatible | 2 * A simple tree API that results from parsing html. Intended to be compatible |
3 * with dart:html, but right now it resembles the classic JS DOM. | 3 * with dart:html, but right now it resembles the classic JS DOM. |
4 */ | 4 */ |
5 library dom; | 5 library dom; |
6 | 6 |
7 import 'dart:collection'; | 7 import 'dart:collection'; |
8 import 'package:source_maps/span.dart' show FileSpan; | 8 import 'package:source_maps/span.dart' show FileSpan; |
9 | 9 |
10 import 'src/constants.dart'; | 10 import 'src/constants.dart'; |
11 import 'src/list_proxy.dart'; | 11 import 'src/list_proxy.dart'; |
12 import 'src/token.dart'; | 12 import 'src/token.dart'; |
13 import 'src/tokenizer.dart'; | 13 import 'src/tokenizer.dart'; |
14 import 'src/treebuilder.dart'; | |
15 import 'src/utils.dart'; | 14 import 'src/utils.dart'; |
16 import 'dom_parsing.dart'; | 15 import 'dom_parsing.dart'; |
17 import 'parser.dart'; | 16 import 'parser.dart'; |
18 | 17 |
19 // TODO(jmesserly): this needs to be replaced by an AttributeMap for attributes | 18 // TODO(jmesserly): this needs to be replaced by an AttributeMap for attributes |
20 // that exposes namespace info. | 19 // that exposes namespace info. |
21 class AttributeName implements Comparable { | 20 class AttributeName implements Comparable { |
22 /** The namespace prefix, e.g. `xlink`. */ | 21 /** The namespace prefix, e.g. `xlink`. */ |
23 final String prefix; | 22 final String prefix; |
24 | 23 |
(...skipping 839 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
864 if (start == null) start = length - 1; | 863 if (start == null) start = length - 1; |
865 return _filtered.lastIndexOf(element, start); | 864 return _filtered.lastIndexOf(element, start); |
866 } | 865 } |
867 | 866 |
868 Element get first => _filtered.first; | 867 Element get first => _filtered.first; |
869 | 868 |
870 Element get last => _filtered.last; | 869 Element get last => _filtered.last; |
871 | 870 |
872 Element get single => _filtered.single; | 871 Element get single => _filtered.single; |
873 } | 872 } |
OLD | NEW |