const EventEmitter = require('events')class MyEmitter extends EventEmitter {}const myEmitter = new MyEmitter()let times = 0myEmitter.on('canReceive', function () { console.log(++times) myEmitter.emit('canReceive')})myEmitter.emit('canReceive')为何栈溢出了,有什么方式可以一直触发但是防止溢出吗?
添加回答
举报
0/150
提交
取消