marko-js-archive / marko-widgets

[LEGACY] Module to support binding of behavior to rendered UI components rendered on the server or client
http://v3.markojs.com/docs/marko-widgets/
MIT License
141 stars 40 forks source link

Support event delegation to subscribeTo() #94

Open maberer opened 9 years ago

maberer commented 9 years ago

Add support for delegation of events when using subscribeTo()

this.subscribeTo(DOMElement|Widget, eventName, nameOfHandlerFunction|Function)

Without event delegation/bubbling of events, adding listeners could become costly...

This is even worse, since client side rendering requires you to add listeners via JavaScript (there is no way to use the more performant declarative events in this case)