?
u
m
/
The global object:
new
operator.The initial value of the
This property has the attributes { [[Writable]]:
The value of Infinity
is
The value of NaN
is
The value of undefined
is
The eval
function is the %eval% intrinsic object. When the eval
function is called with one argument x, the following steps are taken:
The abstract operation PerformEval takes arguments x, callerRealm, strictCaller, and direct and returns either a
eval
function.The eval code cannot instantiate variable or function bindings in the variable environment of the calling context that invoked the eval if either the code of the calling context or the eval code is let
, const
, or class
declarations are always instantiated in a new LexicalEnvironment.
The
An implementation of HostEnsureCanCompileStrings must conform to the following requirements:
The default implementation of HostEnsureCanCompileStrings is to return
The abstract operation EvalDeclarationInstantiation takes arguments body, varEnv, lexEnv, privateEnv, and strict and returns either a
eval
will not create a global var declaration that would be shadowed by a global lexical declaration.An alternative version of this algorithm is described in
The isFinite
function is the %isFinite% intrinsic object. When the isFinite
function is called with one argument number, the following steps are taken:
The isNaN
function is the %isNaN% intrinsic object. When the isNaN
function is called with one argument number, the following steps are taken:
A reliable way for ECMAScript code to test if a value X
is a X !== X
. The result will be X
is a
The parseFloat
function produces a
The parseFloat
function is the %parseFloat% intrinsic object. When the parseFloat
function is called with one argument string, the following steps are taken:
parseFloat
may interpret only a leading portion of string as a
The parseInt
function produces an 0x
or 0X
, in which case a radix of 16 is assumed. If radix is 16, the number may also optionally begin with the code unit pairs 0x
or 0X
.
The parseInt
function is the %parseInt% intrinsic object. When the parseInt
function is called, the following steps are taken:
Uniform Resource Identifiers, or URIs, are Strings that identify resources (e.g. web pages or files) and transport protocols by which to access them (e.g. HTTP or FTP) on the Internet. The ECMAScript language itself does not provide any support for using URIs except for functions that encode and decode URIs as described in
Many implementations of ECMAScript provide additional functions and methods that manipulate web pages; these functions are beyond the scope of this standard.
A URI is composed of a sequence of components separated by component separators. The general form is:
:
First /
Second ;
Third ?
Fourth
where the italicized names represent components and “:
”, “/
”, “;
” and “?
” are reserved for use as separators. The encodeURI
and decodeURI
functions are intended to work with complete URIs; they assume that any reserved code units in the URI are intended to have special meaning and so are not encoded. The encodeURIComponent
and decodeURIComponent
functions are intended to work with the individual component parts of a URI; they assume that any reserved code units represent text and so must be encoded so that they are not interpreted as reserved code units when the component is part of a complete URI.
The following lexical grammar specifies the form of encoded URIs.
The above syntax is based upon RFC 2396 and does not reflect changes introduced by the more recent RFC 3986.
When a code unit to be included in a URI is not listed above or is not intended to have the special meaning sometimes given to the reserved code units, that code unit must be encoded. The code unit is transformed into its UTF-8 encoding, with
The abstract operation Encode takes arguments string (a String) and unescapedSet (a String) and returns either a
The abstract operation Decode takes arguments string (a String) and reservedSet (a String) and returns either a
This syntax of Uniform Resource Identifiers is based upon RFC 2396 and does not reflect the more recent RFC 3986 which replaces RFC 2396. A formal description and implementation of UTF-8 is given in RFC 3629.
RFC 3629 prohibits the decoding of invalid UTF-8 octet sequences. For example, the invalid sequence C0 80 must not decode into the code unit 0x0000. Implementations of the Decode algorithm are required to throw a
The decodeURI
function computes a new version of a URI in which each escape sequence and UTF-8 encoding of the sort that might be introduced by the encodeURI
function is replaced with the UTF-16 encoding of the code points that it represents. Escape sequences that could not have been introduced by encodeURI
are not replaced.
The decodeURI
function is the %decodeURI% intrinsic object. When the decodeURI
function is called with one argument encodedURI, the following steps are taken:
The code point #
is not decoded from escape sequences even though it is not a reserved URI code point.
The decodeURIComponent
function computes a new version of a URI in which each escape sequence and UTF-8 encoding of the sort that might be introduced by the encodeURIComponent
function is replaced with the UTF-16 encoding of the code points that it represents.
The decodeURIComponent
function is the %decodeURIComponent% intrinsic object. When the decodeURIComponent
function is called with one argument encodedURIComponent, the following steps are taken:
The encodeURI
function computes a new version of a UTF-16 encoded (
The encodeURI
function is the %encodeURI% intrinsic object. When the encodeURI
function is called with one argument uri, the following steps are taken:
The code point #
is not encoded to an escape sequence even though it is not a reserved or unescaped URI code point.
The encodeURIComponent
function computes a new version of a UTF-16 encoded (
The encodeURIComponent
function is the %encodeURIComponent% intrinsic object. When the encodeURIComponent
function is called with one argument uriComponent, the following steps are taken:
See
See
See
See
See
See
See
See
See
See
See
See
See
See
See
See
See
See
See
See
See
See
See
See
See
See
See
See
See
See
See
See
See
See
See
See
See
See
See
See
See
See
See
See