I have a reusable module that creates a top of form for our site. One of the features it supports is permitting other developers to add event handlers to their pages.