title: How to find JavaScript function called when clicking an anchor in HTML
body: <p>I am just wondering in Twitter, when you click &quot;replay&quot; of a tweet, what front-end function is called. I inspected the element in Chrome and it seems to be an anchor with <code>href=&quot;#&quot;</code>, so I guess there is some JavaScript function associated with the <code>onclick</code> event of that anchor. Just wondering how to find out which function is called and where is the source code of that function?</p>
  <p>Here is the code part of the &quot;replay&quot; on Twitter:</p>
  <pre><code>&lt;a class=&quot;with-icn js-action-reply&quot; data-modal=&quot;tweet-reply&quot; href=&quot;#&quot; title=&quot;Reply&quot;&gt;
  &lt;i class=&quot;sm-reply&quot;&gt;&lt;/i&gt;
  &lt;b&gt;Reply&lt;/b&gt;
  &lt;/a&gt;
  </code></pre>