as

Settings
Sign out
Notifications
Alexa
亚马逊应用商店
AWS
文档
Support
Contact Us
My Cases
新手入门
设计和开发
应用发布
参考
支持
跳转到主要内容
https://dom.spec.whatwg.org/#interface-eventtarget

Methods

addEventListener()

addEventListener(type: string, listener: EventListener, options?: boolean | AddEventListenerOptions | undefined): void
Adds an event listener.

Parameters

type
string The event to listen to.
listener
EventListener The Event Handler function.
options?
boolean | AddEventListenerOptions | undefined Ignore.

removeEventListener()

removeEventListener(type: string, listener: EventListener, options?: boolean | EventListenerOptions | undefined): void
Removes an event listener.

Parameters

type
string The event to listen to.
listener
EventListener The Event Handler function to be removed.
options?
boolean | EventListenerOptions | undefined Ignore.

dispatchEvent()

dispatchEvent(event: Event): boolean
Dispatches an event to the target

Parameters

event
Event The event which signals an occurrenceo. Add and define in the implementations, keep it optional for now.

Returns

boolean
最后修改于 2026年8月25日