Weird error: Uncaught TypeError: Object [object HTMLElement] has no method 'getAttribute'
<p>I get the above error when I run this line of JavaScript (And thisMaxNode holds an HTML Element object with an attribute of <code>data-max="10"</code> or another number):</p>

<pre><code>var thisMax = parseFloat(thisMaxNode.getAttribute('data-max'));
</code></pre>

<p>Isn't the <code>HTMLElement</code> object <strong>exactly</strong> what should have the method <code>getAttribute</code>?</p>
