Variation on Javascript Function.prototype.bind I want to make sure I understand
<p>I am going through some code left behind by some long-gone developers and came across this:</p>

<pre><code>Function.prototype.binding = function ()
{
  if(arguments.length &lt; 2 &amp;&amp; typeof arguments[0] == "undefined") return this;
  var __method = this, args = jQuery.makeArray(arguments), object = args.shift();
  return function()
  { return __method.apply(object, args.concat(jQuery.makeArray(arguments))); };
};
</code></pre>

<p>and it is referenced elsewhere in a couple of places, this DataTables callback function is representitive:</p>

<pre><code>"fnRowCallback": function (nRow, aData, iDisplayIndex)
  {
    nRow = this.options.fnRowCallback(nRow, aData, iDisplayIndex);
    return nRow;
  }.binding(this),
</code></pre>

<p>I think that what this is accomplishing is to set the <em>this</em> context in the function to the object passed into the .binding; is that correct?  And is this way of doing that considered a good practice? </p>

<p>Thanks,
Matthew</p>
