Skip to content

Commit 958aec5

Browse files
committed
Ref gh-240. jQuery.proxy() and this change.
1 parent bc1823a commit 958aec5

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

entries/jQuery.proxy.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
<p>Be aware, however, that jQuery's event binding subsystem assigns a unique id to each event handling function in order to track it when it is used to specify the function to be unbound. The function represented by <code>jQuery.proxy()</code> is seen as a single function by the event subsystem, even when it is used to bind different contexts. To avoid unbinding the wrong handler, use a unique event namespace for binding and unbinding (e.g., <code>"click.myproxy1"</code>) rather than specifying the proxied function during unbinding.
5151
</p>
5252
<p><strong>As of jQuery 1.6</strong>, any number of additional arguments may supplied to <code>$.proxy()</code>, and they will be passed to the function whose context will be changed.</p>
53+
<p><strong>As of jQuery 1.9</strong>, when the <code>context</code> is <code>null</code> or <code>undefined</code> the the proxied function will be called with the same <code>this</code> object as the proxy was called with. This allows <code>$.proxy()</code> to be used to partially apply the arguments of a function without changing the context.</p>
5354
</longdesc>
5455
<example>
5556
<desc>Change the context of functions bound to a click handler using the "function, context" signature. Unbind the first handler after first click.</desc>

0 commit comments

Comments
 (0)