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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 '*.unload': ('unload', 'Event'), | 107 '*.unload': ('unload', 'Event'), |
108 '*.volumechange': ('volumeChange', 'Event'), | 108 '*.volumechange': ('volumeChange', 'Event'), |
109 '*.waiting': ('waiting', 'Event'), | 109 '*.waiting': ('waiting', 'Event'), |
110 '*.webkitAnimationEnd': ('animationEnd', 'AnimationEvent'), | 110 '*.webkitAnimationEnd': ('animationEnd', 'AnimationEvent'), |
111 '*.webkitAnimationIteration': ('animationIteration', 'AnimationEvent'), | 111 '*.webkitAnimationIteration': ('animationIteration', 'AnimationEvent'), |
112 '*.webkitAnimationStart': ('animationStart', 'AnimationEvent'), | 112 '*.webkitAnimationStart': ('animationStart', 'AnimationEvent'), |
113 '*.transitionend': ('transitionEnd', 'TransitionEvent'), | 113 '*.transitionend': ('transitionEnd', 'TransitionEvent'), |
114 '*.webkitfullscreenchange': ('fullscreenChange', 'Event'), | 114 '*.webkitfullscreenchange': ('fullscreenChange', 'Event'), |
115 '*.webkitfullscreenerror': ('fullscreenError', 'Event'), | 115 '*.webkitfullscreenerror': ('fullscreenError', 'Event'), |
116 '*.wheel': ('wheel', 'WheelEvent'), | 116 '*.wheel': ('wheel', 'WheelEvent'), |
117 'AbstractWorker.error': ('error', 'ErrorEvent'), | 117 'AbstractWorker.error': ('error', 'Event'), |
118 'AudioContext.complete': ('complete', 'Event'), | 118 'AudioContext.complete': ('complete', 'Event'), |
119 'ApplicationCache.cached': ('cached', 'Event'), | 119 'ApplicationCache.cached': ('cached', 'Event'), |
120 'ApplicationCache.checking': ('checking', 'Event'), | 120 'ApplicationCache.checking': ('checking', 'Event'), |
121 'ApplicationCache.downloading': ('downloading', 'Event'), | 121 'ApplicationCache.downloading': ('downloading', 'Event'), |
122 'ApplicationCache.noupdate': ('noUpdate', 'Event'), | 122 'ApplicationCache.noupdate': ('noUpdate', 'Event'), |
123 'ApplicationCache.obsolete': ('obsolete', 'Event'), | 123 'ApplicationCache.obsolete': ('obsolete', 'Event'), |
124 'ApplicationCache.progress': ('progress', 'ProgressEvent'), | 124 'ApplicationCache.progress': ('progress', 'ProgressEvent'), |
125 'ApplicationCache.updateready': ('updateReady', 'Event'), | 125 'ApplicationCache.updateready': ('updateReady', 'Event'), |
126 'CompositorWorker.error': ('error', 'ErrorEvent'), | 126 'CompositorWorker.error': ('error', 'Event'), |
127 'Document.readystatechange': ('readyStateChange', 'Event'), | 127 'Document.readystatechange': ('readyStateChange', 'Event'), |
128 'Document.securitypolicyviolation': ('securityPolicyViolation', 'SecurityPolic
yViolationEvent'), | 128 'Document.securitypolicyviolation': ('securityPolicyViolation', 'SecurityPolic
yViolationEvent'), |
129 'Document.selectionchange': ('selectionChange', 'Event'), | 129 'Document.selectionchange': ('selectionChange', 'Event'), |
130 'Document.pointerlockchange': ('pointerLockChange', 'Event'), | 130 'Document.pointerlockchange': ('pointerLockChange', 'Event'), |
131 'Document.pointerlockerror': ('pointerLockError', 'Event'), | 131 'Document.pointerlockerror': ('pointerLockError', 'Event'), |
132 'EventSource.open': ('open', 'Event'), | 132 'EventSource.open': ('open', 'Event'), |
133 'FileReader.abort': ('abort', 'ProgressEvent'), | 133 'FileReader.abort': ('abort', 'ProgressEvent'), |
134 'FileReader.load': ('load', 'ProgressEvent'), | 134 'FileReader.load': ('load', 'ProgressEvent'), |
135 'FileReader.loadend': ('loadEnd', 'ProgressEvent'), | 135 'FileReader.loadend': ('loadEnd', 'ProgressEvent'), |
136 'FileReader.loadstart': ('loadStart', 'ProgressEvent'), | 136 'FileReader.loadstart': ('loadStart', 'ProgressEvent'), |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 'RTCDataChannel.close': ('close', 'Event'), | 184 'RTCDataChannel.close': ('close', 'Event'), |
185 'RTCDataChannel.open': ('open', 'Event'), | 185 'RTCDataChannel.open': ('open', 'Event'), |
186 'RTCPeerConnection.addstream': ('addStream', 'MediaStreamEvent'), | 186 'RTCPeerConnection.addstream': ('addStream', 'MediaStreamEvent'), |
187 'RTCPeerConnection.datachannel': ('dataChannel', 'RtcDataChannelEvent'), | 187 'RTCPeerConnection.datachannel': ('dataChannel', 'RtcDataChannelEvent'), |
188 'RTCPeerConnection.icecandidate': ('iceCandidate', 'RtcIceCandidateEvent'), | 188 'RTCPeerConnection.icecandidate': ('iceCandidate', 'RtcIceCandidateEvent'), |
189 'RTCPeerConnection.iceconnectionstatechange': ('iceConnectionStateChange', 'Ev
ent'), | 189 'RTCPeerConnection.iceconnectionstatechange': ('iceConnectionStateChange', 'Ev
ent'), |
190 'RTCPeerConnection.negotiationneeded': ('negotiationNeeded', 'Event'), | 190 'RTCPeerConnection.negotiationneeded': ('negotiationNeeded', 'Event'), |
191 'RTCPeerConnection.removestream': ('removeStream', 'MediaStreamEvent'), | 191 'RTCPeerConnection.removestream': ('removeStream', 'MediaStreamEvent'), |
192 'RTCPeerConnection.signalingstatechange': ('signalingStateChange', 'Event'), | 192 'RTCPeerConnection.signalingstatechange': ('signalingStateChange', 'Event'), |
193 'ScriptProcessorNode.audioprocess': ('audioProcess', 'AudioProcessingEvent'), | 193 'ScriptProcessorNode.audioprocess': ('audioProcess', 'AudioProcessingEvent'), |
194 'SharedWorker.error': ('error', 'ErrorEvent'), | 194 'SharedWorker.error': ('error', 'Event'), |
195 'SharedWorkerGlobalScope.connect': ('connect', 'Event'), | 195 'SharedWorkerGlobalScope.connect': ('connect', 'Event'), |
196 'SpeechRecognition.audioend': ('audioEnd', 'Event'), | 196 'SpeechRecognition.audioend': ('audioEnd', 'Event'), |
197 'SpeechRecognition.audiostart': ('audioStart', 'Event'), | 197 'SpeechRecognition.audiostart': ('audioStart', 'Event'), |
198 'SpeechRecognition.end': ('end', 'Event'), | 198 'SpeechRecognition.end': ('end', 'Event'), |
199 'SpeechRecognition.error': ('error', 'SpeechRecognitionError'), | 199 'SpeechRecognition.error': ('error', 'SpeechRecognitionError'), |
200 'SpeechRecognition.nomatch': ('noMatch', 'SpeechRecognitionEvent'), | 200 'SpeechRecognition.nomatch': ('noMatch', 'SpeechRecognitionEvent'), |
201 'SpeechRecognition.result': ('result', 'SpeechRecognitionEvent'), | 201 'SpeechRecognition.result': ('result', 'SpeechRecognitionEvent'), |
202 'SpeechRecognition.soundend': ('soundEnd', 'Event'), | 202 'SpeechRecognition.soundend': ('soundEnd', 'Event'), |
203 'SpeechRecognition.soundstart': ('soundStart', 'Event'), | 203 'SpeechRecognition.soundstart': ('soundStart', 'Event'), |
204 'SpeechRecognition.speechend': ('speechEnd', 'Event'), | 204 'SpeechRecognition.speechend': ('speechEnd', 'Event'), |
(...skipping 11 matching lines...) Expand all Loading... |
216 'WebSocket.close': ('close', 'CloseEvent'), | 216 'WebSocket.close': ('close', 'CloseEvent'), |
217 'WebSocket.open': ('open', 'Event'), # should be OpenEvent, but not exposed. | 217 'WebSocket.open': ('open', 'Event'), # should be OpenEvent, but not exposed. |
218 'Window.DOMContentLoaded': ('contentLoaded', 'Event'), | 218 'Window.DOMContentLoaded': ('contentLoaded', 'Event'), |
219 'Window.devicemotion': ('deviceMotion', 'DeviceMotionEvent'), | 219 'Window.devicemotion': ('deviceMotion', 'DeviceMotionEvent'), |
220 'Window.deviceorientation': ('deviceOrientation', 'DeviceOrientationEvent'), | 220 'Window.deviceorientation': ('deviceOrientation', 'DeviceOrientationEvent'), |
221 'Window.loadstart': ('loadStart', 'Event'), | 221 'Window.loadstart': ('loadStart', 'Event'), |
222 'Window.pagehide': ('pageHide', 'Event'), | 222 'Window.pagehide': ('pageHide', 'Event'), |
223 'Window.pageshow': ('pageShow', 'Event'), | 223 'Window.pageshow': ('pageShow', 'Event'), |
224 'Window.progress': ('progress', 'Event'), | 224 'Window.progress': ('progress', 'Event'), |
225 'Window.webkittransitionend': ('webkitTransitionEnd', 'TransitionEvent'), | 225 'Window.webkittransitionend': ('webkitTransitionEnd', 'TransitionEvent'), |
226 'Worker.error': ('error', 'ErrorEvent'), | 226 'Worker.error': ('error', 'Event'), |
227 'XMLHttpRequestEventTarget.abort': ('abort', 'ProgressEvent'), | 227 'XMLHttpRequestEventTarget.abort': ('abort', 'ProgressEvent'), |
228 'XMLHttpRequestEventTarget.error': ('error', 'ProgressEvent'), | 228 'XMLHttpRequestEventTarget.error': ('error', 'ProgressEvent'), |
229 'XMLHttpRequestEventTarget.load': ('load', 'ProgressEvent'), | 229 'XMLHttpRequestEventTarget.load': ('load', 'ProgressEvent'), |
230 'XMLHttpRequestEventTarget.loadend': ('loadEnd', 'ProgressEvent'), | 230 'XMLHttpRequestEventTarget.loadend': ('loadEnd', 'ProgressEvent'), |
231 'XMLHttpRequestEventTarget.loadstart': ('loadStart', 'ProgressEvent'), | 231 'XMLHttpRequestEventTarget.loadstart': ('loadStart', 'ProgressEvent'), |
232 'XMLHttpRequestEventTarget.progress': ('progress', 'ProgressEvent'), | 232 'XMLHttpRequestEventTarget.progress': ('progress', 'ProgressEvent'), |
233 'XMLHttpRequestEventTarget.timeout': ('timeout', 'ProgressEvent'), | 233 'XMLHttpRequestEventTarget.timeout': ('timeout', 'ProgressEvent'), |
234 'XMLHttpRequest.readystatechange': ('readyStateChange', 'ProgressEvent'), | 234 'XMLHttpRequest.readystatechange': ('readyStateChange', 'ProgressEvent'), |
235 }) | 235 }) |
236 | 236 |
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
413 """ | 413 """ |
414 key = '%s.%s' % (html_interface_name, dom_event_name) | 414 key = '%s.%s' % (html_interface_name, 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 key = '*.%s' % dom_event_name | 417 key = '*.%s' % dom_event_name |
418 if key in _html_event_types: | 418 if key in _html_event_types: |
419 return _html_event_types[key] | 419 return _html_event_types[key] |
420 _logger.warn('Cannot resolve event type for %s.%s' % | 420 _logger.warn('Cannot resolve event type for %s.%s' % |
421 (html_interface_name, dom_event_name)) | 421 (html_interface_name, dom_event_name)) |
422 return None | 422 return None |
OLD | NEW |