EventTarget 和 Event API


\EventTarget and Event API

版本历史
版本变更
v16.0.0

更改了 EventTarget 的错误处理。

v15.4.0

不再是实验的。

v15.0.0

EventTargetEvent 类现在可用作全局变量。

v14.5.0

新增于: v14.5.0

EventTargetEvent 对象是 EventTarget 网络应用接口 的特定于 Node.js 的实现,由一些 Node.js 核心 API 公开。

\The EventTarget and Event objects are a Node.js-specific implementation of the EventTarget Web API that are exposed by some Node.js core APIs.

const target = new EventTarget();
target.addEventListener('foo', (event) => {
 console.log('foo event happened!');
}); 

AltStyle によって変換されたページ (->オリジナル) /