8.2.4 SetDefaultGlobalBindings ( realmRec )

带参数 realmRec 的抽象操作 SetDefaultGlobalBindings 执行以下步骤:

  1. 使 global 变为 realmRec.[[GlobalObject]]。
  2. 对于第 18 节中指定的全局对象的每个属性,

a. 使 name 为属性名称的 String 值。 b. 使 desc 作为包含属性的指定属性的属性的完全填充的数据属性描述符。 对于18.2、18.3 或 18.4中列出的属性,[[Value]] 属性的值是来自 realmRec 的对应内在对象。

c. 执行 ? DefinePropertyOrThrow(global, name, desc)。

3.返回 global

results matching ""

    No results matching ""