ECMAScipt 2017 中文文档
介绍
引言
1 范围
2 一致性
3 规范性参考文献
4 概述
4.1 Web 脚本语言
4.2 ECMAScript 概述
4.2.1 对象
4.2.2 ECMAScript 的严格模式
4.3 术语与定义
4.3.1 类型
4.3.2 原始值
4.3.3 对象
4.3.4 构造函数
4.3.5 原型
4.3.6 普通对象
4.3.7 异常对象
4.3.8 标准对象
4.3.9 内置对象
4.3.10 undefined 值
4.3.11 Undefined类型
4.3.12 null 值
4.3.13 Null 类型
4.3.14 Boolean 值
4.3.15 Boolean 类型
4.3.16 Boolean 对象
4.3.17 String 值
4.3.18 String 类型
4.3.19 String 对象
4.3.20 Number 值
4.3.21 Number 类型
4.3.22 Number 对象
4.3.23 Infinity
4.3.24 NaN
4.3.25 Symbol 值
4.3.26 Symbol 类型
4.3.27 Symbol 对象
4.3.28 函数
4.3.29 内置函数
4.3.30 属性
4.3.31 方法
4.3.32 内置方法
4.3.33 特性
4.3.34 私有属性
4.3.35 继承属性
4.4 该规范的其他部分
5 符号约定
5.1 句法和词法语法
5.1.1 上下文无关语法
5.1.2 词法和正则表达式语法
5.1.3 数字字符串语法
5.1.4 句法语法
5.1.5 语法符号
5.2 算法约定
5.3 静态语义规则
6 ECMAScript 数据类型和值
6.1 ECMAScript 语言类型
6.1.1 Undefined 类型
6.1.2 Null 类型
6.1.3 Boolean 类型
6.1.4 String 类型
6.1.5 Symbol 类型
6.1.5.1 熟悉的 Symbols
6.1.6 Number 类型
6.1.7 Object 类型
6.1.7.1 属性特性
6.1.7.2 Object 内在方法和插槽
6.1.7.3 基本内部方法的不变量
6.1.7.4 熟悉的内在 Objects
6.2 ECMAScript 规范类型
6.2.1 规范类型的列表和记录
6.2.2 规范类型的完成记录
6.2.2.1 正常完成
6.2.2.2 隐式完成值
6.2.2.3 抛出异常
6.2.2.4 如果突然返回
6.2.2.5 更新为空(完成记录,值)
6.2.3 规范类型参考
6.2.3.1 获取值(V)
6.2.3.2 输出值(V,W)
6.2.3.3 获取此值(V)
6.2.3.4 初始化参考绑定(V,W)
6.2.4 属性描述符规范类型
6.2.4.1 访问器描述符(Desc)
6.2.4.2 数据描述符(Desc)
6.2.4.3 通用描述符(Desc)
6.2.4.4 来自属性描述符(Desc)
6.2.4.5 属性描述符(Obj)
6.2.4.6 完成属性描述符(Desc)
6.2.5 词法环境和环境记录规范类型
6.2.6 数据块
6.2.6.1 创建字节数据块(大小)
6.2.6.2 复制数据块字节(到块,到索引,从块,从索引,计数)
7 抽象操作
7.1 类型转换
7.1.1 ToPrimitive ( input [ , PreferredType ] )
7.1.1.1 OrdinaryToPrimitive ( O, hint )
7.1.2 ToBoolean ( argument )
7.1.3 ToNumber ( argument )
7.1.3.1 ToNumber 应用于 String 类型
7.1.3.1.1 RS: MV
7.1.4 ToInteger ( argument )
7.1.5 ToInt32 ( argument )
7.1.6 ToUint32 ( argument )
7.1.7 ToInt16 ( argument )
7.1.8 ToUint16 ( argument )
7.1.9 ToInt8 ( argument )
7.1.10 ToUint8 ( argument )
7.1.11 ToUint8Clamp ( argument )
7.1.12 ToString ( argument )
7.1.12.1 ToString 应用于 Number 类型
7.1.13 ToObject ( argument )
7.1.14 ToPropertyKey ( argument )
7.1.15 ToLength ( argument )
7.1.16 CanonicalNumericIndexString ( argument )
7.1.17 ToIndex ( value )
7.2 测试和比较操作
7.2.1 RequireObjectCoercible ( argument )
7.2.2 IsArray ( argument )
7.2.3 IsCallable ( argument )
7.2.4 IsConstructor ( argument )
7.2.5 IsExtensible ( O )
7.2.6 IsInteger ( argument )
7.2.7 IsPropertyKey ( argument )
7.2.8 IsRegExp ( argument )
7.2.9 SameValue ( x, y )
7.2.10 SameValueZero ( x, y )
7.2.11 SameValueNonNumber ( x, y )
7.2.12 抽象关系比较
7.2.13 抽象相等比较
7.2.14 严格相等比较
7.3 对象上的操作
7.3.1 Get ( O, P )
7.3.2 GetV ( V, P )
7.3.3 Set ( O, P, V, Throw )
7.3.4 CreateDataProperty ( O, P, V )
7.3.5 CreateMethodProperty ( O, P, V )
7.3.6 CreateDataPropertyOrThrow ( O, P, V )
7.3.7 DefinePropertyOrThrow ( O, P, desc )
7.3.8 DeletePropertyOrThrow ( O, P )
7.3.9 GetMethod ( V, P )
7.3.10 HasProperty ( O, P )
7.3.11 HasOwnProperty ( O, P )
7.3.12 Call ( F, V [ , argumentsList ] )
7.3.13 Construct ( F [ , argumentsList [ , newTarget ]] )
7.3.14 SetIntegrityLevel ( O, level )
7.3.15 TestIntegrityLevel ( O, level )
7.3.16 CreateArrayFromList ( elements )
7.3.17 CreateListFromArrayLike ( obj [ , elementTypes ] )
7.3.18 Invoke ( V, P [ , argumentsList ] )
7.3.19 OrdinaryHasInstance ( C, O )
7.3.20 SpeciesConstructor ( O, defaultConstructor )
7.3.21 EnumerableOwnProperties ( O, kind )
7.3.22 GetFunctionRealm ( obj )
7.4 迭代器对象上的操作
7.4.1 GetIterator ( obj [ , method ] )
7.4.2 IteratorNext ( iterator [ , value ] )
7.4.3 IteratorComplete ( iterResult )
7.4.4 IteratorValue ( iterResult )
7.4.5 IteratorStep ( iterator )
7.4.6 IteratorClose ( iterator, completion )
7.4.7 CreateIterResultObject ( value, done )
7.4.8 CreateListIterator ( list )
7.4.8.1 ListIterator next( )
8 可执行代码和执行上下文
8.1 词法环境
8.1.1 环境记录
8.1.1.1 Declarative 环境记录
8.1.1.1.1 HasBinding ( N )
8.1.1.1.2 CreateMutableBinding ( N, D )
8.1.1.1.3 CreateImmutableBinding ( N, S )
8.1.1.1.4 InitializeBinding ( N, V )
8.1.1.1.5 SetMutableBinding ( N, V, S )
8.1.1.1.6 GetBindingValue ( N, S )
8.1.1.1.7 DeleteBinding ( N )
8.1.1.1.8 HasThisBinding ( )
8.1.1.1.9 HasSuperBinding ( )
8.1.1.1.10 WithBaseObject ( )
8.1.1.2 Object 环境记录
8.1.1.2.1 HasBinding ( N )
8.1.1.2.2 CreateMutableBinding ( N, D )
8.1.1.2.3 CreateImmutableBinding ( N, S )
8.1.1.2.4 InitializeBinding ( N, V )
8.1.1.2.5 SetMutableBinding ( N, V, S )
8.1.1.2.6 GetBindingValue ( N, S )
8.1.1.2.7 DeleteBinding ( N )
8.1.1.2.8 HasThisBinding ( )
8.1.1.2.9 HasSuperBinding ( )
8.1.1.2.10 WithBaseObject ( )
8.1.1.3 Function 环境记录
8.1.1.3.1 BindThisValue ( V )
8.1.1.3.2 HasThisBinding ( )
8.1.1.3.3 HasSuperBinding ( )
8.1.1.3.4 GetThisBinding ( )
8.1.1.3.5 GetSuperBase ( )
8.1.1.4 Global 环境记录
8.1.1.4.1 HasBinding ( N )
8.1.1.4.2 CreateMutableBinding ( N, D )
8.1.1.4.3 CreateImmutableBinding ( N, S )
8.1.1.4.4 InitializeBinding ( N, V )
8.1.1.4.5 SetMutableBinding ( N, V, S )
8.1.1.4.6 GetBindingValue ( N, S )
8.1.1.4.7 DeleteBinding ( N )
8.1.1.4.8 HasThisBinding ( )
8.1.1.4.9 HasSuperBinding ( )
8.1.1.4.10 WithBaseObject ( )
8.1.1.4.11 GetThisBinding ( )
8.1.1.4.12 HasVarDeclaration ( N )
8.1.1.4.13 HasLexicalDeclaration ( N )
8.1.1.4.14 HasRestrictedGlobalProperty ( N )
8.1.1.4.15 CanDeclareGlobalVar ( N )
8.1.1.4.16 CanDeclareGlobalFunction ( N )
8.1.1.4.17 CreateGlobalVarBinding ( N, D )
8.1.1.4.18 CreateGlobalFunctionBinding ( N, V, D )
8.1.1.5 Module 环境记录
8.1.1.5.1 GetBindingValue ( N, S )
8.1.1.5.2 DeleteBinding ( N )
8.1.1.5.3 HasThisBinding ( )
8.1.1.5.4 GetThisBinding ( )
8.1.1.5.5 CreateImportBinding ( N, M, N2 )
8.1.2 词法环境操作
8.1.2.1 GetIdentifierReference ( lex, name, strict )
8.1.2.2 NewDeclarativeEnvironment ( E )
8.1.2.3 NewObjectEnvironment ( O, E )
8.1.2.4 NewFunctionEnvironment ( F, newTarget )
8.1.2.5 NewGlobalEnvironment ( G, thisValue )
8.1.2.6 NewModuleEnvironment ( E )
8.2 领域(Realms)
8.2.1 CreateRealm ( )
8.2.2 CreateIntrinsics ( realmRec )
8.2.3 SetRealmGlobalObject ( realmRec, globalObj, thisValue )
8.2.4 SetDefaultGlobalBindings ( realmRec )
8.3 执行上下文
8.3.1 GetActiveScriptOrModule ( )
8.3.2 ResolveBinding ( name [ , env ] )
8.3.3 GetThisEnvironment ( )
8.3.4 ResolveThisBinding ( )
8.3.5 GetNewTarget ( )
8.3.6 GetGlobalObject ( )
8.4 Jobs 和 Job 队列
8.4.1 EnqueueJob ( queueName, job, arguments )
8.5 InitializeHostDefinedRealm ( )
8.6 RunJobs ( )
9 普通和异常对象行为
9.1 普通对象内部方法和内部插槽
9.1.1 [[GetPrototypeOf]] ( )
9.1.1.1 OrdinaryGetPrototypeOf ( O )
9.1.2 [[SetPrototypeOf]] ( V )
9.1.2.1 OrdinarySetPrototypeOf ( O, V )
9.1.3 [[IsExtensible]] ( )
9.1.3.1 OrdinaryIsExtensible ( O )
9.1.4 [[PreventExtensions]] ( )
9.1.4.1 OrdinaryPreventExtensions ( O )
9.1.5 [[GetOwnProperty]] ( P )
9.1.5.1 OrdinaryGetOwnProperty ( O, P )
9.1.6 [[DefineOwnProperty]] ( P, Desc )
9.1.6.1 OrdinaryDefineOwnProperty ( O, P, Desc )
9.1.6.2 IsCompatiblePropertyDescriptor ( Extensible, Desc, Current )
9.1.6.3 ValidateAndApplyPropertyDescriptor ( O, P, extensible, Desc, current )
9.1.7 [[HasProperty]]( P )
9.1.7.1 OrdinaryHasProperty ( O, P )
9.1.8 [[Get]] ( P, Receiver )
9.1.8.1 OrdinaryGet ( O, P, Receiver )
9.1.9 [[Set]] ( P, V, Receiver )
9.1.9.1 OrdinarySet ( O, P, V, Receiver )
9.1.10 [[Delete]] ( P )
9.1.10.1 OrdinaryDelete ( O, P )
9.1.11 [[OwnPropertyKeys]] ( )
9.1.11.1 OrdinaryOwnPropertyKeys ( O )
9.1.12 ObjectCreate ( proto [ , internalSlotsList ] )
9.1.13 OrdinaryCreateFromConstructor ( constructor, intrinsicDefaultProto [ , internalSlotsList ] )
9.1.14 GetPrototypeFromConstructor ( constructor, intrinsicDefaultProto )
9.2 ECMAScript Function 对象
9.2.1 [[Call]] ( thisArgument, argumentsList )
9.2.1.1 PrepareForOrdinaryCall ( F, newTarget )
9.2.1.2 OrdinaryCallBindThis ( F, calleeContext, thisArgument )
9.2.1.3 OrdinaryCallEvaluateBody ( F, argumentsList )
9.2.2 [[Construct]] ( argumentsList, newTarget )
9.2.3 FunctionAllocate ( functionPrototype, strict, functionKind )
9.2.4 FunctionInitialize ( F, kind, ParameterList, Body, Scope )
9.2.5 FunctionCreate ( kind, ParameterList, Body, Scope, Strict [ , prototype ] )
9.2.6 GeneratorFunctionCreate ( kind, ParameterList, Body, Scope, Strict )
9.2.7 AddRestrictedFunctionProperties ( F, realm )
9.2.7.1 %ThrowTypeError% ( )
9.2.8 MakeConstructor ( F [ , writablePrototype [ , prototype ] ] )
9.2.9 MakeClassConstructor ( F )
9.2.10 MakeMethod ( F, homeObject )
9.2.11 SetFunctionName ( F, name [ , prefix ] )
9.2.12 FunctionDeclarationInstantiation ( func, argumentsList )
9.3 内置的 Function 对象
9.4 内置异常对象内部方法和插槽
9.5 代理对象内部方法和内部插槽
Powered by
GitBook
4.3.23 Infinity
4.3.23 Infinity
其值是正无穷数值。
results matching "
"
No results matching "
"