domain.add(emitter)


明确地将一个触发器添加到域中。如果由触发器调用的任何事件处理程序抛出错误,或者触发器发出 'error' 事件,它将像隐式绑定一样被路由到域的 'error' 事件。

🌐 Explicitly adds an emitter to the domain. If any event handlers called by the emitter throw an error, or if the emitter emits an 'error' event, it will be routed to the domain's 'error' event, just like with implicit binding.

如果 EventEmitter 已经绑定到一个域,它将从该域中移除,并绑定到这个域。

🌐 If the EventEmitter was already bound to a domain, it is removed from that one, and bound to this one instead.