I'm looking for a way to test whether an html element already has an event attached to it. In ie6 I add an event to an element with (must use attachEvent, can not use element.onclick = f; ):

element.attachEvent("onclick", eventHandler(element, "click"));

How can I test whether an element has this particulair event already attached to it? So something like:

if ( element.hasAttachedEvent("onclick", eventHandler(element, "click")); )

hasAttachedEvent does not exist, how do I do this? Thx