19 全局对象 (The Global Object)

global object(全局对象)

19.1 全局对象的值属性 (Value Properties of the Global Object)

19.1.1 globalThis

Realm Record realm 中全局对象 "globalThis" 属性的初始值为 realm.[[GlobalEnv]].[[GlobalThisValue]]

该属性具有特性 { [[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: true }。

19.1.2 Infinity

Infinity 的值为 +∞𝔽(见 6.1.6.1)。该属性具有特性 { [[Writable]]: false, [[Enumerable]]: false, [[Configurable]]: false }。

19.1.3 NaN

NaN 的值为 NaN(见 6.1.6.1)。该属性具有特性 { [[Writable]]: false, [[Enumerable]]: false, [[Configurable]]: false }。

19.1.4 undefined

undefined 的值为 undefined(见 6.1.1)。该属性具有特性 { [[Writable]]: false, [[Enumerable]]: false, [[Configurable]]: false }。

19.2 全局对象的函数属性 (Function Properties of the Global Object)

19.2.1 eval ( x )

此函数是 %eval% 本源对象。

调用时执行以下步骤:

  1. 返回 ? PerformEval(x, false, false)。

19.2.1.1 PerformEval ( x, strictCaller, direct )

The abstract operation PerformEval takes arguments x (一个 ECMAScript 语言值), strictCaller (Boolean), and direct (Boolean) and returns 正常完成(含 ECMAScript 语言值)或 throw completion. It performs the following steps when called:

  1. 断言:若 directfalse,则 strictCaller 也为 false
  2. x 不是 String,返回 x
  3. evalRealm当前 Realm Record
  4. 注:直接 eval 情况下,evalRealm 同时是调用 eval 的调用者与 eval 函数自身的 realm
  5. 执行 ? HostEnsureCanCompileStrings(evalRealm, « », x, direct)。
  6. inFunctionfalse
  7. inMethodfalse
  8. inDerivedConstructorfalse
  9. inClassFieldInitializerfalse
  10. directtrue,则
    1. thisEnvRec = GetThisEnvironment()。
    2. thisEnvRecFunction Environment Record,则
      1. F = thisEnvRec.[[FunctionObject]]
      2. inFunctiontrue
      3. inMethodthisEnvRec.HasSuperBinding()。
      4. F.[[ConstructorKind]]derived,设 inDerivedConstructortrue
      5. classFieldInitializerNameF.[[ClassFieldInitializerName]]
      6. classFieldInitializerNameempty,设 inClassFieldInitializertrue
  11. 按实现定义顺序执行以下子步骤,可交织解析与错误检测:
    1. script 为 ParseText(x, Script)。
    2. script 为错误列表,抛出 SyntaxError
    3. script Contains ScriptBodyfalse,返回 undefined
    4. bodyscriptScriptBody
    5. inFunctionfalsebody Contains NewTarget,抛出 SyntaxError
    6. inMethodfalsebody Contains SuperProperty,抛出 SyntaxError
    7. inDerivedConstructorfalsebody Contains SuperCall,抛出 SyntaxError
    8. inClassFieldInitializertrue 且 ContainsArguments(body) 为 true,抛出 SyntaxError
  12. strictCallertrue,令 strictEvaltrue
  13. 否则,令 strictEval 为 ScriptIsStrict(script)。
  14. runningContext 为正在运行的执行上下文。
  15. 注:若 directtruerunningContext 是执行直接 eval 的上下文;否则为 eval 调用的执行上下文。
  16. directtrue,则
    1. lexEnv = NewDeclarativeEnvironment(runningContext.LexicalEnvironment)。
    2. varEnv = runningContext.VariableEnvironment。
    3. privateEnv = runningContext.PrivateEnvironment。
  17. 否则,
    1. lexEnv = NewDeclarativeEnvironment(evalRealm.[[GlobalEnv]])。
    2. varEnv = evalRealm.[[GlobalEnv]]
    3. privateEnv = null
  18. strictEvaltrue,设 varEnv = lexEnv
  19. runningContext 尚未被暂停,则暂停之。
  20. evalContext 为新的 ECMAScript 代码执行上下文
  21. 设其 Function 为 null
  22. 设其 RealmevalRealm
  23. 设其 ScriptOrModule 为 runningContext.ScriptOrModule。
  24. 设其 VariableEnvironment 为 varEnv
  25. 设其 LexicalEnvironment 为 lexEnv
  26. 设其 PrivateEnvironment 为 privateEnv
  27. 压入 evalContext;其成为正在运行的执行上下文。
  28. result = Completion(EvalDeclarationInstantiation(body, varEnv, lexEnv, privateEnv, strictEval))。
  29. result正常完成,则
    1. result = Completion(Evaluation of body)。
  30. result正常完成result.[[Value]]empty,则
    1. result = NormalCompletion(undefined)。
  31. 暂停 evalContext 并将其移出执行上下文栈。
  32. 恢复当前栈顶上下文。
  33. 返回 ? result
Note

若调用者代码或 eval 代码为严格模式代码,eval 代码不得在调用上下文的变量环境中实例化变量或函数绑定;此时这些绑定在新建的 VariableEnvironment 中实例化,仅对 eval 代码可见。由 letconstclass 声明引入的绑定总是在新 LexicalEnvironment 中实例化。

19.2.1.2 HostEnsureCanCompileStrings ( calleeRealm, parameterStrings, bodyString, direct )

The host-defined abstract operation HostEnsureCanCompileStrings takes arguments calleeRealm (Realm Record), parameterStrings (字符串列表), bodyString (字符串), and direct (Boolean) and returns 正常完成(含 unused)或 throw completion. 允许宿主环境阻止某些可让开发者将字符串解释并求值为 ECMAScript 代码的 ECMAScript 函数。

parameterStrings 表示使用函数构造器时会被连接以构造参数列表的字符串。bodyString 表示函数体或传递给 eval 的字符串。 direct 表示是否为直接 eval。

默认实现返回 NormalCompletion(unused)。

19.2.1.3 EvalDeclarationInstantiation ( body, varEnv, lexEnv, privateEnv, strict )

The abstract operation EvalDeclarationInstantiation takes arguments body (ScriptBody 解析节点), varEnv (Environment Record), lexEnv (Declarative Environment Record), privateEnv (PrivateEnvironment Recordnull), and strict (Boolean) and returns 正常完成(含 unused)或 throw completion. It performs the following steps when called:

  1. varNamesbody 的 VarDeclaredNames。
  2. varDeclarationsbody 的 VarScopedDeclarations。
  3. strictfalse,则
    1. varEnvGlobal Environment Record,则
      1. varNames 每个 name
        1. HasLexicalDeclaration(varEnv, name) 为 true,抛 SyntaxError
        2. 注:eval 不会创建会被全局词法声明遮蔽的全局 var 声明。
    2. thisEnv = lexEnv
    3. 断言:以下循环会终止。
    4. 重复,条件:thisEnvthisEnvvarEnv 不同:
      1. thisEnv 不是 Object Environment Record,则
        1. 注:with 语句环境不含词法声明,因此不需检查 var/let 提升冲突。
        2. varNames 每个 name
          1. 若 ! thisEnv.HasBinding(name) 为 true,则
            1. Normative Optional
              宿主为浏览器或支持 Catch 块中的 VariableStatements
              1. thisEnv 不是 Catch 子句的 Environment Record,抛 SyntaxError
            2. 否则,抛 SyntaxError
          2. 注:直接 eval 不会将 var 声明提升越过同名词法声明。
      2. thisEnvthisEnv.[[OuterEnv]]
  4. privateIdentifiers 为新空列表。
  5. pointer = privateEnv
  6. 重复,条件:pointernull
    1. pointer.[[Names]] 每个 Private Name binding
      1. privateIdentifiers 不含 binding.[[Description]],追加之。
    2. pointer = pointer.[[OuterPrivateEnvironment]]
  7. 若 AllPrivateIdentifiersValid(body, privateIdentifiers) 为 false,抛 SyntaxError
  8. functionsToInitialize 为新空列表。
  9. declaredFunctionNames 为新空列表。
  10. 逆序遍历 varDeclarations 中每个 d
    1. d 不是 VariableDeclarationForBindingBindingIdentifier,则
      1. 断言:dFunctionDeclarationGeneratorDeclarationAsyncFunctionDeclarationAsyncGeneratorDeclaration
      2. 注:若同名多次函数声明,最后一个生效。
      3. fn 为其 BoundNames 唯一元素。
      4. declaredFunctionNames 不含 fn,则
        1. varEnvGlobal Environment Record,则
          1. fnDefinable = ? CanDeclareGlobalFunction(varEnv, fn)。
          2. fnDefinablefalse,抛 TypeError
        2. 追加 fndeclaredFunctionNames
        3. d 插入 functionsToInitialize 首位。
  11. declaredVarNames 为新空列表。
  12. 遍历 varDeclarations 中每个 d
    1. dVariableDeclarationForBindingBindingIdentifier,则
      1. 对其 BoundNames 每个字符串 vn
        1. declaredFunctionNames 不含 vn,则
          1. varEnvGlobal Environment Record,则
            1. vnDefinable = ? CanDeclareGlobalVar(varEnv, vn)。
            2. vnDefinablefalse,抛 TypeError
          2. declaredVarNames 不含 vn,则追加之。
  13. Normative Optional
    strictfalse宿主为浏览器或支持 块级函数声明 Web 历史兼容语义,则
    1. declaredFunctionOrVarNamesdeclaredFunctionNamesdeclaredVarNames 的连接。
    2. 对每个直接包含于任何 BlockCaseClauseDefaultClauseStatementList 中、且使 body Contains 该子节点为 trueFunctionDeclaration f
      1. F 为其 BindingIdentifier 的 StringValue。
      2. 若将 f 替换为以 FBindingIdentifierVariableStatement 不会为 body 产生早期错误,则
        1. bindingExistsfalse
        2. thisEnv = lexEnv
        3. 断言:以下循环终止。
        4. 重复,条件:thisEnvvarEnv
          1. thisEnv 不是 Object Environment Record,则
            1. 若 ! thisEnv.HasBinding(F) 为 true,则
              1. Normative Optional
                宿主为浏览器或支持 Catch 块中的 VariableStatements
                1. thisEnv 不是 Catch 子句的 Environment Record,设 bindingExiststrue
              2. 否则设 bindingExiststrue
          2. thisEnv = thisEnv.[[OuterEnv]]
        5. bindingExistsfalsevarEnvGlobal Environment Record,则
          1. HasLexicalDeclaration(varEnv, F) 为 false,则
            1. fnDefinable = ? CanDeclareGlobalVar(varEnv, F)。
          2. 否则设 fnDefinablefalse
        6. 否则,
          1. fnDefinabletrue
        7. bindingExistsfalsefnDefinabletrue,则
          1. declaredFunctionOrVarNames 不含 F,则
            1. varEnvGlobal Environment Record,则
              1. 执行 ? CreateGlobalVarBinding(varEnv, F, true)。
            2. 否则,
              1. bindingExists = ! varEnv.HasBinding(F)。
              2. bindingExistsfalse,则
                1. 执行 ! varEnv.CreateMutableBinding(F, true)。
                2. 执行 ! varEnv.InitializeBinding(F, undefined)。
            3. 追加 FdeclaredFunctionOrVarNames
          2. FunctionDeclaration f 被求值时,执行以下步骤替代 15.2.6 中的求值算法:
            1. gEnv 为正在运行执行上下文的 VariableEnvironment。
            2. bEnv 为正在运行执行上下文的 LexicalEnvironment。
            3. fObj 为 ! bEnv.GetBindingValue(F, false)。
            4. 执行 ? gEnv.SetMutableBinding(F, fObj, false)。
            5. 返回 unused
  14. 注:除非 varEnvGlobal Environment Record 且全局对象为 Proxy 异域对象,此后不再出现异常终止。
  15. lexDeclarationsbody 的 LexicallyScopedDeclarations。
  16. lexDeclarations 每个 d
    1. 注:词法声明名此处仅实例化,未初始化。
    2. d 的 BoundNames 每个 dn
      1. 若 IsConstantDeclaration(d) 为 true,执行 ? lexEnv.CreateImmutableBinding(dn, true)。
      2. 否则执行 ? lexEnv.CreateMutableBinding(dn, false)。
  17. functionsToInitialize 每个解析节点 f
    1. fn 为其 BoundNames 唯一元素。
    2. fo 为 InstantiateFunctionObject(f, lexEnv, privateEnv)。
    3. varEnvGlobal Environment Record,则
      1. 执行 ? CreateGlobalFunctionBinding(varEnv, fn, fo, true)。
    4. 否则,
      1. bindingExists = ! varEnv.HasBinding(fn)。
      2. false
        1. 注:因前置验证,不会异常。
        2. 执行 ! varEnv.CreateMutableBinding(fn, true)。
        3. 执行 ! varEnv.InitializeBinding(fn, fo)。
      3. 否则执行 ! varEnv.SetMutableBinding(fn, fo, false)。
  18. declaredVarNames 每个字符串 vn
    1. varEnvGlobal Environment Record,则
      1. 执行 ? CreateGlobalVarBinding(varEnv, vn, true)。
    2. 否则,
      1. bindingExists = ! varEnv.HasBinding(vn)。
      2. false
        1. 注:因前置验证不异常。
        2. 执行 ! varEnv.CreateMutableBinding(vn, true)。
        3. 执行 ! varEnv.InitializeBinding(vn, undefined)。
  19. 返回 unused

19.2.2 isFinite ( number )

此函数是 %isFinite% 本源对象。

调用时执行:

  1. num = ? ToNumber(number)。
  2. num 不是有限值,返回 false
  3. 否则返回 true

19.2.3 isNaN ( number )

此函数是 %isNaN% 本源对象。

调用时执行:

  1. num = ? ToNumber(number)。
  2. numNaN,返回 true
  3. 否则返回 false
Note

在 ECMAScript 中检测值 X 是否为 NaN 的可靠方式是 X !== X;仅当且仅当 XNaN 时结果为 true

19.2.4 parseFloat ( string )

该函数根据对参数 string 内容按十进制字面量的解释产生一个 Number 值。

它是 %parseFloat% 本源对象。

调用时执行:

  1. inputString = ? ToString(string)。
  2. trimmedString = ! TrimString(inputString, start)。
  3. trimmed = StringToCodePoints(trimmedString)。
  4. trimmedPrefixtrimmed 的最长前缀,满足 StrDecimalLiteral 语法,可能等于 trimmed 本身。若不存在,返回 NaN
  5. parsedNumber = ParseText(trimmedPrefix, StrDecimalLiteral)。
  6. 断言:parsedNumber解析节点
  7. 返回 parsedNumber 的 StringNumericValue。
Note

该函数可能仅将 string 的前导部分解释为 Number;忽略无法视为十进制字面量部分的代码单元,且不会指示有代码单元被忽略。

19.2.5 parseInt ( string, radix )

该函数依据指定 radixstring 内容的解释产生一个整数 Number。忽略 string 前导空白。若 radix 强制为 0(如其为 undefined),除非数字表示以 "0x""0X" 开头,否则假设为 10;若以其开头则假设为 16。若 radix 为 16,数字表示可选以 "0x""0X" 开头。

它是 %parseInt% 本源对象。

调用时执行:

  1. inputString = ? ToString(string)。
  2. S = ! TrimString(inputString, start)。
  3. sign = 1。
  4. S 非空且首代码单元为 0x002D,设 sign = -1。
  5. S 非空且首代码单元为 0x002B 或 0x002D,设 S 为去掉首单元的子串。
  6. R = (? ToInt32(radix))。
  7. stripPrefix = true
  8. R ≠ 0,则
    1. R < 2 或 R > 36,返回 NaN
    2. R ≠ 16,设 stripPrefix = false
  9. 否则设 R = 10。
  10. stripPrefixtrue,则
    1. S 长度 ≥ 2 且前两代码单元为 "0x""0X",则
      1. S 为从索引 2 起子串。
      2. R = 16。
  11. S 含有非基数 R 数字的代码单元,令 end 为首此类代码单元索引;否则 endS 长度。
  12. Z = S 从 0 到 end 的子串。
  13. Z 为空,返回 NaN
  14. mathInt 为以基数-R 表示 Z 的整数值,使用字母 A-Z / a-z 表示 10 到 35。(但若 R = 10 且 Z 含超过 20 个有效数字,实现可将第 21 位及之后替换为 0;若 R 不在 {2,4,8,10,16,32},mathInt 可为实现近似值。)
  15. mathInt = 0,则
    1. sign = -1,返回 -0𝔽
    2. 返回 +0𝔽
  16. 返回 𝔽(sign × mathInt)。
Note

该函数可能仅将 string 的前导部分解释为整数;忽略无法视为整数表示的代码单元,且不会给出被忽略的提示。

19.2.6 URI 处理函数 (URI Handling Functions)

统一资源标识符(URI)是识别资源(如网页或文件)及其访问传输协议(如 HTTP、FTP)的字符串。ECMAScript 语言本身除提供按本节描述进行 URI 编解码的函数外,不提供使用 URI 的支持。encodeURIdecodeURI 针对完整 URI;它们假设保留字符具特殊含义(如作为分隔符),故不编码它们。encodeURIComponentdecodeURIComponent 针对 URI 的各个组成部分;它们假设保留字符代表文本,需编码以在该组成部分成为完整 URI 的一部分时避免特殊含义。

Note 1

保留字符集合基于 RFC 2396,未反映较新的 RFC 3986 所引入的变化。

Note 2

许多 ECMAScript 实现提供额外操作网页的函数与方法;这些超出本标准范围。

19.2.6.1 decodeURI ( encodedURI )

此函数计算一个新 URI,将每个可能由 encodeURI 引入的转义序列与 UTF-8 编码替换为其表示码点的 UTF-16 编码。encodeURI 不会引入的转义序列不会被替换。

它是 %decodeURI% 本源对象。

调用时执行:

  1. uriString = ? ToString(encodedURI)。
  2. preserveEscapeSet = ";/?:@&=+$,#"
  3. 返回 ? Decode(uriString, preserveEscapeSet)。

19.2.6.2 decodeURIComponent ( encodedURIComponent )

此函数计算新 URI,将每个可能由 encodeURIComponent 引入的转义序列与 UTF-8 编码替换为相应码点的 UTF-16 编码。

它是 %decodeURIComponent% 本源对象。

调用时执行:

  1. componentString = ? ToString(encodedURIComponent)。
  2. preserveEscapeSet 为空字符串。
  3. 返回 ? Decode(componentString, preserveEscapeSet)。

19.2.6.3 encodeURI ( uri )

此函数对一个 UTF-16 编码(6.1.4)的 URI 进行处理,将特定码点的每个实例替换为表示该码点 UTF-8 编码的一至四个转义序列。

它是 %encodeURI% 本源对象。

调用时执行:

  1. uriString = ? ToString(uri)。
  2. extraUnescaped = ";/?:@&=+$,#"
  3. 返回 ? Encode(uriString, extraUnescaped)。

19.2.6.4 encodeURIComponent ( uriComponent )

此函数对一个 UTF-16 编码(6.1.4)的 URI 组成部分处理,将特定码点的每个实例替换为表示该码点 UTF-8 编码的一至四个转义序列。

它是 %encodeURIComponent% 本源对象。

调用时执行:

  1. componentString = ? ToString(uriComponent)。
  2. extraUnescaped 为空字符串。
  3. 返回 ? Encode(componentString, extraUnescaped)。

19.2.6.5 Encode ( string, extraUnescaped )

The abstract operation Encode takes arguments string (字符串) and extraUnescaped (字符串) and returns 正常完成(含字符串)或 throw completion. 执行 URI 编码与转义,将 string 视为 6.1.4 所述的 UTF-16 编码码点序列。若字符在 RFC 2396 标记为未保留或出现在 extraUnescaped 中,则不转义。 It performs the following steps when called:

  1. lenstring 长度。
  2. R 为空字符串。
  3. alwaysUnescaped 为 ASCII 单词字符与 "-.!~*'()" 的串联。
  4. unescapedSet = alwaysUnescapedextraUnescaped 的串联。
  5. k = 0。
  6. 重复,条件:k < len
    1. Cstring 索引 k 的代码单元。
    2. unescapedSet 包含 C,则
      1. kk + 1。
      2. RRC 串联。
    3. 否则,
      1. cp = CodePointAt(string, k)。
      2. cp.[[IsUnpairedSurrogate]]true,抛 URIError
      3. kk + cp.[[CodeUnitCount]]
      4. Octets 为将 cp.[[CodePoint]] 进行 UTF-8 转换得到的八位组列表。
      5. Octets 每个 octet
        1. hexoctet 的大写十六进制字符串。
        2. RR"%"StringPad(hex, 2, "0", start) 串联。
  7. 返回 R
Note

因百分号编码表示单个八位组,一个码点可能由多个连续转义序列(其 UTF-8 各字节)表示。

19.2.6.6 Decode ( string, preserveEscapeSet )

The abstract operation Decode takes arguments string (字符串) and preserveEscapeSet (字符串) and returns 正常完成(含字符串)或 throw completion. 执行 URI 反转义与解码,保留对应 preserveEscapeSet 中基本拉丁字符的转义序列。 It performs the following steps when called:

  1. lenstring 长度。
  2. R 为空字符串。
  3. k = 0。
  4. 重复,条件:k < len
    1. Cstring 索引 k 的代码单元。
    2. S = C
    3. C 为 0x0025,则
      1. k + 3 > len,抛 URIError
      2. escape 为从 kk + 3 的子串。
      3. B = ParseHexOctet(string, k + 1)。
      4. B 非整数,抛 URIError
      5. kk + 2。
      6. nB 中前导 1 比特数。
      7. n = 0,则
        1. asciiChar 为数值 B 的代码单元。
        2. preserveEscapeSet 包含 asciiChar,设 S = escape;否则 S = asciiChar
      8. 否则,
        1. n = 1 或 n > 4,抛 URIError
        2. Octets = « B »。
        3. j = 1。
        4. 重复,条件:j < n
          1. kk + 1。
          2. k + 3 > len,抛 URIError
          3. 若索引 k 代码单元不是 0x0025,抛 URIError
          4. continuationByte = ParseHexOctet(string, k + 1)。
          5. 若其非整数,抛 URIError
          6. 追加 continuationByteOctets
          7. kk + 2。
          8. jj + 1。
        5. 断言:Octets 长度为 n
        6. Octets 不含有效 UTF-8 编码,抛 URIError
        7. V 为对 Octets 应用 UTF-8 转换得到的码点。
        8. S = UTF16EncodeCodePoint(V)。
    4. RRS 串联。
    5. kk + 1。
  5. 返回 R
Note

RFC 3629 禁止解码无效 UTF-8 序列。例如,无效序列 0xC0 0x80 不得解码为 0x0000。Decode 算法的实现遇到此类无效序列必须抛 URIError

19.2.6.7 ParseHexOctet ( string, position )

The abstract operation ParseHexOctet takes arguments string (字符串) and position (非负整数) and returns 非负整数或非空 SyntaxError 对象列表. 解析 stringposition 位置的两个十六进制字符序列为无符号 8 位整数。 It performs the following steps when called:

  1. lenstring 长度。
  2. 断言:position + 2 ≤ len
  3. hexDigits 为从 positionposition + 2 的子串。
  4. parseResult = ParseText(hexDigits, HexDigits[~Sep])。
  5. parseResult 不是解析节点,返回 parseResult
  6. nparseResult 的 MV。
  7. 断言:n 在 [0,255] 范围。
  8. 返回 n

19.3 全局对象的构造器属性 (Constructor Properties of the Global Object)

19.3.1 AggregateError ( . . . )

20.5.7.1

19.3.2 Array ( . . . )

23.1.1

19.3.3 ArrayBuffer ( . . . )

25.1.4

19.3.4 BigInt ( . . . )

21.2.1

19.3.5 BigInt64Array ( . . . )

23.2.5

19.3.6 BigUint64Array ( . . . )

23.2.5

19.3.7 Boolean ( . . . )

20.3.1

19.3.8 DataView ( . . . )

25.3.2

19.3.9 Date ( . . . )

21.4.2

19.3.10 Error ( . . . )

20.5.1

19.3.11 EvalError ( . . . )

20.5.5.1

19.3.12 FinalizationRegistry ( . . . )

26.2.1

19.3.13 Float16Array ( . . . )

23.2.5

19.3.14 Float32Array ( . . . )

23.2.5

19.3.15 Float64Array ( . . . )

23.2.5

19.3.16 Function ( . . . )

20.2.1

19.3.17 Int8Array ( . . . )

23.2.5

19.3.18 Int16Array ( . . . )

23.2.5

19.3.19 Int32Array ( . . . )

23.2.5

19.3.20 Iterator ( . . . )

27.1.3.1

19.3.21 Map ( . . . )

24.1.1

19.3.22 Number ( . . . )

21.1.1

19.3.23 Object ( . . . )

20.1.1

19.3.24 Promise ( . . . )

27.2.3

19.3.25 Proxy ( . . . )

28.2.1

19.3.26 RangeError ( . . . )

20.5.5.2

19.3.27 ReferenceError ( . . . )

20.5.5.3

19.3.28 RegExp ( . . . )

22.2.4

19.3.29 Set ( . . . )

24.2.2

19.3.30 SharedArrayBuffer ( . . . )

25.2.3

19.3.31 String ( . . . )

22.1.1

19.3.32 Symbol ( . . . )

20.4.1

19.3.33 SyntaxError ( . . . )

20.5.5.4

19.3.34 TypeError ( . . . )

20.5.5.5

19.3.35 Uint8Array ( . . . )

23.2.5

19.3.36 Uint8ClampedArray ( . . . )

23.2.5

19.3.37 Uint16Array ( . . . )

23.2.5

19.3.38 Uint32Array ( . . . )

23.2.5

19.3.39 URIError ( . . . )

20.5.5.6

19.3.40 WeakMap ( . . . )

24.3.1

19.3.41 WeakRef ( . . . )

26.1.1

19.3.42 WeakSet ( . . . )

24.4

19.4 全局对象的其他属性 (Other Properties of the Global Object)

19.4.1 Atomics

25.4

19.4.2 JSON

25.5

19.4.3 Math

21.3

19.4.4 Reflect

28.1