bind

  • Revision slug: Talk:JavaScript/Reference/Global_Objects/Function/bind
  • Revision title: bind
  • Revision id: 79964
  • Created:
  • Creator: RickB
  • Is current revision? No
  • Comment page created, 39 words added

Revision Content

(function(){return this;}).bind(null)() === window; //this returns true in native implementations and false in the current compatibility code.

On line 11, "( obj || {} )" if this read "( obj || (window || {}) )" it would behave like the native bind when "thisArg" is null.

Revision Source

<p>(function(){return this;}).bind(null)() === window; //this returns true in native implementations and false in the current compatibility code.</p>
<p>On line 11, "( obj || {} )" if this read "( obj || (window || {}) )" it would behave like the native bind when "thisArg" is null.</p>
Revert to this revision