When an event of a given type is dispatched, the event listeners for that event type are called. strings, on which event listeners can be registered for one of those event types and on which events can be dispatched. ![]() Loosely speaking, an EventTarget is a JavaScript object that is associated with a list of event types, i.e. ![]() What is an EventTarget and why do we want it? Doing so gives us insight into not only the process of bringing features into Node.js, but also how we deal with performance and compatibility problems, and what the future of Node.js might look like. One API proving to be particularly fundamental is EventTarget, the DOM interface for firing events, and it’s worth taking a closer look at how we’re bringing EventTarget into Node.js. ![]() In recent years, Node.js has seen increasing adoption of standard browser application programming interfaces (APIs), such as the WHATWG-compliant URL implementation, the TextEncoder/TextDecoder API or the Console API that now matches what browsers provide.
0 Comments
Leave a Reply. |