EventListener 方法 handleEvent() method is called by the 用户代理 when an event is sent to the EventListener , in order to handle events that occur on an observed EventTarget .

句法

eventListener.handleEvent(event);
					

参数

event
事件 object describing the event that has been fired and needs to be processed.

返回值

undefined . If you return a value, the browser will ignore it.

规范

规范 状态 注释
DOM
The definition of 'EventListener.handleEvent()' in that specification.
实时标准 无变化。
DOM (文档对象模型) 2 级事件规范
The definition of 'EventListener.handleEvent()' in that specification.
过时 初始定义。

浏览器兼容性

The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. 更新 GitHub 上的兼容性数据
桌面 移动
Chrome Edge Firefox Internet Explorer Opera Safari Android webview Chrome for Android Firefox for Android Opera for Android Safari on iOS Samsung Internet
handleEvent Chrome 1 Edge 12 Firefox 1 IE 9 Opera 7 Safari 1 WebView Android 1 Chrome Android 18 Firefox Android 4 Opera Android 10.1 Safari iOS 1 Samsung Internet Android 1.0

图例

完整支持

完整支持

元数据

  • 最后修改: