js code to tell if a function is available for an object
<p>The following line of javascript gets a Uncaught TypeError: <strong>Object #Text has no method 'getAttribute'</strong> in chrome and safari but not in IE.</p>

<pre><code>this.Element.getAttribute("whatever")
</code></pre>

<p>I get that this.Element is the main problem, but would like a temporary fix for debugging other parts of the code. <strong>How can test to see if a function is available on an item without getting a javascript error?</strong></p>
