Is it possible to examine DOM elements for event handler functions in order to construct conditionals?
E.g.:
domElement.onclick == eventHandlerFunction ? doThis() : doThat()
// I'm unsure whether the conditional in this ternary expression
// evaluates to anything, or what syntax to use to get at the same idea.