OLD | NEW |
1 #!/usr/bin/python | 1 #!/usr/bin/python |
2 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 2 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
3 # for details. All rights reserved. Use of this source code is governed by a | 3 # for details. All rights reserved. Use of this source code is governed by a |
4 # BSD-style license that can be found in the LICENSE file. | 4 # BSD-style license that can be found in the LICENSE file. |
5 | 5 |
6 """This module provides shared functionality to provide Dart metadata for | 6 """This module provides shared functionality to provide Dart metadata for |
7 DOM APIs. | 7 DOM APIs. |
8 """ | 8 """ |
9 | 9 |
10 import copy | 10 import copy |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 'Document.getElementsByName': [ | 85 'Document.getElementsByName': [ |
86 "@Creates('NodeList|HtmlCollection')", | 86 "@Creates('NodeList|HtmlCollection')", |
87 "@Returns('NodeList|HtmlCollection')", | 87 "@Returns('NodeList|HtmlCollection')", |
88 ], | 88 ], |
89 | 89 |
90 'Document.getElementsByTagName': [ | 90 'Document.getElementsByTagName': [ |
91 "@Creates('NodeList|HtmlCollection')", | 91 "@Creates('NodeList|HtmlCollection')", |
92 "@Returns('NodeList|HtmlCollection')", | 92 "@Returns('NodeList|HtmlCollection')", |
93 ], | 93 ], |
94 | 94 |
| 95 # querysSelectorAll never returns `null`. |
| 96 'Document.querySelectorAll': [ |
| 97 "@Creates('NodeList')", |
| 98 "@Returns('NodeList')", |
| 99 ], |
| 100 'DocumentFragment.querySelectorAll': [ |
| 101 "@Creates('NodeList')", |
| 102 "@Returns('NodeList')", |
| 103 ], |
| 104 'Element.querySelectorAll': [ |
| 105 "@Creates('NodeList')", |
| 106 "@Returns('NodeList')", |
| 107 ], |
| 108 |
95 # Methods returning Window can return a local window, or a cross-frame | 109 # Methods returning Window can return a local window, or a cross-frame |
96 # window (=Object) that needs wrapping. | 110 # window (=Object) that needs wrapping. |
97 'Window': [ | 111 'Window': [ |
98 "@Creates('Window|=Object')", | 112 "@Creates('Window|=Object')", |
99 "@Returns('Window|=Object')", | 113 "@Returns('Window|=Object')", |
100 ], | 114 ], |
101 | 115 |
102 'Window.openDatabase': [ | 116 'Window.openDatabase': [ |
103 "@Creates('SqlDatabase')", | 117 "@Creates('SqlDatabase')", |
104 ], | 118 ], |
(...skipping 787 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
892 pass | 906 pass |
893 else: | 907 else: |
894 _logger.warn('Unknown support_level - %s:%s' % (interface_id, member_id)) | 908 _logger.warn('Unknown support_level - %s:%s' % (interface_id, member_id)) |
895 | 909 |
896 return annotations | 910 return annotations |
897 | 911 |
898 def Flush(self): | 912 def Flush(self): |
899 json_file = open(self._api_status_path, 'w+') | 913 json_file = open(self._api_status_path, 'w+') |
900 json.dump(self._types, json_file, indent=2, separators=(',', ': '), sort_key
s=True) | 914 json.dump(self._types, json_file, indent=2, separators=(',', ': '), sort_key
s=True) |
901 json_file.close() | 915 json_file.close() |
OLD | NEW |