title: Understanding "this" keyword
body: <p><a href="https://github.com/jquery/jquery/commit/6e066a4db72ff6b0d12dd8a43faec0a80e4a1fed#L0L31" rel="noreferrer">In this commit</a> there is a change I cannot explain</p>
  
  <pre><code>deferred.done.apply( deferred, arguments ).fail.apply( deferred, arguments );
  </code></pre>
  
  <p>becomes</p>
  
  <pre><code>deferred.done( arguments ).fail( arguments );
  </code></pre>
  
  <p><a href="https://developer.mozilla.org/en/JavaScript/Reference/Operators/this#section_5" rel="noreferrer">AFAIK</a>, when you invoke a function as a member of some object like <code>obj.func()</code>, inside the function <code>this</code> is bound to <code>obj</code>, so there would be no use invoking a function through <code>apply()</code> just to bound <code>this</code> to <code>obj</code>. Instead, according to the comments, this was required because of some preceding <code>$.Callbacks.add</code> implementation.</p>
  
  <p>My doubt is not about jQuery, but about the Javascript language itself: when you invoke a function like <code>obj.func()</code>, how can it be that inside <code>func()</code> the <code>this</code> keyword <strong>is not bound</strong> to <code>obj</code>?</p>