http://people.mozilla.org/~jorendorff/es6-draft.html#sec-23.4
Draft
Report Errors and Issues at: https://bugs.ecmascript.org
Product: Draft for 6th Edition
Component: choose an appropriate one
Version: Rev 27, August 24, 2014 Draft
Ecma/TC39/2014/0xx
Contents
- Introduction
- 1 Scope
- 2 Conformance
- 3 Normative references
- 4 Overview
- 4.1 Web Scripting
- 4.2 ECMAScript Overview
- 4.3 Terms and definitions
- 4.3.1 type
- 4.3.2 primitive value
- 4.3.3 object
- 4.3.4 constructor
- 4.3.5 prototype
- 4.3.6 ordinary object
- 4.3.7 exotic object
- 4.3.8 standard object
- 4.3.9 built-in object
- 4.3.10 undefined value
- 4.3.11 Undefined type
- 4.3.12 null value
- 4.3.13 Null type
- 4.3.14 Boolean value
- 4.3.15 Boolean type
- 4.3.16 Boolean object
- 4.3.17 String value
- 4.3.18 String type
- 4.3.19 String object
- 4.3.20 Number value
- 4.3.21 Number type
- 4.3.22 Number object
- 4.3.23 Infinity
- 4.3.24 NaN
- 4.3.25 Symbol value
- 4.3.26 Symbol type
- 4.3.27 Symbol object
- 4.3.28 function
- 4.3.29 built-in function
- 4.3.30 property
- 4.3.31 method
- 4.3.32 built-in method
- 4.3.33 attribute
- 4.3.34 own property
- 4.3.35 inherited property
- 4.4 Organization of This Specification
- 5 Notational Conventions
- 6 ECMAScript Data Types and Values
- 7 Abstract Operations
- 7.1 Type Conversion and Testing
- 7.1.1 ToPrimitive ( input [, PreferredType] )
- 7.1.2 ToBoolean ( argument )
- 7.1.3 ToNumber ( argument )
- 7.1.4 ToInteger ( argument )
- 7.1.5 ToInt32 ( argument ) — Signed 32 Bit Integer
- 7.1.6 ToUint32 ( argument ) — Unsigned 32 Bit Integer
- 7.1.7 ToInt16 ( argument ) — Signed 16 Bit Integer
- 7.1.8 ToUint16 ( argument ) — Unsigned 16 Bit Integer
- 7.1.9 ToInt8 ( argument ) — Signed 8 Bit Integer
- 7.1.10 ToUint8 ( argument ) — Unsigned 8 Bit Integer
- 7.1.11 ToUint8Clamp ( argument ) — Unsigned 8 Bit Integer, Clamped
- 7.1.12 ToString ( argument )
- 7.1.13 ToObject ( argument )
- 7.1.14 ToPropertyKey ( argument )
- 7.1.15 ToLength ( argument )
- 7.1.16 CanonicalNumericIndexString ( argument )
- 7.2 Testing and Comparison Operations
- 7.2.1 RequireObjectCoercible ( argument )
- 7.2.2 IsCallable ( argument )
- 7.2.3 SameValue(x, y)
- 7.2.4 SameValueZero(x, y)
- 7.2.5 IsConstructor ( argument )
- 7.2.6 IsPropertyKey ( argument )
- 7.2.7 IsExtensible (O)
- 7.2.8 IsInteger ( argument )
- 7.2.9 Abstract Relational Comparison
- 7.2.10 Abstract Equality Comparison
- 7.2.11 Strict Equality Comparison
- 7.3 Operations on Objects
- 7.3.1 Get (O, P)
- 7.3.2 Put (O, P, V, Throw)
- 7.3.3 CreateDataProperty (O, P, V)
- 7.3.4 CreateDataPropertyOrThrow (O, P, V)
- 7.3.5 DefinePropertyOrThrow (O, P, desc)
- 7.3.6 DeletePropertyOrThrow (O, P)
- 7.3.7 GetMethod (O, P)
- 7.3.8 HasProperty (O, P)
- 7.3.9 HasOwnProperty (O, P)
- 7.3.10 Invoke(O,P, [args])
- 7.3.11 SetIntegrityLevel (O, level)
- 7.3.12 TestIntegrityLevel (O, level)
- 7.3.13 CreateArrayFromList (elements)
- 7.3.14 CreateListFromArrayLike (obj)
- 7.3.15 OrdinaryHasInstance (C, O)
- 7.3.16 GetPrototypeFromConstructor ( constructor, intrinsicDefaultProto )
- 7.3.17 CreateFromConstructor (F)
- 7.3.18 Construct (F, argumentsList)
- 7.3.19 GetOption (options, P)
- 7.3.20 EnumerableOwnNames (O)
- 7.3.21 GetFunctionRealm ( obj ) Abstract Operation
- 7.4 Operations on Iterator Objects
- 7.4.1 CheckIterable ( obj )
- 7.4.2 GetIterator ( obj, method )
- 7.4.3 IteratorNext ( iterator, value )
- 7.4.4 IteratorComplete ( iterResult )
- 7.4.5 IteratorValue ( iterResult )
- 7.4.6 IteratorStep ( iterator )
- 7.4.7 IteratorClose( iterator, completion )
- 7.4.8 CreateIterResultObject ( value, done )
- 7.4.9 CreateListIterator ( list )
- 7.4.10 CreateEmptyIterator ( )
- 7.4.11 CreateCompoundIterator ( iterator1, iterator2 )
- 7.5 Operations on Promise Objects
- 7.5.1 PromiseNew ( executor ) Abstract Operation
- 7.5.2 PromiseBuiltinCapability () Abstract Operation
- 7.5.3 PromiseOf (value) Abstract Operation
- 7.5.4 PromiseAll (promiseList) Abstract Operation
- 7.5.5 PromiseCatch (promise, rejectedAction) Abstract Operation
- 7.5.6 PromiseThen (promise, resolvedAction, rejectedAction) Abstract Operation
- 7.1 Type Conversion and Testing
- 8 Executable Code and Execution Contexts
- 9 Ordinary and Exotic Objects Behaviours
- 9.1 Ordinary Object Internal Methods and Internal Slots
- 9.1.1 [[GetPrototypeOf]] ( )
- 9.1.2 [[SetPrototypeOf]] (V)
- 9.1.3 [[IsExtensible]] ( )
- 9.1.4 [[PreventExtensions]] ( )
- 9.1.5 [[GetOwnProperty]] (P)
- 9.1.6 [[DefineOwnProperty]] (P, Desc)
- 9.1.7 [[HasProperty]](P)
- 9.1.8 [[Get]] (P, Receiver)
- 9.1.9 [[Set]] ( P, V, Receiver)
- 9.1.10 [[Delete]] (P)
- 9.1.11 [[Enumerate]] ()
- 9.1.12 [[OwnPropertyKeys]] ( )
- 9.1.13 ObjectCreate(proto, internalSlotsList) Abstract Operation
- 9.1.14 OrdinaryCreateFromConstructor ( constructor, intrinsicDefaultProto, internalSlotsList )
- 9.2 ECMAScript Function Objects
- 9.2.1 [[GetOwnProperty]] (P)
- 9.2.2 [[Call]] ( thisArgument, argumentsList)
- 9.2.3 [[Construct]] ( argumentsList)
- 9.2.4 FunctionAllocate (functionPrototype, strict) Abstract Operation
- 9.2.5 FunctionInitialize (F, kind, Strict, ParameterList, Body, Scope) Abstract Operation
- 9.2.6 FunctionCreate (kind, ParameterList, Body, Scope, Strict) Abstract Operation
- 9.2.7 GeneratorFunctionCreate (kind, ParameterList, Body, Scope, Strict) Abstract Operation
- 9.2.8 AddRestrictedFunctionProperties ( F, realm ) Abstract Operation
- 9.2.9 MakeConstructor (F, writablePrototype, prototype) Abstract Operation
- 9.2.10 MakeMethod ( F, methodName, homeObject) Abstract Operation
- 9.2.11 SetFunctionName (F, name, prefix) Abstract Operation
- 9.2.12 CloneMethod(function, newHome, newName) Abstract Operation
- 9.2.13 FunctionDeclarationInstantiation(func, argumentsList, env ) Abstract Operation
- 9.3 Built-in Function Objects
- 9.4 Built-in Exotic Object Internal Methods and Data Fields
- 9.5 Proxy Object Internal Methods and Internal Slots
- 9.5.1 [[GetPrototypeOf]] ( )
- 9.5.2 [[SetPrototypeOf]] (V)
- 9.5.3 [[IsExtensible]] ( )
- 9.5.4 [[PreventExtensions]] ( )
- 9.5.5 [[GetOwnProperty]] (P)
- 9.5.6 [[DefineOwnProperty]] (P, Desc)
- 9.5.7 [[HasProperty]] (P)
- 9.5.8 [[Get]] (P, Receiver)
- 9.5.9 [[Set]] ( P, V, Receiver)
- 9.5.10 [[Delete]] (P)
- 9.5.11 [[Enumerate]] ()
- 9.5.12 [[OwnPropertyKeys]] ( )
- 9.5.13 [[Call]] (thisArgument, argumentsList)
- 9.5.14 [[Construct]] Internal Method
- 9.5.15 ProxyCreate(target, handler) Abstract Operation
- 9.1 Ordinary Object Internal Methods and Internal Slots
- 10 ECMAScript Language: Source Code
- 11 ECMAScript Language: Lexical Grammar
- 12 ECMAScript Language: Expressions
- 12.1 Identifiers
- 12.2 Primary Expression
- 12.3 Left-Hand-Side Expressions
- 12.4 Postfix Expressions
- 12.5 Unary Operators
- 12.5.1 Static Semantics: Early Errors
- 12.5.2 Static Semantics: IsFunctionDefinition
- 12.5.3 Static Semantics: IsValidSimpleAssignmentTarget
- 12.5.4 The
delete
Operator - 12.5.5 The
void
Operator - 12.5.6 The
typeof
Operator - 12.5.7 Prefix Increment Operator
- 12.5.8 Prefix Decrement Operator
- 12.5.9 Unary
+
Operator - 12.5.10 Unary
-
Operator - 12.5.11 Bitwise NOT Operator (
~
) - 12.5.12 Logical NOT Operator (
!
)
- 12.6 Multiplicative Operators
- 12.7 Additive Operators
- 12.8 Bitwise Shift Operators
- 12.9 Relational Operators
- 12.10 Equality Operators
- 12.11 Binary Bitwise Operators
- 12.12 Binary Logical Operators
- 12.13 Conditional Operator (
? : )
- 12.14 Assignment Operators
- 12.15 Comma Operator (
, )
- 13 ECMAScript Language: Statements and Declarations
- 13.0 Statement Semantics
- 13.1 Block
- 13.1.1 Static Semantics: Early Errors
- 13.1.2 Static Semantics: LexicallyDeclaredNames
- 13.1.3 Static Semantics: LexicallyScopedDeclarations
- 13.1.4 Static Semantics: TopLevelLexicallyDeclaredNames
- 13.1.5 Static Semantics: TopLevelLexicallyScopedDeclarations
- 13.1.6 Static Semantics: TopLevelVarDeclaredNames
- 13.1.7 Static Semantics: TopLevelVarScopedDeclarations
- 13.1.8 Static Semantics: VarDeclaredNames
- 13.1.9 Static Semantics: VarScopedDeclarations
- 13.1.10 Runtime Semantics: Evaluation
- 13.1.11 Runtime Semantics: BlockDeclarationInstantiation( code, env )
- 13.2 Declarations and the Variable Statement
- 13.3 Empty Statement
- 13.3.1 Runtime Semantics: Evaluation
- 13.4 Expression Statement
- 13.4.1 Runtime Semantics: Evaluation
- 13.5 The
if
Statement - 13.6 Iteration Statements
- 13.7 The
continue
Statement - 13.8 The
break
Statement - 13.9 The
return
Statement- 13.9.1 Runtime Semantics: Evaluation
- 13.10 The
with
Statement - 13.11 The
switch
Statement- 13.11.1 Static Semantics: Early Errors
- 13.11.2 Static Semantics: LexicallyDeclaredNames
- 13.11.3 Static Semantics: LexicallyScopedDeclarations
- 13.11.4 Static Semantics: VarDeclaredNames
- 13.11.5 Static Semantics: VarScopedDeclarations
- 13.11.6 Runtime Semantics: CaseBlockEvaluation
- 13.11.7 Runtime Semantics: CaseSelectorEvaluation
- 13.11.8 Runtime Semantics: Evaluation
- 13.12 Labelled Statements
- 13.12.1 Static Semantics: Early Errors
- 13.12.2 Static Semantics: CurrentLabelSet
- 13.12.3 Static Semantics: IsLabelledFunction ( stmt )
- 13.12.4 Static Semantics: LexicallyDeclaredNames
- 13.12.5 Static Semantics: LexicallyScopedDeclarations
- 13.12.6 Static Semantics: TopLevelLexicallyDeclaredNames
- 13.12.7 Static Semantics: TopLevelLexicallyScopedDeclarations
- 13.12.8 Static Semantics: TopLevelVarDeclaredNames
- 13.12.9 Static Semantics: TopLevelVarScopedDeclarations
- 13.12.10 Static Semantics: VarDeclaredNames
- 13.12.11 Static Semantics: VarScopedDeclarations
- 13.12.12 Runtime Semantics: LabelledEvaluation
- 13.13 The
throw
Statement- 13.13.1 Runtime Semantics: Evaluation
- 13.14 The
try
Statement - 13.15 The
debugger
statement- 13.15.1 Runtime Semantics: Evaluation
- 14 ECMAScript Language: Functions and Classes
- 14.1 Function Definitions
- 14.1.1 Directive Prologues and the Use Strict Directive
- 14.1.2 Static Semantics: Early Errors
- 14.1.3 Static Semantics: BoundNames
- 14.1.4 Static Semantics: Contains
- 14.1.5 Static Semantics: ContainsExpression
- 14.1.6 Static Semantics: ExpectedArgumentCount
- 14.1.7 Static Semantics: HasInitializer
- 14.1.8 Static Semantics: HasName
- 14.1.9 Static Semantics: IsAnonymousFunctionDefinition ( production) Abstract Operation
- 14.1.10 Static Semantics: IsConstantDeclaration
- 14.1.11 Static Semantics: IsFunctionDefinition
- 14.1.12 Static Semantics: IsSimpleParameterList
- 14.1.13 Static Semantics: IsStrict
- 14.1.14 Static Semantics: LexicallyDeclaredNames
- 14.1.15 Static Semantics: LexicallyScopedDeclarations
- 14.1.16 Static Semantics: ReferencesSuper
- 14.1.17 Static Semantics: VarDeclaredNames
- 14.1.18 Static Semantics: VarScopedDeclarations
- 14.1.19 Runtime Semantics: EvaluateBody
- 14.1.20 Runtime Semantics: IteratorBindingInitialization
- 14.1.21 Runtime Semantics: InstantiateFunctionObject
- 14.1.22 Runtime Semantics: Evaluation
- 14.2 Arrow Function Definitions
- 14.2.1 Static Semantics: Early Errors
- 14.2.2 Static Semantics: BoundNames
- 14.2.3 Static Semantics: Contains
- 14.2.4 Static Semantics: ContainsExpression
- 14.2.5 Static Semantics: CoveredFormalsList
- 14.2.6 Static Semantics: ExpectedArgumentCount
- 14.2.7 Static Semantics: HasInitializer
- 14.2.8 Static Semantics: HasName
- 14.2.9 Static Semantics: IsSimpleParameterList
- 14.2.10 Static Semantics: LexicallyDeclaredNames
- 14.2.11 Static Semantics: LexicallyScopedDeclarations
- 14.2.12 Static Semantics: ReferencesSuper
- 14.2.13 Static Semantics: VarDeclaredNames
- 14.2.14 Static Semantics: VarScopedDeclarations
- 14.2.15 Runtime Semantics: IteratorBindingInitialization
- 14.2.16 Runtime Semantics: EvaluateBody
- 14.2.17 Runtime Semantics: Evaluation
- 14.3 Method Definitions
- 14.3.1 Static Semantics: Early Errors
- 14.3.2 Static Semantics: ComputedPropertyContains
- 14.3.3 Static Semantics: ExpectedArgumentCount
- 14.3.4 Static Semantics: HasComputedPropertyKey
- 14.3.5 Static Semantics: PropName
- 14.3.6 Static Semantics: ReferencesSuper
- 14.3.7 Static Semantics: SpecialMethod
- 14.3.8 Runtime Semantics: DefineMethod
- 14.3.9 Runtime Semantics: PropertyDefinitionEvaluation
- 14.4 Generator Function Definitions
- 14.4.1 Static Semantics: Early Errors
- 14.4.2 Static Semantics: BoundNames
- 14.4.3 Static Semantics: ComputedPropertyContains
- 14.4.4 Static Semantics: Contains
- 14.4.5 Static Semantics: HasComputedPropertyKey
- 14.4.6 Static Semantics: HasName
- 14.4.7 Static Semantics: IsConstantDeclaration
- 14.4.8 Static Semantics: IsFunctionDefinition
- 14.4.9 Static Semantics: PropName
- 14.4.10 Static Semantics: ReferencesSuper
- 14.4.11 Runtime Semantics: EvaluateBody
- 14.4.12 Runtime Semantics: InstantiateFunctionObject
- 14.4.13 Runtime Semantics: PropertyDefinitionEvaluation
- 14.4.14 Runtime Semantics: Evaluation
- 14.5 Class Definitions
- 14.5.1 Static Semantics: Early Errors
- 14.5.2 Static Semantics: BoundNames
- 14.5.3 Static Semantics: ConstructorMethod
- 14.5.4 Static Semantics: Contains
- 14.5.5 Static Semantics: ComputedPropertyContains
- 14.5.6 Static Semantics: HasName
- 14.5.7 Static Semantics: IsConstantDeclaration
- 14.5.8 Static Semantics: IsFunctionDefinition
- 14.5.9 Static Semantics: IsStatic
- 14.5.10 Static Semantics: NonConstructorMethodDefinitions
- 14.5.11 Static Semantics: PrototypePropertyNameList
- 14.5.12 Static Semantics: PropName
- 14.5.13 Static Semantics: StaticPropertyNameList
- 14.5.14 Runtime Semantics: ClassDefinitionEvaluation
- 14.5.15 Runtime Semantics: Evaluation
- 14.6 Tail Position Calls
- 14.1 Function Definitions
- 15 ECMAScript Language: Scripts and Modules
- 15.1 Scripts
- 15.1.1 Static Semantics: Early Errors
- 15.1.2 Static Semantics: IsStrict
- 15.1.3 Static Semantics: LexicallyDeclaredNames
- 15.1.4 Static Semantics: LexicallyScopedDeclarations
- 15.1.5 Static Semantics: VarDeclaredNames
- 15.1.6 Static Semantics: VarScopedDeclarations
- 15.1.7 Runtime Semantics: ScriptEvaluation
- 15.1.8 Runtime Semantics: GlobalDeclarationInstantiation
- 15.1.9 Runtime Semantics: ScriptEvaluationJob ( source )
- 15.2 Modules
- 15.1 Scripts
- 16 Error Handling and Language Extensions
- 16.1 Forbidden Extensions
- 17 ECMAScript Standard Built-in Objects
- 18 The Global Object
- 18.1 Value Properties of the Global Object
- 18.2 Function Properties of the Global Object
- 18.3 Constructor Properties of the Global Object
- 18.3.1 Array ( . . . )
- 18.3.2 ArrayBuffer ( . . . )
- 18.3.3 Boolean ( . . . )
- 18.3.4 DataView ( . . . )
- 18.3.5 Date ( . . . )
- 18.3.6 Error ( . . . )
- 18.3.7 EvalError ( . . . )
- 18.3.8 Float32Array ( . . . )
- 18.3.9 Float64Array ( . . . )
- 18.3.10 Function ( . . . )
- 18.3.11 Int8Array ( . . . )
- 18.3.12 Int16Array ( . . . )
- 18.3.13 Int32Array ( . . . )
- 18.3.14 Map ( . . . )
- 18.3.15 Number ( . . . )
- 18.3.16 Object ( . . . )
- 18.3.17 Promise ( . . . )
- 18.3.18 RangeError ( . . . )
- 18.3.19 ReferenceError ( . . . )
- 18.3.20 RegExp ( . . . )
- 18.3.21 Set ( . . . )
- 18.3.22 String ( . . . )
- 18.3.23 Symbol ( . . . )
- 18.3.24 SyntaxError ( . . . )
- 18.3.25 TypeError ( . . . )
- 18.3.26 Uint8Array ( . . . )
- 18.3.27 Uint8ClampedArray ( . . . )
- 18.3.28 Uint16Array ( . . . )
- 18.3.29 Uint32Array ( . . . )
- 18.3.30 URIError ( . . . )
- 18.3.31 WeakMap ( . . . )
- 18.3.32 WeakSet ( . . . )
- 18.4 Other Properties of the Global Object
- 19 Fundamental Objects
- 20 Numbers and Dates
- 21 Text Processing
- 22 Indexed Collections
- 22.1 Array Objects
- 22.2 TypedArray Objects
- 22.2.1 The %TypedArray% Intrinsic Object
- 22.2.2 Properties of the %TypedArray% Intrinsic Object
- 22.2.3 Properties of the %TypedArrayPrototype% Object
- 22.2.4 The TypedArray Constructors
- 22.2.5 Properties of the TypedArray Constructors
- 22.2.6 Properties of TypedArray Prototype Objects
- 22.2.7 Properties of TypedArray Instances
- 23 Keyed Collection
- 24 Structured Data
- 25 Control Abstraction Objects
- 26 Reflection
- 26.1 The Reflect Object
- 26.1.1 Reflect.apply ( target, thisArgument, argumentsList )
- 26.1.2 Reflect.construct ( target, argumentsList )
- 26.1.3 Reflect.defineProperty ( target, propertyKey, attributes )
- 26.1.4 Reflect.deleteProperty ( target, propertyKey )
- 26.1.5 Reflect.enumerate ( target )
- 26.1.6 Reflect.get ( target, propertyKey [ , receiver ])
- 26.1.7 Reflect.getOwnPropertyDescriptor ( target, propertyKey )
- 26.1.8 Reflect.getPrototypeOf ( target )
- 26.1.9 Reflect.has ( target, propertyKey )
- 26.1.10 Reflect.isExtensible (target)
- 26.1.11 Reflect.ownKeys ( target )
- 26.1.12 Reflect.preventExtensions ( target )
- 26.1.13 Reflect.set ( target, propertyKey, V [ , receiver ] )
- 26.1.14 Reflect.setPrototypeOf ( target, proto )
- 26.2 Loader Objects
- 26.3 The System Object
- 26.4 Proxy Objects
- 26.1 The Reflect Object
- Annex A (informative) Grammar Summary
- Annex B (normative) Additional ECMAScript Features for Web Browsers
- Annex C (informative) The Strict Mode of ECMAScript
- Annex D (informative) Corrections and Clarifications with Possible Compatibility Impact
- Annex E (informative) Additions and Changes That Introduce Incompatibilities with Prior Editions
- Bibliography