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'; |
(...skipping 984 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
995 | 995 |
996 class _ConcatTextVisitor extends TreeVisitor { | 996 class _ConcatTextVisitor extends TreeVisitor { |
997 final _str = new StringBuffer(); | 997 final _str = new StringBuffer(); |
998 | 998 |
999 String toString() => _str.toString(); | 999 String toString() => _str.toString(); |
1000 | 1000 |
1001 visitText(Text node) { | 1001 visitText(Text node) { |
1002 _str.write(node.data); | 1002 _str.write(node.data); |
1003 } | 1003 } |
1004 } | 1004 } |
OLD | NEW |