| 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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 '*.wheel': ('wheel', 'WheelEvent'), | 116 '*.wheel': ('wheel', 'WheelEvent'), |
| 117 'AbstractWorker.error': ('error', 'ErrorEvent'), | 117 'AbstractWorker.error': ('error', 'ErrorEvent'), |
| 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 'Document.readystatechange': ('readyStateChange', 'Event'), | 127 'Document.readystatechange': ('readyStateChange', 'Event'), |
| 127 'Document.securitypolicyviolation': ('securityPolicyViolation', 'SecurityPolic
yViolationEvent'), | 128 'Document.securitypolicyviolation': ('securityPolicyViolation', 'SecurityPolic
yViolationEvent'), |
| 128 'Document.selectionchange': ('selectionChange', 'Event'), | 129 'Document.selectionchange': ('selectionChange', 'Event'), |
| 129 'Document.pointerlockchange': ('pointerLockChange', 'Event'), | 130 'Document.pointerlockchange': ('pointerLockChange', 'Event'), |
| 130 'Document.pointerlockerror': ('pointerLockError', 'Event'), | 131 'Document.pointerlockerror': ('pointerLockError', 'Event'), |
| 131 'EventSource.open': ('open', 'Event'), | 132 'EventSource.open': ('open', 'Event'), |
| 132 'FileReader.abort': ('abort', 'ProgressEvent'), | 133 'FileReader.abort': ('abort', 'ProgressEvent'), |
| 133 'FileReader.load': ('load', 'ProgressEvent'), | 134 'FileReader.load': ('load', 'ProgressEvent'), |
| 134 'FileReader.loadend': ('loadEnd', 'ProgressEvent'), | 135 'FileReader.loadend': ('loadEnd', 'ProgressEvent'), |
| 135 'FileReader.loadstart': ('loadStart', 'ProgressEvent'), | 136 'FileReader.loadstart': ('loadStart', 'ProgressEvent'), |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 'RTCDataChannel.close': ('close', 'Event'), | 184 'RTCDataChannel.close': ('close', 'Event'), |
| 184 'RTCDataChannel.open': ('open', 'Event'), | 185 'RTCDataChannel.open': ('open', 'Event'), |
| 185 'RTCPeerConnection.addstream': ('addStream', 'MediaStreamEvent'), | 186 'RTCPeerConnection.addstream': ('addStream', 'MediaStreamEvent'), |
| 186 'RTCPeerConnection.datachannel': ('dataChannel', 'RtcDataChannelEvent'), | 187 'RTCPeerConnection.datachannel': ('dataChannel', 'RtcDataChannelEvent'), |
| 187 'RTCPeerConnection.icecandidate': ('iceCandidate', 'RtcIceCandidateEvent'), | 188 'RTCPeerConnection.icecandidate': ('iceCandidate', 'RtcIceCandidateEvent'), |
| 188 'RTCPeerConnection.iceconnectionstatechange': ('iceConnectionStateChange', 'Ev
ent'), | 189 'RTCPeerConnection.iceconnectionstatechange': ('iceConnectionStateChange', 'Ev
ent'), |
| 189 'RTCPeerConnection.negotiationneeded': ('negotiationNeeded', 'Event'), | 190 'RTCPeerConnection.negotiationneeded': ('negotiationNeeded', 'Event'), |
| 190 'RTCPeerConnection.removestream': ('removeStream', 'MediaStreamEvent'), | 191 'RTCPeerConnection.removestream': ('removeStream', 'MediaStreamEvent'), |
| 191 'RTCPeerConnection.signalingstatechange': ('signalingStateChange', 'Event'), | 192 'RTCPeerConnection.signalingstatechange': ('signalingStateChange', 'Event'), |
| 192 'ScriptProcessorNode.audioprocess': ('audioProcess', 'AudioProcessingEvent'), | 193 'ScriptProcessorNode.audioprocess': ('audioProcess', 'AudioProcessingEvent'), |
| 194 'SharedWorker.error': ('error', 'ErrorEvent'), |
| 193 'SharedWorkerGlobalScope.connect': ('connect', 'Event'), | 195 'SharedWorkerGlobalScope.connect': ('connect', 'Event'), |
| 194 'SpeechRecognition.audioend': ('audioEnd', 'Event'), | 196 'SpeechRecognition.audioend': ('audioEnd', 'Event'), |
| 195 'SpeechRecognition.audiostart': ('audioStart', 'Event'), | 197 'SpeechRecognition.audiostart': ('audioStart', 'Event'), |
| 196 'SpeechRecognition.end': ('end', 'Event'), | 198 'SpeechRecognition.end': ('end', 'Event'), |
| 197 'SpeechRecognition.error': ('error', 'SpeechRecognitionError'), | 199 'SpeechRecognition.error': ('error', 'SpeechRecognitionError'), |
| 198 'SpeechRecognition.nomatch': ('noMatch', 'SpeechRecognitionEvent'), | 200 'SpeechRecognition.nomatch': ('noMatch', 'SpeechRecognitionEvent'), |
| 199 'SpeechRecognition.result': ('result', 'SpeechRecognitionEvent'), | 201 'SpeechRecognition.result': ('result', 'SpeechRecognitionEvent'), |
| 200 'SpeechRecognition.soundend': ('soundEnd', 'Event'), | 202 'SpeechRecognition.soundend': ('soundEnd', 'Event'), |
| 201 'SpeechRecognition.soundstart': ('soundStart', 'Event'), | 203 'SpeechRecognition.soundstart': ('soundStart', 'Event'), |
| 202 'SpeechRecognition.speechend': ('speechEnd', 'Event'), | 204 'SpeechRecognition.speechend': ('speechEnd', 'Event'), |
| (...skipping 11 matching lines...) Expand all Loading... |
| 214 'WebSocket.close': ('close', 'CloseEvent'), | 216 'WebSocket.close': ('close', 'CloseEvent'), |
| 215 'WebSocket.open': ('open', 'Event'), # should be OpenEvent, but not exposed. | 217 'WebSocket.open': ('open', 'Event'), # should be OpenEvent, but not exposed. |
| 216 'Window.DOMContentLoaded': ('contentLoaded', 'Event'), | 218 'Window.DOMContentLoaded': ('contentLoaded', 'Event'), |
| 217 'Window.devicemotion': ('deviceMotion', 'DeviceMotionEvent'), | 219 'Window.devicemotion': ('deviceMotion', 'DeviceMotionEvent'), |
| 218 'Window.deviceorientation': ('deviceOrientation', 'DeviceOrientationEvent'), | 220 'Window.deviceorientation': ('deviceOrientation', 'DeviceOrientationEvent'), |
| 219 'Window.loadstart': ('loadStart', 'Event'), | 221 'Window.loadstart': ('loadStart', 'Event'), |
| 220 'Window.pagehide': ('pageHide', 'Event'), | 222 'Window.pagehide': ('pageHide', 'Event'), |
| 221 'Window.pageshow': ('pageShow', 'Event'), | 223 'Window.pageshow': ('pageShow', 'Event'), |
| 222 'Window.progress': ('progress', 'Event'), | 224 'Window.progress': ('progress', 'Event'), |
| 223 'Window.webkittransitionend': ('webkitTransitionEnd', 'TransitionEvent'), | 225 'Window.webkittransitionend': ('webkitTransitionEnd', 'TransitionEvent'), |
| 226 'Worker.error': ('error', 'ErrorEvent'), |
| 224 'XMLHttpRequestEventTarget.abort': ('abort', 'ProgressEvent'), | 227 'XMLHttpRequestEventTarget.abort': ('abort', 'ProgressEvent'), |
| 225 'XMLHttpRequestEventTarget.error': ('error', 'ProgressEvent'), | 228 'XMLHttpRequestEventTarget.error': ('error', 'ProgressEvent'), |
| 226 'XMLHttpRequestEventTarget.load': ('load', 'ProgressEvent'), | 229 'XMLHttpRequestEventTarget.load': ('load', 'ProgressEvent'), |
| 227 'XMLHttpRequestEventTarget.loadend': ('loadEnd', 'ProgressEvent'), | 230 'XMLHttpRequestEventTarget.loadend': ('loadEnd', 'ProgressEvent'), |
| 228 'XMLHttpRequestEventTarget.loadstart': ('loadStart', 'ProgressEvent'), | 231 'XMLHttpRequestEventTarget.loadstart': ('loadStart', 'ProgressEvent'), |
| 229 'XMLHttpRequestEventTarget.progress': ('progress', 'ProgressEvent'), | 232 'XMLHttpRequestEventTarget.progress': ('progress', 'ProgressEvent'), |
| 230 'XMLHttpRequestEventTarget.timeout': ('timeout', 'ProgressEvent'), | 233 'XMLHttpRequestEventTarget.timeout': ('timeout', 'ProgressEvent'), |
| 231 'XMLHttpRequest.readystatechange': ('readyStateChange', 'ProgressEvent'), | 234 'XMLHttpRequest.readystatechange': ('readyStateChange', 'ProgressEvent'), |
| 232 }) | 235 }) |
| 233 | 236 |
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 410 """ | 413 """ |
| 411 key = '%s.%s' % (html_interface_name, dom_event_name) | 414 key = '%s.%s' % (html_interface_name, dom_event_name) |
| 412 if key in _html_event_types: | 415 if key in _html_event_types: |
| 413 return _html_event_types[key] | 416 return _html_event_types[key] |
| 414 key = '*.%s' % dom_event_name | 417 key = '*.%s' % dom_event_name |
| 415 if key in _html_event_types: | 418 if key in _html_event_types: |
| 416 return _html_event_types[key] | 419 return _html_event_types[key] |
| 417 _logger.warn('Cannot resolve event type for %s.%s' % | 420 _logger.warn('Cannot resolve event type for %s.%s' % |
| 418 (html_interface_name, dom_event_name)) | 421 (html_interface_name, dom_event_name)) |
| 419 return None | 422 return None |
| OLD | NEW |