Annex B (normative) Additional ECMAScript Features for Web Browsers
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.
B.1 Additional Syntax
B.1.1 HTML-like Comments
The syntax and semantics of
Syntax
Similar to a
B.1.2 Regular Expressions Patterns
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
Syntax
When the same left-hand sides occurs with both [+UnicodeMode] and [~UnicodeMode] guards it is to control the disambiguation priority.
B.1.2.1 Static Semantics: Early Errors
The semantics of
- It is a Syntax Error if any source text is matched by this production.
Additionally, the rules for the following productions are modified with the addition of the highlighted text:
-
It is a Syntax Error if
IsCharacterClass of the firstClassAtom istrue orIsCharacterClass of the secondClassAtom istrue and this production has a [UnicodeMode] parameter. -
It is a Syntax Error if
IsCharacterClass of the firstClassAtom isfalse ,IsCharacterClass of the secondClassAtom isfalse , and theCharacterValue of the firstClassAtom is strictly greater than theCharacterValue of the secondClassAtom .
-
It is a Syntax Error if
IsCharacterClass ofClassAtomNoDash istrue orIsCharacterClass ofClassAtom istrue and this production has a [UnicodeMode] parameter. -
It is a Syntax Error if
IsCharacterClass ofClassAtomNoDash isfalse ,IsCharacterClass ofClassAtom isfalse , and theCharacterValue ofClassAtomNoDash is strictly greater than theCharacterValue ofClassAtom .
B.1.2.2 Static Semantics: CountLeftCapturingParensWithin and CountLeftCapturingParensBefore
In the definitions of
B.1.2.3 Static Semantics: IsCharacterClass
The semantics of
- Return
false .
B.1.2.4 Static Semantics: CharacterValue
The semantics of
- Return the numeric value of U+005C (REVERSE SOLIDUS).
- Let ch be the code point matched by
ClassControlLetter . - Let i be the numeric value of ch.
- Return the remainder of dividing i by 32.
- Return the MV of
LegacyOctalEscapeSequence (see12.9.4.3 ).
B.1.2.5 Runtime Semantics: CompileSubpattern
The semantics of
The rule for
The rule for
The rule for
B.1.2.6 Runtime Semantics: CompileAssertion
B.1.2.7 Runtime Semantics: CompileAtom
- Let A be the
CharSet containing the single character\U+005C (REVERSE SOLIDUS). - Return
CharacterSetMatcher (rer, A,false , direction).
- Let ch be the character represented by
ExtendedPatternCharacter . - Let A be a one-element
CharSet containing the character ch. - Return
CharacterSetMatcher (rer, A,false , direction).
B.1.2.8 Runtime Semantics: CompileToCharSet
The semantics of
The following two rules replace the corresponding rules of
- Let A be
CompileToCharSet of the firstClassAtom with argument rer. - Let B be
CompileToCharSet of the secondClassAtom with argument rer. - Let C be
CompileToCharSet ofClassRanges with argument rer. - Let D be CharacterRangeOrUnion(rer, A, B).
- Return the union of D and C.
- Let A be
CompileToCharSet ofClassAtomNoDash with argument rer. - Let B be
CompileToCharSet ofClassAtom with argument rer. - Let C be
CompileToCharSet ofClassRanges with argument rer. - Let D be CharacterRangeOrUnion(rer, A, B).
- Return the union of D and C.
In addition, the following rules are added to
- Let cv be the
CharacterValue of thisClassEscape . - Let c be the character whose character value is cv.
- Return the
CharSet containing the single character c.
- Return the
CharSet containing the single character\U+005C (REVERSE SOLIDUS).
\c within a character class where it is not followed by an acceptable control character.B.1.2.8.1 CharacterRangeOrUnion ( rer, A, B )
The abstract operation CharacterRangeOrUnion takes arguments rer (a
- If rer.[[Unicode]] is
false , then - Return
CharacterRange (A, B).
B.1.2.9 Static Semantics: ParsePattern ( patternText, u )
The semantics of
The abstract operation
- If u is
true , then - Else,
- Return parseResult.
B.2 Additional Built-in Properties
When the ECMAScript
B.2.1 Additional Properties of the Global Object
The entries in
| Intrinsic Name | Global Name | ECMAScript Language Association |
|---|---|---|
|
|
escape
|
The escape function ( |
|
|
unescape
|
The unescape function ( |
B.2.1.1 escape ( string )
This function is a property of the
When replacing a code unit of numeric value less than or equal to 0x00FF, a two-digit escape sequence of the form %xx is used. When replacing a code unit of numeric value strictly greater than 0x00FF, a four-digit escape sequence of the form %uxxxx is used.
It is the
It performs the following steps when called:
- Set string to ?
ToString (string). - Let len be the length of string.
- Let R be the empty String.
- Let unescapedSet be the
string-concatenation ofthe ASCII word characters and"@*+-./" . - Let k be 0.
- Repeat, while k < len,
- Let C be the code unit at index k within string.
- If unescapedSet contains C, then
- Let S be C.
- Else,
- Let n be the numeric value of C.
- If n < 256, then
- Let hex be the String representation of n, formatted as an uppercase hexadecimal number.
- Let S be the
string-concatenation of"%" and !StringPad (hex,2 𝔽,"0" ,start ).
- Else,
- Let hex be the String representation of n, formatted as an uppercase hexadecimal number.
- Let S be the
string-concatenation of"%u" and !StringPad (hex,4 𝔽,"0" ,start ).
- Set R to the
string-concatenation of R and S. - Set k to k + 1.
- Return R.
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.
B.2.1.2 unescape ( string )
This function is a property of the escape function is replaced with the code unit that it represents.
It is the
It performs the following steps when called:
- Set string to ?
ToString (string). - Let len be the length of string.
- Let R be the empty String.
- Let k be 0.
- Repeat, while k < len,
- Let C be the code unit at index k within string.
- If C is the code unit 0x0025 (PERCENT SIGN), then
- Let hexDigits be the empty String.
- Let optionalAdvance be 0.
- If k + 5 < len and the code unit at index k + 1 within string is the code unit 0x0075 (LATIN SMALL LETTER U), then
- Set hexDigits to the
substring of string from k + 2 to k + 6. - Set optionalAdvance to 5.
- Set hexDigits to the
- Else if k + 3 ≤ len, then
- Set hexDigits to the
substring of string from k + 1 to k + 3. - Set optionalAdvance to 2.
- Set hexDigits to the
- Let parseResult be
ParseText (StringToCodePoints (hexDigits),HexDigits ).[~Sep] - If parseResult is a
Parse Node , then- Let n be the MV of parseResult.
- Set C to the code unit whose numeric value is n.
- Set k to k + optionalAdvance.
- Set R to the
string-concatenation of R and C. - Set k to k + 1.
- Return R.
B.2.2 Additional Properties of the String.prototype Object
B.2.2.1 String.prototype.substr ( start, length )
This method returns a
It performs the following steps when called:
- Let O be ?
RequireObjectCoercible (this value). - Let S be ?
ToString (O). - Let size be the length of S.
- Let intStart be ?
ToIntegerOrInfinity (start). - If intStart = -∞, set intStart to 0.
- Else if intStart < 0, set intStart to
max (size + intStart, 0). - Else, set intStart to
min (intStart, size). - If length is
undefined , let intLength be size; otherwise let intLength be ?ToIntegerOrInfinity (length). - Set intLength to the result of
clamping intLength between 0 and size. - Let intEnd be
min (intStart + intLength, size). - Return the
substring of S from intStart to intEnd.
This method is intentionally generic; it does not require that its
B.2.2.2 String.prototype.anchor ( name )
This method performs the following steps when called:
- Let S be the
this value. - Return ? CreateHTML(S,
"a" ,"name" , name).
B.2.2.2.1 CreateHTML ( string, tag, attribute, value )
The abstract operation CreateHTML takes arguments string (an
- Let str be ?
RequireObjectCoercible (string). - Let S be ?
ToString (str). - Let p1 be the
string-concatenation of"<" and tag. - If attribute is not the empty String, then
- Let V be ?
ToString (value). - Let escapedV be the String value that is the same as V except that each occurrence of the code unit 0x0022 (QUOTATION MARK) in V has been replaced with the six code unit sequence
""" . - Set p1 to the
string-concatenation of:- p1
- the code unit 0x0020 (SPACE)
- attribute
- the code unit 0x003D (EQUALS SIGN)
- the code unit 0x0022 (QUOTATION MARK)
- escapedV
- the code unit 0x0022 (QUOTATION MARK)
- Let V be ?
- Let p2 be the
string-concatenation of p1 and">" . - Let p3 be the
string-concatenation of p2 and S. - Let p4 be the
string-concatenation of p3,"</" , tag, and">" . - Return p4.
B.2.2.3 String.prototype.big ( )
This method performs the following steps when called:
- Let S be the
this value. - Return ? CreateHTML(S,
"big" ,"" ,"" ).
B.2.2.4 String.prototype.blink ( )
This method performs the following steps when called:
- Let S be the
this value. - Return ? CreateHTML(S,
"blink" ,"" ,"" ).
B.2.2.5 String.prototype.bold ( )
This method performs the following steps when called:
- Let S be the
this value. - Return ? CreateHTML(S,
"b" ,"" ,"" ).
B.2.2.6 String.prototype.fixed ( )
This method performs the following steps when called:
- Let S be the
this value. - Return ? CreateHTML(S,
"tt" ,"" ,"" ).
B.2.2.7 String.prototype.fontcolor ( color )
This method performs the following steps when called:
- Let S be the
this value. - Return ? CreateHTML(S,
"font" ,"color" , color).
B.2.2.8 String.prototype.fontsize ( size )
This method performs the following steps when called:
- Let S be the
this value. - Return ? CreateHTML(S,
"font" ,"size" , size).
B.2.2.9 String.prototype.italics ( )
This method performs the following steps when called:
- Let S be the
this value. - Return ? CreateHTML(S,
"i" ,"" ,"" ).
B.2.2.10 String.prototype.link ( url )
This method performs the following steps when called:
- Let S be the
this value. - Return ? CreateHTML(S,
"a" ,"href" , url).
B.2.2.11 String.prototype.small ( )
This method performs the following steps when called:
- Let S be the
this value. - Return ? CreateHTML(S,
"small" ,"" ,"" ).
B.2.2.12 String.prototype.strike ( )
This method performs the following steps when called:
- Let S be the
this value. - Return ? CreateHTML(S,
"strike" ,"" ,"" ).
B.2.2.13 String.prototype.sub ( )
This method performs the following steps when called:
- Let S be the
this value. - Return ? CreateHTML(S,
"sub" ,"" ,"" ).
B.2.2.14 String.prototype.sup ( )
This method performs the following steps when called:
- Let S be the
this value. - Return ? CreateHTML(S,
"sup" ,"" ,"" ).
B.2.2.15 String.prototype.trimLeft ( )
The property
The initial value of the
B.2.2.16 String.prototype.trimRight ( )
The property
The initial value of the
B.2.3 Additional Properties of the Date.prototype Object
B.2.3.1 Date.prototype.getYear ( )
The getFullYear method is preferred for nearly all purposes, because it avoids the “year 2000 problem.”
This method performs the following steps when called:
- Let t be ?
thisTimeValue (this value). - If t is
NaN , returnNaN . - Return
YearFromTime (LocalTime (t)) -1900 𝔽.
B.2.3.2 Date.prototype.setYear ( year )
The setFullYear method is preferred for nearly all purposes, because it avoids the “year 2000 problem.”
This method performs the following steps when called:
- Let t be ?
thisTimeValue (this value). - Let y be ?
ToNumber (year). - If t is
NaN , set t to+0 𝔽; otherwise, set t toLocalTime (t). - If y is
NaN , then- Set the [[DateValue]] internal slot of
this Date object toNaN . - Return
NaN .
- Set the [[DateValue]] internal slot of
- Let yi be !
ToIntegerOrInfinity (y). - If 0 ≤ yi ≤ 99, let yyyy be
1900 𝔽 +𝔽 (yi). - Else, let yyyy be y.
- Let d be
MakeDay (yyyy,MonthFromTime (t), DateFromTime(t)). - Let date be
UTC (MakeDate (d,TimeWithinDay (t))). - Set the [[DateValue]] internal slot of
this Date object toTimeClip (date). - Return the value of the [[DateValue]] internal slot of
this Date object .
B.2.3.3 Date.prototype.toGMTString ( )
The toUTCString method is preferred. This method is provided principally for compatibility with old code.
The initial value of the
B.2.4 Additional Properties of the RegExp.prototype Object
B.2.4.1 RegExp.prototype.compile ( pattern, flags )
This method performs the following steps when called:
- Let O be the
this value. - Perform ?
RequireInternalSlot (O, [[RegExpMatcher]]). - If pattern
is an Object and pattern has a [[RegExpMatcher]] internal slot, then- If flags is not
undefined , throw aTypeError exception. - Let P be pattern.[[OriginalSource]].
- Let F be pattern.[[OriginalFlags]].
- If flags is not
- Else,
- Let P be pattern.
- Let F be flags.
- Return ?
RegExpInitialize (O, P, F).
This method completely reinitializes the
B.3 Other Additional Features
B.3.1 Labelled Function Declarations
Prior to ECMAScript 2015, the specification of
-
It is a Syntax Error if any source text that is
strict mode code is matched by this production.
The
B.3.2 Block-Level Function Declarations Web Legacy Compatibility Semantics
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.
-
One or more
FunctionDeclaration s whoseBindingIdentifier is the name f occur within the function code of an enclosing function g and that declaration is nested within aBlock . -
No other declaration of f that is not a
vardeclaration occurs within the function code of g. -
All occurrences of f as an
IdentifierReference are within theStatementList of theBlock containing the declaration of f.
-
One or more
-
A function is declared and possibly used within a single
Block but also referenced by an inner function definition that is not contained within that sameBlock .-
One or more
FunctionDeclaration s whoseBindingIdentifier is the name f occur within the function code of an enclosing function g and that declaration is nested within aBlock . -
No other declaration of f that is not a
vardeclaration occurs within the function code of g. -
There may be occurrences of f as an
IdentifierReference within theStatementList of theBlock containing the declaration of f. -
There is at least one occurrence of f as an
IdentifierReference within another function h that is nested within g and no other declaration of f shadows the references to f from within h. - All invocations of h occur after the declaration of f has been evaluated.
-
One or more
-
A function is declared and possibly used within a single block but also referenced within subsequent blocks.
-
One or more
FunctionDeclaration whoseBindingIdentifier is the name f occur within the function code of an enclosing function g and that declaration is nested within aBlock . -
No other declaration of f that is not a
vardeclaration occurs within the function code of g. -
There may be occurrences of f as an
IdentifierReference within theStatementList of theBlock containing the declaration of f. -
There is at least one occurrence of f as an
IdentifierReference within the function code of g that lexically follows theBlock containing the declaration of f.
-
One or more
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
B.3.2.1 Changes to FunctionDeclarationInstantiation
During
- If strict is
false , then- For each
FunctionDeclaration f that is directly contained in theStatementList of aBlock ,CaseClause , orDefaultClause , do- Let F be
StringValue of theBindingIdentifier of f. - If replacing the
FunctionDeclaration f with aVariableStatement that has F as aBindingIdentifier would not produce any Early Errors for func and parameterNames does not contain F, then- NOTE: A var binding for F is only instantiated here if it is neither a VarDeclaredName, the name of a formal parameter, or another
FunctionDeclaration . - If initializedBindings does not contain F and F is not
"arguments" , then- Perform ! varEnv.CreateMutableBinding(F,
false ). - Perform ! varEnv.InitializeBinding(F,
undefined ). - Append F to instantiatedVarNames.
- Perform ! varEnv.CreateMutableBinding(F,
- When the
FunctionDeclaration f is evaluated, perform the following steps in place of theFunctionDeclaration Evaluation algorithm provided in15.2.6 :- Let fenv be the
running execution context 's VariableEnvironment. - Let benv be the
running execution context 's LexicalEnvironment. - Let fobj be ! benv.GetBindingValue(F,
false ). - Perform ! fenv.SetMutableBinding(F, fobj,
false ). - Return
unused .
- Let fenv be the
- NOTE: A var binding for F is only instantiated here if it is neither a VarDeclaredName, the name of a formal parameter, or another
- Let F be
- For each
B.3.2.2 Changes to GlobalDeclarationInstantiation
During
- Perform the following steps:
- Let strict be
IsStrict of script. - If strict is
false , then- Let declaredFunctionOrVarNames be the
list-concatenation of declaredFunctionNames and declaredVarNames. - For each
FunctionDeclaration f that is directly contained in theStatementList of aBlock ,CaseClause , orDefaultClause Contained within script, do- Let F be
StringValue of theBindingIdentifier of f. - If replacing the
FunctionDeclaration f with aVariableStatement that has F as aBindingIdentifier would not produce any Early Errors for script, then- If env.HasLexicalDeclaration(F) is
false , then- Let fnDefinable be ? env.CanDeclareGlobalVar(F).
- If fnDefinable is
true , then- NOTE: A var binding for F is only instantiated here if it is neither a VarDeclaredName nor the name of another
FunctionDeclaration . - If declaredFunctionOrVarNames does not contain F, then
- Perform ? env.CreateGlobalVarBinding(F,
false ). - Append F to declaredFunctionOrVarNames.
- Perform ? env.CreateGlobalVarBinding(F,
- When the
FunctionDeclaration f is evaluated, perform the following steps in place of theFunctionDeclaration Evaluation algorithm provided in15.2.6 :- Let genv be the
running execution context 's VariableEnvironment. - Let benv be the
running execution context 's LexicalEnvironment. - Let fobj be ! benv.GetBindingValue(F,
false ). - Perform ?
genv.SetMutableBinding (F, fobj,false ). - Return
unused .
- Let genv be the
- NOTE: A var binding for F is only instantiated here if it is neither a VarDeclaredName nor the name of another
- If env.HasLexicalDeclaration(F) is
- Let F be
- Let declaredFunctionOrVarNames be the
- Let strict be
B.3.2.3 Changes to EvalDeclarationInstantiation
During
- If strict is
false , then- Let declaredFunctionOrVarNames be the
list-concatenation of declaredFunctionNames and declaredVarNames. - For each
FunctionDeclaration f that is directly contained in theStatementList of aBlock ,CaseClause , orDefaultClause Contained within body, do- Let F be
StringValue of theBindingIdentifier of f. - If replacing the
FunctionDeclaration f with aVariableStatement that has F as aBindingIdentifier would not produce any Early Errors for body, then- Let bindingExists be
false . - Let thisEnv be lexEnv.
Assert : The following loop will terminate.- Repeat, while thisEnv is not varEnv,
- If thisEnv
is not an Object Environment Record , then- If ! thisEnv.HasBinding(F) is
true , then- Let bindingExists be
true .
- Let bindingExists be
- If ! thisEnv.HasBinding(F) is
- Set thisEnv to thisEnv.[[OuterEnv]].
- If thisEnv
- If bindingExists is
false and varEnv is aGlobal Environment Record , then- If varEnv.HasLexicalDeclaration(F) is
false , then- Let fnDefinable be ? varEnv.CanDeclareGlobalVar(F).
- Else,
- Let fnDefinable be
false .
- Let fnDefinable be
- If varEnv.HasLexicalDeclaration(F) is
- Else,
- Let fnDefinable be
true .
- Let fnDefinable be
- If bindingExists is
false and fnDefinable istrue , then- If declaredFunctionOrVarNames does not contain F, then
- If varEnv is a
Global Environment Record , then- Perform ? varEnv.CreateGlobalVarBinding(F,
true ).
- Perform ? varEnv.CreateGlobalVarBinding(F,
- Else,
- Let bindingExists be ! varEnv.HasBinding(F).
- If bindingExists is
false , then- Perform ! varEnv.CreateMutableBinding(F,
true ). - Perform ! varEnv.InitializeBinding(F,
undefined ).
- Perform ! varEnv.CreateMutableBinding(F,
- Append F to declaredFunctionOrVarNames.
- If varEnv is a
- When the
FunctionDeclaration f is evaluated, perform the following steps in place of theFunctionDeclaration Evaluation algorithm provided in15.2.6 :- Let genv be the
running execution context 's VariableEnvironment. - Let benv be the
running execution context 's LexicalEnvironment. - Let fobj be ! benv.GetBindingValue(F,
false ). - Perform ?
genv.SetMutableBinding (F, fobj,false ). - Return
unused .
- Let genv be the
- If declaredFunctionOrVarNames does not contain F, then
- Let bindingExists be
- Let F be
- Let declaredFunctionOrVarNames be the
B.3.2.4 Changes to Block Static Semantics: Early Errors
The rules for the following production in
-
It is a Syntax Error if the
LexicallyDeclaredNames ofStatementList contains any duplicate entries, unless thesource text matched by this production is notstrict mode code and the duplicate entries are only bound by FunctionDeclarations. -
It is a Syntax Error if any element of the
LexicallyDeclaredNames ofStatementList also occurs in theVarDeclaredNames ofStatementList .
B.3.2.5 Changes to switch Statement Static Semantics: Early Errors
The rules for the following production in
-
It is a Syntax Error if the
LexicallyDeclaredNames ofCaseBlock contains any duplicate entries, unless thesource text matched by this production is notstrict mode code and the duplicate entries are only bound by FunctionDeclarations. -
It is a Syntax Error if any element of the
LexicallyDeclaredNames ofCaseBlock also occurs in theVarDeclaredNames ofCaseBlock .
B.3.2.6 Changes to BlockDeclarationInstantiation
During
- If ! env.HasBinding(dn) is
false , then- Perform ! env.CreateMutableBinding(dn,
false ).
- Perform ! env.CreateMutableBinding(dn,
During
- Perform the following steps:
- If the binding for fn in env is an uninitialized binding, then
- Perform ! env.InitializeBinding(fn, fo).
- Else,
Assert : d is aFunctionDeclaration .- Perform ! env.SetMutableBinding(fn, fo,
false ).
- If the binding for fn in env is an uninitialized binding, then
B.3.3 FunctionDeclarations in IfStatement Statement Clauses
The following augments the
This production only applies when parsing
B.3.4 VariableStatements in Catch Blocks
The content of subclause
-
It is a Syntax Error if
BoundNames ofCatchParameter contains any duplicate elements. -
It is a Syntax Error if any element of the
BoundNames ofCatchParameter also occurs in theLexicallyDeclaredNames ofBlock . -
It is a Syntax Error if any element of the
BoundNames ofCatchParameter also occurs in theVarDeclaredNames ofBlock unlessCatchParameter is .CatchParameter : BindingIdentifier
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
- If thisEnv is not the
Environment Record for aCatch clause, throw aSyntaxError exception.
Step
- If thisEnv is not the
Environment Record for aCatch clause, let bindingExists betrue .
B.3.5 Initializers in ForIn Statement Heads
The following augments the
This production only applies when parsing
The
- Return
ContainsDuplicateLabels ofStatement with argument labelSet.
The
- Return
ContainsUndefinedBreakTarget ofStatement with argument labelSet.
The
- Return
ContainsUndefinedContinueTarget ofStatement with arguments iterationSet and « ».
The
- Return
false .
The
- Let names1 be the
BoundNames ofBindingIdentifier . - Let names2 be the
VarDeclaredNames ofStatement . - Return the
list-concatenation of names1 and names2.
The
- Let declarations1 be «
BindingIdentifier ». - Let declarations2 be the
VarScopedDeclarations ofStatement . - Return the
list-concatenation of declarations1 and declarations2.
The
- Let bindingId be
StringValue ofBindingIdentifier . - Let lhs be ?
ResolveBinding (bindingId). - If
IsAnonymousFunctionDefinition (Initializer ) istrue , then- Let value be ?
NamedEvaluation ofInitializer with argument bindingId.
- Let value be ?
- Else,
- Let rhs be ?
Evaluation ofInitializer . - Let value be ?
GetValue (rhs).
- Let rhs be ?
- Perform ?
PutValue (lhs, value). - Let keyResult be ? ForIn/OfHeadEvaluation(« »,
Expression ,enumerate ). - Return ? ForIn/OfBodyEvaluation(
BindingIdentifier ,Statement , keyResult,enumerate ,varBinding , labelSet).
B.3.6 The [[IsHTMLDDA]] Internal Slot
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.
B.3.6.1 Changes to ToBoolean
The following step replaces step
- If argument
is an Object and argument has an [[IsHTMLDDA]] internal slot, returnfalse .
B.3.6.2 Changes to IsLooselyEqual
The following steps replace step
- Perform the following steps:
- If x
is an Object , x has an [[IsHTMLDDA]] internal slot, and y is eithernull orundefined , returntrue . - If x is either
null orundefined , yis an Object , and y has an [[IsHTMLDDA]] internal slot, returntrue .
- If x
B.3.6.3 Changes to the typeof Operator
The following step replaces step typeof
- If val has an [[IsHTMLDDA]] internal slot, return
"undefined" .
B.3.7 Non-default behaviour in HostMakeJobCallback
The
B.3.8 Non-default behaviour in HostEnsureCanAddPrivateElement
The