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. varEnv 是 Global 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. varEnv 是 Global 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. varEnv 是 Global 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. bindingExistsfalsevarEnv 是 Global Environment Record,则
          1. HasLexicalDeclaration(varEnv, F) 为 false,则
            1. fnDefinable = ? CanDeclareGlobalVar(varEnv, F)。
          2. 否则设 fnDefinablefalse
        6. 否则,
          1. fnDefinabletrue
        7. bindingExistsfalsefnDefinabletrue,则
          1. declaredFunctionOrVarNames 不含 F,则
            1. varEnv 是 Global 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. 注:除非 varEnv 为 Global 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. varEnv 是 Global 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. varEnv 是 Global 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有限值,返回 true
  3. 返回 false

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. trimmedPrefix 为满足 StrDecimalLiteral 语法的 trimmed 的最长前缀,可能为自身。如无前缀,返回 NaN
  5. parsedNumber 为 ParseText(trimmedPrefix, StrDecimalLiteral)。
  6. 断言:parsedNumber 是 Parse Node。
  7. 返回 parsedNumber 的 StringNumericValue。
Note

该函数可能仅解释 string 的前导部分为 Number 值;它会忽略无法作为十进制字面量标记的码元,且不会提示这些码元被忽略。

19.2.5 parseInt( stringradix

该函数根据指定 radix 解释 string 内容,生成整数 Number。string 开头空白会被忽略。若 radix 转换为 0(如为 undefined),则视为 10,除非数字表示以 "0x""0X" 开头,此时为 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(减号),令 SS 从索引 1 开始的子串。
  6. R(? ToInt32(radix))。
  7. stripPrefixtrue
  8. R ≠ 0,则
    1. R < 2 或 R > 36,返回 NaN
    2. R ≠ 16,令 stripPrefixfalse
  9. 否则,
    1. R 为 10。
  10. stripPrefixtrue,则
    1. S 长度 ≥ 2 且首两个码元为 "0x""0X"
      1. SS 从索引 2 开始的子串。
      2. R 为 16。
  11. S 包含非 radix-R 数码元,令 end 为第一个出现该码元的位置,否则令 endS 长度。
  12. ZS 从 0 到 end 的子串。
  13. Z 为空,返回 NaN
  14. mathIntZ 按 radix-R 表示的整数值,A-Z 与 a-z 代表 10-35。(若 R = 10 且有效数码超 20,20 后每位可变 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)是在互联网中标识资源(如网页、文件)及用于访问它们的协议(如 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 编码的 URI(6.1.4),将某些码点替换为一至四个表示 UTF-8 编码的转义序列。

它是 %encodeURI% 内建对象。

其调用时按以下步骤执行:

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

19.2.6.4 encodeURIComponent( uriComponent

此函数处理 UTF-16 编码的 URI(6.1.4),将某些码点替换为一至四个表示 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 返回字符串或抛出异常完成. 执行 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. unescapedSetalwaysUnescapedextraUnescaped 的串联。
  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 为应用 UTF-8 转换到 cp.[[CodePoint]] 的字节列表。
      5. 对每个 octet 属于 Octets
        1. hexoctet 的字符串表示,格式为大写十六进制数。
        2. RR"%"StringPad(hex, 2, "0", start) 的串联。
  7. 返回 R
Note

因百分号编码用于表示单字节,一个码点可能被多个连续转义序列表达(每个 8 位 UTF-8 字节一个转义)。

19.2.6.6 Decode ( string, preserveEscapeSet )

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

  1. lenstring 长度。
  2. R 为空字符串。
  3. k 为 0。
  4. k < len 时,重复:
    1. Cstring 索引 k 的码元。
    2. SC
    3. C 为码元 0x0025(%),则
      1. k + 3 > len,抛出 URIError 异常。
      2. escapestringkk + 3 的子串。
      3. BParseHexOctet(string, k + 1)。
      4. B 非整数,抛出 URIError 异常。
      5. kk + 2。
      6. nB 的高位 1 数量。
      7. n = 0,
        1. asciiChar 为数值为 B 的码元。
        2. preserveEscapeSet 包含 asciiChar,令 Sescape;否则令 SasciiChar
      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. string 索引 k 的码元不是 0x0025(%),抛出 URIError 异常。
          4. continuationByteParseHexOctet(string, k + 1)。
          5. continuationByte 非整数,抛出 URIError 异常。
          6. Octets 追加 continuationByte
          7. kk + 2。
          8. jj + 1。
        5. 断言:Octets 长度为 n
        6. Octets 非法 UTF-8 编码码点,抛出 URIError 异常。
        7. V 为对 Octets 应用 UTF-8 转换所得码点(字节列表转 21 位值)。
        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 对象非空列表. 解析 string 指定位置的两个十六进制字符为无符号 8 位整数。 It performs the following steps when called:

  1. lenstring 长度。
  2. 断言:position + 2 ≤ len
  3. hexDigitsstringpositionposition + 2 的子串。
  4. parseResult 为 ParseText(hexDigits, HexDigits[~Sep])。
  5. parseResult 非 Parse Node,返回 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