| 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 ], | 76 ], |
| 77 | 77 |
| 78 'Window.openDatabase': [ | 78 'Window.openDatabase': [ |
| 79 "@Creates('SqlDatabase')", | 79 "@Creates('SqlDatabase')", |
| 80 ], | 80 ], |
| 81 | 81 |
| 82 'Window.showModalDialog': [ | 82 'Window.showModalDialog': [ |
| 83 "@Creates('Null')", | 83 "@Creates('Null')", |
| 84 ], | 84 ], |
| 85 | 85 |
| 86 "ErrorEvent.error": [ |
| 87 "@Creates('Null')", # Only returns values created elsewhere. |
| 88 ], |
| 89 |
| 86 # To be in callback with the browser-created Event, we had to have called | 90 # To be in callback with the browser-created Event, we had to have called |
| 87 # addEventListener on the target, so we avoid | 91 # addEventListener on the target, so we avoid |
| 88 'Event.currentTarget': [ | 92 'Event.currentTarget': [ |
| 89 "@Creates('Null')", | 93 "@Creates('Null')", |
| 90 "@Returns('EventTarget|=Object')", | 94 "@Returns('EventTarget|=Object')", |
| 91 ], | 95 ], |
| 92 | 96 |
| 93 # Only nodes in the DOM bubble and have target !== currentTarget. | 97 # Only nodes in the DOM bubble and have target !== currentTarget. |
| 94 'Event.target': [ | 98 'Event.target': [ |
| 95 "@Creates('Node')", | 99 "@Creates('Node')", |
| (...skipping 656 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 752 pass | 756 pass |
| 753 else: | 757 else: |
| 754 _logger.warn('Unknown support_level - %s:%s' % (interface_id, member_id)) | 758 _logger.warn('Unknown support_level - %s:%s' % (interface_id, member_id)) |
| 755 | 759 |
| 756 return annotations | 760 return annotations |
| 757 | 761 |
| 758 def Flush(self): | 762 def Flush(self): |
| 759 json_file = open(self._api_status_path, 'w+') | 763 json_file = open(self._api_status_path, 'w+') |
| 760 json.dump(self._types, json_file, indent=2, separators=(',', ': '), sort_key
s=True) | 764 json.dump(self._types, json_file, indent=2, separators=(',', ': '), sort_key
s=True) |
| 761 json_file.close() | 765 json_file.close() |
| OLD | NEW |