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 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 'FocusEvent.relatedTarget': [ | 185 'FocusEvent.relatedTarget': [ |
186 "@Creates('Null')", | 186 "@Creates('Null')", |
187 ], | 187 ], |
188 | 188 |
189 'Gamepad.buttons': [ | 189 'Gamepad.buttons': [ |
190 "@Creates('JSExtendableArray|GamepadButton')", | 190 "@Creates('JSExtendableArray|GamepadButton')", |
191 "@Returns('JSExtendableArray')", | 191 "@Returns('JSExtendableArray')", |
192 ], | 192 ], |
193 | 193 |
194 'HTMLCanvasElement.getContext': [ | 194 'HTMLCanvasElement.getContext': [ |
195 "@Creates('CanvasRenderingContext2D|RenderingContext')", | 195 "@Creates('CanvasRenderingContext2D|RenderingContext|RenderingContext2')", |
196 "@Returns('CanvasRenderingContext2D|RenderingContext|Null')", | 196 "@Returns('CanvasRenderingContext2D|RenderingContext|RenderingContext2|Nul
l')", |
197 ], | 197 ], |
198 | 198 |
199 'HTMLInputElement.valueAsDate': [ | 199 'HTMLInputElement.valueAsDate': [ |
200 "@Creates('Null')", # JS date object. | 200 "@Creates('Null')", # JS date object. |
201 ], | 201 ], |
202 | 202 |
203 # Rather than have the result of an IDBRequest as a union over all possible | 203 # Rather than have the result of an IDBRequest as a union over all possible |
204 # results, we mark the result as instantiating any classes, and mark | 204 # results, we mark the result as instantiating any classes, and mark |
205 # each operation with the classes that it could cause to be asynchronously | 205 # each operation with the classes that it could cause to be asynchronously |
206 # instantiated. | 206 # instantiated. |
(...skipping 719 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
926 pass | 926 pass |
927 else: | 927 else: |
928 _logger.warn('Unknown support_level - %s:%s' % (interface_id, member_id)) | 928 _logger.warn('Unknown support_level - %s:%s' % (interface_id, member_id)) |
929 | 929 |
930 return annotations | 930 return annotations |
931 | 931 |
932 def Flush(self): | 932 def Flush(self): |
933 json_file = open(self._api_status_path, 'w+') | 933 json_file = open(self._api_status_path, 'w+') |
934 json.dump(self._types, json_file, indent=2, separators=(',', ': '), sort_key
s=True) | 934 json.dump(self._types, json_file, indent=2, separators=(',', ': '), sort_key
s=True) |
935 json_file.close() | 935 json_file.close() |
OLD | NEW |