OLD | NEW |
1 /// A simple tree API that results from parsing html. Intended to be compatible | 1 /// A simple tree API that results from parsing html. Intended to be compatible |
2 /// with dart:html, but it is missing many types and APIs. | 2 /// with dart:html, but it is missing many types and APIs. |
3 library dom; | 3 library dom; |
4 | 4 |
5 // TODO(jmesserly): lots to do here. Originally I wanted to generate this using | 5 // TODO(jmesserly): lots to do here. Originally I wanted to generate this using |
6 // our Blink IDL generator, but another idea is to directly use the excellent | 6 // our Blink IDL generator, but another idea is to directly use the excellent |
7 // http://dom.spec.whatwg.org/ and http://html.spec.whatwg.org/ and just | 7 // http://dom.spec.whatwg.org/ and http://html.spec.whatwg.org/ and just |
8 // implement that. | 8 // implement that. |
9 | 9 |
10 import 'dart:collection'; | 10 import 'dart:collection'; |
11 import 'package:source_maps/span.dart' show FileSpan; | 11 import 'package:source_span/source_span.dart'; |
12 | 12 |
13 import 'src/constants.dart'; | 13 import 'src/constants.dart'; |
14 import 'src/css_class_set.dart'; | 14 import 'src/css_class_set.dart'; |
15 import 'src/list_proxy.dart'; | 15 import 'src/list_proxy.dart'; |
16 import 'src/query_selector.dart' as query; | 16 import 'src/query_selector.dart' as query; |
17 import 'src/token.dart'; | 17 import 'src/token.dart'; |
18 import 'src/tokenizer.dart'; | 18 import 'src/tokenizer.dart'; |
19 import 'dom_parsing.dart'; | 19 import 'dom_parsing.dart'; |
20 import 'parser.dart'; | 20 import 'parser.dart'; |
21 | 21 |
(...skipping 989 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1011 | 1011 |
1012 class _ConcatTextVisitor extends TreeVisitor { | 1012 class _ConcatTextVisitor extends TreeVisitor { |
1013 final _str = new StringBuffer(); | 1013 final _str = new StringBuffer(); |
1014 | 1014 |
1015 String toString() => _str.toString(); | 1015 String toString() => _str.toString(); |
1016 | 1016 |
1017 visitText(Text node) { | 1017 visitText(Text node) { |
1018 _str.write(node.data); | 1018 _str.write(node.data); |
1019 } | 1019 } |
1020 } | 1020 } |
OLD | NEW |