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 functionality to generate dart:html event classes.""" | 6 """This module provides functionality to generate dart:html event classes.""" |
7 | 7 |
8 import logging | 8 import logging |
9 import monitored | 9 import monitored |
10 | 10 |
(...skipping 25 matching lines...) Expand all Loading... |
36 '*.beforecopy': ('beforeCopy', 'Event'), | 36 '*.beforecopy': ('beforeCopy', 'Event'), |
37 '*.beforecut': ('beforeCut', 'Event'), | 37 '*.beforecut': ('beforeCut', 'Event'), |
38 '*.beforepaste': ('beforePaste', 'Event'), | 38 '*.beforepaste': ('beforePaste', 'Event'), |
39 '*.beforeunload': ('beforeUnload', 'Event'), | 39 '*.beforeunload': ('beforeUnload', 'Event'), |
40 '*.blur': ('blur', 'Event'), | 40 '*.blur': ('blur', 'Event'), |
41 '*.canplay': ('canPlay', 'Event'), | 41 '*.canplay': ('canPlay', 'Event'), |
42 '*.canplaythrough': ('canPlayThrough', 'Event'), | 42 '*.canplaythrough': ('canPlayThrough', 'Event'), |
43 '*.change': ('change', 'Event'), | 43 '*.change': ('change', 'Event'), |
44 '*.click': ('click', 'MouseEvent'), | 44 '*.click': ('click', 'MouseEvent'), |
45 '*.contextmenu': ('contextMenu', 'MouseEvent'), | 45 '*.contextmenu': ('contextMenu', 'MouseEvent'), |
46 '*.copy': ('copy', 'Event'), | 46 '*.copy': ('copy', 'ClipboardEvent'), |
47 '*.cut': ('cut', 'Event'), | 47 '*.cut': ('cut', 'ClipboardEvent'), |
48 '*.dblclick': ('doubleClick', 'Event'), | 48 '*.dblclick': ('doubleClick', 'Event'), |
49 '*.drag': ('drag', 'MouseEvent'), | 49 '*.drag': ('drag', 'MouseEvent'), |
50 '*.dragend': ('dragEnd', 'MouseEvent'), | 50 '*.dragend': ('dragEnd', 'MouseEvent'), |
51 '*.dragenter': ('dragEnter', 'MouseEvent'), | 51 '*.dragenter': ('dragEnter', 'MouseEvent'), |
52 '*.dragleave': ('dragLeave', 'MouseEvent'), | 52 '*.dragleave': ('dragLeave', 'MouseEvent'), |
53 '*.dragover': ('dragOver', 'MouseEvent'), | 53 '*.dragover': ('dragOver', 'MouseEvent'), |
54 '*.dragstart': ('dragStart', 'MouseEvent'), | 54 '*.dragstart': ('dragStart', 'MouseEvent'), |
55 '*.drop': ('drop', 'MouseEvent'), | 55 '*.drop': ('drop', 'MouseEvent'), |
56 '*.durationchange': ('durationChange', 'Event'), | 56 '*.durationchange': ('durationChange', 'Event'), |
57 '*.emptied': ('emptied', 'Event'), | 57 '*.emptied': ('emptied', 'Event'), |
(...skipping 14 matching lines...) Expand all Loading... |
72 '*.mousedown': ('mouseDown', 'MouseEvent'), | 72 '*.mousedown': ('mouseDown', 'MouseEvent'), |
73 '*.mouseenter': ('mouseEnter', 'MouseEvent'), | 73 '*.mouseenter': ('mouseEnter', 'MouseEvent'), |
74 '*.mouseleave': ('mouseLeave', 'MouseEvent'), | 74 '*.mouseleave': ('mouseLeave', 'MouseEvent'), |
75 '*.mousemove': ('mouseMove', 'MouseEvent'), | 75 '*.mousemove': ('mouseMove', 'MouseEvent'), |
76 '*.mouseout': ('mouseOut', 'MouseEvent'), | 76 '*.mouseout': ('mouseOut', 'MouseEvent'), |
77 '*.mouseover': ('mouseOver', 'MouseEvent'), | 77 '*.mouseover': ('mouseOver', 'MouseEvent'), |
78 '*.mouseup': ('mouseUp', 'MouseEvent'), | 78 '*.mouseup': ('mouseUp', 'MouseEvent'), |
79 '*.mousewheel': ('mouseWheel', 'WheelEvent'), | 79 '*.mousewheel': ('mouseWheel', 'WheelEvent'), |
80 '*.offline': ('offline', 'Event'), | 80 '*.offline': ('offline', 'Event'), |
81 '*.online': ('online', 'Event'), | 81 '*.online': ('online', 'Event'), |
82 '*.paste': ('paste', 'Event'), | 82 '*.paste': ('paste', 'ClipboardEvent'), |
83 '*.pause': ('pause', 'Event'), | 83 '*.pause': ('pause', 'Event'), |
84 '*.play': ('play', 'Event'), | 84 '*.play': ('play', 'Event'), |
85 '*.playing': ('playing', 'Event'), | 85 '*.playing': ('playing', 'Event'), |
86 '*.popstate': ('popState', 'PopStateEvent'), | 86 '*.popstate': ('popState', 'PopStateEvent'), |
87 '*.ratechange': ('rateChange', 'Event'), | 87 '*.ratechange': ('rateChange', 'Event'), |
88 '*.reset': ('reset', 'Event'), | 88 '*.reset': ('reset', 'Event'), |
89 '*.resize': ('resize', 'Event'), | 89 '*.resize': ('resize', 'Event'), |
90 '*.scroll': ('scroll', 'Event'), | 90 '*.scroll': ('scroll', 'Event'), |
91 '*.search': ('search', 'Event'), | 91 '*.search': ('search', 'Event'), |
92 '*.seeked': ('seeked', 'Event'), | 92 '*.seeked': ('seeked', 'Event'), |
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
410 """ | 410 """ |
411 key = '%s.%s' % (html_interface_name, dom_event_name) | 411 key = '%s.%s' % (html_interface_name, dom_event_name) |
412 if key in _html_event_types: | 412 if key in _html_event_types: |
413 return _html_event_types[key] | 413 return _html_event_types[key] |
414 key = '*.%s' % dom_event_name | 414 key = '*.%s' % dom_event_name |
415 if key in _html_event_types: | 415 if key in _html_event_types: |
416 return _html_event_types[key] | 416 return _html_event_types[key] |
417 _logger.warn('Cannot resolve event type for %s.%s' % | 417 _logger.warn('Cannot resolve event type for %s.%s' % |
418 (html_interface_name, dom_event_name)) | 418 (html_interface_name, dom_event_name)) |
419 return None | 419 return None |
OLD | NEW |