I wasn't there on day 2 so I may be lacking context, but I'd like to
clarify some parts in the notes re. proxies and Function.prototype.bind:

2013/11/27 Rick Waldron <[email protected]>

> EA: What happens when do bind on a function proxy?
>
> MM: fail?
>
> DH: This is shocking.
>
> MM: bind is a perfect example, there is no conflict between security and
> transparency. You'd like bind to work on proxy functions
>

Not sure why Mark mentioned that bind fails on function proxies. It doesn’t:

js> var o = {}
js> var p = new Proxy(function() { return this; }, {})
js> var f = p.bind(o)
js> f() === o
true

(and this works regardless of whether you use p.bind(o) or
Function.prototype.bind.call(p,o))

Cheers,
Tom
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to