SVG - click is not a function
<p>I have an element like this.</p>

<pre><code>&lt;g id="box_w" onclick="recordResponseKeyboard('W');" onmousedown="svgFill('W');" onmouseup="svgUnfill('W');"&gt; 
    &lt;rect fill="#FFFFFF" height="68.522" stroke="#FFFFFF" stroke-miterlimit="10" width="119.297" x="306.673" y="384.406"&gt;&lt;/rect&gt; 
&lt;/g&gt;
</code></pre>

<p>From the chrome console, I can do to locate the element.</p>

<pre><code>document.getElementById('box_w')
</code></pre>

<p>If i call click event, </p>

<pre><code>document.getElementById('box_w').click()
</code></pre>

<p>It throws an error that click is not a function.</p>

<p>How to click on the element using console.? </p>