Improved delegate directive to allow user-selectable events