Putting `global` reference in specs

Andrea Giammarchi andrea.giammarchi at gmail.com
Fri Apr 17 18:57:02 UTC 2015


And that's indeed the only place on Web world where `self` makes sense:
it's referring to the frame (scoped) context its running, not to the `top`
(global) tab wrapper.



On Fri, Apr 17, 2015 at 7:51 PM, Brendan Eich <brendan at mozilla.org> wrote:

> Just for historians who might not know, when I did ur-JS in 1995, I made
> multiple names for the global, in part because event handlers (which
> prefigured nested functions in general, and added with-like DOM object
> scoping -- a regret); but also in part because <a target="_self"> was a
> thing in Netscape 2.
>
> /be
>
>
> Boris Zbarsky wrote:
>
>> On 4/17/15 10:55 AM, Andrea Giammarchi wrote:
>>
>>> We have `window` in DOM land, `self` in Workers
>>>
>>
>> We have `self` in DOM land too, so you can consistently use `self` across
>> Window and Workers.
>>
>>  and `global` in most common server side JS engines
>>>
>>
>> Sounds like they should add `self`.  ;)
>>
>> -Boris
>> _______________________________________________
>> es-discuss mailing list
>> es-discuss at mozilla.org
>> https://mail.mozilla.org/listinfo/es-discuss
>>
>>  _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20150417/9715905f/attachment-0001.html>


More information about the es-discuss mailing list