| 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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 # Only nodes in the DOM bubble and have target !== currentTarget. | 102 # Only nodes in the DOM bubble and have target !== currentTarget. |
| 103 'Event.target': [ | 103 'Event.target': [ |
| 104 "@Creates('Node')", | 104 "@Creates('Node')", |
| 105 "@Returns('EventTarget|=Object')", | 105 "@Returns('EventTarget|=Object')", |
| 106 ], | 106 ], |
| 107 | 107 |
| 108 'File.lastModifiedDate': [ | 108 'File.lastModifiedDate': [ |
| 109 "@Creates('Null')", # JS date object. | 109 "@Creates('Null')", # JS date object. |
| 110 ], | 110 ], |
| 111 | 111 |
| 112 'FileReader.result': ["@Creates('String|NativeByteBuffer|Null')"], | |
| 113 | |
| 114 'FocusEvent.relatedTarget': [ | 112 'FocusEvent.relatedTarget': [ |
| 115 "@Creates('Null')", | 113 "@Creates('Null')", |
| 116 ], | 114 ], |
| 117 | 115 |
| 118 'HTMLInputElement.valueAsDate': [ | 116 'HTMLInputElement.valueAsDate': [ |
| 119 "@Creates('Null')", # JS date object. | 117 "@Creates('Null')", # JS date object. |
| 120 ], | 118 ], |
| 121 | 119 |
| 122 # Rather than have the result of an IDBRequest as a union over all possible | 120 # Rather than have the result of an IDBRequest as a union over all possible |
| 123 # results, we mark the result as instantiating any classes, and mark | 121 # results, we mark the result as instantiating any classes, and mark |
| (...skipping 667 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 791 pass | 789 pass |
| 792 else: | 790 else: |
| 793 _logger.warn('Unknown support_level - %s:%s' % (interface_id, member_id)) | 791 _logger.warn('Unknown support_level - %s:%s' % (interface_id, member_id)) |
| 794 | 792 |
| 795 return annotations | 793 return annotations |
| 796 | 794 |
| 797 def Flush(self): | 795 def Flush(self): |
| 798 json_file = open(self._api_status_path, 'w+') | 796 json_file = open(self._api_status_path, 'w+') |
| 799 json.dump(self._types, json_file, indent=2, separators=(',', ': '), sort_key
s=True) | 797 json.dump(self._types, json_file, indent=2, separators=(',', ': '), sort_key
s=True) |
| 800 json_file.close() | 798 json_file.close() |
| OLD | NEW |