On 18 October 2011 17:08, David Bruant <bruan...@gmail.com> wrote: > Ok for typeof. But there are other places where [[Call]] is used and the > proxy is expected to (indirectly) expose it. For instance bind: > ----- > var fpb = Function.prototype.bind; > var bind = fpb.bind(fpb); > var p = Proxy.for(function(){}, {}); // purposefully no 'call' trap > var p2 = bind(p, {}); // ? > ----- > Here, bind will look for an internal [[Call]] from p. What is it? It cannot > be the call trap since this one doesn't exist. Fallback to target.[[call]]? > > If target.[[Call]] is a fallback, it means that the internal [[call]] of an > object can be changed... actually, just changing the call trap makes > [[call]] dynamic. I'm not sure what are the ramifications of this. For > instance, when binding a function, should it take the [[call]] value at bind > call or the dynamic one (current ES5.1 definition says "dynamic", but both > are equivalent with today's objects)
I don't think the presence of [[Call]] itself is "dynamic". It's always there, but it checks for the presence of the call trap. /Andreas _______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss