| 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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 'Element.getElementsByTagName': [ | 101 'Element.getElementsByTagName': [ |
| 102 "@Creates('NodeList|HtmlCollection')", | 102 "@Creates('NodeList|HtmlCollection')", |
| 103 "@Returns('NodeList|HtmlCollection')", | 103 "@Returns('NodeList|HtmlCollection')", |
| 104 ], | 104 ], |
| 105 | 105 |
| 106 'Element.getElementsByClassName': [ | 106 'Element.getElementsByClassName': [ |
| 107 "@Creates('NodeList|HtmlCollection')", | 107 "@Creates('NodeList|HtmlCollection')", |
| 108 "@Returns('NodeList|HtmlCollection')", | 108 "@Returns('NodeList|HtmlCollection')", |
| 109 ], | 109 ], |
| 110 | 110 |
| 111 'Element.style': [ # Element.style is never null. |
| 112 "@Returns('CssStyleDeclaration')", |
| 113 ], |
| 114 |
| 111 "ErrorEvent.error": [ | 115 "ErrorEvent.error": [ |
| 112 "@Creates('Null')", # Only returns values created elsewhere. | 116 "@Creates('Null')", # Only returns values created elsewhere. |
| 113 ], | 117 ], |
| 114 | 118 |
| 115 # To be in callback with the browser-created Event, we had to have called | 119 # To be in callback with the browser-created Event, we had to have called |
| 116 # addEventListener on the target, so we avoid | 120 # addEventListener on the target, so we avoid |
| 117 'Event.currentTarget': [ | 121 'Event.currentTarget': [ |
| 118 "@Creates('Null')", | 122 "@Creates('Null')", |
| 119 "@Returns('EventTarget|=Object')", | 123 "@Returns('EventTarget|=Object')", |
| 120 ], | 124 ], |
| (...skipping 714 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 835 pass | 839 pass |
| 836 else: | 840 else: |
| 837 _logger.warn('Unknown support_level - %s:%s' % (interface_id, member_id)) | 841 _logger.warn('Unknown support_level - %s:%s' % (interface_id, member_id)) |
| 838 | 842 |
| 839 return annotations | 843 return annotations |
| 840 | 844 |
| 841 def Flush(self): | 845 def Flush(self): |
| 842 json_file = open(self._api_status_path, 'w+') | 846 json_file = open(self._api_status_path, 'w+') |
| 843 json.dump(self._types, json_file, indent=2, separators=(',', ': '), sort_key
s=True) | 847 json.dump(self._types, json_file, indent=2, separators=(',', ': '), sort_key
s=True) |
| 844 json_file.close() | 848 json_file.close() |
| OLD | NEW |