Hey all, I need a XB (Cross Browser) method of detecting if an argument is a HTML Element.
Using the following code gives different results in different browsers:
Object.prototype.toString.call(element);
// returns in FF "[object HTMLDivElement]";
// returns in IE "[object Object]";
The other method I found was:
if(element.nodeType) // true for a HTML Element;
Does someone knows a XB tested solution?