3 ms·
Are not the event objects technically part of the DOM, though? It seems to me the view should unpack the event objects, and then delegate to a controller method
by fzzzy 14y ago
Are not the event objects technically part of the DOM, though? It seems to me the view should unpack the event objects, and then delegate to a controller method, passing only non-DOM-related data. The controller then contains the "business logic" which is what everyone seems to put in controllers anyway.
- petermichaux 14y agoYou're right about the event being part of the DOM. If that is a concern, you can define your own view handlers that unpack the DOM event and forward the data to the controller handler. There is no way to autogenerate view handlers that know what needs to be unpacked in what way.