Movatterモバイル変換


[0]ホーム

URL:


Pins
Table of Contents
  1. Introduction
  2. 1 Scope
  3. +2 Conformance
    1. 2.1 Example Normative Optional Clause Heading
    2. 2.2 Example Legacy Clause Heading
    3. 2.3 Example Legacy Normative Optional Clause Heading
  4. 3 Normative References
  5. +4 Overview
    1. 4.1 Web Scripting
    2. 4.2 Hosts and Implementations
    3. +4.3 ECMAScript Overview
      1. 4.3.1 Objects
      2. 4.3.2 The Strict Variant of ECMAScript
    4. +4.4 Terms and Definitions
      1. 4.4.1 implementation-approximated
      2. 4.4.2 implementation-defined
      3. 4.4.3 host-defined
      4. 4.4.4 type
      5. 4.4.5 primitive value
      6. 4.4.6 object
      7. 4.4.7 constructor
      8. 4.4.8 prototype
      9. 4.4.9 ordinary object
      10. 4.4.10 exotic object
      11. 4.4.11 standard object
      12. 4.4.12 built-in object
      13. 4.4.13 undefined value
      14. 4.4.14 Undefined type
      15. 4.4.15 null value
      16. 4.4.16 Null type
      17. 4.4.17 Boolean value
      18. 4.4.18 Boolean type
      19. 4.4.19 Boolean object
      20. 4.4.20 String value
      21. 4.4.21 String type
      22. 4.4.22 String object
      23. 4.4.23 Number value
      24. 4.4.24 Number type
      25. 4.4.25 Number object
      26. 4.4.26 Infinity
      27. 4.4.27 NaN
      28. 4.4.28 BigInt value
      29. 4.4.29 BigInt type
      30. 4.4.30 BigInt object
      31. 4.4.31 Symbol value
      32. 4.4.32 Symbol type
      33. 4.4.33 Symbol object
      34. 4.4.34 function
      35. 4.4.35 built-in function
      36. 4.4.36 built-in constructor
      37. 4.4.37 property
      38. 4.4.38 method
      39. 4.4.39 built-in method
      40. 4.4.40 attribute
      41. 4.4.41 own property
      42. 4.4.42 inherited property
    5. 4.5 Organization of This Specification
  6. +5 Notational Conventions
    1. +5.1 Syntactic and Lexical Grammars
      1. 5.1.1 Context-Free Grammars
      2. 5.1.2 The Lexical and RegExp Grammars
      3. 5.1.3 The Numeric String Grammar
      4. 5.1.4 The Syntactic Grammar
      5. +5.1.5 Grammar Notation
        1. 5.1.5.1 Terminal Symbols
        2. 5.1.5.2 Nonterminal Symbols and Productions
        3. 5.1.5.3 Optional Symbols
        4. 5.1.5.4 Grammatical Parameters
        5. 5.1.5.5 one of
        6. 5.1.5.6 [empty]
        7. 5.1.5.7 Lookahead Restrictions
        8. 5.1.5.8 [noLineTerminator here]
        9. 5.1.5.9 but not
        10. 5.1.5.10 Descriptive Phrases
    2. +5.2 Algorithm Conventions
      1. 5.2.1 Abstract Operations
      2. 5.2.2 Syntax-Directed Operations
      3. +5.2.3 Runtime Semantics
        1. 5.2.3.1 Completion (completionRecord )
        2. 5.2.3.2 Throw an Exception
        3. 5.2.3.3 ReturnIfAbrupt
        4. 5.2.3.4 ReturnIfAbrupt Shorthands
        5. 5.2.3.5 Implicit Normal Completion
      4. 5.2.4 Static Semantics
      5. 5.2.5 Mathematical Operations
      6. 5.2.6 Value Notation
      7. 5.2.7 Identity
  7. +6 ECMAScript Data Types and Values
    1. +6.1 ECMAScript Language Types
      1. 6.1.1 The Undefined Type
      2. 6.1.2 The Null Type
      3. 6.1.3 The Boolean Type
      4. +6.1.4 The String Type
        1. 6.1.4.1 StringIndexOf (string,searchValue,fromIndex )
        2. 6.1.4.2 StringLastIndexOf (string,searchValue,fromIndex )
      5. +6.1.5 The Symbol Type
        1. 6.1.5.1 Well-Known Symbols
      6. +6.1.6 Numeric Types
        1. +6.1.6.1 The Number Type
          1. 6.1.6.1.1 Number::unaryMinus (x )
          2. 6.1.6.1.2 Number::bitwiseNOT (x )
          3. 6.1.6.1.3 Number::exponentiate (base,exponent )
          4. 6.1.6.1.4 Number::multiply (x,y )
          5. 6.1.6.1.5 Number::divide (x,y )
          6. 6.1.6.1.6 Number::remainder (n,d )
          7. 6.1.6.1.7 Number::add (x,y )
          8. 6.1.6.1.8 Number::subtract (x,y )
          9. 6.1.6.1.9 Number::leftShift (x,y )
          10. 6.1.6.1.10 Number::signedRightShift (x,y )
          11. 6.1.6.1.11 Number::unsignedRightShift (x,y )
          12. 6.1.6.1.12 Number::lessThan (x,y )
          13. 6.1.6.1.13 Number::equal (x,y )
          14. 6.1.6.1.14 Number::sameValue (x,y )
          15. 6.1.6.1.15 Number::sameValueZero (x,y )
          16. 6.1.6.1.16 NumberBitwiseOp (op,x,y )
          17. 6.1.6.1.17 Number::bitwiseAND (x,y )
          18. 6.1.6.1.18 Number::bitwiseXOR (x,y )
          19. 6.1.6.1.19 Number::bitwiseOR (x,y )
          20. 6.1.6.1.20 Number::toString (x,radix )
        2. +6.1.6.2 The BigInt Type
          1. 6.1.6.2.1 BigInt::unaryMinus (x )
          2. 6.1.6.2.2 BigInt::bitwiseNOT (x )
          3. 6.1.6.2.3 BigInt::exponentiate (base,exponent )
          4. 6.1.6.2.4 BigInt::multiply (x,y )
          5. 6.1.6.2.5 BigInt::divide (x,y )
          6. 6.1.6.2.6 BigInt::remainder (n,d )
          7. 6.1.6.2.7 BigInt::add (x,y )
          8. 6.1.6.2.8 BigInt::subtract (x,y )
          9. 6.1.6.2.9 BigInt::leftShift (x,y )
          10. 6.1.6.2.10 BigInt::signedRightShift (x,y )
          11. 6.1.6.2.11 BigInt::unsignedRightShift (x,y )
          12. 6.1.6.2.12 BigInt::lessThan (x,y )
          13. 6.1.6.2.13 BigInt::equal (x,y )
          14. 6.1.6.2.14 BinaryAnd (x,y )
          15. 6.1.6.2.15 BinaryOr (x,y )
          16. 6.1.6.2.16 BinaryXor (x,y )
          17. 6.1.6.2.17 BigIntBitwiseOp (op,x,y )
          18. 6.1.6.2.18 BigInt::bitwiseAND (x,y )
          19. 6.1.6.2.19 BigInt::bitwiseXOR (x,y )
          20. 6.1.6.2.20 BigInt::bitwiseOR (x,y )
          21. 6.1.6.2.21 BigInt::toString (x,radix )
      7. +6.1.7 The Object Type
        1. 6.1.7.1 Property Attributes
        2. 6.1.7.2 Object Internal Methods and Internal Slots
        3. 6.1.7.3 Invariants of the Essential Internal Methods
        4. 6.1.7.4 Well-Known Intrinsic Objects
    2. +6.2 ECMAScript Specification Types
      1. 6.2.1 The Enum Specification Type
      2. 6.2.2 The List and Record Specification Types
      3. 6.2.3 The Set and Relation Specification Types
      4. +6.2.4 The Completion Record Specification Type
        1. 6.2.4.1 NormalCompletion (value )
        2. 6.2.4.2 ThrowCompletion (value )
        3. 6.2.4.3 ReturnCompletion (value )
        4. 6.2.4.4 UpdateEmpty (completionRecord,value )
      5. +6.2.5 The Reference Record Specification Type
        1. 6.2.5.1 IsPropertyReference (V )
        2. 6.2.5.2 IsUnresolvableReference (V )
        3. 6.2.5.3 IsSuperReference (V )
        4. 6.2.5.4 IsPrivateReference (V )
        5. 6.2.5.5 GetValue (V )
        6. 6.2.5.6 PutValue (V,W )
        7. 6.2.5.7 GetThisValue (V )
        8. 6.2.5.8 InitializeReferencedBinding (V,W )
        9. 6.2.5.9 MakePrivateReference (baseValue,privateIdentifier )
      6. +6.2.6 The Property Descriptor Specification Type
        1. 6.2.6.1 IsAccessorDescriptor (Desc )
        2. 6.2.6.2 IsDataDescriptor (Desc )
        3. 6.2.6.3 IsGenericDescriptor (Desc )
        4. 6.2.6.4 FromPropertyDescriptor (Desc )
        5. 6.2.6.5 ToPropertyDescriptor (Obj )
        6. 6.2.6.6 CompletePropertyDescriptor (Desc )
      7. 6.2.7 The Environment Record Specification Type
      8. 6.2.8 The Abstract Closure Specification Type
      9. +6.2.9 Data Blocks
        1. 6.2.9.1 CreateByteDataBlock (size )
        2. 6.2.9.2 CreateSharedByteDataBlock (size )
        3. 6.2.9.3 CopyDataBlockBytes (toBlock,toIndex,fromBlock,fromIndex,count )
      10. 6.2.10 The PrivateElement Specification Type
      11. 6.2.11 The ClassFieldDefinition Record Specification Type
      12. 6.2.12 Private Names
      13. 6.2.13 The ClassStaticBlockDefinition Record Specification Type
  8. +7 Abstract Operations
    1. +7.1 Type Conversion
      1. +7.1.1 ToPrimitive (input [ ,preferredType ] )
        1. 7.1.1.1 OrdinaryToPrimitive (O,hint )
      2. 7.1.2 ToBoolean (argument )
      3. 7.1.3 ToNumeric (value )
      4. +7.1.4 ToNumber (argument )
        1. +7.1.4.1 ToNumber Applied to the String Type
          1. 7.1.4.1.1 StringToNumber (str )
          2. 7.1.4.1.2 RS: StringNumericValue
          3. 7.1.4.1.3 RoundMVResult (n )
      5. 7.1.5 ToIntegerOrInfinity (argument )
      6. 7.1.6 ToInt32 (argument )
      7. 7.1.7 ToUint32 (argument )
      8. 7.1.8 ToInt16 (argument )
      9. 7.1.9 ToUint16 (argument )
      10. 7.1.10 ToInt8 (argument )
      11. 7.1.11 ToUint8 (argument )
      12. 7.1.12 ToUint8Clamp (argument )
      13. 7.1.13 ToBigInt (argument )
      14. +7.1.14 StringToBigInt (str )
        1. 7.1.14.1 StringIntegerLiteral Grammar
        2. 7.1.14.2 RS: MV
      15. 7.1.15 ToBigInt64 (argument )
      16. 7.1.16 ToBigUint64 (argument )
      17. 7.1.17 ToString (argument )
      18. 7.1.18 ToObject (argument )
      19. 7.1.19 ToPropertyKey (argument )
      20. 7.1.20 ToLength (argument )
      21. 7.1.21 CanonicalNumericIndexString (argument )
      22. 7.1.22 ToIndex (value )
    2. +7.2 Testing and Comparison Operations
      1. 7.2.1 RequireObjectCoercible (argument )
      2. 7.2.2 IsArray (argument )
      3. 7.2.3 IsCallable (argument )
      4. 7.2.4 IsConstructor (argument )
      5. 7.2.5 IsExtensible (O )
      6. 7.2.6 IsRegExp (argument )
      7. 7.2.7 SS: IsStringWellFormedUnicode (string )
      8. 7.2.8 SameType (x,y )
      9. 7.2.9 SameValue (x,y )
      10. 7.2.10 SameValueZero (x,y )
      11. 7.2.11 SameValueNonNumber (x,y )
      12. 7.2.12 IsLessThan (x,y,LeftFirst )
      13. 7.2.13 IsLooselyEqual (x,y )
      14. 7.2.14 IsStrictlyEqual (x,y )
    3. +7.3 Operations on Objects
      1. 7.3.1 MakeBasicObject (internalSlotsList )
      2. 7.3.2 Get (O,P )
      3. 7.3.3 GetV (V,P )
      4. 7.3.4 Set (O,P,V,Throw )
      5. 7.3.5 CreateDataProperty (O,P,V )
      6. 7.3.6 CreateDataPropertyOrThrow (O,P,V )
      7. 7.3.7 CreateNonEnumerableDataPropertyOrThrow (O,P,V )
      8. 7.3.8 DefinePropertyOrThrow (O,P,desc )
      9. 7.3.9 DeletePropertyOrThrow (O,P )
      10. 7.3.10 GetMethod (V,P )
      11. 7.3.11 HasProperty (O,P )
      12. 7.3.12 HasOwnProperty (O,P )
      13. 7.3.13 Call (F,V [ ,argumentsList ] )
      14. 7.3.14 Construct (F [ ,argumentsList [ ,newTarget ] ] )
      15. 7.3.15 SetIntegrityLevel (O,level )
      16. 7.3.16 TestIntegrityLevel (O,level )
      17. 7.3.17 CreateArrayFromList (elements )
      18. 7.3.18 LengthOfArrayLike (obj )
      19. 7.3.19 CreateListFromArrayLike (obj [ ,validElementTypes ] )
      20. 7.3.20 Invoke (V,P [ ,argumentsList ] )
      21. 7.3.21 OrdinaryHasInstance (C,O )
      22. 7.3.22 SpeciesConstructor (O,defaultConstructor )
      23. 7.3.23 EnumerableOwnProperties (O,kind )
      24. 7.3.24 GetFunctionRealm (obj )
      25. 7.3.25 CopyDataProperties (target,source,excludedItems )
      26. 7.3.26 PrivateElementFind (O,P )
      27. 7.3.27 PrivateFieldAdd (O,P,value )
      28. 7.3.28 PrivateMethodOrAccessorAdd (O,method )
      29. 7.3.29 HostEnsureCanAddPrivateElement (O )
      30. 7.3.30 PrivateGet (O,P )
      31. 7.3.31 PrivateSet (O,P,value )
      32. 7.3.32 DefineField (receiver,fieldRecord )
      33. 7.3.33 InitializeInstanceElements (O,constructor )
      34. 7.3.34 AddValueToKeyedGroup (groups,key,value )
      35. 7.3.35 GroupBy (items,callback,keyCoercion )
      36. 7.3.36 GetOptionsObject (options )
      37. 7.3.37 SetterThatIgnoresPrototypeProperties (thisValue,home,p,v )
    4. +7.4 Operations on Iterator Objects
      1. 7.4.1 Iterator Records
      2. 7.4.2 GetIteratorDirect (obj )
      3. 7.4.3 GetIteratorFromMethod (obj,method )
      4. 7.4.4 GetIterator (obj,kind )
      5. 7.4.5 GetIteratorFlattenable (obj,primitiveHandling )
      6. 7.4.6 IteratorNext (iteratorRecord [ ,value ] )
      7. 7.4.7 IteratorComplete (iteratorResult )
      8. 7.4.8 IteratorValue (iteratorResult )
      9. 7.4.9 IteratorStep (iteratorRecord )
      10. 7.4.10 IteratorStepValue (iteratorRecord )
      11. 7.4.11 IteratorClose (iteratorRecord,completion )
      12. 7.4.12 IfAbruptCloseIterator (value,iteratorRecord )
      13. 7.4.13 AsyncIteratorClose (iteratorRecord,completion )
      14. 7.4.14 CreateIteratorResultObject (value,done )
      15. 7.4.15 CreateListIteratorRecord (list )
      16. 7.4.16 IteratorToList (iteratorRecord )
  9. +8 Syntax-Directed Operations
    1. 8.1 RS: Evaluation
    2. +8.2 Scope Analysis
      1. 8.2.1 SS: BoundNames
      2. 8.2.2 SS: DeclarationPart
      3. 8.2.3 SS: IsConstantDeclaration
      4. 8.2.4 SS: LexicallyDeclaredNames
      5. 8.2.5 SS: LexicallyScopedDeclarations
      6. 8.2.6 SS: VarDeclaredNames
      7. 8.2.7 SS: VarScopedDeclarations
      8. 8.2.8 SS: TopLevelLexicallyDeclaredNames
      9. 8.2.9 SS: TopLevelLexicallyScopedDeclarations
      10. 8.2.10 SS: TopLevelVarDeclaredNames
      11. 8.2.11 SS: TopLevelVarScopedDeclarations
    3. +8.3 Labels
      1. 8.3.1 SS: ContainsDuplicateLabels
      2. 8.3.2 SS: ContainsUndefinedBreakTarget
      3. 8.3.3 SS: ContainsUndefinedContinueTarget
    4. +8.4 Function Name Inference
      1. 8.4.1 SS: HasName
      2. 8.4.2 SS: IsFunctionDefinition
      3. 8.4.3 SS: IsAnonymousFunctionDefinition (expr )
      4. 8.4.4 SS: IsIdentifierRef
      5. 8.4.5 RS: NamedEvaluation
    5. +8.5 Contains
      1. 8.5.1 SS: Contains
      2. 8.5.2 SS: ComputedPropertyContains
    6. +8.6 Miscellaneous
      1. 8.6.1 RS: InstantiateFunctionObject
      2. +8.6.2 RS: BindingInitialization
        1. 8.6.2.1 InitializeBoundName (name,value,environment )
      3. 8.6.3 RS: IteratorBindingInitialization
      4. 8.6.4 SS: AssignmentTargetType
      5. 8.6.5 SS: PropName
  10. +9 Executable Code and Execution Contexts
    1. +9.1 Environment Records
      1. +9.1.1 The Environment Record Type Hierarchy
        1. +9.1.1.1 Declarative Environment Records
          1. 9.1.1.1.1 HasBinding (N )
          2. 9.1.1.1.2 CreateMutableBinding (N,D )
          3. 9.1.1.1.3 CreateImmutableBinding (N,S )
          4. 9.1.1.1.4 InitializeBinding (N,V )
          5. 9.1.1.1.5 SetMutableBinding (N,V,S )
          6. 9.1.1.1.6 GetBindingValue (N,S )
          7. 9.1.1.1.7 DeleteBinding (N )
          8. 9.1.1.1.8 HasThisBinding ( )
          9. 9.1.1.1.9 HasSuperBinding ( )
          10. 9.1.1.1.10 WithBaseObject ( )
        2. +9.1.1.2 Object Environment Records
          1. 9.1.1.2.1 HasBinding (N )
          2. 9.1.1.2.2 CreateMutableBinding (N,D )
          3. 9.1.1.2.3 CreateImmutableBinding (N,S )
          4. 9.1.1.2.4 InitializeBinding (N,V )
          5. 9.1.1.2.5 SetMutableBinding (N,V,S )
          6. 9.1.1.2.6 GetBindingValue (N,S )
          7. 9.1.1.2.7 DeleteBinding (N )
          8. 9.1.1.2.8 HasThisBinding ( )
          9. 9.1.1.2.9 HasSuperBinding ( )
          10. 9.1.1.2.10 WithBaseObject ( )
        3. +9.1.1.3 Function Environment Records
          1. 9.1.1.3.1 BindThisValue (envRec,V )
          2. 9.1.1.3.2 HasThisBinding ( )
          3. 9.1.1.3.3 HasSuperBinding ( )
          4. 9.1.1.3.4 GetThisBinding ( )
          5. 9.1.1.3.5 GetSuperBase (envRec )
        4. +9.1.1.4 Global Environment Records
          1. 9.1.1.4.1 HasBinding (N )
          2. 9.1.1.4.2 CreateMutableBinding (N,D )
          3. 9.1.1.4.3 CreateImmutableBinding (N,S )
          4. 9.1.1.4.4 InitializeBinding (N,V )
          5. 9.1.1.4.5 SetMutableBinding (N,V,S )
          6. 9.1.1.4.6 GetBindingValue (N,S )
          7. 9.1.1.4.7 DeleteBinding (N )
          8. 9.1.1.4.8 HasThisBinding ( )
          9. 9.1.1.4.9 HasSuperBinding ( )
          10. 9.1.1.4.10 WithBaseObject ( )
          11. 9.1.1.4.11 GetThisBinding ( )
          12. 9.1.1.4.12 HasLexicalDeclaration (envRec,N )
          13. 9.1.1.4.13 HasRestrictedGlobalProperty (envRec,N )
          14. 9.1.1.4.14 CanDeclareGlobalVar (envRec,N )
          15. 9.1.1.4.15 CanDeclareGlobalFunction (envRec,N )
          16. 9.1.1.4.16 CreateGlobalVarBinding (envRec,N,D )
          17. 9.1.1.4.17 CreateGlobalFunctionBinding (envRec,N,V,D )
        5. +9.1.1.5 Module Environment Records
          1. 9.1.1.5.1 GetBindingValue (N,S )
          2. 9.1.1.5.2 DeleteBinding (N )
          3. 9.1.1.5.3 HasThisBinding ( )
          4. 9.1.1.5.4 GetThisBinding ( )
          5. 9.1.1.5.5 CreateImportBinding (envRec,N,M,N2 )
      2. +9.1.2 Environment Record Operations
        1. 9.1.2.1 GetIdentifierReference (env,name,strict )
        2. 9.1.2.2 NewDeclarativeEnvironment (E )
        3. 9.1.2.3 NewObjectEnvironment (O,W,E )
        4. 9.1.2.4 NewFunctionEnvironment (F,newTarget )
        5. 9.1.2.5 NewGlobalEnvironment (G,thisValue )
        6. 9.1.2.6 NewModuleEnvironment (E )
    2. +9.2 PrivateEnvironment Records
      1. +9.2.1 PrivateEnvironment Record Operations
        1. 9.2.1.1 NewPrivateEnvironment (outerPrivateEnv )
        2. 9.2.1.2 ResolvePrivateIdentifier (privateEnv,identifier )
    3. +9.3 Realms
      1. 9.3.1 InitializeHostDefinedRealm ( )
      2. 9.3.2 CreateIntrinsics (realmRec )
      3. 9.3.3 SetDefaultGlobalBindings (realmRec )
    4. +9.4 Execution Contexts
      1. 9.4.1 GetActiveScriptOrModule ( )
      2. 9.4.2 ResolveBinding (name [ ,env ] )
      3. 9.4.3 GetThisEnvironment ( )
      4. 9.4.4 ResolveThisBinding ( )
      5. 9.4.5 GetNewTarget ( )
      6. 9.4.6 GetGlobalObject ( )
    5. +9.5 Jobs and Host Operations to Enqueue Jobs
      1. 9.5.1 JobCallback Records
      2. 9.5.2 HostMakeJobCallback (callback )
      3. 9.5.3 HostCallJobCallback (jobCallback,V,argumentsList )
      4. 9.5.4 HostEnqueueGenericJob (job,realm )
      5. 9.5.5 HostEnqueuePromiseJob (job,realm )
      6. 9.5.6 HostEnqueueTimeoutJob (timeoutJob,realm,milliseconds )
    6. +9.6 Agents
      1. 9.6.1 AgentSignifier ( )
      2. 9.6.2 AgentCanSuspend ( )
      3. 9.6.3 IncrementModuleAsyncEvaluationCount ( )
    7. 9.7 Agent Clusters
    8. 9.8 Forward Progress
    9. +9.9 Processing Model of WeakRef and FinalizationRegistry Targets
      1. 9.9.1 Objectives
      2. 9.9.2 Liveness
      3. 9.9.3 Execution
      4. +9.9.4 Host Hooks
        1. 9.9.4.1 HostEnqueueFinalizationRegistryCleanupJob (finalizationRegistry )
    10. 9.10 ClearKeptObjects ( )
    11. 9.11 AddToKeptObjects (value )
    12. 9.12 CleanupFinalizationRegistry (finalizationRegistry )
    13. 9.13 CanBeHeldWeakly (v )
  11. +10 Ordinary and Exotic Objects Behaviours
    1. +10.1 Ordinary Object Internal Methods and Internal Slots
      1. +10.1.1[[GetPrototypeOf]] ( )
        1. 10.1.1.1 OrdinaryGetPrototypeOf (O )
      2. +10.1.2[[SetPrototypeOf]] (V )
        1. 10.1.2.1 OrdinarySetPrototypeOf (O,V )
      3. +10.1.3[[IsExtensible]] ( )
        1. 10.1.3.1 OrdinaryIsExtensible (O )
      4. +10.1.4[[PreventExtensions]] ( )
        1. 10.1.4.1 OrdinaryPreventExtensions (O )
      5. +10.1.5[[GetOwnProperty]] (P )
        1. 10.1.5.1 OrdinaryGetOwnProperty (O,P )
      6. +10.1.6[[DefineOwnProperty]] (P,Desc )
        1. 10.1.6.1 OrdinaryDefineOwnProperty (O,P,Desc )
        2. 10.1.6.2 IsCompatiblePropertyDescriptor (Extensible,Desc,Current )
        3. 10.1.6.3 ValidateAndApplyPropertyDescriptor (O,P,extensible,Desc,current )
      7. +10.1.7[[HasProperty]] (P )
        1. 10.1.7.1 OrdinaryHasProperty (O,P )
      8. +10.1.8[[Get]] (P,Receiver )
        1. 10.1.8.1 OrdinaryGet (O,P,Receiver )
      9. +10.1.9[[Set]] (P,V,Receiver )
        1. 10.1.9.1 OrdinarySet (O,P,V,Receiver )
        2. 10.1.9.2 OrdinarySetWithOwnDescriptor (O,P,V,Receiver,ownDesc )
      10. +10.1.10[[Delete]] (P )
        1. 10.1.10.1 OrdinaryDelete (O,P )
      11. +10.1.11[[OwnPropertyKeys]] ( )
        1. 10.1.11.1 OrdinaryOwnPropertyKeys (O )
      12. 10.1.12 OrdinaryObjectCreate (proto [ ,additionalInternalSlotsList ] )
      13. 10.1.13 OrdinaryCreateFromConstructor (constructor,intrinsicDefaultProto [ ,internalSlotsList ] )
      14. 10.1.14 GetPrototypeFromConstructor (constructor,intrinsicDefaultProto )
      15. 10.1.15 RequireInternalSlot (O,internalSlot )
    2. +10.2 ECMAScript Function Objects
      1. +10.2.1[[Call]] (thisArgument,argumentsList )
        1. 10.2.1.1 PrepareForOrdinaryCall (F,newTarget )
        2. 10.2.1.2 OrdinaryCallBindThis (F,calleeContext,thisArgument )
        3. 10.2.1.3 RS: EvaluateBody
        4. 10.2.1.4 OrdinaryCallEvaluateBody (F,argumentsList )
      2. 10.2.2[[Construct]] (argumentsList,newTarget )
      3. 10.2.3 OrdinaryFunctionCreate (functionPrototype,sourceText,ParameterList,Body,thisMode,env,privateEnv )
      4. +10.2.4 AddRestrictedFunctionProperties (F,realm )
        1. 10.2.4.1 %ThrowTypeError% ( )
      5. 10.2.5 MakeConstructor (F [ ,writablePrototype [ ,prototype ] ] )
      6. 10.2.6 MakeClassConstructor (F )
      7. 10.2.7 MakeMethod (F,homeObject )
      8. 10.2.8 DefineMethodProperty (homeObject,key,closure,enumerable )
      9. 10.2.9 SetFunctionName (F,name [ ,prefix ] )
      10. 10.2.10 SetFunctionLength (F,length )
      11. 10.2.11 FunctionDeclarationInstantiation (func,argumentsList )
    3. +10.3 Built-in Function Objects
      1. 10.3.1[[Call]] (thisArgument,argumentsList )
      2. 10.3.2[[Construct]] (argumentsList,newTarget )
      3. 10.3.3 BuiltinCallOrConstruct (F,thisArgument,argumentsList,newTarget )
      4. 10.3.4 CreateBuiltinFunction (behaviour,length,name,additionalInternalSlotsList [ ,realm [ ,prototype [ ,prefix ] ] ] )
    4. +10.4 Built-in Exotic Object Internal Methods and Slots
      1. +10.4.1 Bound Function Exotic Objects
        1. 10.4.1.1[[Call]] (thisArgument,argumentsList )
        2. 10.4.1.2[[Construct]] (argumentsList,newTarget )
        3. 10.4.1.3 BoundFunctionCreate (targetFunction,boundThis,boundArgs )
      2. +10.4.2 Array Exotic Objects
        1. 10.4.2.1[[DefineOwnProperty]] (P,Desc )
        2. 10.4.2.2 ArrayCreate (length [ ,proto ] )
        3. 10.4.2.3 ArraySpeciesCreate (originalArray,length )
        4. 10.4.2.4 ArraySetLength (A,Desc )
      3. +10.4.3 String Exotic Objects
        1. 10.4.3.1[[GetOwnProperty]] (P )
        2. 10.4.3.2[[DefineOwnProperty]] (P,Desc )
        3. 10.4.3.3[[OwnPropertyKeys]] ( )
        4. 10.4.3.4 StringCreate (value,prototype )
        5. 10.4.3.5 StringGetOwnProperty (S,P )
      4. +10.4.4 Arguments Exotic Objects
        1. 10.4.4.1[[GetOwnProperty]] (P )
        2. 10.4.4.2[[DefineOwnProperty]] (P,Desc )
        3. 10.4.4.3[[Get]] (P,Receiver )
        4. 10.4.4.4[[Set]] (P,V,Receiver )
        5. 10.4.4.5[[Delete]] (P )
        6. 10.4.4.6 CreateUnmappedArgumentsObject (argumentsList )
        7. +10.4.4.7 CreateMappedArgumentsObject (func,formals,argumentsList,env )
          1. 10.4.4.7.1 MakeArgGetter (name,env )
          2. 10.4.4.7.2 MakeArgSetter (name,env )
      5. +10.4.5 TypedArray Exotic Objects
        1. 10.4.5.1[[PreventExtensions]] ( )
        2. 10.4.5.2[[GetOwnProperty]] (P )
        3. 10.4.5.3[[HasProperty]] (P )
        4. 10.4.5.4[[DefineOwnProperty]] (P,Desc )
        5. 10.4.5.5[[Get]] (P,Receiver )
        6. 10.4.5.6[[Set]] (P,V,Receiver )
        7. 10.4.5.7[[Delete]] (P )
        8. 10.4.5.8[[OwnPropertyKeys]] ( )
        9. 10.4.5.9 TypedArray With Buffer Witness Records
        10. 10.4.5.10 MakeTypedArrayWithBufferWitnessRecord (obj,order )
        11. 10.4.5.11 TypedArrayCreate (prototype )
        12. 10.4.5.12 TypedArrayByteLength (taRecord )
        13. 10.4.5.13 TypedArrayLength (taRecord )
        14. 10.4.5.14 IsTypedArrayOutOfBounds (taRecord )
        15. 10.4.5.15 IsTypedArrayFixedLength (O )
        16. 10.4.5.16 IsValidIntegerIndex (O,index )
        17. 10.4.5.17 TypedArrayGetElement (O,index )
        18. 10.4.5.18 TypedArraySetElement (O,index,value )
        19. 10.4.5.19 IsArrayBufferViewOutOfBounds (O )
      6. +10.4.6 Module Namespace Exotic Objects
        1. 10.4.6.1[[GetPrototypeOf]] ( )
        2. 10.4.6.2[[SetPrototypeOf]] (V )
        3. 10.4.6.3[[IsExtensible]] ( )
        4. 10.4.6.4[[PreventExtensions]] ( )
        5. 10.4.6.5[[GetOwnProperty]] (P )
        6. 10.4.6.6[[DefineOwnProperty]] (P,Desc )
        7. 10.4.6.7[[HasProperty]] (P )
        8. 10.4.6.8[[Get]] (P,Receiver )
        9. 10.4.6.9[[Set]] (P,V,Receiver )
        10. 10.4.6.10[[Delete]] (P )
        11. 10.4.6.11[[OwnPropertyKeys]] ( )
        12. 10.4.6.12 ModuleNamespaceCreate (module,exports )
      7. +10.4.7 Immutable Prototype Exotic Objects
        1. 10.4.7.1[[SetPrototypeOf]] (V )
        2. 10.4.7.2 SetImmutablePrototype (O,V )
    5. +10.5 Proxy Object Internal Methods and Internal Slots
      1. 10.5.1[[GetPrototypeOf]] ( )
      2. 10.5.2[[SetPrototypeOf]] (V )
      3. 10.5.3[[IsExtensible]] ( )
      4. 10.5.4[[PreventExtensions]] ( )
      5. 10.5.5[[GetOwnProperty]] (P )
      6. 10.5.6[[DefineOwnProperty]] (P,Desc )
      7. 10.5.7[[HasProperty]] (P )
      8. 10.5.8[[Get]] (P,Receiver )
      9. 10.5.9[[Set]] (P,V,Receiver )
      10. 10.5.10[[Delete]] (P )
      11. 10.5.11[[OwnPropertyKeys]] ( )
      12. 10.5.12[[Call]] (thisArgument,argumentsList )
      13. 10.5.13[[Construct]] (argumentsList,newTarget )
      14. 10.5.14 ValidateNonRevokedProxy (proxy )
      15. 10.5.15 ProxyCreate (target,handler )
  12. +11 ECMAScript Language: Source Text
    1. +11.1 Source Text
      1. 11.1.1 SS: UTF16EncodeCodePoint (cp )
      2. 11.1.2 SS: CodePointsToString (text )
      3. 11.1.3 SS: UTF16SurrogatePairToCodePoint (lead,trail )
      4. 11.1.4 SS: CodePointAt (string,position )
      5. 11.1.5 SS: StringToCodePoints (string )
      6. 11.1.6 SS: ParseText (sourceText,goalSymbol )
    2. +11.2 Types of Source Code
      1. 11.2.1 Directive Prologues and the Use Strict Directive
      2. +11.2.2 Strict Mode Code
        1. 11.2.2.1 SS: IsStrict (node )
      3. 11.2.3 Non-ECMAScript Functions
  13. +12 ECMAScript Language: Lexical Grammar
    1. 12.1 Unicode Format-Control Characters
    2. 12.2 White Space
    3. 12.3 Line Terminators
    4. 12.4 Comments
    5. 12.5 Hashbang Comments
    6. 12.6 Tokens
    7. +12.7 Names and Keywords
      1. +12.7.1 Identifier Names
        1. 12.7.1.1 SS: Early Errors
        2. 12.7.1.2 SS: IdentifierCodePoints
        3. 12.7.1.3 SS: IdentifierCodePoint
      2. 12.7.2 Keywords and Reserved Words
    8. 12.8 Punctuators
    9. +12.9 Literals
      1. 12.9.1 Null Literals
      2. 12.9.2 Boolean Literals
      3. +12.9.3 Numeric Literals
        1. 12.9.3.1 SS: Early Errors
        2. 12.9.3.2 SS: MV
        3. 12.9.3.3 SS: NumericValue
      4. +12.9.4 String Literals
        1. 12.9.4.1 SS: Early Errors
        2. 12.9.4.2 SS: SV
        3. 12.9.4.3 SS: MV
      5. +12.9.5 Regular Expression Literals
        1. 12.9.5.1 SS: BodyText
        2. 12.9.5.2 SS: FlagText
      6. +12.9.6 Template Literal Lexical Components
        1. 12.9.6.1 SS: TV
        2. 12.9.6.2 SS: TRV
    10. +12.10 Automatic Semicolon Insertion
      1. 12.10.1 Rules of Automatic Semicolon Insertion
      2. 12.10.2 Examples of Automatic Semicolon Insertion
      3. +12.10.3 Interesting Cases of Automatic Semicolon Insertion
        1. 12.10.3.1 Interesting Cases of Automatic Semicolon Insertion in Statement Lists
        2. +12.10.3.2 Cases of Automatic Semicolon Insertion and “[noLineTerminator here]”
          1. 12.10.3.2.1 List of Grammar Productions with Optional Operands and “[noLineTerminator here]”
  14. +13 ECMAScript Language: Expressions
    1. +13.1 Identifiers
      1. 13.1.1 SS: Early Errors
      2. 13.1.2 SS: StringValue
      3. 13.1.3 RS: Evaluation
    2. +13.2 Primary Expression
      1. +13.2.1 Thethis Keyword
        1. 13.2.1.1 RS: Evaluation
      2. 13.2.2 Identifier Reference
      3. +13.2.3 Literals
        1. 13.2.3.1 RS: Evaluation
      4. +13.2.4 Array Initializer
        1. 13.2.4.1 RS: ArrayAccumulation
        2. 13.2.4.2 RS: Evaluation
      5. +13.2.5 Object Initializer
        1. 13.2.5.1 SS: Early Errors
        2. 13.2.5.2 SS: IsComputedPropertyKey
        3. 13.2.5.3 SS: PropertyNameList
        4. 13.2.5.4 RS: Evaluation
        5. 13.2.5.5 RS: PropertyDefinitionEvaluation
      6. 13.2.6 Function Defining Expressions
      7. +13.2.7 Regular Expression Literals
        1. 13.2.7.1 SS: Early Errors
        2. 13.2.7.2 SS: IsValidRegularExpressionLiteral (literal )
        3. 13.2.7.3 RS: Evaluation
      8. +13.2.8 Template Literals
        1. 13.2.8.1 SS: Early Errors
        2. 13.2.8.2 SS: TemplateStrings
        3. 13.2.8.3 SS: TemplateString (templateToken,raw )
        4. 13.2.8.4 GetTemplateObject (templateLiteral )
        5. 13.2.8.5 RS: SubstitutionEvaluation
        6. 13.2.8.6 RS: Evaluation
      9. +13.2.9 The Grouping Operator
        1. 13.2.9.1 SS: Early Errors
        2. 13.2.9.2 RS: Evaluation
    3. +13.3 Left-Hand-Side Expressions
      1. +13.3.1 Static Semantics
        1. 13.3.1.1 SS: Early Errors
      2. +13.3.2 Property Accessors
        1. 13.3.2.1 RS: Evaluation
      3. 13.3.3 EvaluatePropertyAccessWithExpressionKey (baseValue,expression,strict )
      4. 13.3.4 EvaluatePropertyAccessWithIdentifierKey (baseValue,identifierName,strict )
      5. +13.3.5 Thenew Operator
        1. +13.3.5.1 RS: Evaluation
          1. 13.3.5.1.1 EvaluateNew (constructExpr,arguments )
      6. +13.3.6 Function Calls
        1. 13.3.6.1 RS: Evaluation
        2. 13.3.6.2 EvaluateCall (func,ref,arguments,tailPosition )
      7. +13.3.7 Thesuper Keyword
        1. 13.3.7.1 RS: Evaluation
        2. 13.3.7.2 GetSuperConstructor ( )
        3. 13.3.7.3 MakeSuperPropertyReference (actualThis,propertyKey,strict )
      8. +13.3.8 Argument Lists
        1. 13.3.8.1 RS: ArgumentListEvaluation
      9. +13.3.9 Optional Chains
        1. 13.3.9.1 RS: Evaluation
        2. 13.3.9.2 RS: ChainEvaluation
      10. +13.3.10 Import Calls
        1. 13.3.10.1 RS: Evaluation
        2. 13.3.10.2 EvaluateImportCall (specifierExpression [ ,optionsExpression ] )
        3. 13.3.10.3 ContinueDynamicImport (promiseCapability,moduleCompletion )
      11. +13.3.11 Tagged Templates
        1. 13.3.11.1 RS: Evaluation
      12. +13.3.12 Meta Properties
        1. +13.3.12.1 RS: Evaluation
          1. 13.3.12.1.1 HostGetImportMetaProperties (moduleRecord )
          2. 13.3.12.1.2 HostFinalizeImportMeta (importMeta,moduleRecord )
    4. +13.4 Update Expressions
      1. 13.4.1 SS: Early Errors
      2. +13.4.2 Postfix Increment Operator
        1. 13.4.2.1 RS: Evaluation
      3. +13.4.3 Postfix Decrement Operator
        1. 13.4.3.1 RS: Evaluation
      4. +13.4.4 Prefix Increment Operator
        1. 13.4.4.1 RS: Evaluation
      5. +13.4.5 Prefix Decrement Operator
        1. 13.4.5.1 RS: Evaluation
    5. +13.5 Unary Operators
      1. +13.5.1 Thedelete Operator
        1. 13.5.1.1 SS: Early Errors
        2. 13.5.1.2 RS: Evaluation
      2. +13.5.2 Thevoid Operator
        1. 13.5.2.1 RS: Evaluation
      3. +13.5.3 Thetypeof Operator
        1. 13.5.3.1 RS: Evaluation
      4. +13.5.4 Unary+ Operator
        1. 13.5.4.1 RS: Evaluation
      5. +13.5.5 Unary- Operator
        1. 13.5.5.1 RS: Evaluation
      6. +13.5.6 Bitwise NOT Operator (~ )
        1. 13.5.6.1 RS: Evaluation
      7. +13.5.7 Logical NOT Operator (! )
        1. 13.5.7.1 RS: Evaluation
    6. +13.6 Exponentiation Operator
      1. 13.6.1 RS: Evaluation
    7. +13.7 Multiplicative Operators
      1. 13.7.1 RS: Evaluation
    8. +13.8 Additive Operators
      1. +13.8.1 The Addition Operator (+ )
        1. 13.8.1.1 RS: Evaluation
      2. +13.8.2 The Subtraction Operator (- )
        1. 13.8.2.1 RS: Evaluation
    9. +13.9 Bitwise Shift Operators
      1. +13.9.1 The Left Shift Operator (<< )
        1. 13.9.1.1 RS: Evaluation
      2. +13.9.2 The Signed Right Shift Operator (>> )
        1. 13.9.2.1 RS: Evaluation
      3. +13.9.3 The Unsigned Right Shift Operator (>>> )
        1. 13.9.3.1 RS: Evaluation
    10. +13.10 Relational Operators
      1. 13.10.1 RS: Evaluation
      2. 13.10.2 InstanceofOperator (V,target )
    11. +13.11 Equality Operators
      1. 13.11.1 RS: Evaluation
    12. +13.12 Binary Bitwise Operators
      1. 13.12.1 RS: Evaluation
    13. +13.13 Binary Logical Operators
      1. 13.13.1 RS: Evaluation
    14. +13.14 Conditional Operator (? : )
      1. 13.14.1 RS: Evaluation
    15. +13.15 Assignment Operators
      1. 13.15.1 SS: Early Errors
      2. 13.15.2 RS: Evaluation
      3. 13.15.3 ApplyStringOrNumericBinaryOperator (lVal,opText,rVal )
      4. 13.15.4 EvaluateStringOrNumericBinaryExpression (leftOperand,opText,rightOperand )
      5. +13.15.5 Destructuring Assignment
        1. 13.15.5.1 SS: Early Errors
        2. 13.15.5.2 RS: DestructuringAssignmentEvaluation
        3. 13.15.5.3 RS: PropertyDestructuringAssignmentEvaluation
        4. 13.15.5.4 RS: RestDestructuringAssignmentEvaluation
        5. 13.15.5.5 RS: IteratorDestructuringAssignmentEvaluation
        6. 13.15.5.6 RS: KeyedDestructuringAssignmentEvaluation
    16. +13.16 Comma Operator (, )
      1. 13.16.1 RS: Evaluation
  15. +14 ECMAScript Language: Statements and Declarations
    1. +14.1 Statement Semantics
      1. 14.1.1 RS: Evaluation
    2. +14.2 Block
      1. 14.2.1 SS: Early Errors
      2. 14.2.2 RS: Evaluation
      3. 14.2.3 BlockDeclarationInstantiation (code,env )
    3. +14.3 Declarations and the Variable Statement
      1. +14.3.1 Let and Const Declarations
        1. 14.3.1.1 SS: Early Errors
        2. 14.3.1.2 RS: Evaluation
      2. +14.3.2 Variable Statement
        1. 14.3.2.1 RS: Evaluation
      3. +14.3.3 Destructuring Binding Patterns
        1. 14.3.3.1 RS: PropertyBindingInitialization
        2. 14.3.3.2 RS: RestBindingInitialization
        3. 14.3.3.3 RS: KeyedBindingInitialization
    4. +14.4 Empty Statement
      1. 14.4.1 RS: Evaluation
    5. +14.5 Expression Statement
      1. 14.5.1 RS: Evaluation
    6. +14.6 Theif Statement
      1. 14.6.1 SS: Early Errors
      2. 14.6.2 RS: Evaluation
    7. +14.7 Iteration Statements
      1. +14.7.1 Semantics
        1. 14.7.1.1 LoopContinues (completion,labelSet )
        2. 14.7.1.2 RS: LoopEvaluation
      2. +14.7.2 Thedo-while Statement
        1. 14.7.2.1 SS: Early Errors
        2. 14.7.2.2 RS: DoWhileLoopEvaluation
      3. +14.7.3 Thewhile Statement
        1. 14.7.3.1 SS: Early Errors
        2. 14.7.3.2 RS: WhileLoopEvaluation
      4. +14.7.4 Thefor Statement
        1. 14.7.4.1 SS: Early Errors
        2. 14.7.4.2 RS: ForLoopEvaluation
        3. 14.7.4.3 ForBodyEvaluation (test,increment,stmt,perIterationBindings,labelSet )
        4. 14.7.4.4 CreatePerIterationEnvironment (perIterationBindings )
      5. +14.7.5 Thefor-in,for-of, andfor-await-of Statements
        1. 14.7.5.1 SS: Early Errors
        2. 14.7.5.2 SS: IsDestructuring
        3. 14.7.5.3 RS: ForDeclarationBindingInitialization
        4. 14.7.5.4 RS: ForDeclarationBindingInstantiation
        5. 14.7.5.5 RS: ForInOfLoopEvaluation
        6. 14.7.5.6 ForIn/OfHeadEvaluation (uninitializedBoundNames,expr,iterationKind )
        7. 14.7.5.7 ForIn/OfBodyEvaluation (lhs,stmt,iteratorRecord,iterationKind,lhsKind,labelSet [ ,iteratorKind ] )
        8. 14.7.5.8 RS: Evaluation
        9. 14.7.5.9 EnumerateObjectProperties (O )
        10. +14.7.5.10 For-In Iterator Objects
          1. 14.7.5.10.1 CreateForInIterator (object )
          2. +14.7.5.10.2 The %ForInIteratorPrototype% Object
            1. 14.7.5.10.2.1 %ForInIteratorPrototype%.next ( )
          3. 14.7.5.10.3 Properties of For-In Iterator Instances
    8. +14.8 Thecontinue Statement
      1. 14.8.1 SS: Early Errors
      2. 14.8.2 RS: Evaluation
    9. +14.9 Thebreak Statement
      1. 14.9.1 SS: Early Errors
      2. 14.9.2 RS: Evaluation
    10. +14.10 Thereturn Statement
      1. 14.10.1 RS: Evaluation
    11. +14.11 Thewith Statement
      1. 14.11.1 SS: Early Errors
      2. 14.11.2 RS: Evaluation
    12. +14.12 Theswitch Statement
      1. 14.12.1 SS: Early Errors
      2. 14.12.2 RS: CaseBlockEvaluation
      3. 14.12.3 CaseClauseIsSelected (C,input )
      4. 14.12.4 RS: Evaluation
    13. +14.13 Labelled Statements
      1. 14.13.1 SS: Early Errors
      2. 14.13.2 SS: IsLabelledFunction (stmt )
      3. 14.13.3 RS: Evaluation
      4. 14.13.4 RS: LabelledEvaluation
    14. +14.14 Thethrow Statement
      1. 14.14.1 RS: Evaluation
    15. +14.15 Thetry Statement
      1. 14.15.1 SS: Early Errors
      2. 14.15.2 RS: CatchClauseEvaluation
      3. 14.15.3 RS: Evaluation
    16. +14.16 Thedebugger Statement
      1. 14.16.1 RS: Evaluation
  16. +15 ECMAScript Language: Functions and Classes
    1. +15.1 Parameter Lists
      1. 15.1.1 SS: Early Errors
      2. 15.1.2 SS: ContainsExpression
      3. 15.1.3 SS: IsSimpleParameterList
      4. 15.1.4 SS: HasInitializer
      5. 15.1.5 SS: ExpectedArgumentCount
    2. +15.2 Function Definitions
      1. 15.2.1 SS: Early Errors
      2. 15.2.2 SS: FunctionBodyContainsUseStrict
      3. 15.2.3 RS: EvaluateFunctionBody
      4. 15.2.4 RS: InstantiateOrdinaryFunctionObject
      5. 15.2.5 RS: InstantiateOrdinaryFunctionExpression
      6. 15.2.6 RS: Evaluation
    3. +15.3 Arrow Function Definitions
      1. 15.3.1 SS: Early Errors
      2. 15.3.2 SS: ConciseBodyContainsUseStrict
      3. 15.3.3 RS: EvaluateConciseBody
      4. 15.3.4 RS: InstantiateArrowFunctionExpression
      5. 15.3.5 RS: Evaluation
    4. +15.4 Method Definitions
      1. 15.4.1 SS: Early Errors
      2. 15.4.2 SS: HasDirectSuper
      3. 15.4.3 SS: SpecialMethod
      4. 15.4.4 RS: DefineMethod
      5. 15.4.5 RS: MethodDefinitionEvaluation
    5. +15.5 Generator Function Definitions
      1. 15.5.1 SS: Early Errors
      2. 15.5.2 RS: EvaluateGeneratorBody
      3. 15.5.3 RS: InstantiateGeneratorFunctionObject
      4. 15.5.4 RS: InstantiateGeneratorFunctionExpression
      5. 15.5.5 RS: Evaluation
    6. +15.6 Async Generator Function Definitions
      1. 15.6.1 SS: Early Errors
      2. 15.6.2 RS: EvaluateAsyncGeneratorBody
      3. 15.6.3 RS: InstantiateAsyncGeneratorFunctionObject
      4. 15.6.4 RS: InstantiateAsyncGeneratorFunctionExpression
      5. 15.6.5 RS: Evaluation
    7. +15.7 Class Definitions
      1. 15.7.1 SS: Early Errors
      2. 15.7.2 SS: ClassElementKind
      3. 15.7.3 SS: ConstructorMethod
      4. 15.7.4 SS: IsStatic
      5. 15.7.5 SS: NonConstructorElements
      6. 15.7.6 SS: PrototypePropertyNameList
      7. 15.7.7 SS: AllPrivateIdentifiersValid
      8. 15.7.8 SS: PrivateBoundIdentifiers
      9. 15.7.9 SS: ContainsArguments
      10. 15.7.10 RS: ClassFieldDefinitionEvaluation
      11. 15.7.11 RS: ClassStaticBlockDefinitionEvaluation
      12. 15.7.12 RS: EvaluateClassStaticBlockBody
      13. 15.7.13 RS: ClassElementEvaluation
      14. 15.7.14 RS: ClassDefinitionEvaluation
      15. 15.7.15 RS: BindingClassDeclarationEvaluation
      16. 15.7.16 RS: Evaluation
    8. +15.8 Async Function Definitions
      1. 15.8.1 SS: Early Errors
      2. 15.8.2 RS: InstantiateAsyncFunctionObject
      3. 15.8.3 RS: InstantiateAsyncFunctionExpression
      4. 15.8.4 RS: EvaluateAsyncFunctionBody
      5. 15.8.5 RS: Evaluation
    9. +15.9 Async Arrow Function Definitions
      1. 15.9.1 SS: Early Errors
      2. 15.9.2 SS: AsyncConciseBodyContainsUseStrict
      3. 15.9.3 RS: EvaluateAsyncConciseBody
      4. 15.9.4 RS: InstantiateAsyncArrowFunctionExpression
      5. 15.9.5 RS: Evaluation
    10. +15.10 Tail Position Calls
      1. 15.10.1 SS: IsInTailPosition (call )
      2. 15.10.2 SS: HasCallInTailPosition
      3. 15.10.3 PrepareForTailCall ( )
  17. +16 ECMAScript Language: Scripts and Modules
    1. +16.1 Scripts
      1. 16.1.1 SS: Early Errors
      2. 16.1.2 SS: ScriptIsStrict
      3. 16.1.3 RS: Evaluation
      4. 16.1.4 Script Records
      5. 16.1.5 ParseScript (sourceText,realm,hostDefined )
      6. 16.1.6 ScriptEvaluation (scriptRecord )
      7. 16.1.7 GlobalDeclarationInstantiation (script,env )
    2. +16.2 Modules
      1. +16.2.1 Module Semantics
        1. 16.2.1.1 SS: Early Errors
        2. 16.2.1.2 SS: ImportedLocalNames (importEntries )
        3. +16.2.1.3 ModuleRequest Records
          1. 16.2.1.3.1 ModuleRequestsEqual (left,right )
        4. 16.2.1.4 SS: ModuleRequests
        5. +16.2.1.5 Abstract Module Records
          1. 16.2.1.5.1 EvaluateModuleSync (module )
        6. +16.2.1.6 Cyclic Module Records
          1. +16.2.1.6.1 Implementation of Module Record Abstract Methods
            1. +16.2.1.6.1.1 LoadRequestedModules ( [hostDefined ] )
              1. 16.2.1.6.1.1.1 InnerModuleLoading (state,module )
              2. 16.2.1.6.1.1.2 ContinueModuleLoading (state,moduleCompletion )
            2. +16.2.1.6.1.2 Link ( )
              1. 16.2.1.6.1.2.1 InnerModuleLinking (module,stack,index )
            3. +16.2.1.6.1.3 Evaluate ( )
              1. 16.2.1.6.1.3.1 InnerModuleEvaluation (module,stack,index )
              2. 16.2.1.6.1.3.2 ExecuteAsyncModule (module )
              3. 16.2.1.6.1.3.3 GatherAvailableAncestors (module,execList )
              4. 16.2.1.6.1.3.4 AsyncModuleExecutionFulfilled (module )
              5. 16.2.1.6.1.3.5 AsyncModuleExecutionRejected (module,error )
          2. 16.2.1.6.2 Example Cyclic Module Record Graphs
        7. +16.2.1.7 Source Text Module Records
          1. 16.2.1.7.1 ParseModule (sourceText,realm,hostDefined )
          2. +16.2.1.7.2 Implementation of Module Record Abstract Methods
            1. 16.2.1.7.2.1 GetExportedNames ( [exportStarSet ] )
            2. 16.2.1.7.2.2 ResolveExport (exportName [ ,resolveSet ] )
          3. +16.2.1.7.3 Implementation of Cyclic Module Record Abstract Methods
            1. 16.2.1.7.3.1 InitializeEnvironment ( )
            2. 16.2.1.7.3.2 ExecuteModule ( [capability ] )
        8. +16.2.1.8 Synthetic Module Records
          1. 16.2.1.8.1 CreateDefaultExportSyntheticModule (defaultExport )
          2. 16.2.1.8.2 ParseJSONModule (source )
          3. 16.2.1.8.3 SetSyntheticModuleExport (module,exportName,exportValue )
          4. +16.2.1.8.4 Implementation of Module Record Abstract Methods
            1. 16.2.1.8.4.1 LoadRequestedModules ( )
            2. 16.2.1.8.4.2 GetExportedNames ( )
            3. 16.2.1.8.4.3 ResolveExport (exportName )
            4. 16.2.1.8.4.4 Link ( )
            5. 16.2.1.8.4.5 Evaluate ( )
        9. 16.2.1.9 GetImportedModule (referrer,request )
        10. 16.2.1.10 HostLoadImportedModule (referrer,moduleRequest,hostDefined,payload )
        11. 16.2.1.11 FinishLoadingImportedModule (referrer,moduleRequest,payload,result )
        12. +16.2.1.12 AllImportAttributesSupported (attributes )
          1. 16.2.1.12.1 HostGetSupportedImportAttributes ( )
        13. 16.2.1.13 GetModuleNamespace (module )
        14. 16.2.1.14 RS: Evaluation
      2. +16.2.2 Imports
        1. 16.2.2.1 SS: Early Errors
        2. 16.2.2.2 SS: ImportEntries
        3. 16.2.2.3 SS: ImportEntriesForModule
        4. 16.2.2.4 SS: WithClauseToAttributes
      3. +16.2.3 Exports
        1. 16.2.3.1 SS: Early Errors
        2. 16.2.3.2 SS: ExportedBindings
        3. 16.2.3.3 SS: ExportedNames
        4. 16.2.3.4 SS: ExportEntries
        5. 16.2.3.5 SS: ExportEntriesForModule
        6. 16.2.3.6 SS: ReferencedBindings
        7. 16.2.3.7 RS: Evaluation
  18. +17 Error Handling and Language Extensions
    1. 17.1 Forbidden Extensions
  19. 18 ECMAScript Standard Built-in Objects
  20. +19 The Global Object
    1. +19.1 Value Properties of the Global Object
      1. 19.1.1 globalThis
      2. 19.1.2 Infinity
      3. 19.1.3 NaN
      4. 19.1.4 undefined
    2. +19.2 Function Properties of the Global Object
      1. +19.2.1 eval (x )
        1. 19.2.1.1 PerformEval (x,strictCaller,direct )
        2. 19.2.1.2 HostEnsureCanCompileStrings (calleeRealm,parameterStrings,bodyString,direct )
        3. 19.2.1.3 EvalDeclarationInstantiation (body,varEnv,lexEnv,privateEnv,strict )
      2. 19.2.2 isFinite (number )
      3. 19.2.3 isNaN (number )
      4. 19.2.4 parseFloat (string )
      5. 19.2.5 parseInt (string,radix )
      6. +19.2.6 URI Handling Functions
        1. 19.2.6.1 decodeURI (encodedURI )
        2. 19.2.6.2 decodeURIComponent (encodedURIComponent )
        3. 19.2.6.3 encodeURI (uri )
        4. 19.2.6.4 encodeURIComponent (uriComponent )
        5. 19.2.6.5 Encode (string,extraUnescaped )
        6. 19.2.6.6 Decode (string,preserveEscapeSet )
        7. 19.2.6.7 ParseHexOctet (string,position )
    3. +19.3 Constructor Properties of the Global Object
      1. 19.3.1 AggregateError ( . . . )
      2. 19.3.2 Array ( . . . )
      3. 19.3.3 ArrayBuffer ( . . . )
      4. 19.3.4 BigInt ( . . . )
      5. 19.3.5 BigInt64Array ( . . . )
      6. 19.3.6 BigUint64Array ( . . . )
      7. 19.3.7 Boolean ( . . . )
      8. 19.3.8 DataView ( . . . )
      9. 19.3.9 Date ( . . . )
      10. 19.3.10 Error ( . . . )
      11. 19.3.11 EvalError ( . . . )
      12. 19.3.12 FinalizationRegistry ( . . . )
      13. 19.3.13 Float16Array ( . . . )
      14. 19.3.14 Float32Array ( . . . )
      15. 19.3.15 Float64Array ( . . . )
      16. 19.3.16 Function ( . . . )
      17. 19.3.17 Int8Array ( . . . )
      18. 19.3.18 Int16Array ( . . . )
      19. 19.3.19 Int32Array ( . . . )
      20. 19.3.20 Iterator ( . . . )
      21. 19.3.21 Map ( . . . )
      22. 19.3.22 Number ( . . . )
      23. 19.3.23 Object ( . . . )
      24. 19.3.24 Promise ( . . . )
      25. 19.3.25 Proxy ( . . . )
      26. 19.3.26 RangeError ( . . . )
      27. 19.3.27 ReferenceError ( . . . )
      28. 19.3.28 RegExp ( . . . )
      29. 19.3.29 Set ( . . . )
      30. 19.3.30 SharedArrayBuffer ( . . . )
      31. 19.3.31 String ( . . . )
      32. 19.3.32 Symbol ( . . . )
      33. 19.3.33 SyntaxError ( . . . )
      34. 19.3.34 TypeError ( . . . )
      35. 19.3.35 Uint8Array ( . . . )
      36. 19.3.36 Uint8ClampedArray ( . . . )
      37. 19.3.37 Uint16Array ( . . . )
      38. 19.3.38 Uint32Array ( . . . )
      39. 19.3.39 URIError ( . . . )
      40. 19.3.40 WeakMap ( . . . )
      41. 19.3.41 WeakRef ( . . . )
      42. 19.3.42 WeakSet ( . . . )
    4. +19.4 Other Properties of the Global Object
      1. 19.4.1 Atomics
      2. 19.4.2 JSON
      3. 19.4.3 Math
      4. 19.4.4 Reflect
  21. +20 Fundamental Objects
    1. +20.1 Object Objects
      1. +20.1.1 The Object Constructor
        1. 20.1.1.1 Object ( [value ] )
      2. +20.1.2 Properties of the Object Constructor
        1. 20.1.2.1 Object.assign (target, ...sources )
        2. 20.1.2.2 Object.create (O,Properties )
        3. +20.1.2.3 Object.defineProperties (O,Properties )
          1. 20.1.2.3.1 ObjectDefineProperties (O,Properties )
        4. 20.1.2.4 Object.defineProperty (O,P,Attributes )
        5. 20.1.2.5 Object.entries (O )
        6. 20.1.2.6 Object.freeze (O )
        7. 20.1.2.7 Object.fromEntries (iterable )
        8. 20.1.2.8 Object.getOwnPropertyDescriptor (O,P )
        9. 20.1.2.9 Object.getOwnPropertyDescriptors (O )
        10. 20.1.2.10 Object.getOwnPropertyNames (O )
        11. +20.1.2.11 Object.getOwnPropertySymbols (O )
          1. 20.1.2.11.1 GetOwnPropertyKeys (O,type )
        12. 20.1.2.12 Object.getPrototypeOf (O )
        13. 20.1.2.13 Object.groupBy (items,callback )
        14. 20.1.2.14 Object.hasOwn (O,P )
        15. 20.1.2.15 Object.is (value1,value2 )
        16. 20.1.2.16 Object.isExtensible (O )
        17. 20.1.2.17 Object.isFrozen (O )
        18. 20.1.2.18 Object.isSealed (O )
        19. 20.1.2.19 Object.keys (O )
        20. 20.1.2.20 Object.preventExtensions (O )
        21. 20.1.2.21 Object.prototype
        22. 20.1.2.22 Object.seal (O )
        23. 20.1.2.23 Object.setPrototypeOf (O,proto )
        24. 20.1.2.24 Object.values (O )
      3. +20.1.3 Properties of the Object Prototype Object
        1. 20.1.3.1 Object.prototype.constructor
        2. 20.1.3.2 Object.prototype.hasOwnProperty (V )
        3. 20.1.3.3 Object.prototype.isPrototypeOf (V )
        4. 20.1.3.4 Object.prototype.propertyIsEnumerable (V )
        5. 20.1.3.5 Object.prototype.toLocaleString ( [reserved1 [ ,reserved2 ] ] )
        6. 20.1.3.6 Object.prototype.toString ( )
        7. 20.1.3.7 Object.prototype.valueOf ( )
        8. +20.1.3.8 Object.prototype.__proto__
          1. 20.1.3.8.1 get Object.prototype.__proto__
          2. 20.1.3.8.2 set Object.prototype.__proto__
        9. +20.1.3.9 Legacy Object.prototype Accessor Methods
          1. 20.1.3.9.1 Object.prototype.__defineGetter__ (P,getter )
          2. 20.1.3.9.2 Object.prototype.__defineSetter__ (P,setter )
          3. 20.1.3.9.3 Object.prototype.__lookupGetter__ (P )
          4. 20.1.3.9.4 Object.prototype.__lookupSetter__ (P )
      4. 20.1.4 Properties of Object Instances
    2. +20.2 Function Objects
      1. +20.2.1 The Function Constructor
        1. +20.2.1.1 Function ( ...parameterArgs,bodyArg )
          1. 20.2.1.1.1 CreateDynamicFunction (constructor,newTarget,kind,parameterArgs,bodyArg )
      2. +20.2.2 Properties of the Function Constructor
        1. 20.2.2.1 Function.prototype
      3. +20.2.3 Properties of the Function Prototype Object
        1. 20.2.3.1 Function.prototype.apply (thisArg,argArray )
        2. 20.2.3.2 Function.prototype.bind (thisArg, ...args )
        3. 20.2.3.3 Function.prototype.call (thisArg, ...args )
        4. 20.2.3.4 Function.prototype.constructor
        5. 20.2.3.5 Function.prototype.toString ( )
        6. 20.2.3.6 Function.prototype [ %Symbol.hasInstance% ] (V )
      4. +20.2.4 Function Instances
        1. 20.2.4.1 length
        2. 20.2.4.2 name
        3. 20.2.4.3 prototype
      5. 20.2.5 HostHasSourceTextAvailable (func )
    3. +20.3 Boolean Objects
      1. +20.3.1 The Boolean Constructor
        1. 20.3.1.1 Boolean (value )
      2. +20.3.2 Properties of the Boolean Constructor
        1. 20.3.2.1 Boolean.prototype
      3. +20.3.3 Properties of the Boolean Prototype Object
        1. 20.3.3.1 Boolean.prototype.constructor
        2. 20.3.3.2 Boolean.prototype.toString ( )
        3. +20.3.3.3 Boolean.prototype.valueOf ( )
          1. 20.3.3.3.1 ThisBooleanValue (value )
      4. 20.3.4 Properties of Boolean Instances
    4. +20.4 Symbol Objects
      1. +20.4.1 The Symbol Constructor
        1. 20.4.1.1 Symbol ( [description ] )
      2. +20.4.2 Properties of the Symbol Constructor
        1. 20.4.2.1 Symbol.asyncIterator
        2. 20.4.2.2 Symbol.for (key )
        3. 20.4.2.3 Symbol.hasInstance
        4. 20.4.2.4 Symbol.isConcatSpreadable
        5. 20.4.2.5 Symbol.iterator
        6. 20.4.2.6 Symbol.keyFor (sym )
        7. 20.4.2.7 Symbol.match
        8. 20.4.2.8 Symbol.matchAll
        9. 20.4.2.9 Symbol.prototype
        10. 20.4.2.10 Symbol.replace
        11. 20.4.2.11 Symbol.search
        12. 20.4.2.12 Symbol.species
        13. 20.4.2.13 Symbol.split
        14. 20.4.2.14 Symbol.toPrimitive
        15. 20.4.2.15 Symbol.toStringTag
        16. 20.4.2.16 Symbol.unscopables
      3. +20.4.3 Properties of the Symbol Prototype Object
        1. 20.4.3.1 Symbol.prototype.constructor
        2. 20.4.3.2 get Symbol.prototype.description
        3. +20.4.3.3 Symbol.prototype.toString ( )
          1. 20.4.3.3.1 SymbolDescriptiveString (sym )
        4. +20.4.3.4 Symbol.prototype.valueOf ( )
          1. 20.4.3.4.1 ThisSymbolValue (value )
        5. 20.4.3.5 Symbol.prototype [ %Symbol.toPrimitive% ] (hint )
        6. 20.4.3.6 Symbol.prototype [ %Symbol.toStringTag% ]
      4. 20.4.4 Properties of Symbol Instances
      5. +20.4.5 Abstract Operations for Symbols
        1. 20.4.5.1 KeyForSymbol (sym )
    5. +20.5 Error Objects
      1. +20.5.1 The Error Constructor
        1. 20.5.1.1 Error (message [ ,options ] )
      2. +20.5.2 Properties of the Error Constructor
        1. 20.5.2.1 Error.isError (arg )
        2. 20.5.2.2 Error.prototype
      3. +20.5.3 Properties of the Error Prototype Object
        1. 20.5.3.1 Error.prototype.constructor
        2. 20.5.3.2 Error.prototype.message
        3. 20.5.3.3 Error.prototype.name
        4. 20.5.3.4 Error.prototype.toString ( )
      4. 20.5.4 Properties of Error Instances
      5. +20.5.5 Native Error Types Used in This Standard
        1. 20.5.5.1 EvalError
        2. 20.5.5.2 RangeError
        3. 20.5.5.3 ReferenceError
        4. 20.5.5.4 SyntaxError
        5. 20.5.5.5 TypeError
        6. 20.5.5.6 URIError
      6. +20.5.6NativeError Object Structure
        1. +20.5.6.1 TheNativeError Constructors
          1. 20.5.6.1.1NativeError (message [ ,options ] )
        2. +20.5.6.2 Properties of theNativeError Constructors
          1. 20.5.6.2.1NativeError.prototype
        3. +20.5.6.3 Properties of theNativeError Prototype Objects
          1. 20.5.6.3.1NativeError.prototype.constructor
          2. 20.5.6.3.2NativeError.prototype.message
          3. 20.5.6.3.3NativeError.prototype.name
        4. 20.5.6.4 Properties ofNativeError Instances
      7. +20.5.7 AggregateError Objects
        1. +20.5.7.1 The AggregateError Constructor
          1. 20.5.7.1.1 AggregateError (errors,message [ ,options ] )
        2. +20.5.7.2 Properties of the AggregateError Constructor
          1. 20.5.7.2.1 AggregateError.prototype
        3. +20.5.7.3 Properties of the AggregateError Prototype Object
          1. 20.5.7.3.1 AggregateError.prototype.constructor
          2. 20.5.7.3.2 AggregateError.prototype.message
          3. 20.5.7.3.3 AggregateError.prototype.name
        4. 20.5.7.4 Properties of AggregateError Instances
      8. +20.5.8 Abstract Operations for Error Objects
        1. 20.5.8.1 InstallErrorCause (O,options )
  22. +21 Numbers and Dates
    1. +21.1 Number Objects
      1. +21.1.1 The Number Constructor
        1. 21.1.1.1 Number (value )
      2. +21.1.2 Properties of the Number Constructor
        1. 21.1.2.1 Number.EPSILON
        2. 21.1.2.2 Number.isFinite (number )
        3. 21.1.2.3 Number.isInteger (number )
        4. 21.1.2.4 Number.isNaN (number )
        5. 21.1.2.5 Number.isSafeInteger (number )
        6. 21.1.2.6 Number.MAX_SAFE_INTEGER
        7. 21.1.2.7 Number.MAX_VALUE
        8. 21.1.2.8 Number.MIN_SAFE_INTEGER
        9. 21.1.2.9 Number.MIN_VALUE
        10. 21.1.2.10 Number.NaN
        11. 21.1.2.11 Number.NEGATIVE_INFINITY
        12. 21.1.2.12 Number.parseFloat (string )
        13. 21.1.2.13 Number.parseInt (string,radix )
        14. 21.1.2.14 Number.POSITIVE_INFINITY
        15. 21.1.2.15 Number.prototype
      3. +21.1.3 Properties of the Number Prototype Object
        1. 21.1.3.1 Number.prototype.constructor
        2. 21.1.3.2 Number.prototype.toExponential (fractionDigits )
        3. 21.1.3.3 Number.prototype.toFixed (fractionDigits )
        4. 21.1.3.4 Number.prototype.toLocaleString ( [reserved1 [ ,reserved2 ] ] )
        5. 21.1.3.5 Number.prototype.toPrecision (precision )
        6. 21.1.3.6 Number.prototype.toString ( [radix ] )
        7. +21.1.3.7 Number.prototype.valueOf ( )
          1. 21.1.3.7.1 ThisNumberValue (value )
      4. 21.1.4 Properties of Number Instances
    2. +21.2 BigInt Objects
      1. +21.2.1 The BigInt Constructor
        1. +21.2.1.1 BigInt (value )
          1. 21.2.1.1.1 NumberToBigInt (number )
      2. +21.2.2 Properties of the BigInt Constructor
        1. 21.2.2.1 BigInt.asIntN (bits,bigint )
        2. 21.2.2.2 BigInt.asUintN (bits,bigint )
        3. 21.2.2.3 BigInt.prototype
      3. +21.2.3 Properties of the BigInt Prototype Object
        1. 21.2.3.1 BigInt.prototype.constructor
        2. 21.2.3.2 BigInt.prototype.toLocaleString ( [reserved1 [ ,reserved2 ] ] )
        3. 21.2.3.3 BigInt.prototype.toString ( [radix ] )
        4. +21.2.3.4 BigInt.prototype.valueOf ( )
          1. 21.2.3.4.1 ThisBigIntValue (value )
        5. 21.2.3.5 BigInt.prototype [ %Symbol.toStringTag% ]
      4. 21.2.4 Properties of BigInt Instances
    3. +21.3 The Math Object
      1. +21.3.1 Value Properties of the Math Object
        1. 21.3.1.1 Math.E
        2. 21.3.1.2 Math.LN10
        3. 21.3.1.3 Math.LN2
        4. 21.3.1.4 Math.LOG10E
        5. 21.3.1.5 Math.LOG2E
        6. 21.3.1.6 Math.PI
        7. 21.3.1.7 Math.SQRT1_2
        8. 21.3.1.8 Math.SQRT2
        9. 21.3.1.9 Math [ %Symbol.toStringTag% ]
      2. +21.3.2 Function Properties of the Math Object
        1. 21.3.2.1 Math.abs (x )
        2. 21.3.2.2 Math.acos (x )
        3. 21.3.2.3 Math.acosh (x )
        4. 21.3.2.4 Math.asin (x )
        5. 21.3.2.5 Math.asinh (x )
        6. 21.3.2.6 Math.atan (x )
        7. 21.3.2.7 Math.atanh (x )
        8. 21.3.2.8 Math.atan2 (y,x )
        9. 21.3.2.9 Math.cbrt (x )
        10. 21.3.2.10 Math.ceil (x )
        11. 21.3.2.11 Math.clz32 (x )
        12. 21.3.2.12 Math.cos (x )
        13. 21.3.2.13 Math.cosh (x )
        14. 21.3.2.14 Math.exp (x )
        15. 21.3.2.15 Math.expm1 (x )
        16. 21.3.2.16 Math.floor (x )
        17. 21.3.2.17 Math.fround (x )
        18. 21.3.2.18 Math.f16round (x )
        19. 21.3.2.19 Math.hypot ( ...args )
        20. 21.3.2.20 Math.imul (x,y )
        21. 21.3.2.21 Math.log (x )
        22. 21.3.2.22 Math.log1p (x )
        23. 21.3.2.23 Math.log10 (x )
        24. 21.3.2.24 Math.log2 (x )
        25. 21.3.2.25 Math.max ( ...args )
        26. 21.3.2.26 Math.min ( ...args )
        27. 21.3.2.27 Math.pow (base,exponent )
        28. 21.3.2.28 Math.random ( )
        29. 21.3.2.29 Math.round (x )
        30. 21.3.2.30 Math.sign (x )
        31. 21.3.2.31 Math.sin (x )
        32. 21.3.2.32 Math.sinh (x )
        33. 21.3.2.33 Math.sqrt (x )
        34. 21.3.2.34 Math.sumPrecise (items )
        35. 21.3.2.35 Math.tan (x )
        36. 21.3.2.36 Math.tanh (x )
        37. 21.3.2.37 Math.trunc (x )
    4. +21.4 Date Objects
      1. +21.4.1 Overview of Date Objects and Definitions of Abstract Operations
        1. 21.4.1.1 Time Values and Time Range
        2. 21.4.1.2 Time-related Constants
        3. 21.4.1.3 Day (t )
        4. 21.4.1.4 TimeWithinDay (t )
        5. 21.4.1.5 DaysInYear (y )
        6. 21.4.1.6 DayFromYear (y )
        7. 21.4.1.7 TimeFromYear (y )
        8. 21.4.1.8 YearFromTime (t )
        9. 21.4.1.9 DayWithinYear (t )
        10. 21.4.1.10 InLeapYear (t )
        11. 21.4.1.11 MonthFromTime (t )
        12. 21.4.1.12 DateFromTime (t )
        13. 21.4.1.13 WeekDay (t )
        14. 21.4.1.14 HourFromTime (t )
        15. 21.4.1.15 MinFromTime (t )
        16. 21.4.1.16 SecFromTime (t )
        17. 21.4.1.17 msFromTime (t )
        18. 21.4.1.18 GetUTCEpochNanoseconds (year,month,day,hour,minute,second,millisecond,microsecond,nanosecond )
        19. 21.4.1.19 Time Zone Identifiers
        20. 21.4.1.20 GetNamedTimeZoneEpochNanoseconds (timeZoneIdentifier,year,month,day,hour,minute,second,millisecond,microsecond,nanosecond )
        21. 21.4.1.21 GetNamedTimeZoneOffsetNanoseconds (timeZoneIdentifier,epochNanoseconds )
        22. 21.4.1.22 Time Zone Identifier Record
        23. 21.4.1.23 AvailableNamedTimeZoneIdentifiers ( )
        24. 21.4.1.24 SystemTimeZoneIdentifier ( )
        25. 21.4.1.25 LocalTime (t )
        26. 21.4.1.26 UTC (t )
        27. 21.4.1.27 MakeTime (hour,min,sec,ms )
        28. 21.4.1.28 MakeDay (year,month,date )
        29. 21.4.1.29 MakeDate (day,time )
        30. 21.4.1.30 MakeFullYear (year )
        31. 21.4.1.31 TimeClip (time )
        32. +21.4.1.32 Date Time String Format
          1. 21.4.1.32.1 Expanded Years
        33. +21.4.1.33 Time Zone Offset String Format
          1. 21.4.1.33.1 IsTimeZoneOffsetString (offsetString )
          2. 21.4.1.33.2 ParseTimeZoneOffsetString (offsetString )
      2. +21.4.2 The Date Constructor
        1. 21.4.2.1 Date ( ...values )
      3. +21.4.3 Properties of the Date Constructor
        1. 21.4.3.1 Date.now ( )
        2. 21.4.3.2 Date.parse (string )
        3. 21.4.3.3 Date.prototype
        4. 21.4.3.4 Date.UTC (year [ ,month [ ,date [ ,hours [ ,minutes [ ,seconds [ ,ms ] ] ] ] ] ] )
      4. +21.4.4 Properties of the Date Prototype Object
        1. 21.4.4.1 Date.prototype.constructor
        2. 21.4.4.2 Date.prototype.getDate ( )
        3. 21.4.4.3 Date.prototype.getDay ( )
        4. 21.4.4.4 Date.prototype.getFullYear ( )
        5. 21.4.4.5 Date.prototype.getHours ( )
        6. 21.4.4.6 Date.prototype.getMilliseconds ( )
        7. 21.4.4.7 Date.prototype.getMinutes ( )
        8. 21.4.4.8 Date.prototype.getMonth ( )
        9. 21.4.4.9 Date.prototype.getSeconds ( )
        10. 21.4.4.10 Date.prototype.getTime ( )
        11. 21.4.4.11 Date.prototype.getTimezoneOffset ( )
        12. 21.4.4.12 Date.prototype.getUTCDate ( )
        13. 21.4.4.13 Date.prototype.getUTCDay ( )
        14. 21.4.4.14 Date.prototype.getUTCFullYear ( )
        15. 21.4.4.15 Date.prototype.getUTCHours ( )
        16. 21.4.4.16 Date.prototype.getUTCMilliseconds ( )
        17. 21.4.4.17 Date.prototype.getUTCMinutes ( )
        18. 21.4.4.18 Date.prototype.getUTCMonth ( )
        19. 21.4.4.19 Date.prototype.getUTCSeconds ( )
        20. 21.4.4.20 Date.prototype.setDate (date )
        21. 21.4.4.21 Date.prototype.setFullYear (year [ ,month [ ,date ] ] )
        22. 21.4.4.22 Date.prototype.setHours (hour [ ,min [ ,sec [ ,ms ] ] ] )
        23. 21.4.4.23 Date.prototype.setMilliseconds (ms )
        24. 21.4.4.24 Date.prototype.setMinutes (min [ ,sec [ ,ms ] ] )
        25. 21.4.4.25 Date.prototype.setMonth (month [ ,date ] )
        26. 21.4.4.26 Date.prototype.setSeconds (sec [ ,ms ] )
        27. 21.4.4.27 Date.prototype.setTime (time )
        28. 21.4.4.28 Date.prototype.setUTCDate (date )
        29. 21.4.4.29 Date.prototype.setUTCFullYear (year [ ,month [ ,date ] ] )
        30. 21.4.4.30 Date.prototype.setUTCHours (hour [ ,min [ ,sec [ ,ms ] ] ] )
        31. 21.4.4.31 Date.prototype.setUTCMilliseconds (ms )
        32. 21.4.4.32 Date.prototype.setUTCMinutes (min [ ,sec [ ,ms ] ] )
        33. 21.4.4.33 Date.prototype.setUTCMonth (month [ ,date ] )
        34. 21.4.4.34 Date.prototype.setUTCSeconds (sec [ ,ms ] )
        35. 21.4.4.35 Date.prototype.toDateString ( )
        36. 21.4.4.36 Date.prototype.toISOString ( )
        37. 21.4.4.37 Date.prototype.toJSON (key )
        38. 21.4.4.38 Date.prototype.toLocaleDateString ( [reserved1 [ ,reserved2 ] ] )
        39. 21.4.4.39 Date.prototype.toLocaleString ( [reserved1 [ ,reserved2 ] ] )
        40. 21.4.4.40 Date.prototype.toLocaleTimeString ( [reserved1 [ ,reserved2 ] ] )
        41. +21.4.4.41 Date.prototype.toString ( )
          1. 21.4.4.41.1 TimeString (tv )
          2. 21.4.4.41.2 DateString (tv )
          3. 21.4.4.41.3 TimeZoneString (tv )
          4. 21.4.4.41.4 ToDateString (tv )
        42. 21.4.4.42 Date.prototype.toTimeString ( )
        43. 21.4.4.43 Date.prototype.toUTCString ( )
        44. 21.4.4.44 Date.prototype.valueOf ( )
        45. 21.4.4.45 Date.prototype [ %Symbol.toPrimitive% ] (hint )
      5. 21.4.5 Properties of Date Instances
  23. +22 Text Processing
    1. +22.1 String Objects
      1. +22.1.1 The String Constructor
        1. 22.1.1.1 String (value )
      2. +22.1.2 Properties of the String Constructor
        1. 22.1.2.1 String.fromCharCode ( ...codeUnits )
        2. 22.1.2.2 String.fromCodePoint ( ...codePoints )
        3. 22.1.2.3 String.prototype
        4. 22.1.2.4 String.raw (template, ...substitutions )
      3. +22.1.3 Properties of the String Prototype Object
        1. 22.1.3.1 String.prototype.at (index )
        2. 22.1.3.2 String.prototype.charAt (pos )
        3. 22.1.3.3 String.prototype.charCodeAt (pos )
        4. 22.1.3.4 String.prototype.codePointAt (pos )
        5. 22.1.3.5 String.prototype.concat ( ...args )
        6. 22.1.3.6 String.prototype.constructor
        7. 22.1.3.7 String.prototype.endsWith (searchString [ ,endPosition ] )
        8. 22.1.3.8 String.prototype.includes (searchString [ ,position ] )
        9. 22.1.3.9 String.prototype.indexOf (searchString [ ,position ] )
        10. 22.1.3.10 String.prototype.isWellFormed ( )
        11. 22.1.3.11 String.prototype.lastIndexOf (searchString [ ,position ] )
        12. 22.1.3.12 String.prototype.localeCompare (that [ ,reserved1 [ ,reserved2 ] ] )
        13. 22.1.3.13 String.prototype.match (regexp )
        14. 22.1.3.14 String.prototype.matchAll (regexp )
        15. 22.1.3.15 String.prototype.normalize ( [form ] )
        16. 22.1.3.16 String.prototype.padEnd (maxLength [ ,fillString ] )
        17. +22.1.3.17 String.prototype.padStart (maxLength [ ,fillString ] )
          1. 22.1.3.17.1 StringPaddingBuiltinsImpl (O,maxLength,fillString,placement )
          2. 22.1.3.17.2 StringPad (S,maxLength,fillString,placement )
          3. 22.1.3.17.3 ToZeroPaddedDecimalString (n,minLength )
        18. 22.1.3.18 String.prototype.repeat (count )
        19. +22.1.3.19 String.prototype.replace (searchValue,replaceValue )
          1. 22.1.3.19.1 GetSubstitution (matched,str,position,captures,namedCaptures,replacementTemplate )
        20. 22.1.3.20 String.prototype.replaceAll (searchValue,replaceValue )
        21. 22.1.3.21 String.prototype.search (regexp )
        22. 22.1.3.22 String.prototype.slice (start,end )
        23. 22.1.3.23 String.prototype.split (separator,limit )
        24. 22.1.3.24 String.prototype.startsWith (searchString [ ,position ] )
        25. 22.1.3.25 String.prototype.substring (start,end )
        26. 22.1.3.26 String.prototype.toLocaleLowerCase ( [reserved1 [ ,reserved2 ] ] )
        27. 22.1.3.27 String.prototype.toLocaleUpperCase ( [reserved1 [ ,reserved2 ] ] )
        28. 22.1.3.28 String.prototype.toLowerCase ( )
        29. 22.1.3.29 String.prototype.toString ( )
        30. 22.1.3.30 String.prototype.toUpperCase ( )
        31. 22.1.3.31 String.prototype.toWellFormed ( )
        32. +22.1.3.32 String.prototype.trim ( )
          1. 22.1.3.32.1 TrimString (string,where )
        33. 22.1.3.33 String.prototype.trimEnd ( )
        34. 22.1.3.34 String.prototype.trimStart ( )
        35. +22.1.3.35 String.prototype.valueOf ( )
          1. 22.1.3.35.1 ThisStringValue (value )
        36. 22.1.3.36 String.prototype [ %Symbol.iterator% ] ( )
      4. +22.1.4 Properties of String Instances
        1. 22.1.4.1 length
      5. +22.1.5 String Iterator Objects
        1. +22.1.5.1 The %StringIteratorPrototype% Object
          1. 22.1.5.1.1 %StringIteratorPrototype%.next ( )
          2. 22.1.5.1.2 %StringIteratorPrototype% [ %Symbol.toStringTag% ]
    2. +22.2 RegExp (Regular Expression) Objects
      1. +22.2.1 Patterns
        1. 22.2.1.1 SS: Early Errors
        2. 22.2.1.2 SS: CountLeftCapturingParensWithin (node )
        3. 22.2.1.3 SS: CountLeftCapturingParensBefore (node )
        4. 22.2.1.4 SS: MightBothParticipate (x,y )
        5. 22.2.1.5 SS: CapturingGroupNumber
        6. 22.2.1.6 SS: IsCharacterClass
        7. 22.2.1.7 SS: CharacterValue
        8. 22.2.1.8 SS: MayContainStrings
        9. 22.2.1.9 SS: GroupSpecifiersThatMatch (thisGroupName )
        10. 22.2.1.10 SS: CapturingGroupName
        11. 22.2.1.11 SS: RegExpIdentifierCodePoints
        12. 22.2.1.12 SS: RegExpIdentifierCodePoint
      2. +22.2.2 Pattern Semantics
        1. +22.2.2.1 Notation
          1. 22.2.2.1.1 RegExp Records
        2. 22.2.2.2 RS: CompilePattern
        3. +22.2.2.3 RS: CompileSubpattern
          1. 22.2.2.3.1 RepeatMatcher (m,min,max,greedy,x,c,parenIndex,parenCount )
          2. 22.2.2.3.2 EmptyMatcher ( )
          3. 22.2.2.3.3 MatchTwoAlternatives (m1,m2 )
          4. 22.2.2.3.4 MatchSequence (m1,m2,direction )
        4. +22.2.2.4 RS: CompileAssertion
          1. 22.2.2.4.1 IsWordChar (rer,Input,e )
        5. 22.2.2.5 RS: CompileQuantifier
        6. 22.2.2.6 RS: CompileQuantifierPrefix
        7. +22.2.2.7 RS: CompileAtom
          1. 22.2.2.7.1 CharacterSetMatcher (rer,A,invert,direction )
          2. 22.2.2.7.2 BackreferenceMatcher (rer,ns,direction )
          3. 22.2.2.7.3 Canonicalize (rer,ch )
          4. 22.2.2.7.4 UpdateModifiers (rer,add,remove )
        8. 22.2.2.8 RS: CompileCharacterClass
        9. +22.2.2.9 RS: CompileToCharSet
          1. 22.2.2.9.1 CharacterRange (A,B )
          2. 22.2.2.9.2 HasEitherUnicodeFlag (rer )
          3. 22.2.2.9.3 WordCharacters (rer )
          4. 22.2.2.9.4 AllCharacters (rer )
          5. 22.2.2.9.5 MaybeSimpleCaseFolding (rer,A )
          6. 22.2.2.9.6 CharacterComplement (rer,S )
          7. 22.2.2.9.7 UnicodeMatchProperty (rer,p )
          8. 22.2.2.9.8 UnicodeMatchPropertyValue (p,v )
        10. 22.2.2.10 RS: CompileClassSetString
      3. +22.2.3 Abstract Operations for RegExp Creation
        1. 22.2.3.1 RegExpCreate (P,F )
        2. 22.2.3.2 RegExpAlloc (newTarget )
        3. 22.2.3.3 RegExpInitialize (obj,pattern,flags )
        4. 22.2.3.4 SS: ParsePattern (patternText,u,v )
      4. +22.2.4 The RegExp Constructor
        1. 22.2.4.1 RegExp (pattern,flags )
      5. +22.2.5 Properties of the RegExp Constructor
        1. +22.2.5.1 RegExp.escape (S )
          1. 22.2.5.1.1 EncodeForRegExpEscape (cp )
        2. 22.2.5.2 RegExp.prototype
        3. 22.2.5.3 get RegExp [ %Symbol.species% ]
      6. +22.2.6 Properties of the RegExp Prototype Object
        1. 22.2.6.1 RegExp.prototype.constructor
        2. 22.2.6.2 RegExp.prototype.exec (string )
        3. 22.2.6.3 get RegExp.prototype.dotAll
        4. +22.2.6.4 get RegExp.prototype.flags
          1. 22.2.6.4.1 RegExpHasFlag (R,codeUnit )
        5. 22.2.6.5 get RegExp.prototype.global
        6. 22.2.6.6 get RegExp.prototype.hasIndices
        7. 22.2.6.7 get RegExp.prototype.ignoreCase
        8. 22.2.6.8 RegExp.prototype [ %Symbol.match% ] (string )
        9. 22.2.6.9 RegExp.prototype [ %Symbol.matchAll% ] (string )
        10. 22.2.6.10 get RegExp.prototype.multiline
        11. 22.2.6.11 RegExp.prototype [ %Symbol.replace% ] (string,replaceValue )
        12. 22.2.6.12 RegExp.prototype [ %Symbol.search% ] (string )
        13. +22.2.6.13 get RegExp.prototype.source
          1. 22.2.6.13.1 EscapeRegExpPattern (P,F )
        14. 22.2.6.14 RegExp.prototype [ %Symbol.split% ] (string,limit )
        15. 22.2.6.15 get RegExp.prototype.sticky
        16. 22.2.6.16 RegExp.prototype.test (S )
        17. 22.2.6.17 RegExp.prototype.toString ( )
        18. 22.2.6.18 get RegExp.prototype.unicode
        19. 22.2.6.19 get RegExp.prototype.unicodeSets
      7. +22.2.7 Abstract Operations for RegExp Matching
        1. 22.2.7.1 RegExpExec (R,S )
        2. 22.2.7.2 RegExpBuiltinExec (R,S )
        3. 22.2.7.3 AdvanceStringIndex (S,index,unicode )
        4. 22.2.7.4 GetStringIndex (S,codePointIndex )
        5. 22.2.7.5 Match Records
        6. 22.2.7.6 GetMatchString (S,match )
        7. 22.2.7.7 GetMatchIndexPair (S,match )
        8. 22.2.7.8 MakeMatchIndicesIndexPairArray (S,indices,groupNames,hasGroups )
      8. +22.2.8 Properties of RegExp Instances
        1. 22.2.8.1 lastIndex
      9. +22.2.9 RegExp String Iterator Objects
        1. 22.2.9.1 CreateRegExpStringIterator (R,S,global,fullUnicode )
        2. +22.2.9.2 The %RegExpStringIteratorPrototype% Object
          1. 22.2.9.2.1 %RegExpStringIteratorPrototype%.next ( )
          2. 22.2.9.2.2 %RegExpStringIteratorPrototype% [ %Symbol.toStringTag% ]
        3. 22.2.9.3 Properties of RegExp String Iterator Instances
  24. +23 Indexed Collections
    1. +23.1 Array Objects
      1. +23.1.1 The Array Constructor
        1. 23.1.1.1 Array ( ...values )
      2. +23.1.2 Properties of the Array Constructor
        1. 23.1.2.1 Array.from (items [ ,mapper [ ,thisArg ] ] )
        2. 23.1.2.2 Array.isArray (arg )
        3. 23.1.2.3 Array.of ( ...items )
        4. 23.1.2.4 Array.prototype
        5. 23.1.2.5 get Array [ %Symbol.species% ]
      3. +23.1.3 Properties of the Array Prototype Object
        1. 23.1.3.1 Array.prototype.at (index )
        2. +23.1.3.2 Array.prototype.concat ( ...items )
          1. 23.1.3.2.1 IsConcatSpreadable (O )
        3. 23.1.3.3 Array.prototype.constructor
        4. 23.1.3.4 Array.prototype.copyWithin (target,start [ ,end ] )
        5. 23.1.3.5 Array.prototype.entries ( )
        6. 23.1.3.6 Array.prototype.every (callback [ ,thisArg ] )
        7. 23.1.3.7 Array.prototype.fill (value [ ,start [ ,end ] ] )
        8. 23.1.3.8 Array.prototype.filter (callback [ ,thisArg ] )
        9. 23.1.3.9 Array.prototype.find (predicate [ ,thisArg ] )
        10. 23.1.3.10 Array.prototype.findIndex (predicate [ ,thisArg ] )
        11. 23.1.3.11 Array.prototype.findLast (predicate [ ,thisArg ] )
        12. +23.1.3.12 Array.prototype.findLastIndex (predicate [ ,thisArg ] )
          1. 23.1.3.12.1 FindViaPredicate (O,len,direction,predicate,thisArg )
        13. +23.1.3.13 Array.prototype.flat ( [depth ] )
          1. 23.1.3.13.1 FlattenIntoArray (target,source,sourceLen,start,depth [ ,mapperFunction [ ,thisArg ] ] )
        14. 23.1.3.14 Array.prototype.flatMap (mapperFunction [ ,thisArg ] )
        15. 23.1.3.15 Array.prototype.forEach (callback [ ,thisArg ] )
        16. 23.1.3.16 Array.prototype.includes (searchElement [ ,fromIndex ] )
        17. 23.1.3.17 Array.prototype.indexOf (searchElement [ ,fromIndex ] )
        18. 23.1.3.18 Array.prototype.join (separator )
        19. 23.1.3.19 Array.prototype.keys ( )
        20. 23.1.3.20 Array.prototype.lastIndexOf (searchElement [ ,fromIndex ] )
        21. 23.1.3.21 Array.prototype.map (callback [ ,thisArg ] )
        22. 23.1.3.22 Array.prototype.pop ( )
        23. 23.1.3.23 Array.prototype.push ( ...items )
        24. 23.1.3.24 Array.prototype.reduce (callback [ ,initialValue ] )
        25. 23.1.3.25 Array.prototype.reduceRight (callback [ ,initialValue ] )
        26. 23.1.3.26 Array.prototype.reverse ( )
        27. 23.1.3.27 Array.prototype.shift ( )
        28. 23.1.3.28 Array.prototype.slice (start,end )
        29. 23.1.3.29 Array.prototype.some (callback [ ,thisArg ] )
        30. +23.1.3.30 Array.prototype.sort (comparator )
          1. 23.1.3.30.1 SortIndexedProperties (obj,len,SortCompare,holes )
          2. 23.1.3.30.2 CompareArrayElements (x,y,comparator )
        31. 23.1.3.31 Array.prototype.splice (start,deleteCount, ...items )
        32. 23.1.3.32 Array.prototype.toLocaleString ( [reserved1 [ ,reserved2 ] ] )
        33. 23.1.3.33 Array.prototype.toReversed ( )
        34. 23.1.3.34 Array.prototype.toSorted (comparator )
        35. 23.1.3.35 Array.prototype.toSpliced (start,skipCount, ...items )
        36. 23.1.3.36 Array.prototype.toString ( )
        37. 23.1.3.37 Array.prototype.unshift ( ...items )
        38. 23.1.3.38 Array.prototype.values ( )
        39. 23.1.3.39 Array.prototype.with (index,value )
        40. 23.1.3.40 Array.prototype [ %Symbol.iterator% ] ( )
        41. 23.1.3.41 Array.prototype [ %Symbol.unscopables% ]
      4. +23.1.4 Properties of Array Instances
        1. 23.1.4.1 length
      5. +23.1.5 Array Iterator Objects
        1. 23.1.5.1 CreateArrayIterator (array,kind )
        2. +23.1.5.2 The %ArrayIteratorPrototype% Object
          1. 23.1.5.2.1 %ArrayIteratorPrototype%.next ( )
          2. 23.1.5.2.2 %ArrayIteratorPrototype% [ %Symbol.toStringTag% ]
        3. 23.1.5.3 Properties of Array Iterator Instances
    2. +23.2 TypedArray Objects
      1. +23.2.1 The %TypedArray% Intrinsic Object
        1. 23.2.1.1 %TypedArray% ( )
      2. +23.2.2 Properties of the %TypedArray% Intrinsic Object
        1. 23.2.2.1 %TypedArray%.from (source [ ,mapper [ ,thisArg ] ] )
        2. 23.2.2.2 %TypedArray%.of ( ...items )
        3. 23.2.2.3 %TypedArray%.prototype
        4. 23.2.2.4 get %TypedArray% [ %Symbol.species% ]
      3. +23.2.3 Properties of the %TypedArray% Prototype Object
        1. 23.2.3.1 %TypedArray%.prototype.at (index )
        2. 23.2.3.2 get %TypedArray%.prototype.buffer
        3. 23.2.3.3 get %TypedArray%.prototype.byteLength
        4. 23.2.3.4 get %TypedArray%.prototype.byteOffset
        5. 23.2.3.5 %TypedArray%.prototype.constructor
        6. 23.2.3.6 %TypedArray%.prototype.copyWithin (target,start [ ,end ] )
        7. 23.2.3.7 %TypedArray%.prototype.entries ( )
        8. 23.2.3.8 %TypedArray%.prototype.every (callback [ ,thisArg ] )
        9. 23.2.3.9 %TypedArray%.prototype.fill (value [ ,start [ ,end ] ] )
        10. 23.2.3.10 %TypedArray%.prototype.filter (callback [ ,thisArg ] )
        11. 23.2.3.11 %TypedArray%.prototype.find (predicate [ ,thisArg ] )
        12. 23.2.3.12 %TypedArray%.prototype.findIndex (predicate [ ,thisArg ] )
        13. 23.2.3.13 %TypedArray%.prototype.findLast (predicate [ ,thisArg ] )
        14. 23.2.3.14 %TypedArray%.prototype.findLastIndex (predicate [ ,thisArg ] )
        15. 23.2.3.15 %TypedArray%.prototype.forEach (callback [ ,thisArg ] )
        16. 23.2.3.16 %TypedArray%.prototype.includes (searchElement [ ,fromIndex ] )
        17. 23.2.3.17 %TypedArray%.prototype.indexOf (searchElement [ ,fromIndex ] )
        18. 23.2.3.18 %TypedArray%.prototype.join (separator )
        19. 23.2.3.19 %TypedArray%.prototype.keys ( )
        20. 23.2.3.20 %TypedArray%.prototype.lastIndexOf (searchElement [ ,fromIndex ] )
        21. 23.2.3.21 get %TypedArray%.prototype.length
        22. 23.2.3.22 %TypedArray%.prototype.map (callback [ ,thisArg ] )
        23. 23.2.3.23 %TypedArray%.prototype.reduce (callback [ ,initialValue ] )
        24. 23.2.3.24 %TypedArray%.prototype.reduceRight (callback [ ,initialValue ] )
        25. 23.2.3.25 %TypedArray%.prototype.reverse ( )
        26. +23.2.3.26 %TypedArray%.prototype.set (source [ ,offset ] )
          1. 23.2.3.26.1 SetTypedArrayFromArrayLike (target,targetOffset,source )
          2. 23.2.3.26.2 SetTypedArrayFromTypedArray (target,targetOffset,source )
        27. 23.2.3.27 %TypedArray%.prototype.slice (start,end )
        28. 23.2.3.28 %TypedArray%.prototype.some (callback [ ,thisArg ] )
        29. 23.2.3.29 %TypedArray%.prototype.sort (comparator )
        30. 23.2.3.30 %TypedArray%.prototype.subarray (start,end )
        31. 23.2.3.31 %TypedArray%.prototype.toLocaleString ( [reserved1 [ ,reserved2 ] ] )
        32. 23.2.3.32 %TypedArray%.prototype.toReversed ( )
        33. 23.2.3.33 %TypedArray%.prototype.toSorted (comparator )
        34. 23.2.3.34 %TypedArray%.prototype.toString ( )
        35. 23.2.3.35 %TypedArray%.prototype.values ( )
        36. 23.2.3.36 %TypedArray%.prototype.with (index,value )
        37. 23.2.3.37 %TypedArray%.prototype [ %Symbol.iterator% ] ( )
        38. 23.2.3.38 get %TypedArray%.prototype [ %Symbol.toStringTag% ]
      4. +23.2.4 Abstract Operations for TypedArray Objects
        1. 23.2.4.1 TypedArrayCreateFromConstructor (constructor,argumentList )
        2. 23.2.4.2 TypedArrayCreateSameType (exemplar,length )
        3. 23.2.4.3 TypedArraySpeciesCreate (exemplar,argumentList )
        4. 23.2.4.4 ValidateTypedArray (O,order )
        5. 23.2.4.5 TypedArrayElementSize (O )
        6. 23.2.4.6 TypedArrayElementType (O )
        7. 23.2.4.7 CompareTypedArrayElements (x,y,comparator )
      5. +23.2.5 TheTypedArray Constructors
        1. +23.2.5.1TypedArray ( ...args )
          1. 23.2.5.1.1 AllocateTypedArray (constructorName,newTarget,defaultProto [ ,length ] )
          2. 23.2.5.1.2 InitializeTypedArrayFromTypedArray (O,srcArray )
          3. 23.2.5.1.3 InitializeTypedArrayFromArrayBuffer (O,buffer,byteOffset,length )
          4. 23.2.5.1.4 InitializeTypedArrayFromList (O,values )
          5. 23.2.5.1.5 InitializeTypedArrayFromArrayLike (O,arrayLike )
          6. 23.2.5.1.6 AllocateTypedArrayBuffer (O,length )
      6. +23.2.6 Properties of theTypedArray Constructors
        1. 23.2.6.1TypedArray.BYTES_PER_ELEMENT
        2. 23.2.6.2TypedArray.prototype
      7. +23.2.7 Properties of theTypedArray Prototype Objects
        1. 23.2.7.1TypedArray.prototype.BYTES_PER_ELEMENT
        2. 23.2.7.2TypedArray.prototype.constructor
      8. 23.2.8 Properties ofTypedArray Instances
    3. +23.3 Uint8Array Objects
      1. +23.3.1 Additional Properties of the Uint8Array Constructor
        1. 23.3.1.1 Uint8Array.fromBase64 (string [ ,options ] )
        2. 23.3.1.2 Uint8Array.fromHex (string )
      2. +23.3.2 Additional Properties of the Uint8Array Prototype Object
        1. 23.3.2.1 Uint8Array.prototype.setFromBase64 (string [ ,options ] )
        2. 23.3.2.2 Uint8Array.prototype.setFromHex (string )
        3. 23.3.2.3 Uint8Array.prototype.toBase64 ( [options ] )
        4. 23.3.2.4 Uint8Array.prototype.toHex ( )
      3. +23.3.3 Abstract Operations for Uint8Array Objects
        1. 23.3.3.1 ValidateUint8Array (ta )
        2. 23.3.3.2 GetUint8ArrayBytes (ta )
        3. 23.3.3.3 SetUint8ArrayBytes (into,bytes )
        4. 23.3.3.4 SkipAsciiWhitespace (string,index )
        5. 23.3.3.5 DecodeFinalBase64Chunk (chunk,throwOnExtraBits )
        6. 23.3.3.6 DecodeFullLengthBase64Chunk (chunk )
        7. 23.3.3.7 FromBase64 (string,alphabet,lastChunkHandling [ ,maxLength ] )
        8. 23.3.3.8 FromHex (string [ ,maxLength ] )
  25. +24 Keyed Collections
    1. +24.1 Map Objects
      1. +24.1.1 The Map Constructor
        1. 24.1.1.1 Map ( [iterable ] )
        2. 24.1.1.2 AddEntriesFromIterable (target,iterable,adder )
      2. +24.1.2 Properties of the Map Constructor
        1. 24.1.2.1 Map.groupBy (items,callback )
        2. 24.1.2.2 Map.prototype
        3. 24.1.2.3 get Map [ %Symbol.species% ]
      3. +24.1.3 Properties of the Map Prototype Object
        1. 24.1.3.1 Map.prototype.clear ( )
        2. 24.1.3.2 Map.prototype.constructor
        3. 24.1.3.3 Map.prototype.delete (key )
        4. 24.1.3.4 Map.prototype.entries ( )
        5. 24.1.3.5 Map.prototype.forEach (callback [ ,thisArg ] )
        6. 24.1.3.6 Map.prototype.get (key )
        7. 24.1.3.7 Map.prototype.has (key )
        8. 24.1.3.8 Map.prototype.keys ( )
        9. 24.1.3.9 Map.prototype.set (key,value )
        10. 24.1.3.10 get Map.prototype.size
        11. 24.1.3.11 Map.prototype.values ( )
        12. 24.1.3.12 Map.prototype [ %Symbol.iterator% ] ( )
        13. 24.1.3.13 Map.prototype [ %Symbol.toStringTag% ]
      4. 24.1.4 Properties of Map Instances
      5. +24.1.5 Map Iterator Objects
        1. 24.1.5.1 CreateMapIterator (map,kind )
        2. +24.1.5.2 The %MapIteratorPrototype% Object
          1. 24.1.5.2.1 %MapIteratorPrototype%.next ( )
          2. 24.1.5.2.2 %MapIteratorPrototype% [ %Symbol.toStringTag% ]
    2. +24.2 Set Objects
      1. +24.2.1 Abstract Operations For Set Objects
        1. 24.2.1.1 Set Records
        2. 24.2.1.2 GetSetRecord (obj )
        3. 24.2.1.3 SetDataHas (setData,value )
        4. 24.2.1.4 SetDataIndex (setData,value )
        5. 24.2.1.5 SetDataSize (setData )
      2. +24.2.2 The Set Constructor
        1. 24.2.2.1 Set ( [iterable ] )
      3. +24.2.3 Properties of the Set Constructor
        1. 24.2.3.1 Set.prototype
        2. 24.2.3.2 get Set [ %Symbol.species% ]
      4. +24.2.4 Properties of the Set Prototype Object
        1. 24.2.4.1 Set.prototype.add (value )
        2. 24.2.4.2 Set.prototype.clear ( )
        3. 24.2.4.3 Set.prototype.constructor
        4. 24.2.4.4 Set.prototype.delete (value )
        5. 24.2.4.5 Set.prototype.difference (other )
        6. 24.2.4.6 Set.prototype.entries ( )
        7. 24.2.4.7 Set.prototype.forEach (callback [ ,thisArg ] )
        8. 24.2.4.8 Set.prototype.has (value )
        9. 24.2.4.9 Set.prototype.intersection (other )
        10. 24.2.4.10 Set.prototype.isDisjointFrom (other )
        11. 24.2.4.11 Set.prototype.isSubsetOf (other )
        12. 24.2.4.12 Set.prototype.isSupersetOf (other )
        13. 24.2.4.13 Set.prototype.keys ( )
        14. 24.2.4.14 get Set.prototype.size
        15. 24.2.4.15 Set.prototype.symmetricDifference (other )
        16. 24.2.4.16 Set.prototype.union (other )
        17. 24.2.4.17 Set.prototype.values ( )
        18. 24.2.4.18 Set.prototype [ %Symbol.iterator% ] ( )
        19. 24.2.4.19 Set.prototype [ %Symbol.toStringTag% ]
      5. 24.2.5 Properties of Set Instances
      6. +24.2.6 Set Iterator Objects
        1. 24.2.6.1 CreateSetIterator (set,kind )
        2. +24.2.6.2 The %SetIteratorPrototype% Object
          1. 24.2.6.2.1 %SetIteratorPrototype%.next ( )
          2. 24.2.6.2.2 %SetIteratorPrototype% [ %Symbol.toStringTag% ]
    3. +24.3 WeakMap Objects
      1. +24.3.1 The WeakMap Constructor
        1. 24.3.1.1 WeakMap ( [iterable ] )
      2. +24.3.2 Properties of the WeakMap Constructor
        1. 24.3.2.1 WeakMap.prototype
      3. +24.3.3 Properties of the WeakMap Prototype Object
        1. 24.3.3.1 WeakMap.prototype.constructor
        2. 24.3.3.2 WeakMap.prototype.delete (key )
        3. 24.3.3.3 WeakMap.prototype.get (key )
        4. 24.3.3.4 WeakMap.prototype.has (key )
        5. 24.3.3.5 WeakMap.prototype.set (key,value )
        6. 24.3.3.6 WeakMap.prototype [ %Symbol.toStringTag% ]
      4. 24.3.4 Properties of WeakMap Instances
    4. +24.4 WeakSet Objects
      1. +24.4.1 The WeakSet Constructor
        1. 24.4.1.1 WeakSet ( [iterable ] )
      2. +24.4.2 Properties of the WeakSet Constructor
        1. 24.4.2.1 WeakSet.prototype
      3. +24.4.3 Properties of the WeakSet Prototype Object
        1. 24.4.3.1 WeakSet.prototype.add (value )
        2. 24.4.3.2 WeakSet.prototype.constructor
        3. 24.4.3.3 WeakSet.prototype.delete (value )
        4. 24.4.3.4 WeakSet.prototype.has (value )
        5. 24.4.3.5 WeakSet.prototype [ %Symbol.toStringTag% ]
      4. 24.4.4 Properties of WeakSet Instances
    5. +24.5 Abstract Operations for Keyed Collections
      1. 24.5.1 CanonicalizeKeyedCollectionKey (key )
  26. +25 Structured Data
    1. +25.1 ArrayBuffer Objects
      1. 25.1.1 Notation
      2. 25.1.2 Fixed-length and Resizable ArrayBuffer Objects
      3. +25.1.3 Abstract Operations For ArrayBuffer Objects
        1. 25.1.3.1 AllocateArrayBuffer (constructor,byteLength [ ,maxByteLength ] )
        2. 25.1.3.2 ArrayBufferByteLength (arrayBuffer,order )
        3. 25.1.3.3 ArrayBufferCopyAndDetach (arrayBuffer,newLength,preserveResizability )
        4. 25.1.3.4 IsDetachedBuffer (arrayBuffer )
        5. 25.1.3.5 DetachArrayBuffer (arrayBuffer [ ,key ] )
        6. 25.1.3.6 CloneArrayBuffer (srcBuffer,srcByteOffset,srcLength )
        7. 25.1.3.7 GetArrayBufferMaxByteLengthOption (options )
        8. 25.1.3.8 HostResizeArrayBuffer (buffer,newByteLength )
        9. 25.1.3.9 IsFixedLengthArrayBuffer (arrayBuffer )
        10. 25.1.3.10 IsUnsignedElementType (type )
        11. 25.1.3.11 IsUnclampedIntegerElementType (type )
        12. 25.1.3.12 IsBigIntElementType (type )
        13. 25.1.3.13 IsNoTearConfiguration (type,order )
        14. 25.1.3.14 RawBytesToNumeric (type,rawBytes,isLittleEndian )
        15. 25.1.3.15 GetRawBytesFromSharedBlock (block,byteIndex,type,isTypedArray,order )
        16. 25.1.3.16 GetValueFromBuffer (arrayBuffer,byteIndex,type,isTypedArray,order [ ,isLittleEndian ] )
        17. 25.1.3.17 NumericToRawBytes (type,value,isLittleEndian )
        18. 25.1.3.18 SetValueInBuffer (arrayBuffer,byteIndex,type,value,isTypedArray,order [ ,isLittleEndian ] )
        19. 25.1.3.19 GetModifySetValueInBuffer (arrayBuffer,byteIndex,type,value,op )
      4. +25.1.4 The ArrayBuffer Constructor
        1. 25.1.4.1 ArrayBuffer (length [ ,options ] )
      5. +25.1.5 Properties of the ArrayBuffer Constructor
        1. 25.1.5.1 ArrayBuffer.isView (arg )
        2. 25.1.5.2 ArrayBuffer.prototype
        3. 25.1.5.3 get ArrayBuffer [ %Symbol.species% ]
      6. +25.1.6 Properties of the ArrayBuffer Prototype Object
        1. 25.1.6.1 get ArrayBuffer.prototype.byteLength
        2. 25.1.6.2 ArrayBuffer.prototype.constructor
        3. 25.1.6.3 get ArrayBuffer.prototype.detached
        4. 25.1.6.4 get ArrayBuffer.prototype.maxByteLength
        5. 25.1.6.5 get ArrayBuffer.prototype.resizable
        6. 25.1.6.6 ArrayBuffer.prototype.resize (newLength )
        7. 25.1.6.7 ArrayBuffer.prototype.slice (start,end )
        8. 25.1.6.8 ArrayBuffer.prototype.transfer ( [newLength ] )
        9. 25.1.6.9 ArrayBuffer.prototype.transferToFixedLength ( [newLength ] )
        10. 25.1.6.10 ArrayBuffer.prototype [ %Symbol.toStringTag% ]
      7. 25.1.7 Properties of ArrayBuffer Instances
      8. 25.1.8 Resizable ArrayBuffer Guidelines
    2. +25.2 SharedArrayBuffer Objects
      1. 25.2.1 Fixed-length and Growable SharedArrayBuffer Objects
      2. +25.2.2 Abstract Operations for SharedArrayBuffer Objects
        1. 25.2.2.1 AllocateSharedArrayBuffer (constructor,byteLength [ ,maxByteLength ] )
        2. 25.2.2.2 IsSharedArrayBuffer (obj )
        3. 25.2.2.3 HostGrowSharedArrayBuffer (buffer,newByteLength )
      3. +25.2.3 The SharedArrayBuffer Constructor
        1. 25.2.3.1 SharedArrayBuffer (length [ ,options ] )
      4. +25.2.4 Properties of the SharedArrayBuffer Constructor
        1. 25.2.4.1 SharedArrayBuffer.prototype
        2. 25.2.4.2 get SharedArrayBuffer [ %Symbol.species% ]
      5. +25.2.5 Properties of the SharedArrayBuffer Prototype Object
        1. 25.2.5.1 get SharedArrayBuffer.prototype.byteLength
        2. 25.2.5.2 SharedArrayBuffer.prototype.constructor
        3. 25.2.5.3 SharedArrayBuffer.prototype.grow (newLength )
        4. 25.2.5.4 get SharedArrayBuffer.prototype.growable
        5. 25.2.5.5 get SharedArrayBuffer.prototype.maxByteLength
        6. 25.2.5.6 SharedArrayBuffer.prototype.slice (start,end )
        7. 25.2.5.7 SharedArrayBuffer.prototype [ %Symbol.toStringTag% ]
      6. 25.2.6 Properties of SharedArrayBuffer Instances
      7. 25.2.7 Growable SharedArrayBuffer Guidelines
    3. +25.3 DataView Objects
      1. +25.3.1 Abstract Operations For DataView Objects
        1. 25.3.1.1 DataView With Buffer Witness Records
        2. 25.3.1.2 MakeDataViewWithBufferWitnessRecord (obj,order )
        3. 25.3.1.3 GetViewByteLength (viewRecord )
        4. 25.3.1.4 IsViewOutOfBounds (viewRecord )
        5. 25.3.1.5 GetViewValue (view,requestIndex,isLittleEndian,type )
        6. 25.3.1.6 SetViewValue (view,requestIndex,isLittleEndian,type,value )
      2. +25.3.2 The DataView Constructor
        1. 25.3.2.1 DataView (buffer [ ,byteOffset [ ,byteLength ] ] )
      3. +25.3.3 Properties of the DataView Constructor
        1. 25.3.3.1 DataView.prototype
      4. +25.3.4 Properties of the DataView Prototype Object
        1. 25.3.4.1 get DataView.prototype.buffer
        2. 25.3.4.2 get DataView.prototype.byteLength
        3. 25.3.4.3 get DataView.prototype.byteOffset
        4. 25.3.4.4 DataView.prototype.constructor
        5. 25.3.4.5 DataView.prototype.getBigInt64 (byteOffset [ ,littleEndian ] )
        6. 25.3.4.6 DataView.prototype.getBigUint64 (byteOffset [ ,littleEndian ] )
        7. 25.3.4.7 DataView.prototype.getFloat16 (byteOffset [ ,littleEndian ] )
        8. 25.3.4.8 DataView.prototype.getFloat32 (byteOffset [ ,littleEndian ] )
        9. 25.3.4.9 DataView.prototype.getFloat64 (byteOffset [ ,littleEndian ] )
        10. 25.3.4.10 DataView.prototype.getInt8 (byteOffset )
        11. 25.3.4.11 DataView.prototype.getInt16 (byteOffset [ ,littleEndian ] )
        12. 25.3.4.12 DataView.prototype.getInt32 (byteOffset [ ,littleEndian ] )
        13. 25.3.4.13 DataView.prototype.getUint8 (byteOffset )
        14. 25.3.4.14 DataView.prototype.getUint16 (byteOffset [ ,littleEndian ] )
        15. 25.3.4.15 DataView.prototype.getUint32 (byteOffset [ ,littleEndian ] )
        16. 25.3.4.16 DataView.prototype.setBigInt64 (byteOffset,value [ ,littleEndian ] )
        17. 25.3.4.17 DataView.prototype.setBigUint64 (byteOffset,value [ ,littleEndian ] )
        18. 25.3.4.18 DataView.prototype.setFloat16 (byteOffset,value [ ,littleEndian ] )
        19. 25.3.4.19 DataView.prototype.setFloat32 (byteOffset,value [ ,littleEndian ] )
        20. 25.3.4.20 DataView.prototype.setFloat64 (byteOffset,value [ ,littleEndian ] )
        21. 25.3.4.21 DataView.prototype.setInt8 (byteOffset,value )
        22. 25.3.4.22 DataView.prototype.setInt16 (byteOffset,value [ ,littleEndian ] )
        23. 25.3.4.23 DataView.prototype.setInt32 (byteOffset,value [ ,littleEndian ] )
        24. 25.3.4.24 DataView.prototype.setUint8 (byteOffset,value )
        25. 25.3.4.25 DataView.prototype.setUint16 (byteOffset,value [ ,littleEndian ] )
        26. 25.3.4.26 DataView.prototype.setUint32 (byteOffset,value [ ,littleEndian ] )
        27. 25.3.4.27 DataView.prototype [ %Symbol.toStringTag% ]
      5. 25.3.5 Properties of DataView Instances
    4. +25.4 The Atomics Object
      1. 25.4.1 Waiter Record
      2. 25.4.2 WaiterList Records
      3. +25.4.3 Abstract Operations for Atomics
        1. 25.4.3.1 ValidateIntegerTypedArray (typedArray,waitable )
        2. 25.4.3.2 ValidateAtomicAccess (taRecord,requestIndex )
        3. 25.4.3.3 ValidateAtomicAccessOnIntegerTypedArray (typedArray,requestIndex )
        4. 25.4.3.4 RevalidateAtomicAccess (typedArray,byteIndexInBuffer )
        5. 25.4.3.5 GetWaiterList (block,i )
        6. 25.4.3.6 EnterCriticalSection (WL )
        7. 25.4.3.7 LeaveCriticalSection (WL )
        8. 25.4.3.8 AddWaiter (WL,waiterRecord )
        9. 25.4.3.9 RemoveWaiter (WL,waiterRecord )
        10. 25.4.3.10 RemoveWaiters (WL,c )
        11. 25.4.3.11 SuspendThisAgent (WL,waiterRecord )
        12. 25.4.3.12 NotifyWaiter (WL,waiterRecord )
        13. 25.4.3.13 EnqueueResolveInAgentJob (agentSignifier,promiseCapability,resolution )
        14. 25.4.3.14 DoWait (mode,typedArray,index,value,timeout )
        15. 25.4.3.15 EnqueueAtomicsWaitAsyncTimeoutJob (WL,waiterRecord )
        16. 25.4.3.16 AtomicCompareExchangeInSharedBlock (block,byteIndexInBuffer,elementSize,expectedBytes,replacementBytes )
        17. 25.4.3.17 AtomicReadModifyWrite (typedArray,index,value,op )
        18. 25.4.3.18 ByteListBitwiseOp (op,xBytes,yBytes )
        19. 25.4.3.19 ByteListEqual (xBytes,yBytes )
      4. 25.4.4 Atomics.add (typedArray,index,value )
      5. 25.4.5 Atomics.and (typedArray,index,value )
      6. 25.4.6 Atomics.compareExchange (typedArray,index,expectedValue,replacementValue )
      7. 25.4.7 Atomics.exchange (typedArray,index,value )
      8. 25.4.8 Atomics.isLockFree (size )
      9. 25.4.9 Atomics.load (typedArray,index )
      10. 25.4.10 Atomics.or (typedArray,index,value )
      11. 25.4.11 Atomics.store (typedArray,index,value )
      12. 25.4.12 Atomics.sub (typedArray,index,value )
      13. 25.4.13 Atomics.wait (typedArray,index,value,timeout )
      14. 25.4.14 Atomics.waitAsync (typedArray,index,value,timeout )
      15. 25.4.15 Atomics.notify (typedArray,index,count )
      16. 25.4.16 Atomics.xor (typedArray,index,value )
      17. 25.4.17 Atomics [ %Symbol.toStringTag% ]
    5. +25.5 The JSON Object
      1. +25.5.1 JSON.parse (text [ ,reviver ] )
        1. 25.5.1.1 ParseJSON (text )
        2. 25.5.1.2 InternalizeJSONProperty (holder,name,reviver )
      2. +25.5.2 JSON.stringify (value [ ,replacer [ ,space ] ] )
        1. 25.5.2.1 JSON Serialization Record
        2. 25.5.2.2 SerializeJSONProperty (state,key,holder )
        3. 25.5.2.3 QuoteJSONString (value )
        4. 25.5.2.4 UnicodeEscape (C )
        5. 25.5.2.5 SerializeJSONObject (state,value )
        6. 25.5.2.6 SerializeJSONArray (state,value )
      3. 25.5.3 JSON [ %Symbol.toStringTag% ]
  27. +26 Managing Memory
    1. +26.1 WeakRef Objects
      1. +26.1.1 The WeakRef Constructor
        1. 26.1.1.1 WeakRef (target )
      2. +26.1.2 Properties of the WeakRef Constructor
        1. 26.1.2.1 WeakRef.prototype
      3. +26.1.3 Properties of the WeakRef Prototype Object
        1. 26.1.3.1 WeakRef.prototype.constructor
        2. 26.1.3.2 WeakRef.prototype.deref ( )
        3. 26.1.3.3 WeakRef.prototype [ %Symbol.toStringTag% ]
      4. +26.1.4 WeakRef Abstract Operations
        1. 26.1.4.1 WeakRefDeref (weakRef )
      5. 26.1.5 Properties of WeakRef Instances
    2. +26.2 FinalizationRegistry Objects
      1. +26.2.1 The FinalizationRegistry Constructor
        1. 26.2.1.1 FinalizationRegistry (cleanupCallback )
      2. +26.2.2 Properties of the FinalizationRegistry Constructor
        1. 26.2.2.1 FinalizationRegistry.prototype
      3. +26.2.3 Properties of the FinalizationRegistry Prototype Object
        1. 26.2.3.1 FinalizationRegistry.prototype.constructor
        2. 26.2.3.2 FinalizationRegistry.prototype.register (target,heldValue [ ,unregisterToken ] )
        3. 26.2.3.3 FinalizationRegistry.prototype.unregister (unregisterToken )
        4. 26.2.3.4 FinalizationRegistry.prototype [ %Symbol.toStringTag% ]
      4. 26.2.4 Properties of FinalizationRegistry Instances
  28. +27 Control Abstraction Objects
    1. +27.1 Iteration
      1. +27.1.1 Common Iteration Interfaces
        1. 27.1.1.1 The Iterable Interface
        2. 27.1.1.2 The Iterator Interface
        3. 27.1.1.3 The Async Iterable Interface
        4. 27.1.1.4 The Async Iterator Interface
        5. 27.1.1.5 The IteratorResult Interface
      2. +27.1.2 Iterator Helper Objects
        1. +27.1.2.1 The %IteratorHelperPrototype% Object
          1. 27.1.2.1.1 %IteratorHelperPrototype%.next ( )
          2. 27.1.2.1.2 %IteratorHelperPrototype%.return ( )
          3. 27.1.2.1.3 %IteratorHelperPrototype% [ %Symbol.toStringTag% ]
      3. +27.1.3 Iterator Objects
        1. +27.1.3.1 The Iterator Constructor
          1. 27.1.3.1.1 Iterator ( )
        2. +27.1.3.2 Properties of the Iterator Constructor
          1. +27.1.3.2.1 Iterator.from (O )
            1. +27.1.3.2.1.1 The %WrapForValidIteratorPrototype% Object
              1. 27.1.3.2.1.1.1 %WrapForValidIteratorPrototype%.next ( )
              2. 27.1.3.2.1.1.2 %WrapForValidIteratorPrototype%.return ( )
          2. 27.1.3.2.2 Iterator.prototype
        3. +27.1.3.3 Properties of the Iterator Prototype Object
          1. +27.1.3.3.1 Iterator.prototype.constructor
            1. 27.1.3.3.1.1 get Iterator.prototype.constructor
            2. 27.1.3.3.1.2 set Iterator.prototype.constructor
          2. 27.1.3.3.2 Iterator.prototype.drop (limit )
          3. 27.1.3.3.3 Iterator.prototype.every (predicate )
          4. 27.1.3.3.4 Iterator.prototype.filter (predicate )
          5. 27.1.3.3.5 Iterator.prototype.find (predicate )
          6. 27.1.3.3.6 Iterator.prototype.flatMap (mapper )
          7. 27.1.3.3.7 Iterator.prototype.forEach (procedure )
          8. 27.1.3.3.8 Iterator.prototype.map (mapper )
          9. 27.1.3.3.9 Iterator.prototype.reduce (reducer [ ,initialValue ] )
          10. 27.1.3.3.10 Iterator.prototype.some (predicate )
          11. 27.1.3.3.11 Iterator.prototype.take (limit )
          12. 27.1.3.3.12 Iterator.prototype.toArray ( )
          13. 27.1.3.3.13 Iterator.prototype [ %Symbol.iterator% ] ( )
          14. +27.1.3.3.14 Iterator.prototype [ %Symbol.toStringTag% ]
            1. 27.1.3.3.14.1 get Iterator.prototype [ %Symbol.toStringTag% ]
            2. 27.1.3.3.14.2 set Iterator.prototype [ %Symbol.toStringTag% ]
      4. +27.1.4 The %AsyncIteratorPrototype% Object
        1. 27.1.4.1 %AsyncIteratorPrototype% [ %Symbol.asyncIterator% ] ( )
      5. +27.1.5 Async-from-Sync Iterator Objects
        1. 27.1.5.1 CreateAsyncFromSyncIterator (syncIteratorRecord )
        2. +27.1.5.2 The %AsyncFromSyncIteratorPrototype% Object
          1. 27.1.5.2.1 %AsyncFromSyncIteratorPrototype%.next ( [value ] )
          2. 27.1.5.2.2 %AsyncFromSyncIteratorPrototype%.return ( [value ] )
          3. 27.1.5.2.3 %AsyncFromSyncIteratorPrototype%.throw ( [value ] )
        3. 27.1.5.3 Properties of Async-from-Sync Iterator Instances
        4. 27.1.5.4 AsyncFromSyncIteratorContinuation (result,promiseCapability,syncIteratorRecord,closeOnRejection )
    2. +27.2 Promise Objects
      1. +27.2.1 Promise Abstract Operations
        1. +27.2.1.1 PromiseCapability Records
          1. 27.2.1.1.1 IfAbruptRejectPromise (value,capability )
        2. 27.2.1.2 PromiseReaction Records
        3. +27.2.1.3 CreateResolvingFunctions (promise )
          1. 27.2.1.3.1 Promise Reject Functions
          2. 27.2.1.3.2 Promise Resolve Functions
        4. 27.2.1.4 FulfillPromise (promise,value )
        5. 27.2.1.5 NewPromiseCapability (C )
        6. 27.2.1.6 IsPromise (x )
        7. 27.2.1.7 RejectPromise (promise,reason )
        8. 27.2.1.8 TriggerPromiseReactions (reactions,argument )
        9. 27.2.1.9 HostPromiseRejectionTracker (promise,operation )
      2. +27.2.2 Promise Jobs
        1. 27.2.2.1 NewPromiseReactionJob (reaction,argument )
        2. 27.2.2.2 NewPromiseResolveThenableJob (promiseToResolve,thenable,then )
      3. +27.2.3 The Promise Constructor
        1. 27.2.3.1 Promise (executor )
      4. +27.2.4 Properties of the Promise Constructor
        1. +27.2.4.1 Promise.all (iterable )
          1. 27.2.4.1.1 GetPromiseResolve (promiseConstructor )
          2. 27.2.4.1.2 PerformPromiseAll (iteratorRecord,constructor,resultCapability,promiseResolve )
          3. 27.2.4.1.3Promise.all Resolve Element Functions
        2. +27.2.4.2 Promise.allSettled (iterable )
          1. 27.2.4.2.1 PerformPromiseAllSettled (iteratorRecord,constructor,resultCapability,promiseResolve )
          2. 27.2.4.2.2Promise.allSettled Resolve Element Functions
          3. 27.2.4.2.3Promise.allSettled Reject Element Functions
        3. +27.2.4.3 Promise.any (iterable )
          1. 27.2.4.3.1 PerformPromiseAny (iteratorRecord,constructor,resultCapability,promiseResolve )
          2. 27.2.4.3.2Promise.any Reject Element Functions
        4. 27.2.4.4 Promise.prototype
        5. +27.2.4.5 Promise.race (iterable )
          1. 27.2.4.5.1 PerformPromiseRace (iteratorRecord,constructor,resultCapability,promiseResolve )
        6. 27.2.4.6 Promise.reject (r )
        7. +27.2.4.7 Promise.resolve (x )
          1. 27.2.4.7.1 PromiseResolve (C,x )
        8. 27.2.4.8 Promise.try (callback, ...args )
        9. 27.2.4.9 Promise.withResolvers ( )
        10. 27.2.4.10 get Promise [ %Symbol.species% ]
      5. +27.2.5 Properties of the Promise Prototype Object
        1. 27.2.5.1 Promise.prototype.catch (onRejected )
        2. 27.2.5.2 Promise.prototype.constructor
        3. 27.2.5.3 Promise.prototype.finally (onFinally )
        4. +27.2.5.4 Promise.prototype.then (onFulfilled,onRejected )
          1. 27.2.5.4.1 PerformPromiseThen (promise,onFulfilled,onRejected [ ,resultCapability ] )
        5. 27.2.5.5 Promise.prototype [ %Symbol.toStringTag% ]
      6. 27.2.6 Properties of Promise Instances
    3. +27.3 GeneratorFunction Objects
      1. +27.3.1 The GeneratorFunction Constructor
        1. 27.3.1.1 GeneratorFunction ( ...parameterArgs,bodyArg )
      2. +27.3.2 Properties of the GeneratorFunction Constructor
        1. 27.3.2.1 GeneratorFunction.prototype
      3. +27.3.3 Properties of the GeneratorFunction Prototype Object
        1. 27.3.3.1 GeneratorFunction.prototype.constructor
        2. 27.3.3.2 GeneratorFunction.prototype.prototype
        3. 27.3.3.3 GeneratorFunction.prototype [ %Symbol.toStringTag% ]
      4. +27.3.4 GeneratorFunction Instances
        1. 27.3.4.1 length
        2. 27.3.4.2 name
        3. 27.3.4.3 prototype
    4. +27.4 AsyncGeneratorFunction Objects
      1. +27.4.1 The AsyncGeneratorFunction Constructor
        1. 27.4.1.1 AsyncGeneratorFunction ( ...parameterArgs,bodyArg )
      2. +27.4.2 Properties of the AsyncGeneratorFunction Constructor
        1. 27.4.2.1 AsyncGeneratorFunction.prototype
      3. +27.4.3 Properties of the AsyncGeneratorFunction Prototype Object
        1. 27.4.3.1 AsyncGeneratorFunction.prototype.constructor
        2. 27.4.3.2 AsyncGeneratorFunction.prototype.prototype
        3. 27.4.3.3 AsyncGeneratorFunction.prototype [ %Symbol.toStringTag% ]
      4. +27.4.4 AsyncGeneratorFunction Instances
        1. 27.4.4.1 length
        2. 27.4.4.2 name
        3. 27.4.4.3 prototype
    5. +27.5 Generator Objects
      1. +27.5.1 The %GeneratorPrototype% Object
        1. 27.5.1.1 %GeneratorPrototype%.constructor
        2. 27.5.1.2 %GeneratorPrototype%.next (value )
        3. 27.5.1.3 %GeneratorPrototype%.return (value )
        4. 27.5.1.4 %GeneratorPrototype%.throw (exception )
        5. 27.5.1.5 %GeneratorPrototype% [ %Symbol.toStringTag% ]
      2. 27.5.2 Properties of Generator Instances
      3. +27.5.3 Generator Abstract Operations
        1. 27.5.3.1 GeneratorStart (generator,generatorBody )
        2. 27.5.3.2 GeneratorValidate (generator,generatorBrand )
        3. 27.5.3.3 GeneratorResume (generator,value,generatorBrand )
        4. 27.5.3.4 GeneratorResumeAbrupt (generator,abruptCompletion,generatorBrand )
        5. 27.5.3.5 GetGeneratorKind ( )
        6. 27.5.3.6 GeneratorYield (iteratorResult )
        7. 27.5.3.7 Yield (value )
        8. 27.5.3.8 CreateIteratorFromClosure (closure,generatorBrand,generatorPrototype [ ,extraSlots ] )
    6. +27.6 AsyncGenerator Objects
      1. +27.6.1 The %AsyncGeneratorPrototype% Object
        1. 27.6.1.1 %AsyncGeneratorPrototype%.constructor
        2. 27.6.1.2 %AsyncGeneratorPrototype%.next (value )
        3. 27.6.1.3 %AsyncGeneratorPrototype%.return (value )
        4. 27.6.1.4 %AsyncGeneratorPrototype%.throw (exception )
        5. 27.6.1.5 %AsyncGeneratorPrototype% [ %Symbol.toStringTag% ]
      2. 27.6.2 Properties of AsyncGenerator Instances
      3. +27.6.3 AsyncGenerator Abstract Operations
        1. 27.6.3.1 AsyncGeneratorRequest Records
        2. 27.6.3.2 AsyncGeneratorStart (generator,generatorBody )
        3. 27.6.3.3 AsyncGeneratorValidate (generator,generatorBrand )
        4. 27.6.3.4 AsyncGeneratorEnqueue (generator,completion,promiseCapability )
        5. 27.6.3.5 AsyncGeneratorCompleteStep (generator,completion,done [ ,realm ] )
        6. 27.6.3.6 AsyncGeneratorResume (generator,completion )
        7. 27.6.3.7 AsyncGeneratorUnwrapYieldResumption (resumptionValue )
        8. 27.6.3.8 AsyncGeneratorYield (value )
        9. 27.6.3.9 AsyncGeneratorAwaitReturn (generator )
        10. 27.6.3.10 AsyncGeneratorDrainQueue (generator )
        11. 27.6.3.11 CreateAsyncIteratorFromClosure (closure,generatorBrand,generatorPrototype )
    7. +27.7 AsyncFunction Objects
      1. +27.7.1 The AsyncFunction Constructor
        1. 27.7.1.1 AsyncFunction ( ...parameterArgs,bodyArg )
      2. +27.7.2 Properties of the AsyncFunction Constructor
        1. 27.7.2.1 AsyncFunction.prototype
      3. +27.7.3 Properties of the AsyncFunction Prototype Object
        1. 27.7.3.1 AsyncFunction.prototype.constructor
        2. 27.7.3.2 AsyncFunction.prototype [ %Symbol.toStringTag% ]
      4. +27.7.4 AsyncFunction Instances
        1. 27.7.4.1 length
        2. 27.7.4.2 name
      5. +27.7.5 Async Functions Abstract Operations
        1. 27.7.5.1 AsyncFunctionStart (promiseCapability,asyncFunctionBody )
        2. 27.7.5.2 AsyncBlockStart (promiseCapability,asyncBody,asyncContext )
        3. 27.7.5.3 Await (value )
  29. +28 Reflection
    1. +28.1 The Reflect Object
      1. 28.1.1 Reflect.apply (target,thisArgument,argumentsList )
      2. 28.1.2 Reflect.construct (target,argumentsList [ ,newTarget ] )
      3. 28.1.3 Reflect.defineProperty (target,propertyKey,attributes )
      4. 28.1.4 Reflect.deleteProperty (target,propertyKey )
      5. 28.1.5 Reflect.get (target,propertyKey [ ,receiver ] )
      6. 28.1.6 Reflect.getOwnPropertyDescriptor (target,propertyKey )
      7. 28.1.7 Reflect.getPrototypeOf (target )
      8. 28.1.8 Reflect.has (target,propertyKey )
      9. 28.1.9 Reflect.isExtensible (target )
      10. 28.1.10 Reflect.ownKeys (target )
      11. 28.1.11 Reflect.preventExtensions (target )
      12. 28.1.12 Reflect.set (target,propertyKey,V [ ,receiver ] )
      13. 28.1.13 Reflect.setPrototypeOf (target,proto )
      14. 28.1.14 Reflect [ %Symbol.toStringTag% ]
    2. +28.2 Proxy Objects
      1. +28.2.1 The Proxy Constructor
        1. 28.2.1.1 Proxy (target,handler )
      2. +28.2.2 Properties of the Proxy Constructor
        1. 28.2.2.1 Proxy.revocable (target,handler )
    3. +28.3 Module Namespace Objects
      1. 28.3.1 %Symbol.toStringTag%
  30. +29 Memory Model
    1. 29.1 Memory Model Fundamentals
    2. 29.2 Agent Events Records
    3. 29.3 Chosen Value Records
    4. 29.4 Candidate Executions
    5. +29.5 Abstract Operations for the Memory Model
      1. 29.5.1 EventSet (execution )
      2. 29.5.2 SharedDataBlockEventSet (execution )
      3. 29.5.3 HostEventSet (execution )
      4. 29.5.4 ComposeWriteEventBytes (execution,byteIndex,Ws )
      5. 29.5.5 ValueOfReadEvent (execution,R )
    6. +29.6 Relations of Candidate Executions
      1. 29.6.1 is-agent-order-before
      2. 29.6.2 reads-bytes-from
      3. 29.6.3 reads-from
      4. 29.6.4 host-synchronizes-with
      5. 29.6.5 synchronizes-with
      6. 29.6.6 happens-before
    7. +29.7 Properties of Valid Executions
      1. 29.7.1 Valid Chosen Reads
      2. 29.7.2 Coherent Reads
      3. 29.7.3 Tear Free Reads
      4. 29.7.4 Sequentially Consistent Atomics
      5. 29.7.5 Valid Executions
    8. 29.8 Races
    9. 29.9 Data Races
    10. 29.10 Data Race Freedom
    11. 29.11 Shared Memory Guidelines
  31. +Annex A(informative) Grammar Summary
    1. A.1 Lexical Grammar
    2. A.2 Expressions
    3. A.3 Statements
    4. A.4 Functions and Classes
    5. A.5 Scripts and Modules
    6. A.6 Number Conversions
    7. A.7 Time Zone Offset String Format
    8. A.8 Regular Expressions
  32. +Annex B(normative) Additional ECMAScript Features for Web Browsers
    1. +B.1 Additional Syntax
      1. B.1.1 HTML-like Comments
      2. +B.1.2 Regular Expressions Patterns
        1. B.1.2.1 SS: Early Errors
        2. B.1.2.2 SS: CountLeftCapturingParensWithin and CountLeftCapturingParensBefore
        3. B.1.2.3 SS: IsCharacterClass
        4. B.1.2.4 SS: CharacterValue
        5. B.1.2.5 RS: CompileSubpattern
        6. B.1.2.6 RS: CompileAssertion
        7. B.1.2.7 RS: CompileAtom
        8. +B.1.2.8 RS: CompileToCharSet
          1. B.1.2.8.1 CharacterRangeOrUnion (rer,A,B )
        9. B.1.2.9 SS: ParsePattern (patternText,u,v )
    2. +B.2 Additional Built-in Properties
      1. +B.2.1 Additional Properties of the Global Object
        1. B.2.1.1 escape (string )
        2. B.2.1.2 unescape (string )
      2. +B.2.2 Additional Properties of the String.prototype Object
        1. B.2.2.1 String.prototype.substr (start,length )
        2. +B.2.2.2 String.prototype.anchor (name )
          1. B.2.2.2.1 CreateHTML (string,tag,attribute,value )
        3. B.2.2.3 String.prototype.big ( )
        4. B.2.2.4 String.prototype.blink ( )
        5. B.2.2.5 String.prototype.bold ( )
        6. B.2.2.6 String.prototype.fixed ( )
        7. B.2.2.7 String.prototype.fontcolor (colour )
        8. B.2.2.8 String.prototype.fontsize (size )
        9. B.2.2.9 String.prototype.italics ( )
        10. B.2.2.10 String.prototype.link (url )
        11. B.2.2.11 String.prototype.small ( )
        12. B.2.2.12 String.prototype.strike ( )
        13. B.2.2.13 String.prototype.sub ( )
        14. B.2.2.14 String.prototype.sup ( )
        15. B.2.2.15 String.prototype.trimLeft ( )
        16. B.2.2.16 String.prototype.trimRight ( )
      3. +B.2.3 Additional Properties of the Date.prototype Object
        1. B.2.3.1 Date.prototype.getYear ( )
        2. B.2.3.2 Date.prototype.setYear (year )
        3. B.2.3.3 Date.prototype.toGMTString ( )
      4. +B.2.4 Additional Properties of the RegExp.prototype Object
        1. B.2.4.1 RegExp.prototype.compile (pattern,flags )
    3. +B.3 Other Additional Features
      1. B.3.1 Labelled Function Declarations
      2. B.3.2 Block-Level Function Declarations Web Legacy Compatibility Semantics
      3. B.3.3 FunctionDeclarations in IfStatement Statement Clauses
      4. B.3.4 VariableStatements in Catch Blocks
      5. B.3.5 Initializers in ForIn Statement Heads
      6. B.3.6 The[[IsHTMLDDA]] Internal Slot
      7. B.3.7 Non-default behaviour in HostMakeJobCallback
      8. B.3.8 Non-default behaviour in HostEnsureCanAddPrivateElement
      9. B.3.9 Runtime Errors for Function Call Assignment Targets
  33. Annex C(informative) The Strict Mode of ECMAScript
  34. +Annex D(informative) Host Layering Points
    1. D.1 Host Hooks
    2. D.2 Host-defined Fields
    3. D.3 Host-defined Objects
    4. D.4 Running Jobs
    5. D.5 Internal Methods of Exotic Objects
    6. D.6 Built-in Objects and Methods
  35. Annex E(informative) Corrections and Clarifications in ECMAScript 2015 with Possible Compatibility Impact
  36. Annex F(informative) Additions and Changes That Introduce Incompatibilities with Prior Editions
  37. Bibliography
  38. Colophon
  39. Copyright & Software License
Menu

10 Ordinary and Exotic Objects Behaviours

10.1 Ordinary Object Internal Methods and Internal Slots

Allordinary objects have an internal slot called[[Prototype]]. The value of this internal slot is eithernull or an object and is used for implementing inheritance. Assume a property namedP is missing from anordinary objectO but exists on its[[Prototype]] object. IfP refers to adata property on the[[Prototype]] object,O inherits it for get access, making it behave as ifP was a property ofO. IfP refers to a writabledata property on the[[Prototype]] object, set access ofP onO creates a newdata property namedP onO. IfP refers to a non-writabledata property on the[[Prototype]] object, set access ofP onO fails. IfP refers to anaccessor property on the[[Prototype]] object, the accessor is inherited byO for both get access and set access.

Everyordinary object has a Boolean-valued[[Extensible]] internal slot which is used to fulfill the extensibility-related internal method invariants specified in6.1.7.3. Namely, once the value of an object's[[Extensible]] internal slot has been set tofalse, it is no longer possible to add properties to the object, to modify the value of the object's[[Prototype]] internal slot, or to subsequently change the value of[[Extensible]] totrue.

In the following algorithm descriptions, assumeO is anordinary object,P is aproperty key value,V is anyECMAScript language value, andDesc is aProperty Descriptor record.

Eachordinary object internal method delegates to a similarly-named abstract operation. If such an abstract operation depends on another internal method, then the internal method is invoked onO rather than calling the similarly-named abstract operation directly. These semantics ensure thatexotic objects have their overridden internal methods invoked whenordinary object internal methods are applied to them.

10.1.1[[GetPrototypeOf]] ( )

The[[GetPrototypeOf]] internal method of anordinary objectO takes no arguments and returns anormal completion containing either an Object ornull. It performs the following steps when called:

  1. ReturnOrdinaryGetPrototypeOf(O).

10.1.1.1 OrdinaryGetPrototypeOf (O )

The abstract operation OrdinaryGetPrototypeOf takes argumentO (an Object) and returns an Object ornull. It performs the following steps when called:

  1. ReturnO.[[Prototype]].

10.1.2[[SetPrototypeOf]] (V )

The[[SetPrototypeOf]] internal method of anordinary objectO takes argumentV (an Object ornull) and returns anormal completion containing a Boolean. It performs the following steps when called:

  1. ReturnOrdinarySetPrototypeOf(O,V).

10.1.2.1 OrdinarySetPrototypeOf (O,V )

The abstract operation OrdinarySetPrototypeOf takes argumentsO (an Object) andV (an Object ornull) and returns a Boolean. It performs the following steps when called:

  1. Letcurrent beO.[[Prototype]].
  2. IfSameValue(V,current) istrue, returntrue.
  3. Letextensible beO.[[Extensible]].
  4. Ifextensible isfalse, returnfalse.
  5. Letp beV.
  6. Letdone befalse.
  7. Repeat, whiledone isfalse,
    1. Ifp isnull, then
      1. Setdone totrue.
    2. Else ifSameValue(p,O) istrue, then
      1. Returnfalse.
    3. Else,
      1. Ifp.[[GetPrototypeOf]] is not theordinary object internal method defined in10.1.1, setdone totrue.
      2. Else, setp top.[[Prototype]].
  8. SetO.[[Prototype]] toV.
  9. Returntrue.
Note

The loop in step7 guarantees that there will be no cycles in any prototype chain that only includes objects that use theordinary object definitions for[[GetPrototypeOf]] and[[SetPrototypeOf]].

10.1.3[[IsExtensible]] ( )

The[[IsExtensible]] internal method of anordinary objectO takes no arguments and returns anormal completion containing a Boolean. It performs the following steps when called:

  1. ReturnOrdinaryIsExtensible(O).

10.1.3.1 OrdinaryIsExtensible (O )

The abstract operation OrdinaryIsExtensible takes argumentO (an Object) and returns a Boolean. It performs the following steps when called:

  1. ReturnO.[[Extensible]].

10.1.4[[PreventExtensions]] ( )

The[[PreventExtensions]] internal method of anordinary objectO takes no arguments and returns anormal completion containingtrue. It performs the following steps when called:

  1. ReturnOrdinaryPreventExtensions(O).

10.1.4.1 OrdinaryPreventExtensions (O )

The abstract operation OrdinaryPreventExtensions takes argumentO (an Object) and returnstrue. It performs the following steps when called:

  1. SetO.[[Extensible]] tofalse.
  2. Returntrue.

10.1.5[[GetOwnProperty]] (P )

The[[GetOwnProperty]] internal method of anordinary objectO takes argumentP (aproperty key) and returns anormal completion containing either aProperty Descriptor orundefined. It performs the following steps when called:

  1. ReturnOrdinaryGetOwnProperty(O,P).

10.1.5.1 OrdinaryGetOwnProperty (O,P )

The abstract operation OrdinaryGetOwnProperty takes argumentsO (an Object) andP (aproperty key) and returns aProperty Descriptor orundefined. It performs the following steps when called:

  1. IfO does not have an own property with keyP, returnundefined.
  2. LetD be a newly createdProperty Descriptor with no fields.
  3. LetX beO's own property whose key isP.
  4. IfX is adata property, then
    1. SetD.[[Value]] to the value ofX's[[Value]] attribute.
    2. SetD.[[Writable]] to the value ofX's[[Writable]] attribute.
  5. Else,
    1. Assert:X is anaccessor property.
    2. SetD.[[Get]] to the value ofX's[[Get]] attribute.
    3. SetD.[[Set]] to the value ofX's[[Set]] attribute.
  6. SetD.[[Enumerable]] to the value ofX's[[Enumerable]] attribute.
  7. SetD.[[Configurable]] to the value ofX's[[Configurable]] attribute.
  8. ReturnD.

10.1.6[[DefineOwnProperty]] (P,Desc )

The[[DefineOwnProperty]] internal method of anordinary objectO takes argumentsP (aproperty key) andDesc (aProperty Descriptor) and returns either anormal completion containing a Boolean or athrow completion. It performs the following steps when called:

  1. Return ? OrdinaryDefineOwnProperty(O,P,Desc).

10.1.6.1 OrdinaryDefineOwnProperty (O,P,Desc )

The abstract operation OrdinaryDefineOwnProperty takes argumentsO (an Object),P (aproperty key), andDesc (aProperty Descriptor) and returns either anormal completion containing a Boolean or athrow completion. It performs the following steps when called:

  1. Letcurrent be ? O.[[GetOwnProperty]](P).
  2. Letextensible be ? IsExtensible(O).
  3. ReturnValidateAndApplyPropertyDescriptor(O,P,extensible,Desc,current).

10.1.6.2 IsCompatiblePropertyDescriptor (Extensible,Desc,Current )

The abstract operation IsCompatiblePropertyDescriptor takes argumentsExtensible (a Boolean),Desc (aProperty Descriptor), andCurrent (aProperty Descriptor orundefined) and returns a Boolean. It performs the following steps when called:

  1. ReturnValidateAndApplyPropertyDescriptor(undefined,"",Extensible,Desc,Current).

10.1.6.3 ValidateAndApplyPropertyDescriptor (O,P,extensible,Desc,current )

The abstract operation ValidateAndApplyPropertyDescriptor takes argumentsO (an Object orundefined),P (aproperty key),extensible (a Boolean),Desc (aProperty Descriptor), andcurrent (aProperty Descriptor orundefined) and returns a Boolean. It returnstrue if and only ifDesc can be applied as the property of an object with specifiedextensibility and current propertycurrent while upholdinginvariants. When such application is possible andO is notundefined, it is performed for the property namedP (which is created if necessary). It performs the following steps when called:

  1. Assert:P is aproperty key.
  2. Ifcurrent isundefined, then
    1. Ifextensible isfalse, returnfalse.
    2. IfO isundefined, returntrue.
    3. IfIsAccessorDescriptor(Desc) istrue, then
      1. Create an ownaccessor property namedP of objectO whose[[Get]],[[Set]],[[Enumerable]], and[[Configurable]] attributes are set to the value of the corresponding field inDesc ifDesc has that field, or to the attribute'sdefault value otherwise.
    4. Else,
      1. Create an owndata property namedP of objectO whose[[Value]],[[Writable]],[[Enumerable]], and[[Configurable]] attributes are set to the value of the corresponding field inDesc ifDesc has that field, or to the attribute'sdefault value otherwise.
    5. Returntrue.
  3. Assert:current is afully populated Property Descriptor.
  4. IfDesc does not have any fields, returntrue.
  5. Ifcurrent.[[Configurable]] isfalse, then
    1. IfDesc has a[[Configurable]] field andDesc.[[Configurable]] istrue, returnfalse.
    2. IfDesc has an[[Enumerable]] field andDesc.[[Enumerable]] is notcurrent.[[Enumerable]], returnfalse.
    3. IfIsGenericDescriptor(Desc) isfalse andIsAccessorDescriptor(Desc) is notIsAccessorDescriptor(current), returnfalse.
    4. IfIsAccessorDescriptor(current) istrue, then
      1. IfDesc has a[[Get]] field andSameValue(Desc.[[Get]],current.[[Get]]) isfalse, returnfalse.
      2. IfDesc has a[[Set]] field andSameValue(Desc.[[Set]],current.[[Set]]) isfalse, returnfalse.
    5. Else ifcurrent.[[Writable]] isfalse, then
      1. IfDesc has a[[Writable]] field andDesc.[[Writable]] istrue, returnfalse.
      2. NOTE:SameValue returnstrue forNaN values which may be distinguishable by other means. Returning here ensures that any existing property ofO remains unmodified.
      3. IfDesc has a[[Value]] field, returnSameValue(Desc.[[Value]],current.[[Value]]).
  6. IfO is notundefined, then
    1. IfIsDataDescriptor(current) istrue andIsAccessorDescriptor(Desc) istrue, then
      1. IfDesc has a[[Configurable]] field, letconfigurable beDesc.[[Configurable]]; else letconfigurable becurrent.[[Configurable]].
      2. IfDesc has a[[Enumerable]] field, letenumerable beDesc.[[Enumerable]]; else letenumerable becurrent.[[Enumerable]].
      3. Replace the property namedP of objectO with anaccessor property whose[[Configurable]] and[[Enumerable]] attributes are set toconfigurable andenumerable, respectively, and whose[[Get]] and[[Set]] attributes are set to the value of the corresponding field inDesc ifDesc has that field, or to the attribute'sdefault value otherwise.
    2. Else ifIsAccessorDescriptor(current) istrue andIsDataDescriptor(Desc) istrue, then
      1. IfDesc has a[[Configurable]] field, letconfigurable beDesc.[[Configurable]]; else letconfigurable becurrent.[[Configurable]].
      2. IfDesc has a[[Enumerable]] field, letenumerable beDesc.[[Enumerable]]; else letenumerable becurrent.[[Enumerable]].
      3. Replace the property namedP of objectO with adata property whose[[Configurable]] and[[Enumerable]] attributes are set toconfigurable andenumerable, respectively, and whose[[Value]] and[[Writable]] attributes are set to the value of the corresponding field inDesc ifDesc has that field, or to the attribute'sdefault value otherwise.
    3. Else,
      1. For each field ofDesc, set the corresponding attribute of the property namedP of objectO to the value of the field.
  7. Returntrue.

10.1.7[[HasProperty]] (P )

The[[HasProperty]] internal method of anordinary objectO takes argumentP (aproperty key) and returns either anormal completion containing a Boolean or athrow completion. It performs the following steps when called:

  1. Return ? OrdinaryHasProperty(O,P).

10.1.7.1 OrdinaryHasProperty (O,P )

The abstract operation OrdinaryHasProperty takes argumentsO (an Object) andP (aproperty key) and returns either anormal completion containing a Boolean or athrow completion. It performs the following steps when called:

  1. LethasOwn be ? O.[[GetOwnProperty]](P).
  2. IfhasOwn is notundefined, returntrue.
  3. Letparent be ? O.[[GetPrototypeOf]]().
  4. Ifparent is notnull, then
    1. Return ? parent.[[HasProperty]](P).
  5. Returnfalse.

10.1.8[[Get]] (P,Receiver )

The[[Get]] internal method of anordinary objectO takes argumentsP (aproperty key) andReceiver (anECMAScript language value) and returns either anormal completion containing anECMAScript language value or athrow completion. It performs the following steps when called:

  1. Return ? OrdinaryGet(O,P,Receiver).

10.1.8.1 OrdinaryGet (O,P,Receiver )

The abstract operation OrdinaryGet takes argumentsO (an Object),P (aproperty key), andReceiver (anECMAScript language value) and returns either anormal completion containing anECMAScript language value or athrow completion. It performs the following steps when called:

  1. Letdesc be ? O.[[GetOwnProperty]](P).
  2. Ifdesc isundefined, then
    1. Letparent be ? O.[[GetPrototypeOf]]().
    2. Ifparent isnull, returnundefined.
    3. Return ? parent.[[Get]](P,Receiver).
  3. IfIsDataDescriptor(desc) istrue, returndesc.[[Value]].
  4. Assert:IsAccessorDescriptor(desc) istrue.
  5. Letgetter bedesc.[[Get]].
  6. Ifgetter isundefined, returnundefined.
  7. Return ? Call(getter,Receiver).

10.1.9[[Set]] (P,V,Receiver )

The[[Set]] internal method of anordinary objectO takes argumentsP (aproperty key),V (anECMAScript language value), andReceiver (anECMAScript language value) and returns either anormal completion containing a Boolean or athrow completion. It performs the following steps when called:

  1. Return ? OrdinarySet(O,P,V,Receiver).

10.1.9.1 OrdinarySet (O,P,V,Receiver )

The abstract operation OrdinarySet takes argumentsO (an Object),P (aproperty key),V (anECMAScript language value), andReceiver (anECMAScript language value) and returns either anormal completion containing a Boolean or athrow completion. It performs the following steps when called:

  1. LetownDesc be ? O.[[GetOwnProperty]](P).
  2. Return ? OrdinarySetWithOwnDescriptor(O,P,V,Receiver,ownDesc).

10.1.9.2 OrdinarySetWithOwnDescriptor (O,P,V,Receiver,ownDesc )

The abstract operation OrdinarySetWithOwnDescriptor takes argumentsO (an Object),P (aproperty key),V (anECMAScript language value),Receiver (anECMAScript language value), andownDesc (aProperty Descriptor orundefined) and returns either anormal completion containing a Boolean or athrow completion. It performs the following steps when called:

  1. IfownDesc isundefined, then
    1. Letparent be ? O.[[GetPrototypeOf]]().
    2. Ifparent is notnull, then
      1. Return ? parent.[[Set]](P,V,Receiver).
    3. Else,
      1. SetownDesc to the PropertyDescriptor {[[Value]]:undefined,[[Writable]]:true,[[Enumerable]]:true,[[Configurable]]:true }.
  2. IfIsDataDescriptor(ownDesc) istrue, then
    1. IfownDesc.[[Writable]] isfalse, returnfalse.
    2. IfReceiveris not an Object, returnfalse.
    3. LetexistingDescriptor be ? Receiver.[[GetOwnProperty]](P).
    4. IfexistingDescriptor is notundefined, then
      1. IfIsAccessorDescriptor(existingDescriptor) istrue, returnfalse.
      2. IfexistingDescriptor.[[Writable]] isfalse, returnfalse.
      3. LetvalueDesc be the PropertyDescriptor {[[Value]]:V }.
      4. Return ? Receiver.[[DefineOwnProperty]](P,valueDesc).
    5. Else,
      1. Assert:Receiver does not currently have a propertyP.
      2. Return ? CreateDataProperty(Receiver,P,V).
  3. Assert:IsAccessorDescriptor(ownDesc) istrue.
  4. Letsetter beownDesc.[[Set]].
  5. Ifsetter isundefined, returnfalse.
  6. Perform ? Call(setter,Receiver, «V »).
  7. Returntrue.

10.1.10[[Delete]] (P )

The[[Delete]] internal method of anordinary objectO takes argumentP (aproperty key) and returns either anormal completion containing a Boolean or athrow completion. It performs the following steps when called:

  1. Return ? OrdinaryDelete(O,P).

10.1.10.1 OrdinaryDelete (O,P )

The abstract operation OrdinaryDelete takes argumentsO (an Object) andP (aproperty key) and returns either anormal completion containing a Boolean or athrow completion. It performs the following steps when called:

  1. Letdesc be ? O.[[GetOwnProperty]](P).
  2. Ifdesc isundefined, returntrue.
  3. Ifdesc.[[Configurable]] istrue, then
    1. Remove the own property with nameP fromO.
    2. Returntrue.
  4. Returnfalse.

10.1.11[[OwnPropertyKeys]] ( )

The[[OwnPropertyKeys]] internal method of anordinary objectO takes no arguments and returns anormal completion containing aList ofproperty keys. It performs the following steps when called:

  1. ReturnOrdinaryOwnPropertyKeys(O).

10.1.11.1 OrdinaryOwnPropertyKeys (O )

The abstract operation OrdinaryOwnPropertyKeys takes argumentO (an Object) and returns aList ofproperty keys. It performs the following steps when called:

  1. Letkeys be a new emptyList.
  2. For each ownproperty keyP ofO such thatP is anarray index, in ascending numeric index order, do
    1. AppendP tokeys.
  3. For each ownproperty keyP ofO such thatPis a String andP is not anarray index, in ascending chronological order of property creation, do
    1. AppendP tokeys.
  4. For each ownproperty keyP ofO such thatPis a Symbol, in ascending chronological order of property creation, do
    1. AppendP tokeys.
  5. Returnkeys.

10.1.12 OrdinaryObjectCreate (proto [ ,additionalInternalSlotsList ] )

The abstract operation OrdinaryObjectCreate takes argumentproto (an Object ornull) and optional argumentadditionalInternalSlotsList (aList of names of internal slots) and returns an Object. It is used to specify the runtime creation of newordinary objects.additionalInternalSlotsList contains the names of additional internal slots that must be defined as part of the object, beyond[[Prototype]] and[[Extensible]]. IfadditionalInternalSlotsList is not provided, a new emptyList is used. It performs the following steps when called:

  1. LetinternalSlotsList be «[[Prototype]],[[Extensible]] ».
  2. IfadditionalInternalSlotsList is present, setinternalSlotsList to thelist-concatenation ofinternalSlotsList andadditionalInternalSlotsList.
  3. LetO beMakeBasicObject(internalSlotsList).
  4. SetO.[[Prototype]] toproto.
  5. ReturnO.
Note

Although OrdinaryObjectCreate does little more than callMakeBasicObject, its use communicates the intention to create anordinary object, and not an exotic one. Thus, within this specification, it is not called by any algorithm that subsequently modifies the internal methods of the object in ways that would make the result non-ordinary. Operations that createexotic objects invokeMakeBasicObject directly.

10.1.13 OrdinaryCreateFromConstructor (constructor,intrinsicDefaultProto [ ,internalSlotsList ] )

The abstract operation OrdinaryCreateFromConstructor takes argumentsconstructor (afunction object) andintrinsicDefaultProto (a String) and optional argumentinternalSlotsList (aList of names of internal slots) and returns either anormal completion containing an Object or athrow completion. It creates anordinary object whose[[Prototype]] value is retrieved from aconstructor's"prototype" property, if it exists. Otherwise the intrinsic named byintrinsicDefaultProto is used for[[Prototype]].internalSlotsList contains the names of additional internal slots that must be defined as part of the object. IfinternalSlotsList is not provided, a new emptyList is used. It performs the following steps when called:

  1. Assert:intrinsicDefaultProto is this specification's name of an intrinsic object. The corresponding object must be an intrinsic that is intended to be used as the[[Prototype]] value of an object.
  2. Letproto be ? GetPrototypeFromConstructor(constructor,intrinsicDefaultProto).
  3. IfinternalSlotsList is present, letslotsList beinternalSlotsList.
  4. Else, letslotsList be a new emptyList.
  5. ReturnOrdinaryObjectCreate(proto,slotsList).

10.1.14 GetPrototypeFromConstructor (constructor,intrinsicDefaultProto )

The abstract operation GetPrototypeFromConstructor takes argumentsconstructor (afunction object) andintrinsicDefaultProto (a String) and returns either anormal completion containing an Object or athrow completion. It determines the[[Prototype]] value that should be used to create an object corresponding to a specificconstructor. The value is retrieved from theconstructor's"prototype" property, if it exists. Otherwise the intrinsic named byintrinsicDefaultProto is used for[[Prototype]]. It performs the following steps when called:

  1. Assert:intrinsicDefaultProto is this specification's name of an intrinsic object. The corresponding object must be an intrinsic that is intended to be used as the[[Prototype]] value of an object.
  2. Letproto be ? Get(constructor,"prototype").
  3. Ifprotois not an Object, then
    1. Letrealm be ? GetFunctionRealm(constructor).
    2. Setproto torealm's intrinsic object namedintrinsicDefaultProto.
  4. Returnproto.
Note

Ifconstructor does not supply a[[Prototype]] value, the default value that is used is obtained from therealm of theconstructor function rather than from therunning execution context.

10.1.15 RequireInternalSlot (O,internalSlot )

The abstract operation RequireInternalSlot takes argumentsO (anECMAScript language value) andinternalSlot (an internal slot name) and returns either anormal completion containingunused or athrow completion. It throws an exception unlessOis an Object and has the given internal slot. It performs the following steps when called:

  1. IfOis not an Object, throw aTypeError exception.
  2. IfO does not have aninternalSlot internal slot, throw aTypeError exception.
  3. Returnunused.

10.2 ECMAScript Function Objects

ECMAScriptfunction objects encapsulate parameterized ECMAScript code closed over a lexical environment and support the dynamic evaluation of that code. An ECMAScriptfunction object is anordinary object and has the same internal slots and the same internal methods as otherordinary objects. The code of an ECMAScriptfunction object may be eitherstrict mode code (11.2.2) ornon-strict code. An ECMAScriptfunction object whose code isstrict mode code is called astrict function. One whose code is notstrict mode code is called anon-strict function.

In addition to[[Extensible]] and[[Prototype]], ECMAScriptfunction objects also have the internal slots listed inTable 28.

Table 28: Internal Slots of ECMAScript Function Objects
Internal Slot Type Description
[[Environment]] anEnvironment Record TheEnvironment Record that the function was closed over. Used as the outer environment when evaluating the code of the function.
[[PrivateEnvironment]] aPrivateEnvironment Record ornull ThePrivateEnvironment Record forPrivate Names that the function was closed over.null if this function is not syntactically contained within a class. Used as the outer PrivateEnvironment for inner classes when evaluating the code of the function.
[[FormalParameters]] aParse Node The root parse node of the source text that defines the function's formal parameter list.
[[ECMAScriptCode]] aParse Node The root parse node of the source text that defines the function's body.
[[ConstructorKind]]base orderived Whether or not the function is a derived classconstructor.
[[Realm]] aRealm Record Therealm in which the function was created and which provides any intrinsic objects that are accessed when evaluating the function.
[[ScriptOrModule]] aScript Record or aModule Record The script or module in which the function was created.
[[ThisMode]]lexical,strict, orglobal Defines howthis references are interpreted within the formal parameters and code body of the function.lexical means thatthis refers to thethis value of a lexically enclosing function.strict means that thethis value is used exactly as provided by an invocation of the function.global means that athis value ofundefined ornull is interpreted as a reference to theglobal object, and any otherthis value is first passed toToObject.
[[Strict]] a Booleantrue if this is astrict function,false if this is anon-strict function.
[[HomeObject]] an Object If the function usessuper, this is the object whose[[GetPrototypeOf]] provides the object wheresuper property lookups begin.
[[SourceText]] a sequence of Unicode code points Thesource text that defines the function.
[[Fields]] aList ofClassFieldDefinition Records If the function is a class, this is a list ofRecords representing the non-static fields and corresponding initializers of the class.
[[PrivateMethods]] aList ofPrivateElements If the function is a class, this is a list representing the non-static private methods and accessors of the class.
[[ClassFieldInitializerName]] a String, a Symbol, aPrivate Name, orempty If the function is created as the initializer of a class field, the name to use forNamedEvaluation of the field;empty otherwise.
[[IsClassConstructor]] a Boolean Indicates whether the function is a classconstructor. (Iftrue, invoking the function's[[Call]] will immediately throw aTypeError exception.)

All ECMAScriptfunction objects have the[[Call]] internal method defined here. ECMAScript functions that are alsoconstructors in addition have the[[Construct]] internal method.

10.2.1[[Call]] (thisArgument,argumentsList )

The[[Call]] internal method of an ECMAScriptfunction objectF takes argumentsthisArgument (anECMAScript language value) andargumentsList (aList ofECMAScript language values) and returns either anormal completion containing anECMAScript language value or athrow completion. It performs the following steps when called:

  1. LetcallerContext be therunning execution context.
  2. LetcalleeContext bePrepareForOrdinaryCall(F,undefined).
  3. Assert:calleeContext is now therunning execution context.
  4. IfF.[[IsClassConstructor]] istrue, then
    1. Leterror be a newly createdTypeError object.
    2. NOTE:error is created incalleeContext withF's associatedRealm Record.
    3. RemovecalleeContext from theexecution context stack and restorecallerContext as therunning execution context.
    4. ReturnThrowCompletion(error).
  5. PerformOrdinaryCallBindThis(F,calleeContext,thisArgument).
  6. Letresult beCompletion(OrdinaryCallEvaluateBody(F,argumentsList)).
  7. RemovecalleeContext from theexecution context stack and restorecallerContext as therunning execution context.
  8. Ifresult is areturn completion, returnresult.[[Value]].
  9. Assert:result is athrow completion.
  10. Return ? result.
Note

WhencalleeContext is removed from theexecution context stack in step7 it must not be destroyed if it is suspended and retained for later resumption by an accessible Generator.

10.2.1.1 PrepareForOrdinaryCall (F,newTarget )

The abstract operation PrepareForOrdinaryCall takes argumentsF (an ECMAScriptfunction object) andnewTarget (an Object orundefined) and returns anexecution context. It performs the following steps when called:

  1. LetcallerContext be therunning execution context.
  2. LetcalleeContext be a newECMAScript code execution context.
  3. Set the Function ofcalleeContext toF.
  4. LetcalleeRealm beF.[[Realm]].
  5. Set theRealm ofcalleeContext tocalleeRealm.
  6. Set the ScriptOrModule ofcalleeContext toF.[[ScriptOrModule]].
  7. LetlocalEnv beNewFunctionEnvironment(F,newTarget).
  8. Set the LexicalEnvironment ofcalleeContext tolocalEnv.
  9. Set the VariableEnvironment ofcalleeContext tolocalEnv.
  10. Set the PrivateEnvironment ofcalleeContext toF.[[PrivateEnvironment]].
  11. IfcallerContext is not already suspended, suspendcallerContext.
  12. PushcalleeContext onto theexecution context stack;calleeContext is now therunning execution context.
  13. NOTE: Any exception objects produced after this point are associated withcalleeRealm.
  14. ReturncalleeContext.

10.2.1.2 OrdinaryCallBindThis (F,calleeContext,thisArgument )

The abstract operation OrdinaryCallBindThis takes argumentsF (an ECMAScriptfunction object),calleeContext (anexecution context), andthisArgument (anECMAScript language value) and returnsunused. It performs the following steps when called:

  1. LetthisMode beF.[[ThisMode]].
  2. IfthisMode islexical, returnunused.
  3. LetcalleeRealm beF.[[Realm]].
  4. LetlocalEnv be the LexicalEnvironment ofcalleeContext.
  5. IfthisMode isstrict, then
    1. LetthisValue bethisArgument.
  6. Else,
    1. IfthisArgument is eitherundefined ornull, then
      1. LetglobalEnv becalleeRealm.[[GlobalEnv]].
      2. Assert:globalEnv is aGlobal Environment Record.
      3. LetthisValue beglobalEnv.[[GlobalThisValue]].
    2. Else,
      1. LetthisValue be ! ToObject(thisArgument).
      2. NOTE:ToObject produces wrapper objects usingcalleeRealm.
  7. Assert:localEnv is aFunction Environment Record.
  8. Assert: The next step never returns anabrupt completion becauselocalEnv.[[ThisBindingStatus]] is notinitialized.
  9. Perform ! BindThisValue(localEnv,thisValue).
  10. Returnunused.

10.2.1.3 Runtime Semantics: EvaluateBody

Thesyntax-directed operation EvaluateBody takes argumentsfunctionObject (an ECMAScriptfunction object) andargumentsList (aList ofECMAScript language values) and returns areturn completion or athrow completion. It is defined piecewise over the following productions:

FunctionBody:FunctionStatementList
  1. Return ? EvaluateFunctionBody ofFunctionBody with argumentsfunctionObject andargumentsList.
ConciseBody:ExpressionBody
  1. Return ? EvaluateConciseBody ofConciseBody with argumentsfunctionObject andargumentsList.
GeneratorBody:FunctionBody
  1. Return ? EvaluateGeneratorBody ofGeneratorBody with argumentsfunctionObject andargumentsList.
AsyncGeneratorBody:FunctionBody
  1. Return ? EvaluateAsyncGeneratorBody ofAsyncGeneratorBody with argumentsfunctionObject andargumentsList.
AsyncFunctionBody:FunctionBody
  1. Return ? EvaluateAsyncFunctionBody ofAsyncFunctionBody with argumentsfunctionObject andargumentsList.
AsyncConciseBody:ExpressionBody
  1. Return ? EvaluateAsyncConciseBody ofAsyncConciseBody with argumentsfunctionObject andargumentsList.
Initializer:=AssignmentExpression
  1. Assert:argumentsList is empty.
  2. Assert:functionObject.[[ClassFieldInitializerName]] is notempty.
  3. IfIsAnonymousFunctionDefinition(AssignmentExpression) istrue, then
    1. Letvalue be ? NamedEvaluation ofInitializer with argumentfunctionObject.[[ClassFieldInitializerName]].
  4. Else,
    1. Letrhs be ? Evaluation ofAssignmentExpression.
    2. Letvalue be ? GetValue(rhs).
  5. ReturnReturnCompletion(value).
Note

Even though field initializers constitute a function boundary, callingFunctionDeclarationInstantiation does not have any observable effect and so is omitted.

ClassStaticBlockBody:ClassStaticBlockStatementList
  1. Assert:argumentsList is empty.
  2. Return ? EvaluateClassStaticBlockBody ofClassStaticBlockBody with argumentfunctionObject.

10.2.1.4 OrdinaryCallEvaluateBody (F,argumentsList )

The abstract operation OrdinaryCallEvaluateBody takes argumentsF (an ECMAScriptfunction object) andargumentsList (aList ofECMAScript language values) and returns areturn completion or athrow completion. It performs the following steps when called:

  1. Return ? EvaluateBody ofF.[[ECMAScriptCode]] with argumentsF andargumentsList.

10.2.2[[Construct]] (argumentsList,newTarget )

The[[Construct]] internal method of an ECMAScriptfunction objectF takes argumentsargumentsList (aList ofECMAScript language values) andnewTarget (aconstructor) and returns either anormal completion containing an Object or athrow completion. It performs the following steps when called:

  1. LetcallerContext be therunning execution context.
  2. Letkind beF.[[ConstructorKind]].
  3. Ifkind isbase, then
    1. LetthisArgument be ? OrdinaryCreateFromConstructor(newTarget,"%Object.prototype%").
  4. LetcalleeContext bePrepareForOrdinaryCall(F,newTarget).
  5. Assert:calleeContext is now therunning execution context.
  6. Ifkind isbase, then
    1. PerformOrdinaryCallBindThis(F,calleeContext,thisArgument).
    2. LetinitializeResult beCompletion(InitializeInstanceElements(thisArgument,F)).
    3. IfinitializeResult is anabrupt completion, then
      1. RemovecalleeContext from theexecution context stack and restorecallerContext as therunning execution context.
      2. Return ? initializeResult.
  7. LetconstructorEnv be the LexicalEnvironment ofcalleeContext.
  8. Letresult beCompletion(OrdinaryCallEvaluateBody(F,argumentsList)).
  9. RemovecalleeContext from theexecution context stack and restorecallerContext as therunning execution context.
  10. Ifresult is athrow completion, then
    1. Return ? result.
  11. Assert:result is areturn completion.
  12. Ifresult.[[Value]]is an Object, returnresult.[[Value]].
  13. Ifkind isbase, returnthisArgument.
  14. Ifresult.[[Value]] is notundefined, throw aTypeError exception.
  15. LetthisBinding be ? constructorEnv.GetThisBinding().
  16. Assert:thisBindingis an Object.
  17. ReturnthisBinding.

10.2.3 OrdinaryFunctionCreate (functionPrototype,sourceText,ParameterList,Body,thisMode,env,privateEnv )

The abstract operation OrdinaryFunctionCreate takes argumentsfunctionPrototype (an Object),sourceText (a sequence of Unicode code points),ParameterList (aParse Node),Body (aParse Node),thisMode (lexical-this ornon-lexical-this),env (anEnvironment Record), andprivateEnv (aPrivateEnvironment Record ornull) and returns an ECMAScriptfunction object. It is used to specify the runtime creation of a new function with a default[[Call]] internal method and no[[Construct]] internal method (although one may be subsequently added by an operation such asMakeConstructor).sourceText is the source text of the syntactic definition of the function to be created. It performs the following steps when called:

  1. LetinternalSlotsList be the internal slots listed inTable 28.
  2. LetF beOrdinaryObjectCreate(functionPrototype,internalSlotsList).
  3. SetF.[[Call]] to the definition specified in10.2.1.
  4. SetF.[[SourceText]] tosourceText.
  5. SetF.[[FormalParameters]] toParameterList.
  6. SetF.[[ECMAScriptCode]] toBody.
  7. LetStrict beIsStrict(Body).
  8. SetF.[[Strict]] toStrict.
  9. IfthisMode islexical-this, setF.[[ThisMode]] tolexical.
  10. Else ifStrict istrue, setF.[[ThisMode]] tostrict.
  11. Else, setF.[[ThisMode]] toglobal.
  12. SetF.[[IsClassConstructor]] tofalse.
  13. SetF.[[Environment]] toenv.
  14. SetF.[[PrivateEnvironment]] toprivateEnv.
  15. SetF.[[ScriptOrModule]] toGetActiveScriptOrModule().
  16. SetF.[[Realm]] tothe current Realm Record.
  17. SetF.[[HomeObject]] toundefined.
  18. SetF.[[Fields]] to a new emptyList.
  19. SetF.[[PrivateMethods]] to a new emptyList.
  20. SetF.[[ClassFieldInitializerName]] toempty.
  21. Letlen be theExpectedArgumentCount ofParameterList.
  22. PerformSetFunctionLength(F,len).
  23. ReturnF.

10.2.4 AddRestrictedFunctionProperties (F,realm )

The abstract operation AddRestrictedFunctionProperties takes argumentsF (afunction object) andrealm (aRealm Record) and returnsunused. It performs the following steps when called:

  1. Assert:realm.[[Intrinsics]].[[%ThrowTypeError%]] exists and has been initialized.
  2. Letthrower berealm.[[Intrinsics]].[[%ThrowTypeError%]].
  3. Perform ! DefinePropertyOrThrow(F,"caller", PropertyDescriptor {[[Get]]:thrower,[[Set]]:thrower,[[Enumerable]]:false,[[Configurable]]:true }).
  4. Perform ! DefinePropertyOrThrow(F,"arguments", PropertyDescriptor {[[Get]]:thrower,[[Set]]:thrower,[[Enumerable]]:false,[[Configurable]]:true }).
  5. Returnunused.

10.2.4.1 %ThrowTypeError% ( )

This function is the%ThrowTypeError% intrinsic object.

It is an anonymous built-infunction object that is defined once for eachrealm.

It performs the following steps when called:

  1. Throw aTypeError exception.

The value of the[[Extensible]] internal slot of this function isfalse.

The"length" property of this function has the attributes {[[Writable]]:false,[[Enumerable]]:false,[[Configurable]]:false }.

The"name" property of this function has the attributes {[[Writable]]:false,[[Enumerable]]:false,[[Configurable]]:false }.

10.2.5 MakeConstructor (F [ ,writablePrototype [ ,prototype ] ] )

The abstract operation MakeConstructor takes argumentF (an ECMAScriptfunction object or a built-infunction object) and optional argumentswritablePrototype (a Boolean) andprototype (an Object) and returnsunused. It convertsF into aconstructor. It performs the following steps when called:

  1. IfF is an ECMAScriptfunction object, then
    1. Assert:IsConstructor(F) isfalse.
    2. Assert:F is an extensible object that does not have a"prototype" own property.
    3. SetF.[[Construct]] to the definition specified in10.2.2.
  2. Else,
    1. SetF.[[Construct]] to the definition specified in10.3.2.
  3. SetF.[[ConstructorKind]] tobase.
  4. IfwritablePrototype is not present, setwritablePrototype totrue.
  5. Ifprototype is not present, then
    1. Setprototype toOrdinaryObjectCreate(%Object.prototype%).
    2. Perform ! DefinePropertyOrThrow(prototype,"constructor", PropertyDescriptor {[[Value]]:F,[[Writable]]:writablePrototype,[[Enumerable]]:false,[[Configurable]]:true }).
  6. Perform ! DefinePropertyOrThrow(F,"prototype", PropertyDescriptor {[[Value]]:prototype,[[Writable]]:writablePrototype,[[Enumerable]]:false,[[Configurable]]:false }).
  7. Returnunused.

10.2.6 MakeClassConstructor (F )

The abstract operation MakeClassConstructor takes argumentF (an ECMAScriptfunction object) and returnsunused. It performs the following steps when called:

  1. Assert:F.[[IsClassConstructor]] isfalse.
  2. SetF.[[IsClassConstructor]] totrue.
  3. Returnunused.

10.2.7 MakeMethod (F,homeObject )

The abstract operation MakeMethod takes argumentsF (an ECMAScriptfunction object) andhomeObject (an Object) and returnsunused. It configuresF as a method. It performs the following steps when called:

  1. Assert:homeObject is anordinary object.
  2. SetF.[[HomeObject]] tohomeObject.
  3. Returnunused.

10.2.8 DefineMethodProperty (homeObject,key,closure,enumerable )

The abstract operation DefineMethodProperty takes argumentshomeObject (an Object),key (aproperty key orPrivate Name),closure (afunction object), andenumerable (a Boolean) and returns either anormal completion containing either aPrivateElement orunused, or anabrupt completion. It performs the following steps when called:

  1. Assert:homeObject is an ordinary, extensible object.
  2. Ifkey is aPrivate Name, then
    1. ReturnPrivateElement {[[Key]]:key,[[Kind]]:method,[[Value]]:closure }.
  3. Else,
    1. Letdesc be the PropertyDescriptor {[[Value]]:closure,[[Writable]]:true,[[Enumerable]]:enumerable,[[Configurable]]:true }.
    2. Perform ? DefinePropertyOrThrow(homeObject,key,desc).
    3. NOTE:DefinePropertyOrThrow only returns anabrupt completion when attempting to define a class static method whosekey is"prototype".
    4. Returnunused.

10.2.9 SetFunctionName (F,name [ ,prefix ] )

The abstract operation SetFunctionName takes argumentsF (afunction object) andname (aproperty key orPrivate Name) and optional argumentprefix (a String) and returnsunused. It adds a"name" property toF. It performs the following steps when called:

  1. Assert:F is an extensible object that does not have a"name" own property.
  2. Ifnameis a Symbol, then
    1. Letdescription bename.[[Description]].
    2. Ifdescription isundefined, setname to the empty String.
    3. Else, setname to thestring-concatenation of"[",description, and"]".
  3. Else ifname is aPrivate Name, then
    1. Setname toname.[[Description]].
  4. IfF has an[[InitialName]] internal slot, then
    1. SetF.[[InitialName]] toname.
  5. Ifprefix is present, then
    1. Setname to thestring-concatenation ofprefix, the code unit 0x0020 (SPACE), andname.
    2. IfF has an[[InitialName]] internal slot, then
      1. NOTE: The choice in the following step is made independently each time this Abstract Operation is invoked.
      2. Optionally, setF.[[InitialName]] toname.
  6. Perform ! DefinePropertyOrThrow(F,"name", PropertyDescriptor {[[Value]]:name,[[Writable]]:false,[[Enumerable]]:false,[[Configurable]]:true }).
  7. Returnunused.

10.2.10 SetFunctionLength (F,length )

The abstract operation SetFunctionLength takes argumentsF (afunction object) andlength (a non-negativeinteger or +∞) and returnsunused. It adds a"length" property toF. It performs the following steps when called:

  1. Assert:F is an extensible object that does not have a"length" own property.
  2. Perform ! DefinePropertyOrThrow(F,"length", PropertyDescriptor {[[Value]]:𝔽(length),[[Writable]]:false,[[Enumerable]]:false,[[Configurable]]:true }).
  3. Returnunused.

10.2.11 FunctionDeclarationInstantiation (func,argumentsList )

The abstract operation FunctionDeclarationInstantiation takes argumentsfunc (an ECMAScriptfunction object) andargumentsList (aList ofECMAScript language values) and returns either anormal completion containingunused or athrow completion.func is thefunction object for which theexecution context is being established.

Note

When anexecution context is established for evaluating an ECMAScript function a newFunction Environment Record is created and bindings for each formal parameter are instantiated in thatEnvironment Record. Each declaration in the function body is also instantiated. If the function's formal parameters do not include any default value initializers then the body declarations are instantiated in the sameEnvironment Record as the parameters. If default value parameter initializers exist, a secondEnvironment Record is created for the body declarations. Formal parameters and functions are initialized as part of FunctionDeclarationInstantiation. All other bindings are initialized during evaluation of the function body.

It performs the following steps when called:

  1. LetcalleeContext be therunning execution context.
  2. Letcode befunc.[[ECMAScriptCode]].
  3. Letstrict befunc.[[Strict]].
  4. Letformals befunc.[[FormalParameters]].
  5. LetparameterNames be theBoundNames offormals.
  6. IfparameterNames has any duplicate entries, lethasDuplicates betrue; otherwise lethasDuplicates befalse.
  7. LetsimpleParameterList beIsSimpleParameterList offormals.
  8. LethasParameterExpressions beContainsExpression offormals.
  9. LetvarNames be theVarDeclaredNames ofcode.
  10. LetvarDeclarations be theVarScopedDeclarations ofcode.
  11. LetlexicalNames be theLexicallyDeclaredNames ofcode.
  12. LetfunctionNames be a new emptyList.
  13. LetfunctionsToInitialize be a new emptyList.
  14. For each elementd ofvarDeclarations, in reverseList order, do
    1. Ifd is neither aVariableDeclaration nor aForBinding nor aBindingIdentifier, then
      1. Assert:d is either aFunctionDeclaration, aGeneratorDeclaration, anAsyncFunctionDeclaration, or anAsyncGeneratorDeclaration.
      2. Letfn be the sole element of theBoundNames ofd.
      3. IffunctionNames does not containfn, then
        1. Insertfn as the first element offunctionNames.
        2. NOTE: If there are multiple function declarations for the same name, the last declaration is used.
        3. Insertd as the first element offunctionsToInitialize.
  15. LetargumentsObjectNeeded betrue.
  16. Iffunc.[[ThisMode]] islexical, then
    1. NOTE: Arrow functions never have an arguments object.
    2. SetargumentsObjectNeeded tofalse.
  17. Else ifparameterNames contains"arguments", then
    1. SetargumentsObjectNeeded tofalse.
  18. Else ifhasParameterExpressions isfalse, then
    1. IffunctionNames contains"arguments" orlexicalNames contains"arguments", then
      1. SetargumentsObjectNeeded tofalse.
  19. Ifstrict istrue orhasParameterExpressions isfalse, then
    1. NOTE: Only a singleEnvironment Record is needed for the parameters, since calls toeval instrict mode code cannot create new bindings which are visible outside of theeval.
    2. Letenv be the LexicalEnvironment ofcalleeContext.
  20. Else,
    1. NOTE: A separateEnvironment Record is needed to ensure that bindings created bydirect eval calls in the formal parameter list are outside the environment where parameters are declared.
    2. LetcalleeEnv be the LexicalEnvironment ofcalleeContext.
    3. Letenv beNewDeclarativeEnvironment(calleeEnv).
    4. Assert: The VariableEnvironment ofcalleeContext andcalleeEnv are the sameEnvironment Record.
    5. Set the LexicalEnvironment ofcalleeContext toenv.
  21. For each StringparamName ofparameterNames, do
    1. LetalreadyDeclared be ! env.HasBinding(paramName).
    2. NOTE:Early errors ensure that duplicate parameter names can only occur innon-strict functions that do not have parameter default values or rest parameters.
    3. IfalreadyDeclared isfalse, then
      1. Perform ! env.CreateMutableBinding(paramName,false).
      2. IfhasDuplicates istrue, then
        1. Perform ! env.InitializeBinding(paramName,undefined).
  22. IfargumentsObjectNeeded istrue, then
    1. Ifstrict istrue orsimpleParameterList isfalse, then
      1. Letao beCreateUnmappedArgumentsObject(argumentsList).
    2. Else,
      1. NOTE: A mapped argument object is only provided fornon-strict functions that don't have a rest parameter, any parameter default value initializers, or any destructured parameters.
      2. Letao beCreateMappedArgumentsObject(func,formals,argumentsList,env).
    3. Ifstrict istrue, then
      1. Perform ! env.CreateImmutableBinding("arguments",false).
      2. NOTE: Instrict mode codeearly errors prevent attempting to assign to this binding, so its mutability is not observable.
    4. Else,
      1. Perform ! env.CreateMutableBinding("arguments",false).
    5. Perform ! env.InitializeBinding("arguments",ao).
    6. LetparameterBindings be thelist-concatenation ofparameterNames and «"arguments" ».
  23. Else,
    1. LetparameterBindings beparameterNames.
  24. LetiteratorRecord beCreateListIteratorRecord(argumentsList).
  25. IfhasDuplicates istrue, then
    1. LetusedEnv beundefined.
  26. Else,
    1. LetusedEnv beenv.
  27. NOTE: The following step cannot return aReturnCompletion because the only way such a completion can arise in expression position is by use ofYieldExpression, which is forbidden in parameter lists by Early Error rules in15.5.1 and15.6.1.
  28. Perform ? IteratorBindingInitialization offormals with argumentsiteratorRecord andusedEnv.
  29. IfhasParameterExpressions isfalse, then
    1. NOTE: Only a singleEnvironment Record is needed for the parameters and top-level vars.
    2. LetinstantiatedVarNames be a copy of theListparameterBindings.
    3. For each elementn ofvarNames, do
      1. IfinstantiatedVarNames does not containn, then
        1. Appendn toinstantiatedVarNames.
        2. Perform ! env.CreateMutableBinding(n,false).
        3. Perform ! env.InitializeBinding(n,undefined).
    4. LetvarEnv beenv.
  30. Else,
    1. NOTE: A separateEnvironment Record is needed to ensure that closures created by expressions in the formal parameter list do not have visibility of declarations in the function body.
    2. LetvarEnv beNewDeclarativeEnvironment(env).
    3. Set the VariableEnvironment ofcalleeContext tovarEnv.
    4. LetinstantiatedVarNames be a new emptyList.
    5. For each elementn ofvarNames, do
      1. IfinstantiatedVarNames does not containn, then
        1. Appendn toinstantiatedVarNames.
        2. Perform ! varEnv.CreateMutableBinding(n,false).
        3. IfparameterBindings does not containn, or iffunctionNames containsn, then
          1. LetinitialValue beundefined.
        4. Else,
          1. LetinitialValue be ! env.GetBindingValue(n,false).
        5. Perform ! varEnv.InitializeBinding(n,initialValue).
        6. NOTE: A var with the same name as a formal parameter initially has the same value as the corresponding initialized parameter.
  31. Ifstrict istrue, then
    1. LetlexEnv bevarEnv.
  32. Else,
    1. If thehost is a web browser or otherwise supportsBlock-Level Function Declarations Web Legacy Compatibility Semantics, then
      1. For eachFunctionDeclarationf that is directly contained in theStatementList of anyBlock,CaseClause, orDefaultClausex such thatcodeContainsx istrue, do
        1. LetF be theStringValue of theBindingIdentifier off.
        2. If replacing theFunctionDeclarationf with aVariableStatement that hasF as aBindingIdentifier would not produce any Early Errors forfunc andparameterNames does not containF, then
          1. NOTE: A var binding forF is only instantiated here if it is neither a VarDeclaredName, the name of a formal parameter, or anotherFunctionDeclaration.
          2. IfinstantiatedVarNames does not containF andF is not"arguments", then
            1. Perform ! varEnv.CreateMutableBinding(F,false).
            2. Perform ! varEnv.InitializeBinding(F,undefined).
            3. AppendF toinstantiatedVarNames.
          3. When theFunctionDeclarationf is evaluated, perform the following steps in place of theFunctionDeclarationEvaluation algorithm provided in15.2.6:
            1. LetfEnv be therunning execution context's VariableEnvironment.
            2. LetbEnv be therunning execution context's LexicalEnvironment.
            3. LetfObj be ! bEnv.GetBindingValue(F,false).
            4. Perform ! fEnv.SetMutableBinding(F,fObj,false).
            5. Returnunused.
    2. LetlexEnv beNewDeclarativeEnvironment(varEnv).
    3. NOTE:Non-strict functions use a separateEnvironment Record for top-level lexical declarations so that adirect eval can determine whether any var scoped declarations introduced by the eval code conflict with pre-existing top-level lexically scoped declarations. This is not needed forstrict functions because a strictdirect eval always places all declarations into a newEnvironment Record.
  33. Set the LexicalEnvironment ofcalleeContext tolexEnv.
  34. LetlexDeclarations be theLexicallyScopedDeclarations ofcode.
  35. For each elementd oflexDeclarations, do
    1. NOTE: A lexically declared name cannot be the same as a function/generator declaration, formal parameter, or a var name. Lexically declared names are only instantiated here but not initialized.
    2. For each elementdn of theBoundNames ofd, do
      1. IfIsConstantDeclaration ofd istrue, then
        1. Perform ! lexEnv.CreateImmutableBinding(dn,true).
      2. Else,
        1. Perform ! lexEnv.CreateMutableBinding(dn,false).
  36. LetprivateEnv be the PrivateEnvironment ofcalleeContext.
  37. For eachParse Nodef offunctionsToInitialize, do
    1. Letfn be the sole element of theBoundNames off.
    2. Letfo beInstantiateFunctionObject off with argumentslexEnv andprivateEnv.
    3. Perform ! varEnv.SetMutableBinding(fn,fo,false).
  38. Returnunused.

10.3 Built-in Function Objects

A built-infunction object is anordinary object; it must satisfy the requirements forordinary objects set out in10.1.

In addition to the internal slots required of everyordinary object (see10.1), a built-infunction object must also have the following internal slots:

  • [[Realm]], aRealm Record that represents therealm in which the function was created.
  • [[InitialName]], a String that is the initial name of the function. It is used by20.2.3.5.

The initial value of a built-infunction object's[[Prototype]] internal slot is%Function.prototype%, unless otherwise specified.

A built-infunction object must have a[[Call]] internal method that conforms to the definition in10.3.1.

A built-infunction object has a[[Construct]] internal method if and only if it is described as a “constructor”, or some algorithm in this specification explicitly sets its[[Construct]] internal method. Such a[[Construct]] internal method must conform to the definition in10.3.2.

An implementation may provide additional built-infunction objects that are not defined in this specification.

10.3.1[[Call]] (thisArgument,argumentsList )

The[[Call]] internal method of a built-infunction objectF takes argumentsthisArgument (anECMAScript language value) andargumentsList (aList ofECMAScript language values) and returns either anormal completion containing anECMAScript language value or athrow completion. It performs the following steps when called:

  1. Return ? BuiltinCallOrConstruct(F,thisArgument,argumentsList,undefined).

10.3.2[[Construct]] (argumentsList,newTarget )

The[[Construct]] internal method of a built-infunction objectF (when the method is present) takes argumentsargumentsList (aList ofECMAScript language values) andnewTarget (aconstructor) and returns either anormal completion containing an Object or athrow completion. It performs the following steps when called:

  1. Letresult be ? BuiltinCallOrConstruct(F,uninitialized,argumentsList,newTarget).
  2. Assert:resultis an Object.
  3. Returnresult.

10.3.3 BuiltinCallOrConstruct (F,thisArgument,argumentsList,newTarget )

The abstract operation BuiltinCallOrConstruct takes argumentsF (a built-infunction object),thisArgument (anECMAScript language value oruninitialized),argumentsList (aList ofECMAScript language values), andnewTarget (aconstructor orundefined) and returns either anormal completion containing anECMAScript language value or athrow completion. It performs the following steps when called:

  1. LetcallerContext be therunning execution context.
  2. IfcallerContext is not already suspended, suspendcallerContext.
  3. LetcalleeContext be a newexecution context.
  4. Set the Function ofcalleeContext toF.
  5. LetcalleeRealm beF.[[Realm]].
  6. Set theRealm ofcalleeContext tocalleeRealm.
  7. Set the ScriptOrModule ofcalleeContext tonull.
  8. Perform any necessaryimplementation-defined initialization ofcalleeContext.
  9. PushcalleeContext onto theexecution context stack;calleeContext is now therunning execution context.
  10. Letresult be theCompletion Record that isthe result of evaluatingF in a manner that conforms to the specification ofF. IfthisArgument isuninitialized, thethis value is uninitialized; otherwisethisArgument provides thethis value.argumentsList provides the named parameters.newTarget provides the NewTarget value.
  11. NOTE: IfF is defined in this document, “the specification ofF” is the behaviour specified for it via algorithm steps or other means.
  12. RemovecalleeContext from theexecution context stack and restorecallerContext as therunning execution context.
  13. Return ? result.
Note

WhencalleeContext is removed from theexecution context stack it must not be destroyed if it has been suspended and retained by an accessible Generator for later resumption.

10.3.4 CreateBuiltinFunction (behaviour,length,name,additionalInternalSlotsList [ ,realm [ ,prototype [ ,prefix ] ] ] )

The abstract operation CreateBuiltinFunction takes argumentsbehaviour (anAbstract Closure, a set of algorithm steps, or some other definition of a function's behaviour provided in this specification),length (a non-negativeinteger or +∞),name (aproperty key or aPrivate Name), andadditionalInternalSlotsList (aList of names of internal slots) and optional argumentsrealm (aRealm Record),prototype (an Object ornull), andprefix (a String) and returns a built-infunction object.additionalInternalSlotsList contains the names of additional internal slots that must be defined as part of the object. This operation creates a built-infunction object. It performs the following steps when called:

  1. Ifrealm is not present, setrealm tothe current Realm Record.
  2. Ifprototype is not present, setprototype torealm.[[Intrinsics]].[[%Function.prototype%]].
  3. LetinternalSlotsList be aList containing the names of all the internal slots that10.3 requires for the built-infunction object that is about to be created.
  4. Append tointernalSlotsList the elements ofadditionalInternalSlotsList.
  5. Letfunc be a new built-infunction object that, when called, performs the action described bybehaviour using the provided arguments as the values of the corresponding parameters specified bybehaviour. The newfunction object has internal slots whose names are the elements ofinternalSlotsList, and an[[InitialName]] internal slot.
  6. Setfunc.[[Prototype]] toprototype.
  7. Setfunc.[[Extensible]] totrue.
  8. Setfunc.[[Realm]] torealm.
  9. Setfunc.[[InitialName]] tonull.
  10. PerformSetFunctionLength(func,length).
  11. Ifprefix is not present, then
    1. PerformSetFunctionName(func,name).
  12. Else,
    1. PerformSetFunctionName(func,name,prefix).
  13. Returnfunc.

Each built-in function defined in this specification is created by calling the CreateBuiltinFunction abstract operation.

10.4 Built-in Exotic Object Internal Methods and Slots

This specification defines several kinds of built-inexotic objects. These objects generally behave similar toordinary objects except for a few specific situations. The followingexotic objects use theordinary object internal methods except where it is explicitly specified otherwise below:

10.4.1 Bound Function Exotic Objects

Abound function exotic object is anexotic object that wraps anotherfunction object. Abound function exotic object is callable (it has a[[Call]] internal method and may have a[[Construct]] internal method). Calling abound function exotic object generally results in a call of its wrapped function.

An object is abound function exotic object if its[[Call]] and (if applicable)[[Construct]] internal methods use the following implementations, and its other essential internal methods use the definitions found in10.1. These methods are installed inBoundFunctionCreate.

Bound function exotic objects do not have the internal slots of ECMAScriptfunction objects listed inTable 28. Instead they have the internal slots listed inTable 29, in addition to[[Prototype]] and[[Extensible]].

Table 29: Internal Slots of Bound Function Exotic Objects
Internal Slot Type Description
[[BoundTargetFunction]] a callable Object The wrappedfunction object.
[[BoundThis]] anECMAScript language value The value that is always passed as thethis value when calling the wrapped function.
[[BoundArguments]] aList ofECMAScript language values A list of values whose elements are used as the first arguments to any call to the wrapped function.

10.4.1.1[[Call]] (thisArgument,argumentsList )

The[[Call]] internal method of abound function exotic objectF takes argumentsthisArgument (anECMAScript language value) andargumentsList (aList ofECMAScript language values) and returns either anormal completion containing anECMAScript language value or athrow completion. It performs the following steps when called:

  1. Lettarget beF.[[BoundTargetFunction]].
  2. LetboundThis beF.[[BoundThis]].
  3. LetboundArgs beF.[[BoundArguments]].
  4. Letargs be thelist-concatenation ofboundArgs andargumentsList.
  5. Return ? Call(target,boundThis,args).

10.4.1.2[[Construct]] (argumentsList,newTarget )

The[[Construct]] internal method of abound function exotic objectF takes argumentsargumentsList (aList ofECMAScript language values) andnewTarget (aconstructor) and returns either anormal completion containing an Object or athrow completion. It performs the following steps when called:

  1. Lettarget beF.[[BoundTargetFunction]].
  2. Assert:IsConstructor(target) istrue.
  3. LetboundArgs beF.[[BoundArguments]].
  4. Letargs be thelist-concatenation ofboundArgs andargumentsList.
  5. IfSameValue(F,newTarget) istrue, setnewTarget totarget.
  6. Return ? Construct(target,args,newTarget).

10.4.1.3 BoundFunctionCreate (targetFunction,boundThis,boundArgs )

The abstract operation BoundFunctionCreate takes argumentstargetFunction (afunction object),boundThis (anECMAScript language value), andboundArgs (aList ofECMAScript language values) and returns either anormal completion containing afunction object or athrow completion. It is used to specify the creation of newbound function exotic objects. It performs the following steps when called:

  1. Letproto be ? targetFunction.[[GetPrototypeOf]]().
  2. LetinternalSlotsList be thelist-concatenation of «[[Prototype]],[[Extensible]] » and the internal slots listed inTable 29.
  3. Letobj beMakeBasicObject(internalSlotsList).
  4. Setobj.[[Prototype]] toproto.
  5. Setobj.[[Call]] as described in10.4.1.1.
  6. IfIsConstructor(targetFunction) istrue, then
    1. Setobj.[[Construct]] as described in10.4.1.2.
  7. Setobj.[[BoundTargetFunction]] totargetFunction.
  8. Setobj.[[BoundThis]] toboundThis.
  9. Setobj.[[BoundArguments]] toboundArgs.
  10. Returnobj.

10.4.2 Array Exotic Objects

An Array is anexotic object that gives special treatment toarray indexproperty keys (see6.1.7). A property whoseproperty name is anarray index is also called anelement. Every Array has a non-configurable"length" property whose value is always a non-negativeintegral Number whosemathematical value is strictly less than 232. The value of the"length" property is numerically greater than the name of every own property whose name is anarray index; whenever an own property of an Array is created or changed, other properties are adjusted as necessary to maintain this invariant. Specifically, whenever an own property is added whose name is anarray index, the value of the"length" property is changed, if necessary, to be one more than the numeric value of thatarray index; and whenever the value of the"length" property is changed, every own property whose name is anarray index whose value is not smaller than the new length is deleted. This constraint applies only to own properties of an Array and is unaffected by"length" orarray index properties that may be inherited from its prototypes.

An object is anArray exotic object (or simply, an Array) if its[[DefineOwnProperty]] internal method uses the following implementation, and its other essential internal methods use the definitions found in10.1. These methods are installed inArrayCreate.

10.4.2.1[[DefineOwnProperty]] (P,Desc )

The[[DefineOwnProperty]] internal method of anArray exotic objectA takes argumentsP (aproperty key) andDesc (aProperty Descriptor) and returns either anormal completion containing a Boolean or athrow completion. It performs the following steps when called:

  1. IfP is"length", then
    1. Return ? ArraySetLength(A,Desc).
  2. Else ifP is anarray index, then
    1. LetlengthDesc beOrdinaryGetOwnProperty(A,"length").
    2. Assert:lengthDesc is notundefined.
    3. Assert:IsDataDescriptor(lengthDesc) istrue.
    4. Assert:lengthDesc.[[Configurable]] isfalse.
    5. Letlength belengthDesc.[[Value]].
    6. Assert:length is a non-negativeintegral Number.
    7. Letindex be ! ToUint32(P).
    8. Ifindexlength andlengthDesc.[[Writable]] isfalse, returnfalse.
    9. Letsucceeded be ! OrdinaryDefineOwnProperty(A,P,Desc).
    10. Ifsucceeded isfalse, returnfalse.
    11. Ifindexlength, then
      1. SetlengthDesc.[[Value]] toindex +1𝔽.
      2. Setsucceeded to ! OrdinaryDefineOwnProperty(A,"length",lengthDesc).
      3. Assert:succeeded istrue.
    12. Returntrue.
  3. Return ? OrdinaryDefineOwnProperty(A,P,Desc).

10.4.2.2 ArrayCreate (length [ ,proto ] )

The abstract operation ArrayCreate takes argumentlength (a non-negativeinteger) and optional argumentproto (an Object) and returns either anormal completion containing anArray exotic object or athrow completion. It is used to specify the creation of new Arrays. It performs the following steps when called:

  1. Iflength > 232 - 1, throw aRangeError exception.
  2. Ifproto is not present, setproto to%Array.prototype%.
  3. LetA beMakeBasicObject[[Prototype]],[[Extensible]] »).
  4. SetA.[[Prototype]] toproto.
  5. SetA.[[DefineOwnProperty]] as specified in10.4.2.1.
  6. Perform ! OrdinaryDefineOwnProperty(A,"length", PropertyDescriptor {[[Value]]:𝔽(length),[[Writable]]:true,[[Enumerable]]:false,[[Configurable]]:false }).
  7. ReturnA.

10.4.2.3 ArraySpeciesCreate (originalArray,length )

The abstract operation ArraySpeciesCreate takes argumentsoriginalArray (an Object) andlength (a non-negativeinteger) and returns either anormal completion containing an Object or athrow completion. It is used to specify the creation of a new Array or similar object using aconstructor function that is derived fromoriginalArray. It does not enforce that theconstructor function returns an Array. It performs the following steps when called:

  1. LetisArray be ? IsArray(originalArray).
  2. IfisArray isfalse, return ? ArrayCreate(length).
  3. LetC be ? Get(originalArray,"constructor").
  4. IfIsConstructor(C) istrue, then
    1. LetthisRealm bethe current Realm Record.
    2. LetrealmC be ? GetFunctionRealm(C).
    3. IfthisRealm andrealmC are not the sameRealm Record, then
      1. IfSameValue(C,realmC.[[Intrinsics]].[[%Array%]]) istrue, setC toundefined.
  5. IfCis an Object, then
    1. SetC to ? Get(C,%Symbol.species%).
    2. IfC isnull, setC toundefined.
  6. IfC isundefined, return ? ArrayCreate(length).
  7. IfIsConstructor(C) isfalse, throw aTypeError exception.
  8. Return ? Construct(C, «𝔽(length) »).
Note

IforiginalArray was created using the standard built-in Arrayconstructor for arealm that is not therealm of therunning execution context, then a new Array is created using therealm of therunning execution context. This maintains compatibility with Web browsers that have historically had that behaviour for theArray.prototype methods that now are defined using ArraySpeciesCreate.

10.4.2.4 ArraySetLength (A,Desc )

The abstract operation ArraySetLength takes argumentsA (an Array) andDesc (aProperty Descriptor) and returns either anormal completion containing a Boolean or athrow completion. It performs the following steps when called:

  1. IfDesc does not have a[[Value]] field, then
    1. Return ! OrdinaryDefineOwnProperty(A,"length",Desc).
  2. LetnewLenDesc be a copy ofDesc.
  3. LetnewLen be ? ToUint32(Desc.[[Value]]).
  4. LetnumberLen be ? ToNumber(Desc.[[Value]]).
  5. IfSameValueZero(newLen,numberLen) isfalse, throw aRangeError exception.
  6. SetnewLenDesc.[[Value]] tonewLen.
  7. LetoldLenDesc beOrdinaryGetOwnProperty(A,"length").
  8. Assert:oldLenDesc is notundefined.
  9. Assert:IsDataDescriptor(oldLenDesc) istrue.
  10. Assert:oldLenDesc.[[Configurable]] isfalse.
  11. LetoldLen beoldLenDesc.[[Value]].
  12. IfnewLenoldLen, then
    1. Return ! OrdinaryDefineOwnProperty(A,"length",newLenDesc).
  13. IfoldLenDesc.[[Writable]] isfalse, returnfalse.
  14. IfnewLenDesc does not have a[[Writable]] field ornewLenDesc.[[Writable]] istrue, then
    1. LetnewWritable betrue.
  15. Else,
    1. NOTE: Setting the[[Writable]] attribute tofalse is deferred in case any elements cannot be deleted.
    2. LetnewWritable befalse.
    3. SetnewLenDesc.[[Writable]] totrue.
  16. Letsucceeded be ! OrdinaryDefineOwnProperty(A,"length",newLenDesc).
  17. Ifsucceeded isfalse, returnfalse.
  18. For each ownproperty keyP ofA such thatP is anarray index and ! ToUint32(P) ≥newLen, in descending numeric index order, do
    1. LetdeleteSucceeded be ! A.[[Delete]](P).
    2. IfdeleteSucceeded isfalse, then
      1. SetnewLenDesc.[[Value]] to ! ToUint32(P) +1𝔽.
      2. IfnewWritable isfalse, setnewLenDesc.[[Writable]] tofalse.
      3. Perform ! OrdinaryDefineOwnProperty(A,"length",newLenDesc).
      4. Returnfalse.
  19. IfnewWritable isfalse, then
    1. Setsucceeded to ! OrdinaryDefineOwnProperty(A,"length", PropertyDescriptor {[[Writable]]:false }).
    2. Assert:succeeded istrue.
  20. Returntrue.
Note

In steps3 and4, ifDesc.[[Value]] is an object then itsvalueOf method is called twice. This is legacy behaviour that was specified with this effect starting with the 2nd Edition of this specification.

10.4.3 String Exotic Objects

A String object is anexotic object that encapsulates a String value and exposes virtualinteger-indexeddata properties corresponding to the individual code unit elements of the String value.String exotic objects always have adata property named"length" whose value is the length of the encapsulated String value. Both the code unitdata properties and the"length" property are non-writable and non-configurable.

An object is aString exotic object (or simply, a String object) if its[[GetOwnProperty]],[[DefineOwnProperty]], and[[OwnPropertyKeys]] internal methods use the following implementations, and its other essential internal methods use the definitions found in10.1. These methods are installed inStringCreate.

String exotic objects have the same internal slots asordinary objects. They also have a[[StringData]] internal slot.

10.4.3.1[[GetOwnProperty]] (P )

The[[GetOwnProperty]] internal method of aString exotic objectS takes argumentP (aproperty key) and returns anormal completion containing either aProperty Descriptor orundefined. It performs the following steps when called:

  1. Letdesc beOrdinaryGetOwnProperty(S,P).
  2. Ifdesc is notundefined, returndesc.
  3. ReturnStringGetOwnProperty(S,P).

10.4.3.2[[DefineOwnProperty]] (P,Desc )

The[[DefineOwnProperty]] internal method of aString exotic objectS takes argumentsP (aproperty key) andDesc (aProperty Descriptor) and returns anormal completion containing a Boolean. It performs the following steps when called:

  1. LetstringDesc beStringGetOwnProperty(S,P).
  2. IfstringDesc is notundefined, then
    1. Letextensible beS.[[Extensible]].
    2. ReturnIsCompatiblePropertyDescriptor(extensible,Desc,stringDesc).
  3. Return ! OrdinaryDefineOwnProperty(S,P,Desc).

10.4.3.3[[OwnPropertyKeys]] ( )

The[[OwnPropertyKeys]] internal method of aString exotic objectO takes no arguments and returns anormal completion containing aList ofproperty keys. It performs the following steps when called:

  1. Letkeys be a new emptyList.
  2. Letstr beO.[[StringData]].
  3. Assert:stris a String.
  4. Letlen be the length ofstr.
  5. For eachintegeri such that 0 ≤i <len, in ascending order, do
    1. Append ! ToString(𝔽(i)) tokeys.
  6. For each ownproperty keyP ofO such thatP is anarray index and ! ToIntegerOrInfinity(P) ≥len, in ascending numeric index order, do
    1. AppendP tokeys.
  7. For each ownproperty keyP ofO such thatPis a String andP is not anarray index, in ascending chronological order of property creation, do
    1. AppendP tokeys.
  8. For each ownproperty keyP ofO such thatPis a Symbol, in ascending chronological order of property creation, do
    1. AppendP tokeys.
  9. Returnkeys.

10.4.3.4 StringCreate (value,prototype )

The abstract operation StringCreate takes argumentsvalue (a String) andprototype (an Object) and returns aString exotic object. It is used to specify the creation of newString exotic objects. It performs the following steps when called:

  1. LetS beMakeBasicObject[[Prototype]],[[Extensible]],[[StringData]] »).
  2. SetS.[[Prototype]] toprototype.
  3. SetS.[[StringData]] tovalue.
  4. SetS.[[GetOwnProperty]] as specified in10.4.3.1.
  5. SetS.[[DefineOwnProperty]] as specified in10.4.3.2.
  6. SetS.[[OwnPropertyKeys]] as specified in10.4.3.3.
  7. Letlength be the length ofvalue.
  8. Perform ! DefinePropertyOrThrow(S,"length", PropertyDescriptor {[[Value]]:𝔽(length),[[Writable]]:false,[[Enumerable]]:false,[[Configurable]]:false }).
  9. ReturnS.

10.4.3.5 StringGetOwnProperty (S,P )

The abstract operation StringGetOwnProperty takes argumentsS (an Object that has a[[StringData]] internal slot) andP (aproperty key) and returns aProperty Descriptor orundefined. It performs the following steps when called:

  1. IfPis not a String, returnundefined.
  2. Letindex beCanonicalNumericIndexString(P).
  3. Ifindex is not anintegral Number, returnundefined.
  4. Ifindex is-0𝔽 orindex <-0𝔽, returnundefined.
  5. Letstr beS.[[StringData]].
  6. Assert:stris a String.
  7. Letlen be the length ofstr.
  8. If(index) ≥len, returnundefined.
  9. LetresultStr be thesubstring ofstr from(index) to(index) + 1.
  10. Return the PropertyDescriptor {[[Value]]:resultStr,[[Writable]]:false,[[Enumerable]]:true,[[Configurable]]:false }.

10.4.4 Arguments Exotic Objects

Most ECMAScript functions make an arguments object available to their code. Depending upon the characteristics of the function definition, its arguments object is either anordinary object or anarguments exotic object. Anarguments exotic object is anexotic object whosearray index properties map to the formal parameters bindings of an invocation of its associated ECMAScript function.

An object is anarguments exotic object if its internal methods use the following implementations, with the ones not specified here using those found in10.1. These methods are installed inCreateMappedArgumentsObject.

Note 1

WhileCreateUnmappedArgumentsObject is grouped into this clause, it creates anordinary object, not anarguments exotic object.

Arguments exotic objects have the same internal slots asordinary objects. They also have a[[ParameterMap]] internal slot. Ordinary arguments objects also have a[[ParameterMap]] internal slot whose value is alwaysundefined. For ordinary argument objects the[[ParameterMap]] internal slot is only used byObject.prototype.toString (20.1.3.6) to identify them as such.

Note 2

Theinteger-indexeddata properties of anarguments exotic object whose numeric name values are less than the number of formal parameters of the correspondingfunction object initially share their values with the corresponding argument bindings in the function'sexecution context. This means that changing the property changes the corresponding value of the argument binding and vice-versa. This correspondence is broken if such a property is deleted and then redefined or if the property is changed into anaccessor property. If the arguments object is anordinary object, the values of its properties are simply a copy of the arguments passed to the function and there is no dynamic linkage between the property values and the formal parameter values.

Note 3

The ParameterMap object and its property values are used as a device for specifying the arguments object correspondence to argument bindings. The ParameterMap object and the objects that are the values of its properties are not directly observable from ECMAScript code. An ECMAScript implementation does not need to actually create or use such objects to implement the specified semantics.

Note 4

Ordinary arguments objects define a non-configurableaccessor property named"callee" which throws aTypeError exception on access. The"callee" property has a more specific meaning forarguments exotic objects, which are created only for some class ofnon-strict functions. The definition of this property in the ordinary variant exists to ensure that it is not defined in any other manner by conforming ECMAScript implementations.

Note 5

ECMAScript implementations ofarguments exotic objects have historically contained anaccessor property named"caller". Prior to ECMAScript 2017, this specification included the definition of a throwing"caller" property on ordinary arguments objects. Since implementations do not contain this extension any longer, ECMAScript 2017 dropped the requirement for a throwing"caller" accessor.

10.4.4.1[[GetOwnProperty]] (P )

The[[GetOwnProperty]] internal method of anarguments exotic objectargs takes argumentP (aproperty key) and returns anormal completion containing either aProperty Descriptor orundefined. It performs the following steps when called:

  1. Letdesc beOrdinaryGetOwnProperty(args,P).
  2. Ifdesc isundefined, returnundefined.
  3. Letmap beargs.[[ParameterMap]].
  4. LetisMapped be ! HasOwnProperty(map,P).
  5. IfisMapped istrue, then
    1. Setdesc.[[Value]] to ! Get(map,P).
  6. Returndesc.

10.4.4.2[[DefineOwnProperty]] (P,Desc )

The[[DefineOwnProperty]] internal method of anarguments exotic objectargs takes argumentsP (aproperty key) andDesc (aProperty Descriptor) and returns anormal completion containing a Boolean. It performs the following steps when called:

  1. Letmap beargs.[[ParameterMap]].
  2. LetisMapped be ! HasOwnProperty(map,P).
  3. LetnewArgDesc beDesc.
  4. IfisMapped istrue andIsDataDescriptor(Desc) istrue, then
    1. IfDesc does not have a[[Value]] field,Desc has a[[Writable]] field, andDesc.[[Writable]] isfalse, then
      1. SetnewArgDesc to a copy ofDesc.
      2. SetnewArgDesc.[[Value]] to ! Get(map,P).
  5. Letallowed be ! OrdinaryDefineOwnProperty(args,P,newArgDesc).
  6. Ifallowed isfalse, returnfalse.
  7. IfisMapped istrue, then
    1. IfIsAccessorDescriptor(Desc) istrue, then
      1. Perform ! map.[[Delete]](P).
    2. Else,
      1. IfDesc has a[[Value]] field, then
        1. Assert: The following Set will succeed, since formal parameters mapped by arguments objects are always writable.
        2. Perform ! Set(map,P,Desc.[[Value]],false).
      2. IfDesc has a[[Writable]] field andDesc.[[Writable]] isfalse, then
        1. Perform ! map.[[Delete]](P).
  8. Returntrue.

10.4.4.3[[Get]] (P,Receiver )

The[[Get]] internal method of anarguments exotic objectargs takes argumentsP (aproperty key) andReceiver (anECMAScript language value) and returns either anormal completion containing anECMAScript language value or athrow completion. It performs the following steps when called:

  1. Letmap beargs.[[ParameterMap]].
  2. LetisMapped be ! HasOwnProperty(map,P).
  3. IfisMapped isfalse, then
    1. Return ? OrdinaryGet(args,P,Receiver).
  4. Else,
    1. Assert:map contains a formal parameter mapping forP.
    2. Return ! Get(map,P).

10.4.4.4[[Set]] (P,V,Receiver )

The[[Set]] internal method of anarguments exotic objectargs takes argumentsP (aproperty key),V (anECMAScript language value), andReceiver (anECMAScript language value) and returns either anormal completion containing a Boolean or athrow completion. It performs the following steps when called:

  1. IfSameValue(args,Receiver) isfalse, then
    1. LetisMapped befalse.
  2. Else,
    1. Letmap beargs.[[ParameterMap]].
    2. LetisMapped be ! HasOwnProperty(map,P).
  3. IfisMapped istrue, then
    1. Assert: The following Set will succeed, since formal parameters mapped by arguments objects are always writable.
    2. Perform ! Set(map,P,V,false).
  4. Return ? OrdinarySet(args,P,V,Receiver).

10.4.4.5[[Delete]] (P )

The[[Delete]] internal method of anarguments exotic objectargs takes argumentP (aproperty key) and returns either anormal completion containing a Boolean or athrow completion. It performs the following steps when called:

  1. Letmap beargs.[[ParameterMap]].
  2. LetisMapped be ! HasOwnProperty(map,P).
  3. Letresult be ? OrdinaryDelete(args,P).
  4. Ifresult istrue andisMapped istrue, then
    1. Perform ! map.[[Delete]](P).
  5. Returnresult.

10.4.4.6 CreateUnmappedArgumentsObject (argumentsList )

The abstract operation CreateUnmappedArgumentsObject takes argumentargumentsList (aList ofECMAScript language values) and returns anordinary object. It performs the following steps when called:

  1. Letlen be the number of elements inargumentsList.
  2. Letobj beOrdinaryObjectCreate(%Object.prototype%, «[[ParameterMap]] »).
  3. Setobj.[[ParameterMap]] toundefined.
  4. Perform ! DefinePropertyOrThrow(obj,"length", PropertyDescriptor {[[Value]]:𝔽(len),[[Writable]]:true,[[Enumerable]]:false,[[Configurable]]:true }).
  5. Letindex be 0.
  6. Repeat, whileindex <len,
    1. Letval beargumentsList[index].
    2. Perform ! CreateDataPropertyOrThrow(obj, ! ToString(𝔽(index)),val).
    3. Setindex toindex + 1.
  7. Perform ! DefinePropertyOrThrow(obj,%Symbol.iterator%, PropertyDescriptor {[[Value]]: %Array.prototype.values%,[[Writable]]:true,[[Enumerable]]:false,[[Configurable]]:true }).
  8. Perform ! DefinePropertyOrThrow(obj,"callee", PropertyDescriptor {[[Get]]:%ThrowTypeError%,[[Set]]:%ThrowTypeError%,[[Enumerable]]:false,[[Configurable]]:false }).
  9. Returnobj.

10.4.4.7 CreateMappedArgumentsObject (func,formals,argumentsList,env )

The abstract operation CreateMappedArgumentsObject takes argumentsfunc (an Object),formals (aParse Node),argumentsList (aList ofECMAScript language values), andenv (anEnvironment Record) and returns anarguments exotic object. It performs the following steps when called:

  1. Assert:formals does not contain a rest parameter, any binding patterns, or any initializers. It may contain duplicate identifiers.
  2. Letlen be the number of elements inargumentsList.
  3. Letobj beMakeBasicObject[[Prototype]],[[Extensible]],[[ParameterMap]] »).
  4. Setobj.[[GetOwnProperty]] as specified in10.4.4.1.
  5. Setobj.[[DefineOwnProperty]] as specified in10.4.4.2.
  6. Setobj.[[Get]] as specified in10.4.4.3.
  7. Setobj.[[Set]] as specified in10.4.4.4.
  8. Setobj.[[Delete]] as specified in10.4.4.5.
  9. Setobj.[[Prototype]] to%Object.prototype%.
  10. Letmap beOrdinaryObjectCreate(null).
  11. Setobj.[[ParameterMap]] tomap.
  12. LetparameterNames be theBoundNames offormals.
  13. LetnumberOfParameters be the number of elements inparameterNames.
  14. Letindex be 0.
  15. Repeat, whileindex <len,
    1. Letval beargumentsList[index].
    2. Perform ! CreateDataPropertyOrThrow(obj, ! ToString(𝔽(index)),val).
    3. Setindex toindex + 1.
  16. Perform ! DefinePropertyOrThrow(obj,"length", PropertyDescriptor {[[Value]]:𝔽(len),[[Writable]]:true,[[Enumerable]]:false,[[Configurable]]:true }).
  17. LetmappedNames be a new emptyList.
  18. Setindex tonumberOfParameters - 1.
  19. Repeat, whileindex ≥ 0,
    1. Letname beparameterNames[index].
    2. IfmappedNames does not containname, then
      1. Appendname tomappedNames.
      2. Ifindex <len, then
        1. Letg beMakeArgGetter(name,env).
        2. Letp beMakeArgSetter(name,env).
        3. Perform ! map.[[DefineOwnProperty]](!ToString(𝔽(index)), PropertyDescriptor {[[Set]]:p,[[Get]]:g,[[Enumerable]]:false,[[Configurable]]:true }).
    3. Setindex toindex - 1.
  20. Perform ! DefinePropertyOrThrow(obj,%Symbol.iterator%, PropertyDescriptor {[[Value]]: %Array.prototype.values%,[[Writable]]:true,[[Enumerable]]:false,[[Configurable]]:true }).
  21. Perform ! DefinePropertyOrThrow(obj,"callee", PropertyDescriptor {[[Value]]:func,[[Writable]]:true,[[Enumerable]]:false,[[Configurable]]:true }).
  22. Returnobj.

10.4.4.7.1 MakeArgGetter (name,env )

The abstract operation MakeArgGetter takes argumentsname (a String) andenv (anEnvironment Record) and returns afunction object. It creates a built-infunction object that when executed returns the value bound forname inenv. It performs the following steps when called:

  1. LetgetterClosure be a newAbstract Closure with no parameters that capturesname andenv and performs the following steps when called:
    1. ReturnNormalCompletion(!env.GetBindingValue(name,false)).
  2. Letgetter beCreateBuiltinFunction(getterClosure, 0,"", « »).
  3. NOTE:getter is never directly accessible to ECMAScript code.
  4. Returngetter.

10.4.4.7.2 MakeArgSetter (name,env )

The abstract operation MakeArgSetter takes argumentsname (a String) andenv (anEnvironment Record) and returns afunction object. It creates a built-infunction object that when executed sets the value bound forname inenv. It performs the following steps when called:

  1. LetsetterClosure be a newAbstract Closure with parameters (value) that capturesname andenv and performs the following steps when called:
    1. ReturnNormalCompletion(!env.SetMutableBinding(name,value,false)).
  2. Letsetter beCreateBuiltinFunction(setterClosure, 1,"", « »).
  3. NOTE:setter is never directly accessible to ECMAScript code.
  4. Returnsetter.

10.4.5 TypedArray Exotic Objects

ATypedArray is anexotic object that performs special handling ofproperty keys that arecanonical numeric strings, using the subset that are in-boundsinteger indices to index elements of uniform type and enforcing the invariant that the remainder are absent without incurring prototype chain traversal.

Note

BecauseToString(n) for any Numbern is acanonical numeric string, an implementation may treat Numbers asproperty keys forTypedArrays without actually performing the string conversion.

TypedArrays have the same internal slots asordinary objects and additionally[[ViewedArrayBuffer]],[[TypedArrayName]],[[ContentType]],[[ByteLength]],[[ByteOffset]], and[[ArrayLength]] internal slots.

An object is aTypedArray if its[[PreventExtensions]],[[GetOwnProperty]],[[HasProperty]],[[DefineOwnProperty]],[[Get]],[[Set]],[[Delete]], and[[OwnPropertyKeys]], internal methods use the definitions in this section, and its other essential internal methods use the definitions found in10.1. These methods are installed byTypedArrayCreate.

10.4.5.1[[PreventExtensions]] ( )

The[[PreventExtensions]] internal method of aTypedArrayO takes no arguments and returns anormal completion containing a Boolean. It performs the following steps when called:

  1. NOTE: The extensibility-related invariants specified in6.1.7.3 do not allow this method to returntrue whenO can gain (or lose and then regain) properties, which might occur for properties withinteger index names when its underlying buffer is resized.
  2. IfIsTypedArrayFixedLength(O) isfalse, returnfalse.
  3. ReturnOrdinaryPreventExtensions(O).

10.4.5.2[[GetOwnProperty]] (P )

The[[GetOwnProperty]] internal method of aTypedArrayO takes argumentP (aproperty key) and returns anormal completion containing either aProperty Descriptor orundefined. It performs the following steps when called:

  1. IfPis a String, then
    1. LetnumericIndex beCanonicalNumericIndexString(P).
    2. IfnumericIndex is notundefined, then
      1. Letvalue beTypedArrayGetElement(O,numericIndex).
      2. Ifvalue isundefined, returnundefined.
      3. Return the PropertyDescriptor {[[Value]]:value,[[Writable]]:true,[[Enumerable]]:true,[[Configurable]]:true }.
  2. ReturnOrdinaryGetOwnProperty(O,P).

10.4.5.3[[HasProperty]] (P )

The[[HasProperty]] internal method of aTypedArrayO takes argumentP (aproperty key) and returns either anormal completion containing a Boolean or athrow completion. It performs the following steps when called:

  1. IfPis a String, then
    1. LetnumericIndex beCanonicalNumericIndexString(P).
    2. IfnumericIndex is notundefined, returnIsValidIntegerIndex(O,numericIndex).
  2. Return ? OrdinaryHasProperty(O,P).

10.4.5.4[[DefineOwnProperty]] (P,Desc )

The[[DefineOwnProperty]] internal method of aTypedArrayO takes argumentsP (aproperty key) andDesc (aProperty Descriptor) and returns either anormal completion containing a Boolean or athrow completion. It performs the following steps when called:

  1. IfPis a String, then
    1. LetnumericIndex beCanonicalNumericIndexString(P).
    2. IfnumericIndex is notundefined, then
      1. IfIsValidIntegerIndex(O,numericIndex) isfalse, returnfalse.
      2. IfDesc has a[[Configurable]] field andDesc.[[Configurable]] isfalse, returnfalse.
      3. IfDesc has an[[Enumerable]] field andDesc.[[Enumerable]] isfalse, returnfalse.
      4. IfIsAccessorDescriptor(Desc) istrue, returnfalse.
      5. IfDesc has a[[Writable]] field andDesc.[[Writable]] isfalse, returnfalse.
      6. IfDesc has a[[Value]] field, perform ? TypedArraySetElement(O,numericIndex,Desc.[[Value]]).
      7. Returntrue.
  2. Return ! OrdinaryDefineOwnProperty(O,P,Desc).

10.4.5.5[[Get]] (P,Receiver )

The[[Get]] internal method of aTypedArrayO takes argumentsP (aproperty key) andReceiver (anECMAScript language value) and returns either anormal completion containing anECMAScript language value or athrow completion. It performs the following steps when called:

  1. IfPis a String, then
    1. LetnumericIndex beCanonicalNumericIndexString(P).
    2. IfnumericIndex is notundefined, then
      1. ReturnTypedArrayGetElement(O,numericIndex).
  2. Return ? OrdinaryGet(O,P,Receiver).

10.4.5.6[[Set]] (P,V,Receiver )

The[[Set]] internal method of aTypedArrayO takes argumentsP (aproperty key),V (anECMAScript language value), andReceiver (anECMAScript language value) and returns either anormal completion containing a Boolean or athrow completion. It performs the following steps when called:

  1. IfPis a String, then
    1. LetnumericIndex beCanonicalNumericIndexString(P).
    2. IfnumericIndex is notundefined, then
      1. IfSameValue(O,Receiver) istrue, then
        1. Perform ? TypedArraySetElement(O,numericIndex,V).
        2. Returntrue.
      2. IfIsValidIntegerIndex(O,numericIndex) isfalse, returntrue.
  2. Return ? OrdinarySet(O,P,V,Receiver).

10.4.5.7[[Delete]] (P )

The[[Delete]] internal method of aTypedArrayO takes argumentP (aproperty key) and returns anormal completion containing a Boolean. It performs the following steps when called:

  1. IfPis a String, then
    1. LetnumericIndex beCanonicalNumericIndexString(P).
    2. IfnumericIndex is notundefined, then
      1. IfIsValidIntegerIndex(O,numericIndex) isfalse, returntrue; else returnfalse.
  2. Return ! OrdinaryDelete(O,P).

10.4.5.8[[OwnPropertyKeys]] ( )

The[[OwnPropertyKeys]] internal method of aTypedArrayO takes no arguments and returns anormal completion containing aList ofproperty keys. It performs the following steps when called:

  1. LettaRecord beMakeTypedArrayWithBufferWitnessRecord(O,seq-cst).
  2. Letkeys be a new emptyList.
  3. IfIsTypedArrayOutOfBounds(taRecord) isfalse, then
    1. Letlength beTypedArrayLength(taRecord).
    2. For eachintegeri such that 0 ≤i <length, in ascending order, do
      1. Append ! ToString(𝔽(i)) tokeys.
  4. For each ownproperty keyP ofO such thatPis a String andP is not aninteger index, in ascending chronological order of property creation, do
    1. AppendP tokeys.
  5. For each ownproperty keyP ofO such thatPis a Symbol, in ascending chronological order of property creation, do
    1. AppendP tokeys.
  6. Returnkeys.

10.4.5.9 TypedArray With Buffer Witness Records

AnTypedArray With Buffer Witness Record is aRecord value used to encapsulate aTypedArray along with a cached byte length of the viewed buffer. It is used to help ensure there is a single shared memory read event of the byte length data block when the viewed buffer is agrowable SharedArrayBuffer.

TypedArray With Buffer Witness Records have the fields listed inTable 30.

Table 30:TypedArray With Buffer Witness Record Fields
Field Name Value Meaning
[[Object]] aTypedArray TheTypedArray whose buffer's byte length is loaded.
[[CachedBufferByteLength]] a non-negativeinteger ordetached The byte length of the object's[[ViewedArrayBuffer]] when theRecord was created.

10.4.5.10 MakeTypedArrayWithBufferWitnessRecord (obj,order )

The abstract operation MakeTypedArrayWithBufferWitnessRecord takes argumentsobj (aTypedArray) andorder (seq-cst orunordered) and returns aTypedArray With Buffer Witness Record. It performs the following steps when called:

  1. Letbuffer beobj.[[ViewedArrayBuffer]].
  2. IfIsDetachedBuffer(buffer) istrue, then
    1. LetbyteLength bedetached.
  3. Else,
    1. LetbyteLength beArrayBufferByteLength(buffer,order).
  4. Return theTypedArray With Buffer Witness Record {[[Object]]:obj,[[CachedBufferByteLength]]:byteLength }.

10.4.5.11 TypedArrayCreate (prototype )

The abstract operation TypedArrayCreate takes argumentprototype (an Object) and returns aTypedArray. It is used to specify the creation of newTypedArrays. It performs the following steps when called:

  1. LetinternalSlotsList be «[[Prototype]],[[Extensible]],[[ViewedArrayBuffer]],[[TypedArrayName]],[[ContentType]],[[ByteLength]],[[ByteOffset]],[[ArrayLength]] ».
  2. LetA beMakeBasicObject(internalSlotsList).
  3. SetA.[[PreventExtensions]] as specified in10.4.5.1.
  4. SetA.[[GetOwnProperty]] as specified in10.4.5.2.
  5. SetA.[[HasProperty]] as specified in10.4.5.3.
  6. SetA.[[DefineOwnProperty]] as specified in10.4.5.4.
  7. SetA.[[Get]] as specified in10.4.5.5.
  8. SetA.[[Set]] as specified in10.4.5.6.
  9. SetA.[[Delete]] as specified in10.4.5.7.
  10. SetA.[[OwnPropertyKeys]] as specified in10.4.5.8.
  11. SetA.[[Prototype]] toprototype.
  12. ReturnA.

10.4.5.12 TypedArrayByteLength (taRecord )

The abstract operation TypedArrayByteLength takes argumenttaRecord (aTypedArray With Buffer Witness Record) and returns a non-negativeinteger. It performs the following steps when called:

  1. IfIsTypedArrayOutOfBounds(taRecord) istrue, return 0.
  2. Letlength beTypedArrayLength(taRecord).
  3. Iflength = 0, return 0.
  4. LetO betaRecord.[[Object]].
  5. IfO.[[ByteLength]] is notauto, returnO.[[ByteLength]].
  6. LetelementSize beTypedArrayElementSize(O).
  7. Returnlength ×elementSize.

10.4.5.13 TypedArrayLength (taRecord )

The abstract operation TypedArrayLength takes argumenttaRecord (aTypedArray With Buffer Witness Record) and returns a non-negativeinteger. It performs the following steps when called:

  1. Assert:IsTypedArrayOutOfBounds(taRecord) isfalse.
  2. LetO betaRecord.[[Object]].
  3. IfO.[[ArrayLength]] is notauto, returnO.[[ArrayLength]].
  4. Assert:IsFixedLengthArrayBuffer(O.[[ViewedArrayBuffer]]) isfalse.
  5. LetbyteOffset beO.[[ByteOffset]].
  6. LetelementSize beTypedArrayElementSize(O).
  7. LetbyteLength betaRecord.[[CachedBufferByteLength]].
  8. Assert:byteLength is notdetached.
  9. Returnfloor((byteLength -byteOffset) /elementSize).

10.4.5.14 IsTypedArrayOutOfBounds (taRecord )

The abstract operation IsTypedArrayOutOfBounds takes argumenttaRecord (aTypedArray With Buffer Witness Record) and returns a Boolean. It checks if any of the object's numeric properties reference a value at an index not contained within the underlying buffer's bounds. It performs the following steps when called:

  1. LetO betaRecord.[[Object]].
  2. LetbufferByteLength betaRecord.[[CachedBufferByteLength]].
  3. Assert:IsDetachedBuffer(O.[[ViewedArrayBuffer]]) istrue if and only ifbufferByteLength isdetached.
  4. IfbufferByteLength isdetached, returntrue.
  5. LetbyteOffsetStart beO.[[ByteOffset]].
  6. IfO.[[ArrayLength]] isauto, then
    1. LetbyteOffsetEnd bebufferByteLength.
  7. Else,
    1. LetelementSize beTypedArrayElementSize(O).
    2. LetbyteOffsetEnd bebyteOffsetStart +O.[[ArrayLength]] ×elementSize.
  8. IfbyteOffsetStart >bufferByteLength orbyteOffsetEnd >bufferByteLength, returntrue.
  9. NOTE: 0-lengthTypedArrays are not considered out-of-bounds.
  10. Returnfalse.

10.4.5.15 IsTypedArrayFixedLength (O )

The abstract operation IsTypedArrayFixedLength takes argumentO (aTypedArray) and returns a Boolean. It performs the following steps when called:

  1. IfO.[[ArrayLength]] isauto, returnfalse.
  2. Letbuffer beO.[[ViewedArrayBuffer]].
  3. IfIsFixedLengthArrayBuffer(buffer) isfalse andIsSharedArrayBuffer(buffer) isfalse, returnfalse.
  4. Returntrue.

10.4.5.16 IsValidIntegerIndex (O,index )

The abstract operation IsValidIntegerIndex takes argumentsO (aTypedArray) andindex (a Number) and returns a Boolean. It performs the following steps when called:

  1. IfIsDetachedBuffer(O.[[ViewedArrayBuffer]]) istrue, returnfalse.
  2. Ifindex is not anintegral Number, returnfalse.
  3. Ifindex is-0𝔽 orindex <-0𝔽, returnfalse.
  4. LettaRecord beMakeTypedArrayWithBufferWitnessRecord(O,unordered).
  5. NOTE: Bounds checking is not a synchronizing operation whenO's backing buffer is agrowable SharedArrayBuffer.
  6. IfIsTypedArrayOutOfBounds(taRecord) istrue, returnfalse.
  7. Letlength beTypedArrayLength(taRecord).
  8. If(index) ≥length, returnfalse.
  9. Returntrue.

10.4.5.17 TypedArrayGetElement (O,index )

The abstract operation TypedArrayGetElement takes argumentsO (aTypedArray) andindex (a Number) and returns a Number, a BigInt, orundefined. It performs the following steps when called:

  1. IfIsValidIntegerIndex(O,index) isfalse, returnundefined.
  2. Letoffset beO.[[ByteOffset]].
  3. LetelementSize beTypedArrayElementSize(O).
  4. LetbyteIndexInBuffer be ((index) ×elementSize) +offset.
  5. LetelementType beTypedArrayElementType(O).
  6. ReturnGetValueFromBuffer(O.[[ViewedArrayBuffer]],byteIndexInBuffer,elementType,true,unordered).

10.4.5.18 TypedArraySetElement (O,index,value )

The abstract operation TypedArraySetElement takes argumentsO (aTypedArray),index (a Number), andvalue (anECMAScript language value) and returns either anormal completion containingunused or athrow completion. It performs the following steps when called:

  1. IfO.[[ContentType]] isbigint, letnumValue be ? ToBigInt(value).
  2. Otherwise, letnumValue be ? ToNumber(value).
  3. IfIsValidIntegerIndex(O,index) istrue, then
    1. Letoffset beO.[[ByteOffset]].
    2. LetelementSize beTypedArrayElementSize(O).
    3. LetbyteIndexInBuffer be ((index) ×elementSize) +offset.
    4. LetelementType beTypedArrayElementType(O).
    5. PerformSetValueInBuffer(O.[[ViewedArrayBuffer]],byteIndexInBuffer,elementType,numValue,true,unordered).
  4. Returnunused.
Note

This operation always appears to succeed, but it has no effect when attempting to write past the end of aTypedArray or to aTypedArray which is backed by a detached ArrayBuffer.

10.4.5.19 IsArrayBufferViewOutOfBounds (O )

The abstract operation IsArrayBufferViewOutOfBounds takes argumentO (aTypedArray or a DataView) and returns a Boolean. It checks if either any of aTypedArray's numeric properties or a DataView object's methods can reference a value at an index not contained within the underlying data block's bounds. This abstract operation exists as a convenience for upstream specifications. It performs the following steps when called:

  1. IfO has a[[DataView]] internal slot, then
    1. LetviewRecord beMakeDataViewWithBufferWitnessRecord(O,seq-cst).
    2. ReturnIsViewOutOfBounds(viewRecord).
  2. LettaRecord beMakeTypedArrayWithBufferWitnessRecord(O,seq-cst).
  3. ReturnIsTypedArrayOutOfBounds(taRecord).

10.4.6 Module Namespace Exotic Objects

Amodule namespace exotic object is anexotic object that exposes the bindings exported from an ECMAScriptModule (See16.2.3). There is a one-to-one correspondence between the String-keyed own properties of amodule namespace exotic object and the binding names exported by theModule. The exported bindings include any bindings that are indirectly exported usingexport * export items. Each String-valued ownproperty key is theStringValue of the corresponding exported binding name. These are the only String-keyed properties of amodule namespace exotic object. Each such property has the attributes {[[Writable]]:true,[[Enumerable]]:true,[[Configurable]]:false }.Module namespace exotic objects are not extensible.

An object is amodule namespace exotic object if its[[GetPrototypeOf]],[[SetPrototypeOf]],[[IsExtensible]],[[PreventExtensions]],[[GetOwnProperty]],[[DefineOwnProperty]],[[HasProperty]],[[Get]],[[Set]],[[Delete]], and[[OwnPropertyKeys]] internal methods use the definitions in this section, and its other essential internal methods use the definitions found in10.1. These methods are installed byModuleNamespaceCreate.

Module namespace exotic objects have the internal slots defined inTable 31.

Table 31: Internal Slots of Module Namespace Exotic Objects
Internal Slot Type Description
[[Module]] aModule Record TheModule Record whose exports this namespace exposes.
[[Exports]] aList of Strings AList whose elements are the String values of the exported names exposed as own properties of this object. The list is sorted according tolexicographic code unit order.

10.4.6.1[[GetPrototypeOf]] ( )

The[[GetPrototypeOf]] internal method of amodule namespace exotic object takes no arguments and returns anormal completion containingnull. It performs the following steps when called:

  1. Returnnull.

10.4.6.2[[SetPrototypeOf]] (V )

The[[SetPrototypeOf]] internal method of amodule namespace exotic objectO takes argumentV (an Object ornull) and returns anormal completion containing a Boolean. It performs the following steps when called:

  1. Return ! SetImmutablePrototype(O,V).

10.4.6.3[[IsExtensible]] ( )

The[[IsExtensible]] internal method of amodule namespace exotic object takes no arguments and returns anormal completion containingfalse. It performs the following steps when called:

  1. Returnfalse.

10.4.6.4[[PreventExtensions]] ( )

The[[PreventExtensions]] internal method of amodule namespace exotic object takes no arguments and returns anormal completion containingtrue. It performs the following steps when called:

  1. Returntrue.

10.4.6.5[[GetOwnProperty]] (P )

The[[GetOwnProperty]] internal method of amodule namespace exotic objectO takes argumentP (aproperty key) and returns either anormal completion containing either aProperty Descriptor orundefined, or athrow completion. It performs the following steps when called:

  1. IfPis a Symbol, returnOrdinaryGetOwnProperty(O,P).
  2. Letexports beO.[[Exports]].
  3. Ifexports does not containP, returnundefined.
  4. Letvalue be ? O.[[Get]](P,O).
  5. Return PropertyDescriptor {[[Value]]:value,[[Writable]]:true,[[Enumerable]]:true,[[Configurable]]:false }.

10.4.6.6[[DefineOwnProperty]] (P,Desc )

The[[DefineOwnProperty]] internal method of amodule namespace exotic objectO takes argumentsP (aproperty key) andDesc (aProperty Descriptor) and returns either anormal completion containing a Boolean or athrow completion. It performs the following steps when called:

  1. IfPis a Symbol, return ! OrdinaryDefineOwnProperty(O,P,Desc).
  2. Letcurrent be ? O.[[GetOwnProperty]](P).
  3. Ifcurrent isundefined, returnfalse.
  4. IfDesc has a[[Configurable]] field andDesc.[[Configurable]] istrue, returnfalse.
  5. IfDesc has an[[Enumerable]] field andDesc.[[Enumerable]] isfalse, returnfalse.
  6. IfIsAccessorDescriptor(Desc) istrue, returnfalse.
  7. IfDesc has a[[Writable]] field andDesc.[[Writable]] isfalse, returnfalse.
  8. IfDesc has a[[Value]] field, returnSameValue(Desc.[[Value]],current.[[Value]]).
  9. Returntrue.

10.4.6.7[[HasProperty]] (P )

The[[HasProperty]] internal method of amodule namespace exotic objectO takes argumentP (aproperty key) and returns anormal completion containing a Boolean. It performs the following steps when called:

  1. IfPis a Symbol, return ! OrdinaryHasProperty(O,P).
  2. Letexports beO.[[Exports]].
  3. Ifexports containsP, returntrue.
  4. Returnfalse.

10.4.6.8[[Get]] (P,Receiver )

The[[Get]] internal method of amodule namespace exotic objectO takes argumentsP (aproperty key) andReceiver (anECMAScript language value) and returns either anormal completion containing anECMAScript language value or athrow completion. It performs the following steps when called:

  1. IfPis a Symbol, then
    1. Return ! OrdinaryGet(O,P,Receiver).
  2. Letexports beO.[[Exports]].
  3. Ifexports does not containP, returnundefined.
  4. Letm beO.[[Module]].
  5. Letbinding bem.ResolveExport(P).
  6. Assert:binding is aResolvedBinding Record.
  7. LettargetModule bebinding.[[Module]].
  8. Assert:targetModule is notundefined.
  9. Ifbinding.[[BindingName]] isnamespace, then
    1. ReturnGetModuleNamespace(targetModule).
  10. LettargetEnv betargetModule.[[Environment]].
  11. IftargetEnv isempty, throw aReferenceError exception.
  12. Return ? targetEnv.GetBindingValue(binding.[[BindingName]],true).
Note

ResolveExport is side-effect free. Each time this operation is called with a specificexportName,resolveSet pair as arguments it must return the same result. An implementation might choose to pre-compute or cache the ResolveExport results for the[[Exports]] of eachmodule namespace exotic object.

10.4.6.9[[Set]] (P,V,Receiver )

The[[Set]] internal method of amodule namespace exotic object takes argumentsP (aproperty key),V (anECMAScript language value), andReceiver (anECMAScript language value) and returns anormal completion containingfalse. It performs the following steps when called:

  1. Returnfalse.

10.4.6.10[[Delete]] (P )

The[[Delete]] internal method of amodule namespace exotic objectO takes argumentP (aproperty key) and returns anormal completion containing a Boolean. It performs the following steps when called:

  1. IfPis a Symbol, then
    1. Return ! OrdinaryDelete(O,P).
  2. Letexports beO.[[Exports]].
  3. Ifexports containsP, returnfalse.
  4. Returntrue.

10.4.6.11[[OwnPropertyKeys]] ( )

The[[OwnPropertyKeys]] internal method of amodule namespace exotic objectO takes no arguments and returns anormal completion containing aList ofproperty keys. It performs the following steps when called:

  1. Letexports beO.[[Exports]].
  2. LetsymbolKeys beOrdinaryOwnPropertyKeys(O).
  3. Return thelist-concatenation ofexports andsymbolKeys.

10.4.6.12 ModuleNamespaceCreate (module,exports )

The abstract operation ModuleNamespaceCreate takes argumentsmodule (aModule Record) andexports (aList of Strings) and returns amodule namespace exotic object. It is used to specify the creation of newmodule namespace exotic objects. It performs the following steps when called:

  1. Assert:module.[[Namespace]] isempty.
  2. LetinternalSlotsList be the internal slots listed inTable 31.
  3. LetM beMakeBasicObject(internalSlotsList).
  4. SetM's essential internal methods to the definitions specified in10.4.6.
  5. SetM.[[Module]] tomodule.
  6. LetsortedExports be aList whose elements are the elements ofexports, sorted according tolexicographic code unit order.
  7. SetM.[[Exports]] tosortedExports.
  8. Create own properties ofM corresponding to the definitions in28.3.
  9. Setmodule.[[Namespace]] toM.
  10. ReturnM.

10.4.7 Immutable Prototype Exotic Objects

Animmutable prototype exotic object is anexotic object that has a[[Prototype]] internal slot that will not change once it is initialized.

An object is animmutable prototype exotic object if its[[SetPrototypeOf]] internal method uses the following implementation. (Its other essential internal methods may use any implementation, depending on the specificimmutable prototype exotic object in question.)

Note

Unlike otherexotic objects, there is not a dedicated creation abstract operation provided forimmutable prototype exotic objects. This is because they are only used by%Object.prototype% and byhost environments, and inhost environments, the relevant objects are potentially exotic in other ways and thus need their own dedicated creation operation.

10.4.7.1[[SetPrototypeOf]] (V )

The[[SetPrototypeOf]] internal method of animmutable prototype exotic objectO takes argumentV (an Object ornull) and returns either anormal completion containing a Boolean or athrow completion. It performs the following steps when called:

  1. Return ? SetImmutablePrototype(O,V).

10.4.7.2 SetImmutablePrototype (O,V )

The abstract operation SetImmutablePrototype takes argumentsO (an Object) andV (an Object ornull) and returns either anormal completion containing a Boolean or athrow completion. It performs the following steps when called:

  1. Letcurrent be ? O.[[GetPrototypeOf]]().
  2. IfSameValue(V,current) istrue, returntrue.
  3. Returnfalse.

10.5 Proxy Object Internal Methods and Internal Slots

A Proxy object is anexotic object whose essential internal methods are partially implemented using ECMAScript code. Every Proxy object has an internal slot called[[ProxyHandler]]. The value of[[ProxyHandler]] is an object, called the proxy'shandler object, ornull. Methods (seeTable 32) of a handler object may be used to augment the implementation for one or more of the Proxy object's internal methods. Every Proxy object also has an internal slot called[[ProxyTarget]] whose value is either an object ornull. This object is called the proxy'starget object.

An object is aProxy exotic object if its essential internal methods (including[[Call]] and[[Construct]], if applicable) use the definitions in this section. These internal methods are installed inProxyCreate.

Table 32: Proxy Handler Methods
Internal Method Handler Method
[[GetPrototypeOf]]getPrototypeOf
[[SetPrototypeOf]]setPrototypeOf
[[IsExtensible]]isExtensible
[[PreventExtensions]]preventExtensions
[[GetOwnProperty]]getOwnPropertyDescriptor
[[DefineOwnProperty]]defineProperty
[[HasProperty]]has
[[Get]]get
[[Set]]set
[[Delete]]deleteProperty
[[OwnPropertyKeys]]ownKeys
[[Call]]apply
[[Construct]]construct

When a handler method is called to provide the implementation of a Proxy object internal method, the handler method is passed the proxy's target object as a parameter. A proxy's handler object does not necessarily have a method corresponding to every essential internal method. Invoking an internal method on the proxy results in the invocation of the corresponding internal method on the proxy's target object if the handler object does not have a method corresponding to the internal trap.

The[[ProxyHandler]] and[[ProxyTarget]] internal slots of a Proxy object are always initialized when the object is created and typically may not be modified. Some Proxy objects are created in a manner that permits them to be subsequentlyrevoked. When a proxy is revoked, its[[ProxyHandler]] and[[ProxyTarget]] internal slots are set tonull causing subsequent invocations of internal methods on that Proxy object to throw aTypeError exception.

Because Proxy objects permit the implementation of internal methods to be provided by arbitrary ECMAScript code, it is possible to define a Proxy object whose handler methods violates the invariants defined in6.1.7.3. Some of the internal method invariants defined in6.1.7.3 are essential integrity invariants. These invariants are explicitly enforced by the Proxy object internal methods specified in this section. An ECMAScript implementation must be robust in the presence of all possible invariant violations.

In the following algorithm descriptions, assumeO is an ECMAScript Proxy object,P is aproperty key value,V is anyECMAScript language value andDesc is aProperty Descriptor record.

10.5.1[[GetPrototypeOf]] ( )

The[[GetPrototypeOf]] internal method of aProxy exotic objectO takes no arguments and returns either anormal completion containing either an Object ornull, or athrow completion. It performs the following steps when called:

  1. Perform ? ValidateNonRevokedProxy(O).
  2. Lettarget beO.[[ProxyTarget]].
  3. Lethandler beO.[[ProxyHandler]].
  4. Assert:handleris an Object.
  5. Lettrap be ? GetMethod(handler,"getPrototypeOf").
  6. Iftrap isundefined, then
    1. Return ? target.[[GetPrototypeOf]]().
  7. LethandlerProto be ? Call(trap,handler, «target »).
  8. IfhandlerProtois not an Object andhandlerProto is notnull, throw aTypeError exception.
  9. LetextensibleTarget be ? IsExtensible(target).
  10. IfextensibleTarget istrue, returnhandlerProto.
  11. LettargetProto be ? target.[[GetPrototypeOf]]().
  12. IfSameValue(handlerProto,targetProto) isfalse, throw aTypeError exception.
  13. ReturnhandlerProto.
Note

[[GetPrototypeOf]] for Proxy objects enforces the following invariants:

  • The result of[[GetPrototypeOf]] must be either an Object ornull.
  • If the target object is not extensible,[[GetPrototypeOf]] applied to the Proxy object must return the same value as[[GetPrototypeOf]] applied to the Proxy object's target object.

10.5.2[[SetPrototypeOf]] (V )

The[[SetPrototypeOf]] internal method of aProxy exotic objectO takes argumentV (an Object ornull) and returns either anormal completion containing a Boolean or athrow completion. It performs the following steps when called:

  1. Perform ? ValidateNonRevokedProxy(O).
  2. Lettarget beO.[[ProxyTarget]].
  3. Lethandler beO.[[ProxyHandler]].
  4. Assert:handleris an Object.
  5. Lettrap be ? GetMethod(handler,"setPrototypeOf").
  6. Iftrap isundefined, then
    1. Return ? target.[[SetPrototypeOf]](V).
  7. LetbooleanTrapResult beToBoolean(?Call(trap,handler, «target,V »)).
  8. IfbooleanTrapResult isfalse, returnfalse.
  9. LetextensibleTarget be ? IsExtensible(target).
  10. IfextensibleTarget istrue, returntrue.
  11. LettargetProto be ? target.[[GetPrototypeOf]]().
  12. IfSameValue(V,targetProto) isfalse, throw aTypeError exception.
  13. Returntrue.
Note

[[SetPrototypeOf]] for Proxy objects enforces the following invariants:

  • The result of[[SetPrototypeOf]]is a Boolean value.
  • If the target object is not extensible, the argument value must be the same as the result of[[GetPrototypeOf]] applied to target object.

10.5.3[[IsExtensible]] ( )

The[[IsExtensible]] internal method of aProxy exotic objectO takes no arguments and returns either anormal completion containing a Boolean or athrow completion. It performs the following steps when called:

  1. Perform ? ValidateNonRevokedProxy(O).
  2. Lettarget beO.[[ProxyTarget]].
  3. Lethandler beO.[[ProxyHandler]].
  4. Assert:handleris an Object.
  5. Lettrap be ? GetMethod(handler,"isExtensible").
  6. Iftrap isundefined, then
    1. Return ? IsExtensible(target).
  7. LetbooleanTrapResult beToBoolean(?Call(trap,handler, «target »)).
  8. LettargetResult be ? IsExtensible(target).
  9. IfbooleanTrapResult is nottargetResult, throw aTypeError exception.
  10. ReturnbooleanTrapResult.
Note

[[IsExtensible]] for Proxy objects enforces the following invariants:

  • The result of[[IsExtensible]]is a Boolean value.
  • [[IsExtensible]] applied to the Proxy object must return the same value as[[IsExtensible]] applied to the Proxy object's target object with the same argument.

10.5.4[[PreventExtensions]] ( )

The[[PreventExtensions]] internal method of aProxy exotic objectO takes no arguments and returns either anormal completion containing a Boolean or athrow completion. It performs the following steps when called:

  1. Perform ? ValidateNonRevokedProxy(O).
  2. Lettarget beO.[[ProxyTarget]].
  3. Lethandler beO.[[ProxyHandler]].
  4. Assert:handleris an Object.
  5. Lettrap be ? GetMethod(handler,"preventExtensions").
  6. Iftrap isundefined, then
    1. Return ? target.[[PreventExtensions]]().
  7. LetbooleanTrapResult beToBoolean(?Call(trap,handler, «target »)).
  8. IfbooleanTrapResult istrue, then
    1. LetextensibleTarget be ? IsExtensible(target).
    2. IfextensibleTarget istrue, throw aTypeError exception.
  9. ReturnbooleanTrapResult.
Note

[[PreventExtensions]] for Proxy objects enforces the following invariants:

  • The result of[[PreventExtensions]]is a Boolean value.
  • [[PreventExtensions]] applied to the Proxy object only returnstrue if[[IsExtensible]] applied to the Proxy object's target object isfalse.

10.5.5[[GetOwnProperty]] (P )

The[[GetOwnProperty]] internal method of aProxy exotic objectO takes argumentP (aproperty key) and returns either anormal completion containing either aProperty Descriptor orundefined, or athrow completion. It performs the following steps when called:

  1. Perform ? ValidateNonRevokedProxy(O).
  2. Lettarget beO.[[ProxyTarget]].
  3. Lethandler beO.[[ProxyHandler]].
  4. Assert:handleris an Object.
  5. Lettrap be ? GetMethod(handler,"getOwnPropertyDescriptor").
  6. Iftrap isundefined, then
    1. Return ? target.[[GetOwnProperty]](P).
  7. LettrapResultObj be ? Call(trap,handler, «target,P »).
  8. IftrapResultObjis not an Object andtrapResultObj is notundefined, throw aTypeError exception.
  9. LettargetDesc be ? target.[[GetOwnProperty]](P).
  10. IftrapResultObj isundefined, then
    1. IftargetDesc isundefined, returnundefined.
    2. IftargetDesc.[[Configurable]] isfalse, throw aTypeError exception.
    3. LetextensibleTarget be ? IsExtensible(target).
    4. IfextensibleTarget isfalse, throw aTypeError exception.
    5. Returnundefined.
  11. LetextensibleTarget be ? IsExtensible(target).
  12. LetresultDesc be ? ToPropertyDescriptor(trapResultObj).
  13. PerformCompletePropertyDescriptor(resultDesc).
  14. Letvalid beIsCompatiblePropertyDescriptor(extensibleTarget,resultDesc,targetDesc).
  15. Ifvalid isfalse, throw aTypeError exception.
  16. IfresultDesc.[[Configurable]] isfalse, then
    1. IftargetDesc isundefined ortargetDesc.[[Configurable]] istrue, then
      1. Throw aTypeError exception.
    2. IfresultDesc has a[[Writable]] field andresultDesc.[[Writable]] isfalse, then
      1. Assert:targetDesc has a[[Writable]] field.
      2. IftargetDesc.[[Writable]] istrue, throw aTypeError exception.
  17. ReturnresultDesc.
Note

[[GetOwnProperty]] for Proxy objects enforces the following invariants:

  • The result of[[GetOwnProperty]] must be either an Object orundefined.
  • A property cannot be reported as non-existent, if it exists as a non-configurable own property of the target object.
  • A property cannot be reported as non-existent, if it exists as an own property of a non-extensible target object.
  • A property cannot be reported as existent, if it does not exist as an own property of the target object and the target object is not extensible.
  • A property cannot be reported as non-configurable, unless it exists as a non-configurable own property of the target object.
  • A property cannot be reported as both non-configurable and non-writable, unless it exists as a non-configurable, non-writable own property of the target object.

10.5.6[[DefineOwnProperty]] (P,Desc )

The[[DefineOwnProperty]] internal method of aProxy exotic objectO takes argumentsP (aproperty key) andDesc (aProperty Descriptor) and returns either anormal completion containing a Boolean or athrow completion. It performs the following steps when called:

  1. Perform ? ValidateNonRevokedProxy(O).
  2. Lettarget beO.[[ProxyTarget]].
  3. Lethandler beO.[[ProxyHandler]].
  4. Assert:handleris an Object.
  5. Lettrap be ? GetMethod(handler,"defineProperty").
  6. Iftrap isundefined, then
    1. Return ? target.[[DefineOwnProperty]](P,Desc).
  7. LetdescObj beFromPropertyDescriptor(Desc).
  8. LetbooleanTrapResult beToBoolean(?Call(trap,handler, «target,P,descObj »)).
  9. IfbooleanTrapResult isfalse, returnfalse.
  10. LettargetDesc be ? target.[[GetOwnProperty]](P).
  11. LetextensibleTarget be ? IsExtensible(target).
  12. IfDesc has a[[Configurable]] field andDesc.[[Configurable]] isfalse, then
    1. LetsettingConfigFalse betrue.
  13. Else,
    1. LetsettingConfigFalse befalse.
  14. IftargetDesc isundefined, then
    1. IfextensibleTarget isfalse, throw aTypeError exception.
    2. IfsettingConfigFalse istrue, throw aTypeError exception.
  15. Else,
    1. IfIsCompatiblePropertyDescriptor(extensibleTarget,Desc,targetDesc) isfalse, throw aTypeError exception.
    2. IfsettingConfigFalse istrue andtargetDesc.[[Configurable]] istrue, throw aTypeError exception.
    3. IfIsDataDescriptor(targetDesc) istrue,targetDesc.[[Configurable]] isfalse, andtargetDesc.[[Writable]] istrue, then
      1. IfDesc has a[[Writable]] field andDesc.[[Writable]] isfalse, throw aTypeError exception.
  16. Returntrue.
Note

[[DefineOwnProperty]] for Proxy objects enforces the following invariants:

  • The result of[[DefineOwnProperty]]is a Boolean value.
  • A property cannot be added, if the target object is not extensible.
  • A property cannot be non-configurable, unless there exists a corresponding non-configurable own property of the target object.
  • A non-configurable property cannot be non-writable, unless there exists a corresponding non-configurable, non-writable own property of the target object.
  • If a property has a corresponding target object property then applying theProperty Descriptor of the property to the target object using[[DefineOwnProperty]] will not throw an exception.

10.5.7[[HasProperty]] (P )

The[[HasProperty]] internal method of aProxy exotic objectO takes argumentP (aproperty key) and returns either anormal completion containing a Boolean or athrow completion. It performs the following steps when called:

  1. Perform ? ValidateNonRevokedProxy(O).
  2. Lettarget beO.[[ProxyTarget]].
  3. Lethandler beO.[[ProxyHandler]].
  4. Assert:handleris an Object.
  5. Lettrap be ? GetMethod(handler,"has").
  6. Iftrap isundefined, then
    1. Return ? target.[[HasProperty]](P).
  7. LetbooleanTrapResult beToBoolean(?Call(trap,handler, «target,P »)).
  8. IfbooleanTrapResult isfalse, then
    1. LettargetDesc be ? target.[[GetOwnProperty]](P).
    2. IftargetDesc is notundefined, then
      1. IftargetDesc.[[Configurable]] isfalse, throw aTypeError exception.
      2. LetextensibleTarget be ? IsExtensible(target).
      3. IfextensibleTarget isfalse, throw aTypeError exception.
  9. ReturnbooleanTrapResult.
Note

[[HasProperty]] for Proxy objects enforces the following invariants:

  • The result of[[HasProperty]]is a Boolean value.
  • A property cannot be reported as non-existent, if it exists as a non-configurable own property of the target object.
  • A property cannot be reported as non-existent, if it exists as an own property of the target object and the target object is not extensible.

10.5.8[[Get]] (P,Receiver )

The[[Get]] internal method of aProxy exotic objectO takes argumentsP (aproperty key) andReceiver (anECMAScript language value) and returns either anormal completion containing anECMAScript language value or athrow completion. It performs the following steps when called:

  1. Perform ? ValidateNonRevokedProxy(O).
  2. Lettarget beO.[[ProxyTarget]].
  3. Lethandler beO.[[ProxyHandler]].
  4. Assert:handleris an Object.
  5. Lettrap be ? GetMethod(handler,"get").
  6. Iftrap isundefined, then
    1. Return ? target.[[Get]](P,Receiver).
  7. LettrapResult be ? Call(trap,handler, «target,P,Receiver »).
  8. LettargetDesc be ? target.[[GetOwnProperty]](P).
  9. IftargetDesc is notundefined andtargetDesc.[[Configurable]] isfalse, then
    1. IfIsDataDescriptor(targetDesc) istrue andtargetDesc.[[Writable]] isfalse, then
      1. IfSameValue(trapResult,targetDesc.[[Value]]) isfalse, throw aTypeError exception.
    2. IfIsAccessorDescriptor(targetDesc) istrue andtargetDesc.[[Get]] isundefined, then
      1. IftrapResult is notundefined, throw aTypeError exception.
  10. ReturntrapResult.
Note

[[Get]] for Proxy objects enforces the following invariants:

  • The value reported for a property must be the same as the value of the corresponding target object property if the target object property is a non-writable, non-configurable owndata property.
  • The value reported for a property must beundefined if the corresponding target object property is a non-configurable ownaccessor property that hasundefined as its[[Get]] attribute.

10.5.9[[Set]] (P,V,Receiver )

The[[Set]] internal method of aProxy exotic objectO takes argumentsP (aproperty key),V (anECMAScript language value), andReceiver (anECMAScript language value) and returns either anormal completion containing a Boolean or athrow completion. It performs the following steps when called:

  1. Perform ? ValidateNonRevokedProxy(O).
  2. Lettarget beO.[[ProxyTarget]].
  3. Lethandler beO.[[ProxyHandler]].
  4. Assert:handleris an Object.
  5. Lettrap be ? GetMethod(handler,"set").
  6. Iftrap isundefined, then
    1. Return ? target.[[Set]](P,V,Receiver).
  7. LetbooleanTrapResult beToBoolean(?Call(trap,handler, «target,P,V,Receiver »)).
  8. IfbooleanTrapResult isfalse, returnfalse.
  9. LettargetDesc be ? target.[[GetOwnProperty]](P).
  10. IftargetDesc is notundefined andtargetDesc.[[Configurable]] isfalse, then
    1. IfIsDataDescriptor(targetDesc) istrue andtargetDesc.[[Writable]] isfalse, then
      1. IfSameValue(V,targetDesc.[[Value]]) isfalse, throw aTypeError exception.
    2. IfIsAccessorDescriptor(targetDesc) istrue, then
      1. IftargetDesc.[[Set]] isundefined, throw aTypeError exception.
  11. Returntrue.
Note

[[Set]] for Proxy objects enforces the following invariants:

  • The result of[[Set]]is a Boolean value.
  • Cannot change the value of a property to be different from the value of the corresponding target object property if the corresponding target object property is a non-writable, non-configurable owndata property.
  • Cannot set the value of a property if the corresponding target object property is a non-configurable ownaccessor property that hasundefined as its[[Set]] attribute.

10.5.10[[Delete]] (P )

The[[Delete]] internal method of aProxy exotic objectO takes argumentP (aproperty key) and returns either anormal completion containing a Boolean or athrow completion. It performs the following steps when called:

  1. Perform ? ValidateNonRevokedProxy(O).
  2. Lettarget beO.[[ProxyTarget]].
  3. Lethandler beO.[[ProxyHandler]].
  4. Assert:handleris an Object.
  5. Lettrap be ? GetMethod(handler,"deleteProperty").
  6. Iftrap isundefined, then
    1. Return ? target.[[Delete]](P).
  7. LetbooleanTrapResult beToBoolean(?Call(trap,handler, «target,P »)).
  8. IfbooleanTrapResult isfalse, returnfalse.
  9. LettargetDesc be ? target.[[GetOwnProperty]](P).
  10. IftargetDesc isundefined, returntrue.
  11. IftargetDesc.[[Configurable]] isfalse, throw aTypeError exception.
  12. LetextensibleTarget be ? IsExtensible(target).
  13. IfextensibleTarget isfalse, throw aTypeError exception.
  14. Returntrue.
Note

[[Delete]] for Proxy objects enforces the following invariants:

  • The result of[[Delete]]is a Boolean value.
  • A property cannot be reported as deleted, if it exists as a non-configurable own property of the target object.
  • A property cannot be reported as deleted, if it exists as an own property of the target object and the target object is non-extensible.

10.5.11[[OwnPropertyKeys]] ( )

The[[OwnPropertyKeys]] internal method of aProxy exotic objectO takes no arguments and returns either anormal completion containing aList ofproperty keys or athrow completion. It performs the following steps when called:

  1. Perform ? ValidateNonRevokedProxy(O).
  2. Lettarget beO.[[ProxyTarget]].
  3. Lethandler beO.[[ProxyHandler]].
  4. Assert:handleris an Object.
  5. Lettrap be ? GetMethod(handler,"ownKeys").
  6. Iftrap isundefined, then
    1. Return ? target.[[OwnPropertyKeys]]().
  7. LettrapResultArray be ? Call(trap,handler, «target »).
  8. LettrapResult be ? CreateListFromArrayLike(trapResultArray,property-key).
  9. IftrapResult contains any duplicate entries, throw aTypeError exception.
  10. LetextensibleTarget be ? IsExtensible(target).
  11. LettargetKeys be ? target.[[OwnPropertyKeys]]().
  12. Assert:targetKeys is aList ofproperty keys.
  13. Assert:targetKeys contains no duplicate entries.
  14. LettargetConfigurableKeys be a new emptyList.
  15. LettargetNonconfigurableKeys be a new emptyList.
  16. For each elementkey oftargetKeys, do
    1. Letdesc be ? target.[[GetOwnProperty]](key).
    2. Ifdesc is notundefined anddesc.[[Configurable]] isfalse, then
      1. Appendkey totargetNonconfigurableKeys.
    3. Else,
      1. Appendkey totargetConfigurableKeys.
  17. IfextensibleTarget istrue andtargetNonconfigurableKeys is empty, then
    1. ReturntrapResult.
  18. LetuncheckedResultKeys be aList whose elements are the elements oftrapResult.
  19. For each elementkey oftargetNonconfigurableKeys, do
    1. IfuncheckedResultKeys does not containkey, throw aTypeError exception.
    2. Removekey fromuncheckedResultKeys.
  20. IfextensibleTarget istrue, returntrapResult.
  21. For each elementkey oftargetConfigurableKeys, do
    1. IfuncheckedResultKeys does not containkey, throw aTypeError exception.
    2. Removekey fromuncheckedResultKeys.
  22. IfuncheckedResultKeys is not empty, throw aTypeError exception.
  23. ReturntrapResult.
Note

[[OwnPropertyKeys]] for Proxy objects enforces the following invariants:

  • The result of[[OwnPropertyKeys]] is aList.
  • The returnedList contains no duplicate entries.
  • Each element of the returnedList is aproperty key.
  • The resultList must contain the keys of all non-configurable own properties of the target object.
  • If the target object is not extensible, then the resultList must contain all the keys of the own properties of the target object and no other values.

10.5.12[[Call]] (thisArgument,argumentsList )

The[[Call]] internal method of aProxy exotic objectO takes argumentsthisArgument (anECMAScript language value) andargumentsList (aList ofECMAScript language values) and returns either anormal completion containing anECMAScript language value or athrow completion. It performs the following steps when called:

  1. Perform ? ValidateNonRevokedProxy(O).
  2. Lettarget beO.[[ProxyTarget]].
  3. Lethandler beO.[[ProxyHandler]].
  4. Assert:handleris an Object.
  5. Lettrap be ? GetMethod(handler,"apply").
  6. Iftrap isundefined, then
    1. Return ? Call(target,thisArgument,argumentsList).
  7. LetargArray beCreateArrayFromList(argumentsList).
  8. Return ? Call(trap,handler, «target,thisArgument,argArray »).
Note

AProxy exotic object only has a[[Call]] internal method if the initial value of its[[ProxyTarget]] internal slot is an object that has a[[Call]] internal method.

10.5.13[[Construct]] (argumentsList,newTarget )

The[[Construct]] internal method of aProxy exotic objectO takes argumentsargumentsList (aList ofECMAScript language values) andnewTarget (aconstructor) and returns either anormal completion containing an Object or athrow completion. It performs the following steps when called:

  1. Perform ? ValidateNonRevokedProxy(O).
  2. Lettarget beO.[[ProxyTarget]].
  3. Assert:IsConstructor(target) istrue.
  4. Lethandler beO.[[ProxyHandler]].
  5. Assert:handleris an Object.
  6. Lettrap be ? GetMethod(handler,"construct").
  7. Iftrap isundefined, then
    1. Return ? Construct(target,argumentsList,newTarget).
  8. LetargArray beCreateArrayFromList(argumentsList).
  9. LetnewObj be ? Call(trap,handler, «target,argArray,newTarget »).
  10. IfnewObjis not an Object, throw aTypeError exception.
  11. ReturnnewObj.
Note 1

AProxy exotic object only has a[[Construct]] internal method if the initial value of its[[ProxyTarget]] internal slot is an object that has a[[Construct]] internal method.

Note 2

[[Construct]] for Proxy objects enforces the following invariants:

  • The result of[[Construct]] must be an Object.

10.5.14 ValidateNonRevokedProxy (proxy )

The abstract operation ValidateNonRevokedProxy takes argumentproxy (aProxy exotic object) and returns either anormal completion containingunused or athrow completion. It throws aTypeError exception ifproxy has been revoked. It performs the following steps when called:

  1. Ifproxy.[[ProxyTarget]] isnull, throw aTypeError exception.
  2. Assert:proxy.[[ProxyHandler]] is notnull.
  3. Returnunused.

10.5.15 ProxyCreate (target,handler )

The abstract operation ProxyCreate takes argumentstarget (anECMAScript language value) andhandler (anECMAScript language value) and returns either anormal completion containing aProxy exotic object or athrow completion. It is used to specify the creation of new Proxy objects. It performs the following steps when called:

  1. Iftargetis not an Object, throw aTypeError exception.
  2. Ifhandleris not an Object, throw aTypeError exception.
  3. LetP beMakeBasicObject[[ProxyHandler]],[[ProxyTarget]] »).
  4. SetP's essential internal methods, except for[[Call]] and[[Construct]], to the definitions specified in10.5.
  5. IfIsCallable(target) istrue, then
    1. SetP.[[Call]] as specified in10.5.12.
    2. IfIsConstructor(target) istrue, then
      1. SetP.[[Construct]] as specified in10.5.13.
  6. SetP.[[ProxyTarget]] totarget.
  7. SetP.[[ProxyHandler]] tohandler.
  8. ReturnP.

[8]ページ先頭

©2009-2025 Movatter.jp