C'è un modo per testare il tipo di un elemento in JavaScript?
La risposta potrebbe richiedere o meno la libreria prototipo, tuttavia la seguente configurazione utilizza la libreria.
function(event) {
var element = event.element();
// if the element is an anchor
...
// if the element is a td
...
}
element.nodeName.match(/\bTBODY\b/i)
oelement.nodeName.toLowerCase() == 'tbody'
ecc.