class Foo {
construtor(){
this.ref = document.querySelector('.foo');
this.bind('click', onClick)
}
onClick(event) {
// event is undefined
console.log(event)
}
bind(event,action) {
this.ref.addEventListener(event, action.bind(this));
}
}
请告诉我event参数如何传递给onClick函数。