Part of the requirements are that it be deniable/spoofable - in other words, that it *be* configurable (see https://github.com/tc39/proposal-global/blob/master/README.md#ses-interaction). Otherwise, we'd have made it syntax and avoided the web compatibility minefield :-)
On Friday, August 31, 2018 at 6:12:11 AM UTC-7, Yuki Shiino wrote: > > IIUC, the proposed |globalThis| is a writable and configurable property, > right? It's easy to change(or fake) it. > > Is there any chance to make it a readonly and non-configurable property? > Then, it's guaranteed to be the real global object. > > +cc: domenic@, what do you think of this, especially from PoV of LAPI? > > Cheers, > Yuki Shiino > > > 2018年8月31日金曜日 0時50分55秒 UTC+9 Sathya Gunasekaran: >> >> LGTM >> >> On Thu, Aug 30, 2018 at 8:23 AM Adam Klein <ad...@chromium.org >> <javascript:>> wrote: >> >>> This LGTM, based on the stage at TC39. >>> >>> It'd be nice if we knew more about other browser plans, given the >>> history here. Do you know if Firefox has plans to try again with this name >>> anytime soon? >>> >>> On Thu, Aug 30, 2018 at 1:24 AM 'Mathias Bynens' via v8-users < >>> v8-u...@googlegroups.com <javascript:>> wrote: >>> >>>> Contact emails >>>> >>>> mat...@chromium.org <javascript:> >>>> >>>> Spec >>>> >>>> https://tc39.github.io/proposal-global/ >>>> >>>> Summary >>>> >>>> A Stage 3 proposal introduces globalThis, enabling a universal >>>> mechanism to access the global object even in strict functions or modules, >>>> regardless of the platform. >>>> >>>> Motivation >>>> >>>> It is difficult to write portable ECMAScript code which accesses the >>>> global object. On the web, it is accessible as window or self or this >>>> or frames; on Node.js, it is global or this; among those, only this is >>>> available in a shell like V8's d8. In a standalone function call in >>>> sloppy mode, this works too, but it's undefined in modules or in >>>> strict mode within a function. In such contexts, the global object can >>>> still be accessed using Function('return this')(), but that form is >>>> incompatible with some CSP settings, such as within Chrome Apps. >>>> >>>> Interoperability and compatibility risk >>>> >>>> An earlier version of this proposal had a different name: global. >>>> Sadly, this name was found to be not Web-compatible when Firefox >>>> shipped it <https://github.com/tc39/proposal-global/issues/20>. After >>>> collaborating with other browsers vendors and looking at data on >>>> real-world >>>> use of JavaScript identifiers on the web, we believe the new name to be >>>> Web-compatible. >>>> >>>> Is this feature fully tested? >>>> >>>> Yes. In addition to V8's own tests (v8/test/mjsunit/harmony/global*.js), >>>> Test262 includes tests for this feature >>>> <https://github.com/tc39/test262/search?q=%22features%3A+%5BglobalThis%5D%22> >>>> . >>>> >>>> Tracking bug >>>> >>>> https://bugs.chromium.org/p/v8/issues/detail?id=5537 >>>> >>>> Link to entry on the Chrome Platform Status dashboard >>>> >>>> https://www.chromestatus.com/feature/6571514765770752 >>>> >>>> Requesting approval to ship? >>>> >>>> Yes. Note that since this is a V8/JS feature, this post is just an FYI >>>> to blink-dev — no signoff from Blink API owners is required. >>>> >>>> -- >>>> -- >>>> v8-users mailing list >>>> v8-u...@googlegroups.com <javascript:> >>>> http://groups.google.com/group/v8-users >>>> --- >>>> You received this message because you are subscribed to the Google >>>> Groups "v8-users" group. >>>> To unsubscribe from this group and stop receiving emails from it, send >>>> an email to v8-users+u...@googlegroups.com <javascript:>. >>>> For more options, visit https://groups.google.com/d/optout. >>>> >>> -- >>> -- >>> v8-users mailing list >>> v8-u...@googlegroups.com <javascript:> >>> http://groups.google.com/group/v8-users >>> --- >>> You received this message because you are subscribed to the Google >>> Groups "v8-users" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to v8-users+u...@googlegroups.com <javascript:>. >>> For more options, visit https://groups.google.com/d/optout. >>> >> -- -- v8-users mailing list v8-users@googlegroups.com http://groups.google.com/group/v8-users --- You received this message because you are subscribed to the Google Groups "v8-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to v8-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.