W3C home > Mailing lists > Public > public-script-coord@w3.org > July to September 2011

Re: [[Call]] behaviour of operations

From: Cameron McCormack <cam@mcc.id.au>
Date: Wed, 24 Aug 2011 09:48:39 +1200
Message-ID: <4E542037.90804@mcc.id.au>
To: Allen Wirfs-Brock <allen@wirfs-brock.com>
CC: Geoffrey Sneddon <gsneddon@opera.com>, public-script-coord@w3.org
Cameron McCormack:
>> The new [[Call]] delegates to the default [[Call]].  I don't think
>> there's a problem with there being no concept of strictness for
>> host functions -- they just won't be strict.

Allen Wirfs-Brock:
> You can only do that delegation if the function is implemented in ES!
> 13.2.1 only applies functions defined in actual ECAMScript source
> code

Otherwise I need to duplicate the native Function object internals 
[[FormalParameters]] and [[Code]] so that the 13.2.1 [[Call]] would 
work?  OK, I see that.

If we do change Window methods to bind to their original window object, 
then we could instead say that the values of the properties are Function 
objects that you'd get by calling .bind(<global>) on them.  Then we 
don't need to have any custom [[Call]] behaviour.
Received on Tuesday, 23 August 2011 21:49:41 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 8 May 2013 19:30:04 UTC