Skip to content

Commit

Permalink
Normative: add globalThis (#702)
Browse files Browse the repository at this point in the history
 - Adds intrinsic `%GlobalThisValue%`
 - Sets it in `SetRealmGlobalObject`
 - Adds global name `globalThis`

Per tc39/proposal-global#12
  • Loading branch information
ljharb committed Oct 2, 2019
1 parent d764223 commit 5b01972
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions spec.html
Original file line number Diff line number Diff line change
Expand Up @@ -7484,8 +7484,7 @@ <h1>GetNewTarget ( )</h1>
<h1>GetGlobalObject ( )</h1>
<p>The abstract operation GetGlobalObject returns the global object used by the currently running execution context. GetGlobalObject performs the following steps:</p>
<emu-alg>
1. Let _ctx_ be the running execution context.
1. Let _currentRealm_ be _ctx_'s Realm.
1. Let _currentRealm_ be the current Realm Record.
1. Return _currentRealm_.[[GlobalObject]].
</emu-alg>
</emu-clause>
Expand Down Expand Up @@ -24441,6 +24440,12 @@ <h1>The Global Object</h1>
<emu-clause id="sec-value-properties-of-the-global-object">
<h1>Value Properties of the Global Object</h1>

<emu-clause id="sec-globalthis">
<h1>globalThis</h1>
<p>The initial value of the `globalThis` property of the global object in a Realm Record _realm_ is _realm_.[[GlobalEnv]]'s EnvironmentRecord's [[GlobalThisValue]].</p>
<p>This property has the attributes { [[Writable]]: *true*, [[Enumerable]]: *false*, [[Configurable]]: *true* }.</p>
</emu-clause>

<emu-clause id="sec-value-properties-of-the-global-object-infinity">
<h1>Infinity</h1>
<p>The value of `Infinity` is *+&infin;* (see <emu-xref href="#sec-ecmascript-language-types-number-type"></emu-xref>). This property has the attributes { [[Writable]]: *false*, [[Enumerable]]: *false*, [[Configurable]]: *false* }.</p>
Expand Down

0 comments on commit 5b01972

Please sign in to comment.