diff --git a/spec.html b/spec.html index dd4c3284d6..8261c1d2d6 100644 --- a/spec.html +++ b/spec.html @@ -141,6 +141,7 @@
A conforming implementation of ECMAScript may provide additional types, values, objects, properties, and functions beyond those described in this specification. In particular, a conforming implementation of ECMAScript may provide properties not described in this specification, and values for those properties, for objects that are described in this specification.
A conforming implementation of ECMAScript may support program and regular expression syntax not described in this specification. In particular, a conforming implementation of ECMAScript may support program syntax that makes use of any “future reserved words” noted in subclause
A conforming implementation of ECMAScript must not implement any extension that is listed as a Forbidden Extension in subclause
A conforming implementation of ECMAScript must not redefine any facilities that are not implementation-defined, implementation-approximated, or host-defined.
Each Web browser and server that supports ECMAScript supplies its own host environment, completing the ECMAScript execution environment.
To aid integrating ECMAScript into host environments, this specification defers the definition certain facilities (e.g., abstract operations), either in whole or in part, to a source outside of this specification. Editorially, this specification distinguishes the following kinds of deferrals.
+ +An implementation is an external source that further defines facilities enumerated in Annex
An implementation-defined facility is one that defers its definition to an external source without further qualification. This specification does not make any recommendations for particular behaviours, and conforming implementations are free to choose any behaviour within the constraints put forth by this specification.
+An implementation-approximated facility is one that defers its definition to an external source while recommending an ideal behaviour. While conforming implementations are free to choose any behaviour within the constraints put forth by this specification, they are encouraged to strive to approximate the ideal. Some mathematical operations, such as Math.exp
A host is an external source that further defines facilities listed in Annex
A host hook is an abstract operation that is defined in whole or in part by an external source. All host hooks must be listed in Annex
A host-defined facility is one that defers its definition to an external source without further qualification and is listed in Annex
A host environment is a particular choice of definition for all host-defined facilities. A host environment typically includes objects or functions which allow obtaining input and providing output as host-defined properties of the global object.
+This specification follows the editorial convention of always using the most specific term. For example, if a facility is host-defined, it should not be referred to as implementation-defined.
+Both hosts and implementations may interface with this specification via the language types, specification types, abstract operations, grammar productions, intrinsic objects, and intrinsic symbols defined herein.
+The following is an informal overview of ECMAScript—not all parts of the language are described. This overview is not part of the standard proper.
@@ -210,6 +226,24 @@For the purposes of this document, the following terms and definitions apply.
+an implementation-approximated facility is defined in whole or in part by an external source but has a recommended, ideal behaviour in this specification
+an implementation-defined facility is defined in whole or in part by an external source to this specification
+same as implementation-defined
+Editorially, see clause
set of data values as defined in clause
built-in object that is a function
Examples of built-in functions include `parseInt` and `Math.exp`. An implementation may provide implementation-dependent built-in functions that are not described in this specification.
+Examples of built-in functions include `parseInt` and `Math.exp`. A host or implementation may provide additional built-in functions that are not described in this specification.
method that is a built-in function
Standard built-in methods are defined in this specification, and an ECMAScript implementation may specify and provide other additional built-in methods.
+Standard built-in methods are defined in this specification. A host or implementation may provide additional built-in methods that are not described in this specification.
The Number type has exactly 18437736874454810627ℝ (that is,
The Number type has exactly 18437736874454810627ℝ (that is,
The bit pattern that might be observed in an ArrayBuffer (see
The abstract operation Number::exponentiate takes arguments _base_ (a Number) and _exponent_ (a Number). It returns an implementation-dependent approximation of the result of raising _base_ to the power _exponent_, subject to the following requirements:
+The abstract operation Number::exponentiate takes arguments _base_ (a Number) and _exponent_ (a Number). It returns an implementation-approximated value representing the result of raising _base_ to the power _exponent_, subject to the following requirements:
A Job is an Abstract Closure with no parameters that initiates an ECMAScript computation when no other ECMAScript computation is currently in progress.
-Jobs are scheduled for execution by ECMAScript host environments. This specification describes the host hook HostEnqueuePromiseJob to schedule one kind of job; host environments may define additional abstract operations which schedule jobs. Such operations accept a Job Abstract Closure as the parameter and schedule it to be performed at some future time. Their implementations must conform to the following requirements:
+Jobs are scheduled for execution by ECMAScript host environments. This specification describes the host hook HostEnqueuePromiseJob to schedule one kind of job; hosts may define additional abstract operations which schedule jobs. Such operations accept a Job Abstract Closure as the parameter and schedule it to be performed at some future time. Their implementations must conform to the following requirements:
The _realm_ parameter is passed through to hosts with no normative requirements; it is either *null* or a Realm.
The implementation of HostEnqueuePromiseJob must conform to the requirements in
An ECMAScript implementation may support the evaluation of function exotic objects whose evaluative behaviour is expressed in some implementation-defined form of executable code other than via ECMAScript code. Whether a function object is an ECMAScript code function or a non-ECMAScript function is not semantically observable from the perspective of an ECMAScript code function that calls or is called by such a non-ECMAScript function.
+An ECMAScript implementation may support the evaluation of function exotic objects whose evaluative behaviour is expressed in some host-defined form of executable code other than via ECMAScript code. Whether a function object is an ECMAScript code function or a non-ECMAScript function is not semantically observable from the perspective of an ECMAScript code function that calls or is called by such a non-ECMAScript function.
HostGetImportMetaProperties is an implementation-defined abstract operation that allows hosts to provide property keys and values for the object returned from `import.meta`.
+HostGetImportMetaProperties is a host-defined abstract operation that allows hosts to provide property keys and values for the object returned from `import.meta`.
The implementation of HostGetImportMetaProperties must conform to the following requirements:
HostFinalizeImportMeta is an implementation-defined abstract operation that allows hosts to perform any extraordinary operations to prepare the object returned from `import.meta`.
+HostFinalizeImportMeta is a host-defined abstract operation that allows hosts to perform any extraordinary operations to prepare the object returned from `import.meta`.
Most hosts will be able to simply define HostGetImportMetaProperties, and leave HostFinalizeImportMeta with its default behaviour. However, HostFinalizeImportMeta provides an "escape hatch" for hosts which need to directly manipulate the object before it is exposed to ECMAScript code.
@@ -18094,7 +18128,7 @@Hosts are not required to implement the algorithm in
ECMAScript implementations are not required to implement the algorithm in
The following is an informative definition of an ECMAScript generator function that conforms to these rules:
function* EnumerateObjectProperties(obj) {
@@ -22470,7 +22504,7 @@ ParseScript ( _sourceText_, _realm_, _hostDefined_ )
1. Assert: _sourceText_ is an ECMAScript source text (see clause ).
- 1. Parse _sourceText_ using |Script| as the goal symbol and analyse the parse result for any Early Error conditions. If the parse was successful and no early errors were found, let _body_ be the resulting parse tree. Otherwise, let _body_ be a List of one or more *SyntaxError* objects representing the parsing errors and/or early errors. Parsing and early error detection may be interweaved in an implementation-dependent manner. If more than one parsing error or early error is present, the number and ordering of error objects in the list is implementation-dependent, but at least one must be present.
+ 1. Parse _sourceText_ using |Script| as the goal symbol and analyse the parse result for any Early Error conditions. If the parse was successful and no early errors were found, let _body_ be the resulting parse tree. Otherwise, let _body_ be a List of one or more *SyntaxError* objects representing the parsing errors and/or early errors. Parsing and early error detection may be interweaved in an implementation-defined manner. If more than one parsing error or early error is present, the number and ordering of error objects in the list is implementation-defined, but at least one must be present.
1. If _body_ is a List of errors, return _body_.
1. Return Script Record { [[Realm]]: _realm_, [[Environment]]: *undefined*, [[ECMAScriptCode]]: _body_, [[HostDefined]]: _hostDefined_ }.
@@ -23829,7 +23863,7 @@ ParseModule ( _sourceText_, _realm_, _hostDefined_ )
The abstract operation ParseModule takes arguments _sourceText_ (ECMAScript source text), _realm_, and _hostDefined_. It creates a Source Text Module Record based upon the result of parsing _sourceText_ as a |Module|. It performs the following steps when called:
1. Assert: _sourceText_ is an ECMAScript source text (see clause ).
- 1. Parse _sourceText_ using |Module| as the goal symbol and analyse the parse result for any Early Error conditions. If the parse was successful and no early errors were found, let _body_ be the resulting parse tree. Otherwise, let _body_ be a List of one or more *SyntaxError* objects representing the parsing errors and/or early errors. Parsing and early error detection may be interweaved in an implementation-dependent manner. If more than one parsing error or early error is present, the number and ordering of error objects in the list is implementation-dependent, but at least one must be present.
+ 1. Parse _sourceText_ using |Module| as the goal symbol and analyse the parse result for any Early Error conditions. If the parse was successful and no early errors were found, let _body_ be the resulting parse tree. Otherwise, let _body_ be a List of one or more *SyntaxError* objects representing the parsing errors and/or early errors. Parsing and early error detection may be interweaved in an implementation-defined manner. If more than one parsing error or early error is present, the number and ordering of error objects in the list is implementation-defined, but at least one must be present.
1. If _body_ is a List of errors, return _body_.
1. Let _requestedModules_ be the ModuleRequests of _body_.
1. Let _importEntries_ be ImportEntries of _body_.
@@ -24027,7 +24061,7 @@ ExecuteModule ( ) Concrete Method
Runtime Semantics: HostResolveImportedModule ( _referencingScriptOrModule_, _specifier_ )
- HostResolveImportedModule is an implementation-defined abstract operation that provides the concrete Module Record subclass instance that corresponds to the |ModuleSpecifier| String, _specifier_, occurring within the context of the script or module represented by the Script Record or Module Record _referencingScriptOrModule_. _referencingScriptOrModule_ may also be *null*, if the resolution is being performed in the context of an `import()` expression, and there is no active script or module at that time.
+ HostResolveImportedModule is a host-defined abstract operation that provides the concrete Module Record subclass instance that corresponds to the |ModuleSpecifier| String, _specifier_, occurring within the context of the script or module represented by the Script Record or Module Record _referencingScriptOrModule_. _referencingScriptOrModule_ may also be *null*, if the resolution is being performed in the context of an `import()` expression, and there is no active script or module at that time.
An example of when _referencingScriptOrModule_ can be *null* is in a web browser host. There, if a user clicks on a control given by
@@ -24049,12 +24083,12 @@ Runtime Semantics: HostResolveImportedModule ( _referencingScriptOrModule_,
Each time this operation is called with a specific _referencingScriptOrModule_, _specifier_ pair as arguments it must return the same Module Record instance if it completes normally.
-
Multiple different _referencingScriptOrModule_, _specifier_ pairs may map to the same Module Record instance. The actual mapping semantic is implementation-defined but typically a normalization process is applied to _specifier_ as part of the mapping process. A typical normalization process would include actions such as alphabetic case folding and expansion of relative and abbreviated path specifiers.
+ Multiple different _referencingScriptOrModule_, _specifier_ pairs may map to the same Module Record instance. The actual mapping semantic is host-defined but typically a normalization process is applied to _specifier_ as part of the mapping process. A typical normalization process would include actions such as alphabetic case folding and expansion of relative and abbreviated path specifiers.
Runtime Semantics: HostImportModuleDynamically ( _referencingScriptOrModule_, _specifier_, _promiseCapability_ )
- HostImportModuleDynamically is an implementation-defined abstract operation that performs any necessary setup work in order to make available the module corresponding to the |ModuleSpecifier| String, _specifier_, occurring within the context of the script or module represented by the Script Record or Module Record _referencingScriptOrModule_. (_referencingScriptOrModule_ may also be *null*, if there is no active script or module when the `import()` expression occurs.) It then performs FinishDynamicImport to finish the dynamic import process.
+ HostImportModuleDynamically is a host-defined abstract operation that performs any necessary setup work in order to make available the module corresponding to the |ModuleSpecifier| String, _specifier_, occurring within the context of the script or module represented by the Script Record or Module Record _referencingScriptOrModule_. (_referencingScriptOrModule_ may also be *null*, if there is no active script or module when the `import()` expression occurs.) It then performs FinishDynamicImport to finish the dynamic import process.
The implementation of HostImportModuleDynamically must conform to the following requirements:
@@ -24094,7 +24128,7 @@ Runtime Semantics: HostImportModuleDynamically ( _referencingScriptOrModule_
-
The actual process performed is implementation-defined, but typically consists of performing whatever I/O operations are necessary to allow HostResolveImportedModule to synchronously retrieve the appropriate Module Record, and then calling its Evaluate concrete method. This might require performing similar normalization as HostResolveImportedModule does.
+ The actual process performed is host-defined, but typically consists of performing whatever I/O operations are necessary to allow HostResolveImportedModule to synchronously retrieve the appropriate Module Record, and then calling its Evaluate concrete method. This might require performing similar normalization as HostResolveImportedModule does.
@@ -24775,10 +24809,10 @@ Error Handling and Language Extensions
An implementation shall report all errors as specified, except for the following:
-
- Except as restricted in
, an implementation may extend |Script| syntax, |Module| syntax, and regular expression pattern or flag syntax. To permit this, all operations (such as calling `eval`, using a regular expression literal, or using the Function or RegExp constructor) that are allowed to throw *SyntaxError* are permitted to exhibit implementation-defined behaviour instead of throwing *SyntaxError* when they encounter an implementation-defined extension to the script syntax or regular expression pattern or flag syntax.
+ Except as restricted in , a host or implementation may extend |Script| syntax, |Module| syntax, and regular expression pattern or flag syntax. To permit this, all operations (such as calling `eval`, using a regular expression literal, or using the Function or RegExp constructor) that are allowed to throw *SyntaxError* are permitted to exhibit host-defined behaviour instead of throwing *SyntaxError* when they encounter a host-defined extension to the script syntax or regular expression pattern or flag syntax.
-
- Except as restricted in
, an implementation may provide additional types, values, objects, properties, and functions beyond those described in this specification. This may cause constructs (such as looking up a variable in the global scope) to have implementation-defined behaviour instead of throwing an error (such as *ReferenceError*).
+ Except as restricted in , a host or implementation may provide additional types, values, objects, properties, and functions beyond those described in this specification. This may cause constructs (such as looking up a variable in the global scope) to have host-defined behaviour instead of throwing an error (such as *ReferenceError*).
@@ -24856,7 +24890,7 @@ The Global Object
- is created before control enters any execution context.
- does not have a [[Construct]] internal method; it cannot be used as a constructor with the `new` operator.
- does not have a [[Call]] internal method; it cannot be invoked as a function.
- - has a [[Prototype]] internal slot whose value is implementation-dependent.
+ - has a [[Prototype]] internal slot whose value is host-defined.
- may have host defined properties in addition to the properties defined in this specification. This may include a property whose value is the global object itself.
@@ -24916,7 +24950,7 @@ Runtime Semantics: PerformEval ( _x_, _callerRealm_, _strictCaller_, _direct
1. Set _inFunction_ to *true*.
1. Set _inMethod_ to _thisEnvRec_.HasSuperBinding().
1. If _F_.[[ConstructorKind]] is ~derived~, set _inDerivedConstructor_ to *true*.
- 1. Perform the following substeps in an implementation-dependent order, possibly interleaving parsing and error detection:
+ 1. Perform the following substeps in an implementation-defined order, possibly interleaving parsing and error detection:
1. Let _script_ be the ECMAScript code that is the result of parsing ! UTF16DecodeString(_x_), for the goal symbol |Script|. If the parse fails, throw a *SyntaxError* exception. If any early errors are detected, throw a *SyntaxError* exception (but see also clause ).
1. If _script_ Contains |ScriptBody| is *false*, return *undefined*.
1. Let _body_ be the |ScriptBody| of _script_.
@@ -24958,7 +24992,7 @@ Runtime Semantics: PerformEval ( _x_, _callerRealm_, _strictCaller_, _direct
HostEnsureCanCompileStrings ( _callerRealm_, _calleeRealm_ )
- HostEnsureCanCompileStrings is an implementation-defined abstract operation that allows host environments to block certain ECMAScript functions which allow developers to compile strings into ECMAScript code.
+ HostEnsureCanCompileStrings is a host-defined abstract operation that allows host environments to block certain ECMAScript functions which allow developers to compile strings into ECMAScript code.
An implementation of HostEnsureCanCompileStrings may complete normally or abruptly. Any abrupt completions will be propagated to its callers. The default implementation of HostEnsureCanCompileStrings is to unconditionally return an empty normal completion.
@@ -25120,7 +25154,7 @@ parseInt ( _string_, _radix_ )
1. Set _R_ to 16.
1. If _S_ contains a code unit that is not a radix-_R_ digit, let _Z_ be the substring of _S_ consisting of all code units before the first such code unit; otherwise, let _Z_ be _S_.
1. If _Z_ is empty, return *NaN*.
- 1. Let _mathInt_ be the mathematical integer value that is represented by _Z_ in radix-_R_ notation, using the letters A-Z and a-z for digits with values 10 through 35. (However, if _R_ is 10 and _Z_ contains more than 20 significant digits, every significant digit after the 20th may be replaced by a 0 digit, at the option of the implementation; and if _R_ is not 2, 4, 8, 10, 16, or 32, then _mathInt_ may be an implementation-dependent approximation to the mathematical integer value that is represented by _Z_ in radix-_R_ notation.)
+ 1. Let _mathInt_ be the mathematical integer value that is represented by _Z_ in radix-_R_ notation, using the letters A-Z and a-z for digits with values 10 through 35. (However, if _R_ is 10 and _Z_ contains more than 20 significant digits, every significant digit after the 20th may be replaced by a 0 digit, at the option of the implementation; and if _R_ is not 2, 4, 8, 10, 16, or 32, then _mathInt_ may be an implementation-approximated value representing the mathematical integer value that is represented by _Z_ in radix-_R_ notation.)
1. If _mathInt_ = 0ℝ, then
1. If _sign_ = -1, return *-0*.
1. Return *+0*.
@@ -26225,7 +26259,7 @@ Runtime Semantics: CreateDynamicFunction ( _constructor_, _newTarget_, _kind
1. Let _prefix_ be the prefix associated with _kind_ in .
1. Let _sourceString_ be the string-concatenation of _prefix_, *" anonymous("*, _P_, 0x000A (LINE FEED), *") {"*, _bodyString_, and *"}"*.
1. Let _sourceText_ be ! UTF16DecodeString(_sourceString_).
- 1. Perform the following substeps in an implementation-dependent order, possibly interleaving parsing and error detection:
+ 1. Perform the following substeps in an implementation-defined order, possibly interleaving parsing and error detection:
1. Let _parameters_ be the result of parsing ! UTF16DecodeString(_P_), using _parameterGoal_ as the goal symbol. Throw a *SyntaxError* exception if the parse fails.
1. Let _body_ be the result of parsing ! UTF16DecodeString(_bodyString_), using _goal_ as the goal symbol. Throw a *SyntaxError* exception if the parse fails.
1. Let _strict_ be ContainsUseStrict of _body_.
@@ -26394,10 +26428,10 @@ Function.prototype.toString ( )
When the `toString` method is called, the following steps are taken:
1. Let _func_ be the *this* value.
- 1. If _func_ is a bound function exotic object or a built-in function object , then return an implementation-dependent String source code representation of _func_. The representation must have the syntax of a |NativeFunction|. Additionally, if _func_ is a Well-known Intrinsic Object and is not identified as an anonymous function, the portion of the returned String that would be matched by |PropertyName| must be the initial value of the *"name"* property of _func_.
+ 1. If _func_ is a bound function exotic object or a built-in function object , then return an implementation-defined String source code representation of _func_. The representation must have the syntax of a |NativeFunction|. Additionally, if _func_ is a Well-known Intrinsic Object and is not identified as an anonymous function, the portion of the returned String that would be matched by |PropertyName| must be the initial value of the *"name"* property of _func_.
1. If Type(_func_) is Object and _func_ has a [[SourceText]] internal slot and _func_.[[SourceText]] is a sequence of Unicode code points and ! HostHasSourceTextAvailable(_func_) is *true*, then
1. Return ! UTF16Encode(_func_.[[SourceText]]).
- 1. If Type(_func_) is Object and IsCallable(_func_) is *true*, then return an implementation-dependent String source code representation of _func_. The representation must have the syntax of a |NativeFunction|.
+ 1. If Type(_func_) is Object and IsCallable(_func_) is *true*, then return an implementation-defined String source code representation of _func_. The representation must have the syntax of a |NativeFunction|.
1. Throw a *TypeError* exception.
@@ -26457,9 +26491,9 @@ prototype
HostHasSourceTextAvailable is an implementation-defined abstract operation that allows host environments to prevent the source text from being provided for a given function.
+HostHasSourceTextAvailable is a host-defined abstract operation that allows host environments to prevent the source text from being provided for a given function.
An implementation of HostHasSourceTextAvailable must complete normally in all cases. This operation must be deterministic with respect to its parameters. Each time it is called with a specific _func_ as its argument, it must return the same completion record. The default implementation of HostHasSourceTextAvailable is to unconditionally return a normal completion with a value of *true*.
An ECMAScript implementation that includes the ECMA-402 Internationalization API must implement the `Number.prototype.toLocaleString` method as specified in the ECMA-402 specification. If an ECMAScript implementation does not include the ECMA-402 API the following specification of the `toLocaleString` method is used.
-Produces a String value that represents this Number value formatted according to the conventions of the host environment's current locale. This function is implementation-dependent, and it is permissible, but not encouraged, for it to return the same thing as `toString`.
+Produces a String value that represents this Number value formatted according to the conventions of the host environment's current locale. This function is implementation-defined, and it is permissible, but not encouraged, for it to return the same thing as `toString`.
The meanings of the optional parameters to this method are defined in the ECMA-402 specification; implementations that do not include ECMA-402 support must not use those parameter positions for anything else.
The `toString` function is not generic; it throws a *TypeError* exception if its *this* value is not a Number or a Number object. Therefore, it cannot be transferred to other kinds of objects for use as a method.
The *"length"* property of the `toString` method is 1.
@@ -27478,7 +27512,7 @@An ECMAScript implementation that includes the ECMA-402 Internationalization API must implement the `BigInt.prototype.toLocaleString` method as specified in the ECMA-402 specification. If an ECMAScript implementation does not include the ECMA-402 API the following specification of the `toLocaleString` method is used.
-Produces a String value that represents this BigInt value formatted according to the conventions of the host environment's current locale. This function is implementation-dependent, and it is permissible, but not encouraged, for it to return the same thing as `toString`.
+Produces a String value that represents this BigInt value formatted according to the conventions of the host environment's current locale. This function is implementation-defined, and it is permissible, but not encouraged, for it to return the same thing as `toString`.
The meanings of the optional parameters to this method are defined in the ECMA-402 specification; implementations that do not include ECMA-402 support must not use those parameter positions for anything else.
The `toString` function is not generic; it throws a *TypeError* exception if its *this* value is not a BigInt or a BigInt object. Therefore, it cannot be transferred to other kinds of objects for use as a method.
@@ -27624,7 +27658,7 @@Returns an implementation-dependent approximation to the arc cosine of _x_. The result is expressed in radians and ranges from *+0* to +π.
+Returns an implementation-approximated value representing the result of the arc cosine of _x_. The result is expressed in radians and ranges from *+0* to +π.
Returns an implementation-dependent approximation to the inverse hyperbolic cosine of _x_.
+Returns an implementation-approximated value representing the result of the inverse hyperbolic cosine of _x_.
Returns an implementation-dependent approximation to the arc sine of _x_. The result is expressed in radians and ranges from -π / 2 to +π / 2.
+Returns an implementation-approximated value representing the result of the arc sine of _x_. The result is expressed in radians and ranges from -π / 2 to +π / 2.
Returns an implementation-dependent approximation to the inverse hyperbolic sine of _x_.
+Returns an implementation-approximated value representing the result of the inverse hyperbolic sine of _x_.
Returns an implementation-dependent approximation to the arc tangent of _x_. The result is expressed in radians and ranges from -π / 2 to +π / 2.
+Returns an implementation-approximated value representing the result of the arc tangent of _x_. The result is expressed in radians and ranges from -π / 2 to +π / 2.
Returns an implementation-dependent approximation to the inverse hyperbolic tangent of _x_.
+Returns an implementation-approximated value representing the result of the inverse hyperbolic tangent of _x_.
Returns an implementation-dependent approximation to the arc tangent of the quotient
Returns an implementation-approximated value representing the result of the arc tangent of the quotient
Returns an implementation-dependent approximation to the cube root of _x_.
+Returns an implementation-approximated value representing the result of the cube root of _x_.
Returns an implementation-dependent approximation to the cosine of _x_. The argument is expressed in radians.
+Returns an implementation-approximated value representing the result of the cosine of _x_. The argument is expressed in radians.
Returns an implementation-dependent approximation to the hyperbolic cosine of _x_.
+Returns an implementation-approximated value representing the result of the hyperbolic cosine of _x_.
Returns an implementation-dependent approximation to the exponential function of _x_ (_e_ raised to the power of _x_, where _e_ is the base of the natural logarithms).
+Returns an implementation-approximated value representing the result of the exponential function of _x_ (_e_ raised to the power of _x_, where _e_ is the base of the natural logarithms).
Returns an implementation-dependent approximation to subtracting 1 from the exponential function of _x_ (_e_ raised to the power of _x_, where _e_ is the base of the natural logarithms). The result is computed in a way that is accurate even when the value of x is close 0.
+Returns an implementation-approximated value representing the result of subtracting 1 from the exponential function of _x_ (_e_ raised to the power of _x_, where _e_ is the base of the natural logarithms). The result is computed in a way that is accurate even when the value of x is close 0.
`Math.hypot` returns an implementation-dependent approximation of the square root of the sum of squares of its arguments.
+`Math.hypot` returns an implementation-approximated value representing the result of the square root of the sum of squares of its arguments.
Returns an implementation-dependent approximation to the natural logarithm of _x_.
+Returns an implementation-approximated value representing the result of the natural logarithm of _x_.
Returns an implementation-dependent approximation to the natural logarithm of 1 + _x_. The result is computed in a way that is accurate even when the value of x is close to zero.
+Returns an implementation-approximated value representing the result of the natural logarithm of 1 + _x_. The result is computed in a way that is accurate even when the value of x is close to zero.
Returns an implementation-dependent approximation to the base 10 logarithm of _x_.
+Returns an implementation-approximated value representing the result of the base 10 logarithm of _x_.
Returns an implementation-dependent approximation to the base 2 logarithm of _x_.
+Returns an implementation-approximated value representing the result of the base 2 logarithm of _x_.
Returns a Number value with positive sign, greater than or equal to 0 but less than 1, chosen randomly or pseudo randomly with approximately uniform distribution over that range, using an implementation-dependent algorithm or strategy. This function takes no arguments.
+Returns a Number value with positive sign, greater than or equal to 0 but less than 1, chosen randomly or pseudo randomly with approximately uniform distribution over that range, using an implementation-defined algorithm or strategy. This function takes no arguments.
Each `Math.random` function created for distinct realms must produce a distinct sequence of values from successive calls.
Returns an implementation-dependent approximation to the sine of _x_. The argument is expressed in radians.
+Returns an implementation-approximated value representing the result of the sine of _x_. The argument is expressed in radians.
Returns an implementation-dependent approximation to the hyperbolic sine of _x_.
+Returns an implementation-approximated value representing the result of the hyperbolic sine of _x_.
Returns an implementation-dependent approximation to the square root of _x_.
+Returns an implementation-approximated value representing the result of the square root of _x_.
Returns an implementation-dependent approximation to the tangent of _x_. The argument is expressed in radians.
+Returns an implementation-approximated value representing the result of the tangent of _x_. The argument is expressed in radians.
Returns an implementation-dependent approximation to the hyperbolic tangent of _x_.
+Returns an implementation-approximated value representing the result of the hyperbolic tangent of _x_.
Date.parse(x.toLocaleString())
- is not required to produce the same Number value as the preceding three expressions and, in general, the value produced by `Date.parse` is implementation-dependent when given any String value that does not conform to the Date Time String Format (
is not required to produce the same Number value as the preceding three expressions and, in general, the value produced by `Date.parse` is implementation-defined when given any String value that does not conform to the Date Time String Format (
An ECMAScript implementation that includes the ECMA-402 Internationalization API must implement the `Date.prototype.toLocaleDateString` method as specified in the ECMA-402 specification. If an ECMAScript implementation does not include the ECMA-402 API the following specification of the `toLocaleDateString` method is used.
-This function returns a String value. The contents of the String are implementation-dependent, but are intended to represent the “date” portion of the Date in the current time zone in a convenient, human-readable form that corresponds to the conventions of the host environment's current locale.
+This function returns a String value. The contents of the String are implementation-defined, but are intended to represent the “date” portion of the Date in the current time zone in a convenient, human-readable form that corresponds to the conventions of the host environment's current locale.
The meaning of the optional parameters to this method are defined in the ECMA-402 specification; implementations that do not include ECMA-402 support must not use those parameter positions for anything else.
An ECMAScript implementation that includes the ECMA-402 Internationalization API must implement the `Date.prototype.toLocaleString` method as specified in the ECMA-402 specification. If an ECMAScript implementation does not include the ECMA-402 API the following specification of the `toLocaleString` method is used.
-This function returns a String value. The contents of the String are implementation-dependent, but are intended to represent the Date in the current time zone in a convenient, human-readable form that corresponds to the conventions of the host environment's current locale.
+This function returns a String value. The contents of the String are implementation-defined, but are intended to represent the Date in the current time zone in a convenient, human-readable form that corresponds to the conventions of the host environment's current locale.
The meaning of the optional parameters to this method are defined in the ECMA-402 specification; implementations that do not include ECMA-402 support must not use those parameter positions for anything else.
An ECMAScript implementation that includes the ECMA-402 Internationalization API must implement the `Date.prototype.toLocaleTimeString` method as specified in the ECMA-402 specification. If an ECMAScript implementation does not include the ECMA-402 API the following specification of the `toLocaleTimeString` method is used.
-This function returns a String value. The contents of the String are implementation-dependent, but are intended to represent the “time” portion of the Date in the current time zone in a convenient, human-readable form that corresponds to the conventions of the host environment's current locale.
+This function returns a String value. The contents of the String are implementation-defined, but are intended to represent the “time” portion of the Date in the current time zone in a convenient, human-readable form that corresponds to the conventions of the host environment's current locale.
The meaning of the optional parameters to this method are defined in the ECMA-402 specification; implementations that do not include ECMA-402 support must not use those parameter positions for anything else.
A Pattern evaluates (“compiles”) to an Abstract Closure value. RegExpBuiltinExec can then apply this procedure to a String and an offset within the String to determine whether the pattern would match starting at exactly that offset within the String, and, if it does match, what the values of the capturing parentheses would be. The algorithms in
A Pattern evaluates (“compiles”) to an Abstract Closure value. RegExpBuiltinExec can then apply this procedure to a String and an offset within the String to determine whether the pattern would match starting at exactly that offset within the String, and, if it does match, what the values of the capturing parentheses would be. The algorithms in
The following steps are taken:
Detaching an ArrayBuffer instance disassociates the Data Block used as its backing store from the instance and sets the byte length of the buffer to 0. No operations defined by this specification use the DetachArrayBuffer abstract operation. However, an ECMAScript implementation or host environment may define such operations.
+Detaching an ArrayBuffer instance disassociates the Data Block used as its backing store from the instance and sets the byte length of the buffer to 0. No operations defined by this specification use the DetachArrayBuffer abstract operation. However, an ECMAScript host or implementation may define such operations.
HostPromiseRejectionTracker is an implementation-defined abstract operation that allows host environments to track promise rejections.
+HostPromiseRejectionTracker is a host-defined abstract operation that allows host environments to track promise rejections.
An implementation of HostPromiseRejectionTracker must complete normally in all cases. The default implementation of HostPromiseRejectionTracker is to unconditionally return an empty normal completion.
@@ -42102,7 +42136,7 @@The ECMAScript language syntax and semantics defined in this annex are required when the ECMAScript host is a web browser. The content of this annex is normative but optional if the ECMAScript host is not a web browser.
This annex describes various legacy features and other characteristics of web browser based ECMAScript implementations. All of the language features and behaviours specified in this annex have one or more undesirable characteristics and in the absence of legacy usage would be removed from this specification. However, the usage of these features by large numbers of existing web pages means that web browsers must continue to support them. The specifications in this annex define the requirements for interoperable implementations of these legacy features.
+This annex describes various legacy features and other characteristics of web browser ECMAScript hosts. All of the language features and behaviours specified in this annex have one or more undesirable characteristics and in the absence of legacy usage would be removed from this specification. However, the usage of these features by large numbers of existing web pages means that web browsers must continue to support them. The specifications in this annex define the requirements for interoperable implementations of these legacy features.
These features are not considered part of the core ECMAScript language. Programmers should not use or assume the existence of these features and behaviours when writing new ECMAScript code. ECMAScript implementations are discouraged from implementing these features unless the implementation is part of a web browser or is required to run the same legacy ECMAScript code that web browsers encounter.
An [[IsHTMLDDA]] internal slot may exist on implementation-defined objects. Objects with an [[IsHTMLDDA]] internal slot behave like *undefined* in the
An [[IsHTMLDDA]] internal slot may exist on host-defined objects. Objects with an [[IsHTMLDDA]] internal slot behave like *undefined* in the
Objects with an [[IsHTMLDDA]] internal slot are never created by this specification. However, the document.all
object in web browsers is a host-created exotic object with this slot that exists for web compatibility purposes. There are no other known examples of this type of object and implementations should not create any with the exception of `document.all`.
Objects with an [[IsHTMLDDA]] internal slot are never created by this specification. However, the document.all
object in web browsers is a host-defined exotic object with this slot that exists for web compatibility purposes. There are no other known examples of this type of object and implementations should not create any with the exception of `document.all`.
See
HostEnqueuePromiseJob(...)
+HostEnsureCanCompileStrings(...)
+HostFinalizeImportMeta(...)
+HostGetImportMetaProperties(...)
+HostHasSourceTextAvailable(...)
+HostImportModuleDynamically(...)
+HostPromiseRejectionTracker(...)
+HostResolveImportedModule(...)
+InitializeHostDefinedRealm(...)
+[[HostDefined]] on Realm Records: See
[[HostDefined]] on Script Records: See
[[HostDefined]] on Module Records: See
[[HostSynchronizesWith]] on Candidate Executions: See
[[IsHTMLDDA]]: See
The global object: See clause
Preparation steps before, and cleanup steps after, invocation of Job Abstract Closures. See
Any of the essential internal methods in
Any built-in objects and methods not defined within this specification, except as restricted in