How do I re-create "this" inside an event handler?
<p>I've got an event handler that was pre-bound to a specific variable (via <code>$.proxy</code>).  As a result, when the handler is triggered, <code>this</code> isn't the normal value, it's my pre-bound value.</p>

<p>I'd like to recover <code>this</code> using the handler's <code>event</code> argument, but <code>this</code> doesn't seem to map directly to <code>event.currentTarget</code>, <code>event.target</code>, or any other event property.</p>

<p>So, I've tried digging through the jQuery source, but the event callback stuff is very convoluted, and I can't figure out exactly what <code>this</code> is getting set to.  Does anyone know how simulate a jQuery event handler <code>this</code> using only the event argument?</p>

<p><strong>* * Edit * *</strong></p>

<p>Just to clarify, here's an example:</p>

<pre><code>var boundThis = {foo: 'bar'}
var handler = $.proxy(function(event) {

    // Because of the $.proxy, this === boundThis
    // (NOT the normal "this" that jQuery would set)
    // In theory event has everything I need to re-create this,
    // but I'm having trouble figuring out exactly how

    // Here's a naive/non-functional example of what I'm trying to do
    jQueryThis = event.target; // If only this worked ...

}, boundThis);
$(someElement).click(handler);
</code></pre>
