EventListener.handleEvent()

当事件被发送到 EventListener 时,user agent 将调用 EventListener 方法 handleEvent(),以便处理在观察到的 EventTarget 上发生的事件。

语法

eventListener.handleEvent(event);

参数

event
一个 Event 对象,描述已被触发并需要处理的事件。

返回值

undefined如果返回了值,浏览器将忽略它。

规范

规范 状态 备注
DOM
EventListener.handleEvent()
Living Standard No change.
Document Object Model (DOM) Level 2 Events Specification
EventListener.handleEvent()
Obsolete Initial definition.

浏览器兼容性

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
handleEventChrome Full support 1Edge Full support 12Firefox Full support 1IE Full support 9Opera Full support 7Safari Full support 1WebView Android Full support 1Chrome Android Full support 18Firefox Android Full support 4Opera Android Full support 10.1Safari iOS Full support 1Samsung Internet Android ?

Legend

Full support  
Full support
Compatibility unknown  
Compatibility unknown