From 300fd513f901bf5d8dd7331c12420ad66487be62 Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Wed, 28 Sep 2016 17:01:57 -0700 Subject: [PATCH] Normative: add `global` - Adds intrinsic `%GlobalThisValue%` - Sets it in `SetRealmGlobalObject` - Adds global name `global` Per https://github.com/tc39/proposal-global/issues/12 --- spec.html | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/spec.html b/spec.html index d3a2ba4f077..224c3b02e84 100644 --- a/spec.html +++ b/spec.html @@ -1886,6 +1886,17 @@

Well-Known Intrinsic Objects

The constructor of async function objects () + + + %GlobalThisValue% + + + `global` + + + The initial value of the `global` property of the global object + + %Int8Array% @@ -5889,11 +5900,12 @@

CreateIntrinsics ( _realmRec_ )

SetRealmGlobalObject ( _realmRec_, _globalObj_, _thisValue_ )

The abstract operation SetRealmGlobalObject with arguments _realmRec_, _globalObj_, and _thisValue_ performs the following steps:

+ 1. Let _intrinsics_ be _realmRec_.[[Intrinsics]]. 1. If _globalObj_ is *undefined*, then - 1. Let _intrinsics_ be _realmRec_.[[Intrinsics]]. 1. Let _globalObj_ be ObjectCreate(_intrinsics_.[[%ObjectPrototype%]]). 1. Assert: Type(_globalObj_) is Object. 1. If _thisValue_ is *undefined*, let _thisValue_ be _globalObj_. + 1. Set _intrinsics_.[[%GlobalThisValue%]] to _thisValue_. 1. Set _realmRec_.[[GlobalObject]] to _globalObj_. 1. Let _newGlobalEnv_ be NewGlobalEnvironment(_globalObj_, _thisValue_). 1. Set _realmRec_.[[GlobalEnv]] to _newGlobalEnv_. @@ -23237,6 +23249,12 @@

Math

Reflect

See .

+ + +

global

+

The initial value of `global` is the well-known intrinsic object %GlobalThisValue%.

+

This property has the attributes { [[Writable]]: *true*, [[Enumerable]]: *false*, [[Configurable]]: *true* }.

+