Probando el tipo de un elemento DOM en JavaScript
¿Hay alguna manera de probar el tipo de un elemento en JavaScript?
La respuesta puede o no requerir la biblioteca prototipo, sin embargo, la siguiente configuración hace uso de la biblioteca.
function(event) {
var element = event.element();
// if the element is an anchor
...
// if the element is a td
...
}