EventTarget类
所有支持事件的对象的基类。
使用on属性来添加和删除事件,以实现编译时类型检查和更简洁的API。
- 实现者
- AbstractWorker
- AccessibleNode
- Animation
- ApplicationCache
- AudioNode
- AudioTrackList
- BackgroundFetchRegistration
- BaseAudioContext
- BatteryManager
- BroadcastChannel
- Database
- EventSource
- FileReader
- FileWriter
- FontFaceSet
- GlobalEventHandlers
- HttpRequestEventTarget
- MediaDevices
- MediaKeySession
- MediaQueryList
- MediaRecorder
- MediaSource
- MediaStream
- MediaStreamTrack
- MessagePort
- MidiAccess
- MidiPort
- NetworkInformation
- Node
- Notification
- OffscreenCanvas
- PaymentRequest
- Performance
- PermissionStatus
- PresentationAvailability
- PresentationConnection
- PresentationConnectionList
- PresentationRequest
- RemotePlayback
- Request
- RtcDataChannel
- RtcDtmfSender
- RtcPeerConnection
- ScreenOrientation
- Sensor
- ServiceWorker
- ServiceWorkerContainer
- ServiceWorkerRegistration
- SharedWorker
- SourceBuffer
- SourceBufferList
- SpeechRecognition
- SpeechSynthesis
- SpeechSynthesisUtterance
- TextTrack
- TextTrackCue
- TextTrackList
- Transaction
- VideoTrackList
- VisualViewport
- VR
- VRDevice
- VRDisplay
- VRSession
- WebSocket
- Window
- WindowBase
- WindowEventHandlers
- Worker
- WorkerGlobalScope
- WorkerPerformance
- 注解
-
- @Native("EventTarget")
属性
方法
-
addEventListener(
String type, EventListener? listener, [bool? useCapture]) → void -
dispatchEvent(
Event event) → bool -
noSuchMethod(
Invocation invocation) → dynamic - 当访问不存在的方法或属性时被调用。继承的
-
removeEventListener(
String type, EventListener? listener, [bool? useCapture]) → void -
toString(
) → String - 本对象的字符串表示。继承的
运算符
-
operator ==(
Object other) → bool - 等于运算符。继承的