JavaScript events module