Function.prototype.bind

Brendan Eich brendan at mozilla.org
Tue Sep 9 21:51:53 PDT 2008


On Sep 9, 2008, at 9:47 PM, David-Sarah Hopwood wrote:

> As an alternative to saying "the original bindings of..." in the spec,
> we could provide a way to actually get the original bindings in  
> ECMAScript
> code. This is independently useful, e.g. for secure subset run-times.

Have you read http://wiki.ecmascript.org/doku.php? 
id=strawman:lexical_scope yet?

The Harmony reference implementation work is very likely to cut back  
the old ES4 RI to ES3 and go forward from there. To avoid hijacking  
built-in behavior it needs something like the "use lexical scope"  
pragma.


> I have also assumed the existence of a "static" Function.apply which
> takes the function to be applied as an explicit first argument.

This was part of ES4 and it's in JS1.7+ in Firefox.

/be


More information about the Es-discuss mailing list