3 ms·
I'm hoping that the event listeners on dom elements can be improved slightly so that if I have an element with an @click listener, it will just create one liste
by wensley 7y ago
I'm hoping that the event listeners on dom elements can be improved slightly so that if I have an element with an @click listener, it will just create one listener for the whole site, rather than one for each instance of that component.
I tend to fall back to jQuery event listeners on the document and listen for clicks on elements with a specific class if I know there will be a lot of instances.
- omnimus 7y agoDoes it even improve performance when you include jquery?
- earthboundkid 7y agohttps://github.com/dgraham/delegated-events https://github.com/dgraham/delegated-events