Skip to content
This repository has been archived by the owner on Oct 2, 2019. It is now read-only.

Latest commit

 

History

History
49 lines (44 loc) · 1.78 KB

spec.md

File metadata and controls

49 lines (44 loc) · 1.78 KB

Other Properties of the Global Object

global

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

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

Well-Known Intrinsic Objects

Well-known Intrinsic Objects
Intrinsic Name Global Name ECMAScript Language Association
%GeneratorPrototype% The initial value of the `prototype` property of %Generator%
%GlobalThisValue% globalThis The initial value of the `globalThis` property of the global object
%Int8Array% Int8Array The `Int8Array` constructor ()

SetRealmGlobalObject ( realmRec, globalObj, thisValue )

The abstract operation SetRealmGlobalObject with arguments realmRec, globalObj, and thisValue performs the following steps:

  1. Let intrinsics be realmRec.[[Intrinsics]].
  2. If globalObj is undefined, then 1. Let globalObj be ObjectCreate(intrinsics.[[%ObjectPrototype%]]).
  3. Assert: Type(globalObj) is Object.
  4. If thisValue is undefined, let thisValue be globalObj.
  5. Set intrinsics.[[%GlobalThisValue%]] to thisValue.
  6. Set realmRec.[[GlobalObject]] to globalObj.
  7. Let newGlobalEnv be NewGlobalEnvironment(globalObj, thisValue).
  8. Set realmRec.[[GlobalEnv]] to newGlobalEnv.
  9. Return realmRec.