OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 /** | 5 /** |
6 * A script to assist in documenting the difference between the dart:html API | 6 * A script to assist in documenting the difference between the dart:html API |
7 * and the old DOM API. | 7 * and the old DOM API. |
8 */ | 8 */ |
9 library html_diff; | 9 library html_diff; |
10 | 10 |
| 11 import 'dart:async'; |
11 import 'dart:io'; | 12 import 'dart:io'; |
12 import 'dart:async'; | 13 |
13 import '../../sdk/lib/html/html_common/metadata.dart'; | |
14 import 'lib/metadata.dart'; | 14 import 'lib/metadata.dart'; |
15 | 15 |
16 // TODO(rnystrom): Use "package:" URL (#4968). | 16 // TODO(rnystrom): Use "package:" URL (#4968). |
17 import '../../sdk/lib/_internal/dartdoc/lib/dartdoc.dart'; | 17 import '../../sdk/lib/_internal/compiler/implementation/mirrors/dart2js_mirror.d
art'; |
18 import '../../sdk/lib/_internal/compiler/implementation/mirrors/mirrors.dart'; | 18 import '../../sdk/lib/_internal/compiler/implementation/mirrors/mirrors.dart'; |
19 import '../../sdk/lib/_internal/compiler/implementation/mirrors/mirrors_util.dar
t'; | 19 import '../../sdk/lib/_internal/compiler/implementation/mirrors/mirrors_util.dar
t'; |
20 import '../../sdk/lib/_internal/compiler/implementation/mirrors/dart2js_mirror.d
art'; | 20 import '../../sdk/lib/_internal/dartdoc/lib/dartdoc.dart'; |
| 21 import '../../sdk/lib/html/html_common/metadata.dart'; |
21 | 22 |
22 // TODO(amouravski): There is currently magic that looks at dart:* libraries | 23 // TODO(amouravski): There is currently magic that looks at dart:* libraries |
23 // rather than the declared library names. This changed due to recent syntax | 24 // rather than the declared library names. This changed due to recent syntax |
24 // changes. We should only need to look at the library 'html'. | 25 // changes. We should only need to look at the library 'html'. |
25 const List<String> HTML_LIBRARY_NAMES = const [ | 26 const List<String> HTML_LIBRARY_NAMES = const [ |
26 'dart:html', | 27 'dart:html', |
| 28 'dart:indexed_db', |
27 'dart:svg', | 29 'dart:svg', |
28 'dart:web_audio']; | 30 'dart:web_audio']; |
29 const List<String> HTML_DECLARED_NAMES = const [ | 31 const List<String> HTML_DECLARED_NAMES = const [ |
30 'dart.dom.html', | 32 'dart.dom.html', |
| 33 'dart.dom.indexed_db', |
31 'dart.dom.svg', | 34 'dart.dom.svg', |
32 'dart.dom.web_audio']; | 35 'dart.dom.web_audio']; |
33 | 36 |
34 /** | 37 /** |
35 * A class for computing a many-to-many mapping between the types and | 38 * A class for computing a many-to-many mapping between the types and |
36 * members in `dart:html` and the MDN DOM types. This mapping is | 39 * members in `dart:html` and the MDN DOM types. This mapping is |
37 * based on two indicators: | 40 * based on two indicators: |
38 * | 41 * |
39 * 1. Auto-detected wrappers. Most `dart:html` types correspond | 42 * 1. Auto-detected wrappers. Most `dart:html` types correspond |
40 * straightforwardly to a single `@DomName` type, and | 43 * straightforwardly to a single `@DomName` type, and |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
223 return members; | 226 return members; |
224 } | 227 } |
225 | 228 |
226 if (name.split('.').length != 2) { | 229 if (name.split('.').length != 2) { |
227 warn('invalid member name ${name}'); | 230 warn('invalid member name ${name}'); |
228 return new Set(); | 231 return new Set(); |
229 } | 232 } |
230 return new Set.from([name]); | 233 return new Set.from([name]); |
231 } | 234 } |
232 } | 235 } |
OLD | NEW |