?
u
m
/
The ECMAScript language syntax and semantics defined in this annex are required when the ECMAScript
This annex describes various legacy features and other characteristics of web browser ECMAScript
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.
The syntax and semantics of
Similar to a
The syntax of
This alternative pattern grammar and semantics only changes the syntax and semantics of BMP patterns. The following grammar extensions include productions parameterized with the [UnicodeMode] parameter. However, none of these extensions change the syntax of Unicode patterns recognized when parsing with the [UnicodeMode] parameter present on the
When the same left-hand sides occurs with both [+UnicodeMode] and [~UnicodeMode] guards it is to control the disambiguation priority.
The semantics of
Additionally, the rules for the following productions are modified with the addition of the highlighted text:
The semantics of
The semantics of
The semantics of
Within the rule for
The rule for
The rule for
The rule for
\
U+005C (REVERSE SOLIDUS).The semantics of
The following two rules replace the corresponding rules of
In addition, the following rules are added to
\
U+005C (REVERSE SOLIDUS).\c
within a character class where it is not followed by an acceptable control character.The abstract operation CharacterRangeOrUnion takes arguments A (a CharSet) and B (a CharSet) and returns a CharSet. It performs the following steps when called:
-
U+002D (HYPHEN-MINUS).When the ECMAScript
The entries in
Intrinsic Name | Global Name | ECMAScript Language Association |
---|---|---|
|
escape
|
The escape function ( |
|
unescape
|
The unescape function ( |
The escape
function is a property of the
For those code units being replaced whose value is 0x00FF
or less, a two-digit escape sequence of the form %xx
is used. For those characters being replaced whose code unit value is greater than 0x00FF
, a four-digit escape sequence of the form %uxxxx
is used.
The escape
function is the %escape% intrinsic object. When the escape
function is called with one argument string, the following steps are taken:
The encoding is partly based on the encoding described in RFC 1738, but the entire encoding specified in this standard is described above without regard to the contents of RFC 1738. This encoding does not reflect changes to RFC 1738 made by RFC 3986.
The unescape
function is a property of the escape
function is replaced with the code unit that it represents.
The unescape
function is the %unescape% intrinsic object. When the unescape
function is called with one argument string, the following steps are taken:
The substr
method takes two arguments, start and length, and returns a
The substr
function is intentionally generic; it does not require that its
When the anchor
method is called with argument name, the following steps are taken:
The abstract operation CreateHTML takes arguments string, tag (a String), attribute (a String), and value and returns either a
When the big
method is called with no arguments, the following steps are taken:
When the blink
method is called with no arguments, the following steps are taken:
When the bold
method is called with no arguments, the following steps are taken:
When the fixed
method is called with no arguments, the following steps are taken:
When the fontcolor
method is called with argument color, the following steps are taken:
When the fontsize
method is called with argument size, the following steps are taken:
When the italics
method is called with no arguments, the following steps are taken:
When the link
method is called with argument url, the following steps are taken:
When the small
method is called with no arguments, the following steps are taken:
When the strike
method is called with no arguments, the following steps are taken:
When the sub
method is called with no arguments, the following steps are taken:
When the sup
method is called with no arguments, the following steps are taken:
The property
The initial value of the
The property
The initial value of the
The getFullYear
method is preferred for nearly all purposes, because it avoids the “year 2000 problem.”
When the getYear
method is called with no arguments, the following steps are taken:
The setFullYear
method is preferred for nearly all purposes, because it avoids the “year 2000 problem.”
When the setYear
method is called with one argument year, the following steps are taken:
The toUTCString
method is preferred. The toGMTString
method is provided principally for compatibility with old code.
The initial value of the
When the compile
method is called with arguments pattern and flags, the following steps are taken:
The compile
method completely reinitializes the
Prior to ECMAScript 2015, the specification of
The
Prior to ECMAScript 2015, the ECMAScript specification did not define the occurrence of a
A function is declared and only referenced within a single block.
var
declaration occurs within the function code of g.
A function is declared and possibly used within a single
var
declaration occurs within the function code of g.
A function is declared and possibly used within a single block but also referenced within subsequent blocks.
var
declaration occurs within the function code of g.
The first use case is interoperable with the semantics of
ECMAScript 2015 interoperability for the second and third use cases requires the following extensions to the clause
If an ECMAScript implementation has a mechanism for reporting diagnostic warning messages, a warning should be produced when code contains a
During
During
During
The rules for the following production in
switch
Statement Static Semantics: Early ErrorsThe rules for the following production in
During
During
The following augments the
This production only applies when parsing
The content of subclause
The var
declarations that bind a name that is also bound by the var
declarations will assign to the corresponding catch parameter rather than the var
binding.
This modified behaviour also applies to var
and function
declarations introduced by
Step
Step
The following augments the
This production only applies when parsing
The
The
The
The
The
The
The
An [[IsHTMLDDA]] internal slot may exist on typeof
operator
Objects with an [[IsHTMLDDA]] internal slot are never created by this specification. However, the document.all
object in web browsers is a document.all
.
The result column in
During
typeof
OperatorThe following step replaces step typeof