Putting `global` reference in specs
d at domenic.me
Fri Apr 17 17:11:30 UTC 2015
One thing I'm surprised nobody has brought up yet is that "global" would be an incorrect name in the case of browsers. The actual global object is not (and must never be) directly accessible. Instead you get a window proxy when you use `window`, `self`, `this`, etc.
As such I think our best bet is for server-side JS runtimes to use `self` or `window`.
It's not as if `window` actually means "window" anymore, given tabs and iframes and frames. We might as well move it into the set of terms like "realm" or "vat" or "environment" that are more abstract than real.
From: es-discuss [mailto:es-discuss-bounces at mozilla.org] On Behalf Of Anne van Kesteren
Sent: Friday, April 17, 2015 11:19
To: Andrea Giammarchi
Cc: es-discuss at mozilla.org
Subject: Re: Putting `global` reference in specs
On Fri, Apr 17, 2015 at 5:12 PM, Andrea Giammarchi <andrea.giammarchi at gmail.com> wrote:
> So I'd say we should not have `self` (if stays on global and Worker I
> don't actually care) and add a `global` that nobody needs explanation
Indeed, three ways to reference the global object is not nearly enough.
es-discuss mailing list
es-discuss at mozilla.org
More information about the es-discuss