RE: Global method calls

2015-02-23 Thread Domenic Denicola
(es-discuss to bcc) I see the attraction of having [Global] do all the work for us, for all the logistical reasons you mention. But I still really don't like the action-at-a-distance on EventTarget. Maybe this is a happy medium? - [Global]/[PrimaryGlobal] = operations from the interface or

RE: Global method calls

2015-02-22 Thread Domenic Denicola
: es-discuss [mailto:es-discuss-boun...@mozilla.org] On Behalf Of Domenic Denicola Sent: Sunday, February 22, 2015 16:39 To: Mark Miller Cc: public-script-co...@w3.org; es-discuss@mozilla.org Subject: RE: Global method calls Thanks Mark. At this point it may tend toward more of a public-script

Re: Global method calls

2015-02-22 Thread Mark Miller
There, Boris writes: Conceptually, using the global of the realm of the function involved (i.e. the Chrome/Firefox/IE10 behavior) makes sense to me. Me too. This is in keeping with the spirit of lexical scoping. It is as if these built-in functions have lexically captured the global of the

Re: Global method calls

2015-02-22 Thread Mark Miller
On Sun, Feb 22, 2015 at 1:03 PM, Domenic Denicola d...@domenic.me wrote: (Cc'ing public-script-coord in case this answer gets more complicated in the presence of the window proxy/overriden this-in-global setup.) Given code like script addEventListener(foo, function () { });

Re: Global method calls

2015-02-22 Thread Mark Miller
Denicola Sent: Sunday, February 22, 2015 16:39 To: Mark Miller Cc: public-script-co...@w3.org; es-discuss@mozilla.org Subject: RE: Global method calls Thanks Mark. At this point it may tend toward more of a public-script-coord question... From: Mark Miller [mailto:erig...@gmail.com

RE: Global method calls

2015-02-22 Thread Domenic Denicola
Thanks Mark. At this point it may tend toward more of a public-script-coord question... From: Mark Miller [mailto:erig...@gmail.com] If it is strict code, then this is definitely a Call(addEventListener, undefined, foo, function () {}) I won't try to speak definitively for what happens if

RE: Global method calls

2015-02-22 Thread Domenic Denicola
From: Mark Miller [mailto:erig...@gmail.com] the ECMAScript global object? Which one? (Even if it is clear from context, please assume I do not have that context.) Heh; good catch. A contemporary thread to my [1] is

Re: Global method calls

2015-02-22 Thread Brendan Eich
Mark Miller wrote: There, Boris writes: Conceptually, using the global of the realm of the function involved (i.e. the Chrome/Firefox/IE10 behavior) makes sense to me. Me too. This is in keeping with the spirit of lexical scoping. It is as if these built-in functions have lexically captured

Re: Global method calls

2015-02-22 Thread Boris Zbarsky
On 2/22/15 4:55 PM, Domenic Denicola wrote: [1] indicates a plan to make [Global]-annotated objects, like the Window object, apply [ImplicitThis] behavior to the object's methods and the methods of anything that shows up in its prototype chain. More like a proposal than a plan, sadly. One