title: How can you gain access to a web page's event listeners from a Google Chrome extension
body: <p>I'm writing a Chrome extension to list out the source code for each event handler attached to an <code>&lt;a/&gt;</code> tag when you roll over it.</p>
  <p>Currently, I've printed out the href attribute - <code>$(this).attr(&quot;href&quot;)</code> - and this works fine.  The source code is on github at <a href="http://github.com/grantyb/Google-Chrome-Link-URL-Extension" rel="nofollow noreferrer">http://github.com/grantyb/Google-Chrome-Link-URL-Extension</a>.</p>
  <p>When I extend it to access event handlers, <code>$(this).data(&quot;events&quot;) </code>returns null.  I'm certain that there is a<code> click()</code> handler for my <code>&lt;a/&gt;</code> tag, because when I output <code>$(&quot;a&quot;).data(&quot;events&quot;)</code> inside my web page, it correctly lists the handler.</p>
  <p>It seems that jQuery's <code>data()</code> method is checking data that is sandboxed, so I can't access it from inside my Extension.  That makes sense, since I guess it's stored within the <code>jQuery</code> global variable, and that's clearly a different variable from the <code>jQuery</code> global that lives inside my Extension.</p>
  <p>Is there another way to access the list of event handlers for an object in the DOM.  Are event handlers even stored in the DOM?</p>