Events target other than current document
dy opened this issue · 2 comments
dy commented
Usually event delegator libs (like https://ghub.io/delegate-it) provide target element, capturing the events.
That can be useful in #16, #20, #23 etc.
The use-case include as well custom elements shadow dom https://developers.google.com/web/fundamentals/web-components/shadowdom#events, since it may hide some events.
on(el, 'selector', evt, handler)
on('selector', evt, handler)
Are there any plans on merging #23 or making own implementation?
reorx commented
Thanks for mentioning delegate-it, now I've replaced delegated-events with delegate-it
dgraham commented
It looks like this is solved in other libraries. This one will always delegate up to document.