Dojo Events - Template or Programmatic?

Events and how best to attach them to widgets.

When you are wiring up events in a custom, templated widget, do you wire them up using the template (using “data-dojo-attach-event”), or do you wire them up in the postCreate of your widget? Is one better than the other?

post-create-events vs.

template-version

Let me know in the comments!

See Also