Closed devmondo closed 8 years ago
@devmondo, curious what are you using to set the event handlers in the first place?
simple
let b1 = document.createElement(`button`);
b1.innerHTML = `click me`;
b1.addEventListener(`click`, (e) => {
console.log(`i am clicked`);
})
Currently this is out of scope for this module. As stated before I recommend that you use event delegation for all events since it is more predictable and typically more performant.
Check out https://github.com/component/delegate, https://github.com/zenorocha/delegate or event jquery for good event delegation.
thanks
hi again,
can we copy the events handlers? morphdom does it automatically somehow!