Looking to see how you go about checking to see if a parameter that is passed into a function is a HTML element like <div>
or <p>
, etc... I've tried numerous things but nothing is working:
if (param !== HTMLElement) return undefined;
if (param !== Element) return undefined;
if (param !== Document) return undefined;
There has been some others but nothing seems to work - any pointers in the right direction would be great. thanks