mirror of
https://github.com/bendtherules/ask262.git
synced 2026-08-18 21:31:46 +00:00
52 lines
35 KiB
HTML
52 lines
35 KiB
HTML
<!DOCTYPE html><html lang="en-GB-oxendict"><head><meta name="viewport" content="width=device-width, initial-scale=1"><meta charset="utf-8"><meta property="og:image" content="https://tc39.es/ecmarkup/ecma-logo.png"><meta property="og:title" content="ECMAScript® 2026 Language Specification"><meta property="og:description" content="Introduction
|
|
This Ecma Standard defines the ECMAScript 2026 Language. It is the seventeenth edition of the ECMAScript Language Specification. ECMAScript is based on several originating technologies, the most well-known being JavaScript (Netscape) and JScript (Microsoft). The language was invent">
|
|
<link rel="icon" href="../img/favicon.ico">
|
|
<link rel="stylesheet" href="../assets/css/ecmarkup.css"><link rel="stylesheet" href="../assets/css/print.css" media="print">
|
|
|
|
<title>ECMAScript® 2026 Language Specification</title><script src="../assets/js/multipage.js?cache=Wu2V1pj2" defer=""></script><script src="../assets/js/ecmarkup.js?cache=BPFBckdu" defer=""></script><link rel="canonical" href="../#sec-additions-and-changes-that-introduce-incompatibilities-with-prior-editions"></head>
|
|
<body><div id="spec-container"><emu-annex id="sec-additions-and-changes-that-introduce-incompatibilities-with-prior-editions">
|
|
<h1><span class="secnum">Annex F <span class="annex-kind">(informative)</span></span> Additions and Changes That Introduce Incompatibilities with Prior Editions</h1>
|
|
<p><emu-xref href="#sec-reference-record-specification-type" id="_ref_949"><a href="ecmascript-data-types-and-values.html#sec-reference-record-specification-type">6.2.5</a></emu-xref>: In ECMAScript 2015, Function calls are not allowed to return a <emu-xref href="#sec-reference-record-specification-type" id="_ref_17318"><a href="ecmascript-data-types-and-values.html#sec-reference-record-specification-type">Reference Record</a></emu-xref>.</p>
|
|
<p><emu-xref href="#sec-tonumber-applied-to-the-string-type" id="_ref_950"><a href="abstract-operations.html#sec-tonumber-applied-to-the-string-type">7.1.4.1</a></emu-xref>: In ECMAScript 2015, <emu-xref aoid="ToNumber" id="_ref_17319"><a href="abstract-operations.html#sec-tonumber">ToNumber</a></emu-xref> applied to a String value now recognizes and converts <emu-nt id="_ref_24895"><a href="ecmascript-language-lexical-grammar.html#prod-BinaryIntegerLiteral">BinaryIntegerLiteral</a></emu-nt> and <emu-nt id="_ref_24896"><a href="ecmascript-language-lexical-grammar.html#prod-OctalIntegerLiteral">OctalIntegerLiteral</a></emu-nt> numeric strings. In previous editions such strings were converted to <emu-val>NaN</emu-val>.</p>
|
|
<p><emu-xref href="#sec-code-realms" id="_ref_951"><a href="executable-code-and-execution-contexts.html#sec-code-realms">9.3</a></emu-xref>: In ECMAScript 2018, Template objects are canonicalized based on <emu-xref href="#sec-syntactic-grammar" id="_ref_17320"><a href="notational-conventions.html#sec-syntactic-grammar">Parse Node</a></emu-xref> (source location), instead of across all occurrences of that template literal or tagged template in a <emu-xref href="#realm" id="_ref_17321"><a href="executable-code-and-execution-contexts.html#realm">Realm</a></emu-xref> in previous editions.</p>
|
|
<p><emu-xref href="#sec-white-space" id="_ref_952"><a href="ecmascript-language-lexical-grammar.html#sec-white-space">12.2</a></emu-xref>: In ECMAScript 2016, Unicode 8.0.0 or higher is mandated, as opposed to ECMAScript 2015 which mandated Unicode 5.1. In particular, this caused U+180E MONGOLIAN VOWEL SEPARATOR, which was in the <code>Space_Separator</code> (<code>Zs</code>) category and thus treated as whitespace in ECMAScript 2015, to be moved to the <code>Format</code> (<code>Cf</code>) category (as of Unicode 6.3.0). This causes whitespace-sensitive methods to behave differently. For example, <code>"\u180E".trim().length</code> was <code>0</code> in previous editions, but <code>1</code> in ECMAScript 2016 and later. Additionally, ECMAScript 2017 mandated always using the latest version of the Unicode Standard.</p>
|
|
<p><emu-xref href="#sec-names-and-keywords" id="_ref_953"><a href="ecmascript-language-lexical-grammar.html#sec-names-and-keywords">12.7</a></emu-xref>: In ECMAScript 2015, the valid code points for an <emu-nt id="_ref_24897"><a href="ecmascript-language-lexical-grammar.html#prod-IdentifierName">IdentifierName</a></emu-nt> are specified in terms of the Unicode properties “ID_Start” and “ID_Continue”. In previous editions, the valid <emu-nt id="_ref_24898"><a href="ecmascript-language-lexical-grammar.html#prod-IdentifierName">IdentifierName</a></emu-nt> or <emu-nt id="_ref_24899"><a href="ecmascript-language-expressions.html#prod-Identifier">Identifier</a></emu-nt> code points were specified by enumerating various Unicode code point categories.</p>
|
|
<p><emu-xref href="#sec-rules-of-automatic-semicolon-insertion" id="_ref_954"><a href="ecmascript-language-lexical-grammar.html#sec-rules-of-automatic-semicolon-insertion">12.10.1</a></emu-xref>: In ECMAScript 2015, Automatic Semicolon Insertion adds a semicolon at the end of a do-while statement if the semicolon is missing. This change aligns the specification with the actual behaviour of most existing implementations.</p>
|
|
<p><emu-xref href="#sec-object-initializer-static-semantics-early-errors" id="_ref_955"><a href="ecmascript-language-expressions.html#sec-object-initializer-static-semantics-early-errors">13.2.5.1</a></emu-xref>: In ECMAScript 2015, it is no longer an <emu-xref href="#early-error" id="_ref_17322"><a href="error-handling-and-language-extensions.html#early-error">early error</a></emu-xref> to have duplicate <emu-xref href="#property-name" id="_ref_17323"><a href="ecmascript-data-types-and-values.html#property-name">property names</a></emu-xref> in Object Initializers.</p>
|
|
<p><emu-xref href="#sec-assignment-operators-static-semantics-early-errors" id="_ref_956"><a href="ecmascript-language-expressions.html#sec-assignment-operators-static-semantics-early-errors">13.15.1</a></emu-xref>: In ECMAScript 2015, <emu-xref href="#sec-strict-mode-code" id="_ref_17324"><a href="ecmascript-language-source-code.html#sec-strict-mode-code">strict mode code</a></emu-xref> containing an assignment to an immutable binding such as the function name of a <emu-nt id="_ref_24900"><a href="ecmascript-language-functions-and-classes.html#prod-FunctionExpression">FunctionExpression</a></emu-nt> does not produce an <emu-xref href="#early-error" id="_ref_17325"><a href="error-handling-and-language-extensions.html#early-error">early error</a></emu-xref>. Instead it produces a runtime error.</p>
|
|
<p><emu-xref href="#sec-block" id="_ref_957"><a href="ecmascript-language-statements-and-declarations.html#sec-block">14.2</a></emu-xref>: In ECMAScript 2015, a <emu-nt id="_ref_24901"><a href="ecmascript-language-statements-and-declarations.html#prod-StatementList">StatementList</a></emu-nt> beginning with the token let followed by the input elements <emu-nt id="_ref_24902"><a href="ecmascript-language-lexical-grammar.html#prod-LineTerminator">LineTerminator</a></emu-nt> then <emu-nt id="_ref_24903"><a href="ecmascript-language-expressions.html#prod-Identifier">Identifier</a></emu-nt> is the start of a <emu-nt id="_ref_24904"><a href="ecmascript-language-statements-and-declarations.html#prod-LexicalDeclaration">LexicalDeclaration</a></emu-nt>. In previous editions, automatic semicolon insertion would always insert a semicolon before the <emu-nt id="_ref_24905"><a href="ecmascript-language-expressions.html#prod-Identifier">Identifier</a></emu-nt> input element.</p>
|
|
<p><emu-xref href="#sec-expression-statement" id="_ref_958"><a href="ecmascript-language-statements-and-declarations.html#sec-expression-statement">14.5</a></emu-xref>: In ECMAScript 2015, a <emu-nt id="_ref_24906"><a href="ecmascript-language-statements-and-declarations.html#prod-StatementListItem">StatementListItem</a></emu-nt> beginning with the token <code>let</code> followed by the token <code>[</code> is the start of a <emu-nt id="_ref_24907"><a href="ecmascript-language-statements-and-declarations.html#prod-LexicalDeclaration">LexicalDeclaration</a></emu-nt>. In previous editions such a sequence would be the start of an <emu-nt id="_ref_24908"><a href="ecmascript-language-statements-and-declarations.html#prod-ExpressionStatement">ExpressionStatement</a></emu-nt>.</p>
|
|
<p><emu-xref href="#sec-if-statement-runtime-semantics-evaluation" id="_ref_959"><a href="ecmascript-language-statements-and-declarations.html#sec-if-statement-runtime-semantics-evaluation">14.6.2</a></emu-xref>: In ECMAScript 2015, the normal result of an <emu-nt id="_ref_24909"><a href="ecmascript-language-statements-and-declarations.html#prod-IfStatement">IfStatement</a></emu-nt> is never the value <emu-const>empty</emu-const>. If no <emu-nt id="_ref_24910"><a href="ecmascript-language-statements-and-declarations.html#prod-Statement">Statement</a></emu-nt> part is evaluated or if the evaluated <emu-nt id="_ref_24911"><a href="ecmascript-language-statements-and-declarations.html#prod-Statement">Statement</a></emu-nt> part produces a <emu-xref href="#sec-completion-record-specification-type" id="_ref_17326"><a href="ecmascript-data-types-and-values.html#sec-completion-record-specification-type">normal completion containing</a></emu-xref> <emu-const>empty</emu-const>, the result of the <emu-nt id="_ref_24912"><a href="ecmascript-language-statements-and-declarations.html#prod-IfStatement">IfStatement</a></emu-nt> is <emu-val>undefined</emu-val>.</p>
|
|
<p><emu-xref href="#sec-iteration-statements" id="_ref_960"><a href="ecmascript-language-statements-and-declarations.html#sec-iteration-statements">14.7</a></emu-xref>: In ECMAScript 2015, if the <code>(</code> token of a for statement is immediately followed by the token sequence <code>let [</code> then the <code>let</code> is treated as the start of a <emu-nt id="_ref_24913"><a href="ecmascript-language-statements-and-declarations.html#prod-LexicalDeclaration">LexicalDeclaration</a></emu-nt>. In previous editions such a token sequence would be the start of an <emu-nt id="_ref_24914"><a href="ecmascript-language-expressions.html#prod-Expression">Expression</a></emu-nt>.</p>
|
|
<p><emu-xref href="#sec-iteration-statements" id="_ref_961"><a href="ecmascript-language-statements-and-declarations.html#sec-iteration-statements">14.7</a></emu-xref>: In ECMAScript 2015, if the ( token of a for-in statement is immediately followed by the token sequence <code>let [</code> then the <code>let</code> is treated as the start of a <emu-nt id="_ref_24915"><a href="ecmascript-language-statements-and-declarations.html#prod-ForDeclaration">ForDeclaration</a></emu-nt>. In previous editions such a token sequence would be the start of an <emu-nt id="_ref_24916"><a href="ecmascript-language-expressions.html#prod-LeftHandSideExpression">LeftHandSideExpression</a></emu-nt>.</p>
|
|
<p><emu-xref href="#sec-iteration-statements" id="_ref_962"><a href="ecmascript-language-statements-and-declarations.html#sec-iteration-statements">14.7</a></emu-xref>: Prior to ECMAScript 2015, an initialization expression could appear as part of the <emu-nt id="_ref_24917"><a href="ecmascript-language-statements-and-declarations.html#prod-VariableDeclaration">VariableDeclaration</a></emu-nt> that precedes the <code>in</code> <emu-xref href="#sec-keywords-and-reserved-words" id="_ref_17327"><a href="ecmascript-language-lexical-grammar.html#sec-keywords-and-reserved-words">keyword</a></emu-xref>. In ECMAScript 2015, the <emu-nt id="_ref_24918"><a href="ecmascript-language-statements-and-declarations.html#prod-ForBinding">ForBinding</a></emu-nt> in that same position does not allow the occurrence of such an initializer. In ECMAScript 2017, such an initializer is permitted only in <emu-xref href="#non-strict-code" id="_ref_17328"><a href="ecmascript-language-source-code.html#non-strict-code">non-strict code</a></emu-xref>.</p>
|
|
<p><emu-xref href="#sec-iteration-statements" id="_ref_963"><a href="ecmascript-language-statements-and-declarations.html#sec-iteration-statements">14.7</a></emu-xref>: In ECMAScript 2015, the result of evaluating an <emu-nt id="_ref_24919"><a href="ecmascript-language-statements-and-declarations.html#prod-IterationStatement">IterationStatement</a></emu-nt> is never a <emu-xref href="#sec-completion-record-specification-type" id="_ref_17329"><a href="ecmascript-data-types-and-values.html#sec-completion-record-specification-type">normal completion</a></emu-xref> whose <var class="field">[[Value]]</var> is <emu-const>empty</emu-const>. If the <emu-nt id="_ref_24920"><a href="ecmascript-language-statements-and-declarations.html#prod-Statement">Statement</a></emu-nt> part of an <emu-nt id="_ref_24921"><a href="ecmascript-language-statements-and-declarations.html#prod-IterationStatement">IterationStatement</a></emu-nt> is not evaluated or if the final evaluation of the <emu-nt id="_ref_24922"><a href="ecmascript-language-statements-and-declarations.html#prod-Statement">Statement</a></emu-nt> part produces a <emu-xref href="#sec-completion-record-specification-type" id="_ref_17330"><a href="ecmascript-data-types-and-values.html#sec-completion-record-specification-type">normal completion</a></emu-xref> whose <var class="field">[[Value]]</var> is <emu-const>empty</emu-const>, the result of evaluating the <emu-nt id="_ref_24923"><a href="ecmascript-language-statements-and-declarations.html#prod-IterationStatement">IterationStatement</a></emu-nt> is a <emu-xref href="#sec-completion-record-specification-type" id="_ref_17331"><a href="ecmascript-data-types-and-values.html#sec-completion-record-specification-type">normal completion</a></emu-xref> whose <var class="field">[[Value]]</var> is <emu-val>undefined</emu-val>.</p>
|
|
<p><emu-xref href="#sec-with-statement-runtime-semantics-evaluation" id="_ref_964"><a href="ecmascript-language-statements-and-declarations.html#sec-with-statement-runtime-semantics-evaluation">14.11.2</a></emu-xref>: In ECMAScript 2015, the result of evaluating a <emu-nt id="_ref_24924"><a href="ecmascript-language-statements-and-declarations.html#prod-WithStatement">WithStatement</a></emu-nt> is never a <emu-xref href="#sec-completion-record-specification-type" id="_ref_17332"><a href="ecmascript-data-types-and-values.html#sec-completion-record-specification-type">normal completion</a></emu-xref> whose <var class="field">[[Value]]</var> is <emu-const>empty</emu-const>. If evaluation of the <emu-nt id="_ref_24925"><a href="ecmascript-language-statements-and-declarations.html#prod-Statement">Statement</a></emu-nt> part of a <emu-nt id="_ref_24926"><a href="ecmascript-language-statements-and-declarations.html#prod-WithStatement">WithStatement</a></emu-nt> produces a <emu-xref href="#sec-completion-record-specification-type" id="_ref_17333"><a href="ecmascript-data-types-and-values.html#sec-completion-record-specification-type">normal completion</a></emu-xref> whose <var class="field">[[Value]]</var> is <emu-const>empty</emu-const>, the result of evaluating the <emu-nt id="_ref_24927"><a href="ecmascript-language-statements-and-declarations.html#prod-WithStatement">WithStatement</a></emu-nt> is a <emu-xref href="#sec-completion-record-specification-type" id="_ref_17334"><a href="ecmascript-data-types-and-values.html#sec-completion-record-specification-type">normal completion</a></emu-xref> whose <var class="field">[[Value]]</var> is <emu-val>undefined</emu-val>.</p>
|
|
<p><emu-xref href="#sec-switch-statement-runtime-semantics-evaluation" id="_ref_965"><a href="ecmascript-language-statements-and-declarations.html#sec-switch-statement-runtime-semantics-evaluation">14.12.4</a></emu-xref>: In ECMAScript 2015, the result of evaluating a <emu-nt id="_ref_24928"><a href="ecmascript-language-statements-and-declarations.html#prod-SwitchStatement">SwitchStatement</a></emu-nt> is never a <emu-xref href="#sec-completion-record-specification-type" id="_ref_17335"><a href="ecmascript-data-types-and-values.html#sec-completion-record-specification-type">normal completion</a></emu-xref> whose <var class="field">[[Value]]</var> is <emu-const>empty</emu-const>. If evaluation of the <emu-nt id="_ref_24929"><a href="ecmascript-language-statements-and-declarations.html#prod-CaseBlock">CaseBlock</a></emu-nt> part of a <emu-nt id="_ref_24930"><a href="ecmascript-language-statements-and-declarations.html#prod-SwitchStatement">SwitchStatement</a></emu-nt> produces a <emu-xref href="#sec-completion-record-specification-type" id="_ref_17336"><a href="ecmascript-data-types-and-values.html#sec-completion-record-specification-type">normal completion</a></emu-xref> whose <var class="field">[[Value]]</var> is <emu-const>empty</emu-const>, the result of evaluating the <emu-nt id="_ref_24931"><a href="ecmascript-language-statements-and-declarations.html#prod-SwitchStatement">SwitchStatement</a></emu-nt> is a <emu-xref href="#sec-completion-record-specification-type" id="_ref_17337"><a href="ecmascript-data-types-and-values.html#sec-completion-record-specification-type">normal completion</a></emu-xref> whose <var class="field">[[Value]]</var> is <emu-val>undefined</emu-val>.</p>
|
|
<p><emu-xref href="#sec-try-statement" id="_ref_966"><a href="ecmascript-language-statements-and-declarations.html#sec-try-statement">14.15</a></emu-xref>: In ECMAScript 2015, it is an <emu-xref href="#early-error" id="_ref_17338"><a href="error-handling-and-language-extensions.html#early-error">early error</a></emu-xref> for a <emu-nt id="_ref_24932"><a href="ecmascript-language-statements-and-declarations.html#prod-Catch">Catch</a></emu-nt> clause to contain a <code>var</code> declaration for the same <emu-nt id="_ref_24933"><a href="ecmascript-language-expressions.html#prod-Identifier">Identifier</a></emu-nt> that appears as the <emu-nt id="_ref_24934"><a href="ecmascript-language-statements-and-declarations.html#prod-Catch">Catch</a></emu-nt> clause parameter. In previous editions, such a variable declaration would be instantiated in the enclosing variable environment but the declaration's <emu-nt id="_ref_24935"><a href="ecmascript-language-expressions.html#prod-Initializer">Initializer</a></emu-nt> value would be assigned to the <emu-nt id="_ref_24936"><a href="ecmascript-language-statements-and-declarations.html#prod-Catch">Catch</a></emu-nt> parameter.</p>
|
|
<p><emu-xref href="#sec-try-statement" id="_ref_967"><a href="ecmascript-language-statements-and-declarations.html#sec-try-statement">14.15</a></emu-xref>, <emu-xref href="#sec-evaldeclarationinstantiation" id="_ref_968"><a href="global-object.html#sec-evaldeclarationinstantiation">19.2.1.3</a></emu-xref>: In ECMAScript 2015, a runtime <emu-val>SyntaxError</emu-val> is thrown if a <emu-nt id="_ref_24937"><a href="ecmascript-language-statements-and-declarations.html#prod-Catch">Catch</a></emu-nt> clause evaluates a non-strict direct <code>eval</code> whose eval code includes a <code>var</code> or <code>FunctionDeclaration</code> declaration that binds the same <emu-nt id="_ref_24938"><a href="ecmascript-language-expressions.html#prod-Identifier">Identifier</a></emu-nt> that appears as the <emu-nt id="_ref_24939"><a href="ecmascript-language-statements-and-declarations.html#prod-Catch">Catch</a></emu-nt> clause parameter.</p>
|
|
<p><emu-xref href="#sec-try-statement-runtime-semantics-evaluation" id="_ref_969"><a href="ecmascript-language-statements-and-declarations.html#sec-try-statement-runtime-semantics-evaluation">14.15.3</a></emu-xref>: In ECMAScript 2015, the result of a <emu-nt id="_ref_24940"><a href="ecmascript-language-statements-and-declarations.html#prod-TryStatement">TryStatement</a></emu-nt> is never the value <emu-const>empty</emu-const>. If the <emu-nt id="_ref_24941"><a href="ecmascript-language-statements-and-declarations.html#prod-Block">Block</a></emu-nt> part of a <emu-nt id="_ref_24942"><a href="ecmascript-language-statements-and-declarations.html#prod-TryStatement">TryStatement</a></emu-nt> evaluates to a <emu-xref href="#sec-completion-record-specification-type" id="_ref_17339"><a href="ecmascript-data-types-and-values.html#sec-completion-record-specification-type">normal completion containing</a></emu-xref> <emu-const>empty</emu-const>, the result of the <emu-nt id="_ref_24943"><a href="ecmascript-language-statements-and-declarations.html#prod-TryStatement">TryStatement</a></emu-nt> is <emu-val>undefined</emu-val>. If the <emu-nt id="_ref_24944"><a href="ecmascript-language-statements-and-declarations.html#prod-Block">Block</a></emu-nt> part of a <emu-nt id="_ref_24945"><a href="ecmascript-language-statements-and-declarations.html#prod-TryStatement">TryStatement</a></emu-nt> evaluates to a <emu-xref href="#sec-completion-record-specification-type" id="_ref_17340"><a href="ecmascript-data-types-and-values.html#sec-completion-record-specification-type">throw completion</a></emu-xref> and it has a <emu-nt id="_ref_24946"><a href="ecmascript-language-statements-and-declarations.html#prod-Catch">Catch</a></emu-nt> part that evaluates to a <emu-xref href="#sec-completion-record-specification-type" id="_ref_17341"><a href="ecmascript-data-types-and-values.html#sec-completion-record-specification-type">normal completion containing</a></emu-xref> <emu-const>empty</emu-const>, the result of the <emu-nt id="_ref_24947"><a href="ecmascript-language-statements-and-declarations.html#prod-TryStatement">TryStatement</a></emu-nt> is <emu-val>undefined</emu-val> if there is no <emu-nt id="_ref_24948"><a href="ecmascript-language-statements-and-declarations.html#prod-Finally">Finally</a></emu-nt> clause or if its <emu-nt id="_ref_24949"><a href="ecmascript-language-statements-and-declarations.html#prod-Finally">Finally</a></emu-nt> clause evaluates to an <emu-const>empty</emu-const> <emu-xref href="#sec-completion-record-specification-type" id="_ref_17342"><a href="ecmascript-data-types-and-values.html#sec-completion-record-specification-type">normal completion</a></emu-xref>.</p>
|
|
<p><emu-xref href="#sec-runtime-semantics-methoddefinitionevaluation" id="_ref_970"><a href="ecmascript-language-functions-and-classes.html#sec-runtime-semantics-methoddefinitionevaluation">15.4.5</a></emu-xref> In ECMAScript 2015, the <emu-xref href="#function-object" id="_ref_17343"><a href="ecmascript-data-types-and-values.html#function-object">function objects</a></emu-xref> that are created as the values of the <var class="field">[[Get]]</var> or <var class="field">[[Set]]</var> attribute of <emu-xref href="#sec-object-type" id="_ref_17344"><a href="ecmascript-data-types-and-values.html#sec-object-type">accessor properties</a></emu-xref> in an <emu-nt id="_ref_24950"><a href="ecmascript-language-expressions.html#prod-ObjectLiteral">ObjectLiteral</a></emu-nt> are not <emu-xref href="#constructor" id="_ref_17345"><a href="ecmascript-data-types-and-values.html#constructor">constructor</a></emu-xref> functions and they do not have a <emu-val>"prototype"</emu-val> own property. In the previous edition, they were <emu-xref href="#constructor" id="_ref_17346"><a href="ecmascript-data-types-and-values.html#constructor">constructors</a></emu-xref> and had a <emu-val>"prototype"</emu-val> property.</p>
|
|
<p><emu-xref href="#sec-object.freeze" id="_ref_971"><a href="fundamental-objects.html#sec-object.freeze">20.1.2.6</a></emu-xref>: In ECMAScript 2015, if the argument to <code>Object.freeze</code> is not an object it is treated as if it was a non-extensible <emu-xref href="#ordinary-object" id="_ref_17347"><a href="ecmascript-data-types-and-values.html#ordinary-object">ordinary object</a></emu-xref> with no own properties. In the previous edition, a non-object argument always causes a <emu-val>TypeError</emu-val> to be thrown.</p>
|
|
<p><emu-xref href="#sec-object.getownpropertydescriptor" id="_ref_972"><a href="fundamental-objects.html#sec-object.getownpropertydescriptor">20.1.2.8</a></emu-xref>: In ECMAScript 2015, if the argument to <code>Object.getOwnPropertyDescriptor</code> is not an object an attempt is made to coerce the argument using <emu-xref aoid="ToObject" id="_ref_17348"><a href="abstract-operations.html#sec-toobject">ToObject</a></emu-xref>. If the coercion is successful the result is used in place of the original argument value. In the previous edition, a non-object argument always causes a <emu-val>TypeError</emu-val> to be thrown.</p>
|
|
<p><emu-xref href="#sec-object.getownpropertynames" id="_ref_973"><a href="fundamental-objects.html#sec-object.getownpropertynames">20.1.2.10</a></emu-xref>: In ECMAScript 2015, if the argument to <code>Object.getOwnPropertyNames</code> is not an object an attempt is made to coerce the argument using <emu-xref aoid="ToObject" id="_ref_17349"><a href="abstract-operations.html#sec-toobject">ToObject</a></emu-xref>. If the coercion is successful the result is used in place of the original argument value. In the previous edition, a non-object argument always causes a <emu-val>TypeError</emu-val> to be thrown.</p>
|
|
<p><emu-xref href="#sec-object.getprototypeof" id="_ref_974"><a href="fundamental-objects.html#sec-object.getprototypeof">20.1.2.12</a></emu-xref>: In ECMAScript 2015, if the argument to <code>Object.getPrototypeOf</code> is not an object an attempt is made to coerce the argument using <emu-xref aoid="ToObject" id="_ref_17350"><a href="abstract-operations.html#sec-toobject">ToObject</a></emu-xref>. If the coercion is successful the result is used in place of the original argument value. In the previous edition, a non-object argument always causes a <emu-val>TypeError</emu-val> to be thrown.</p>
|
|
<p><emu-xref href="#sec-object.isextensible" id="_ref_975"><a href="fundamental-objects.html#sec-object.isextensible">20.1.2.16</a></emu-xref>: In ECMAScript 2015, if the argument to <code>Object.isExtensible</code> is not an object it is treated as if it was a non-extensible <emu-xref href="#ordinary-object" id="_ref_17351"><a href="ecmascript-data-types-and-values.html#ordinary-object">ordinary object</a></emu-xref> with no own properties. In the previous edition, a non-object argument always causes a <emu-val>TypeError</emu-val> to be thrown.</p>
|
|
<p><emu-xref href="#sec-object.isfrozen" id="_ref_976"><a href="fundamental-objects.html#sec-object.isfrozen">20.1.2.17</a></emu-xref>: In ECMAScript 2015, if the argument to <code>Object.isFrozen</code> is not an object it is treated as if it was a non-extensible <emu-xref href="#ordinary-object" id="_ref_17352"><a href="ecmascript-data-types-and-values.html#ordinary-object">ordinary object</a></emu-xref> with no own properties. In the previous edition, a non-object argument always causes a <emu-val>TypeError</emu-val> to be thrown.</p>
|
|
<p><emu-xref href="#sec-object.issealed" id="_ref_977"><a href="fundamental-objects.html#sec-object.issealed">20.1.2.18</a></emu-xref>: In ECMAScript 2015, if the argument to <code>Object.isSealed</code> is not an object it is treated as if it was a non-extensible <emu-xref href="#ordinary-object" id="_ref_17353"><a href="ecmascript-data-types-and-values.html#ordinary-object">ordinary object</a></emu-xref> with no own properties. In the previous edition, a non-object argument always causes a <emu-val>TypeError</emu-val> to be thrown.</p>
|
|
<p><emu-xref href="#sec-object.keys" id="_ref_978"><a href="fundamental-objects.html#sec-object.keys">20.1.2.19</a></emu-xref>: In ECMAScript 2015, if the argument to <code>Object.keys</code> is not an object an attempt is made to coerce the argument using <emu-xref aoid="ToObject" id="_ref_17354"><a href="abstract-operations.html#sec-toobject">ToObject</a></emu-xref>. If the coercion is successful the result is used in place of the original argument value. In the previous edition, a non-object argument always causes a <emu-val>TypeError</emu-val> to be thrown.</p>
|
|
<p><emu-xref href="#sec-object.preventextensions" id="_ref_979"><a href="fundamental-objects.html#sec-object.preventextensions">20.1.2.20</a></emu-xref>: In ECMAScript 2015, if the argument to <code>Object.preventExtensions</code> is not an object it is treated as if it was a non-extensible <emu-xref href="#ordinary-object" id="_ref_17355"><a href="ecmascript-data-types-and-values.html#ordinary-object">ordinary object</a></emu-xref> with no own properties. In the previous edition, a non-object argument always causes a <emu-val>TypeError</emu-val> to be thrown.</p>
|
|
<p><emu-xref href="#sec-object.seal" id="_ref_980"><a href="fundamental-objects.html#sec-object.seal">20.1.2.22</a></emu-xref>: In ECMAScript 2015, if the argument to <code>Object.seal</code> is not an object it is treated as if it was a non-extensible <emu-xref href="#ordinary-object" id="_ref_17356"><a href="ecmascript-data-types-and-values.html#ordinary-object">ordinary object</a></emu-xref> with no own properties. In the previous edition, a non-object argument always causes a <emu-val>TypeError</emu-val> to be thrown.</p>
|
|
<p><emu-xref href="#sec-function.prototype.bind" id="_ref_981"><a href="fundamental-objects.html#sec-function.prototype.bind">20.2.3.2</a></emu-xref>: In ECMAScript 2015, the <var class="field">[[Prototype]]</var> internal slot of a bound function is set to the <var class="field">[[GetPrototypeOf]]</var> value of its target function. In the previous edition, <var class="field">[[Prototype]]</var> was always set to <emu-xref href="#sec-properties-of-the-function-prototype-object" id="_ref_17357"><a href="fundamental-objects.html#sec-properties-of-the-function-prototype-object">%Function.prototype%</a></emu-xref>.</p>
|
|
<p><emu-xref href="#sec-function-instances-length" id="_ref_982"><a href="fundamental-objects.html#sec-function-instances-length">20.2.4.1</a></emu-xref>: In ECMAScript 2015, the <emu-val>"length"</emu-val> property of function instances is configurable. In previous editions it was non-configurable.</p>
|
|
<p><emu-xref href="#sec-properties-of-the-nativeerror-constructors" id="_ref_983"><a href="fundamental-objects.html#sec-properties-of-the-nativeerror-constructors">20.5.6.2</a></emu-xref>: In ECMAScript 2015, the <var class="field">[[Prototype]]</var> internal slot of a <var>NativeError</var> <emu-xref href="#constructor" id="_ref_17358"><a href="ecmascript-data-types-and-values.html#constructor">constructor</a></emu-xref> is the Error <emu-xref href="#constructor" id="_ref_17359"><a href="ecmascript-data-types-and-values.html#constructor">constructor</a></emu-xref>. In previous editions it was the <emu-xref href="#sec-properties-of-the-function-prototype-object" id="_ref_17360"><a href="fundamental-objects.html#sec-properties-of-the-function-prototype-object">Function prototype object</a></emu-xref>.</p>
|
|
<p><emu-xref href="#sec-properties-of-the-date-prototype-object" id="_ref_984"><a href="numbers-and-dates.html#sec-properties-of-the-date-prototype-object">21.4.4</a></emu-xref> In ECMAScript 2015, the <emu-xref href="#sec-properties-of-the-date-prototype-object" id="_ref_17361"><a href="numbers-and-dates.html#sec-properties-of-the-date-prototype-object">Date prototype object</a></emu-xref> is not a Date instance. In previous editions it was a Date instance whose TimeValue was <emu-val>NaN</emu-val>.</p>
|
|
<p><emu-xref href="#sec-string.prototype.localecompare" id="_ref_985"><a href="text-processing.html#sec-string.prototype.localecompare">22.1.3.12</a></emu-xref> In ECMAScript 2015, the <code>String.prototype.localeCompare</code> function must treat Strings that are canonically equivalent according to the Unicode Standard as being identical. In previous editions implementations were permitted to ignore canonical equivalence and could instead use a bit-wise comparison.</p>
|
|
<p><emu-xref href="#sec-string.prototype.tolowercase" id="_ref_986"><a href="text-processing.html#sec-string.prototype.tolowercase">22.1.3.28</a></emu-xref> and <emu-xref href="#sec-string.prototype.touppercase" id="_ref_987"><a href="text-processing.html#sec-string.prototype.touppercase">22.1.3.30</a></emu-xref> In ECMAScript 2015, lowercase/upper conversion processing operates on code points. In previous editions such the conversion processing was only applied to individual code units. The only affected code points are those in the Deseret block of Unicode.</p>
|
|
<p><emu-xref href="#sec-string.prototype.trim" id="_ref_988"><a href="text-processing.html#sec-string.prototype.trim">22.1.3.32</a></emu-xref> In ECMAScript 2015, the <code>String.prototype.trim</code> method is defined to recognize white space code points that may exist outside of the Unicode BMP. However, as of Unicode 7 no such code points are defined. In previous editions such code points would not have been recognized as white space.</p>
|
|
<p><emu-xref href="#sec-regexp-pattern-flags" id="_ref_989"><a href="text-processing.html#sec-regexp-pattern-flags">22.2.4.1</a></emu-xref> In ECMAScript 2015, If the <var>pattern</var> argument is a RegExp instance and the <var>flags</var> argument is not <emu-val>undefined</emu-val>, a new RegExp instance is created just like <var>pattern</var> except that <var>pattern</var>'s flags are replaced by the argument <var>flags</var>. In previous editions a <emu-val>TypeError</emu-val> exception was thrown when <var>pattern</var> was a RegExp instance and <var>flags</var> was not <emu-val>undefined</emu-val>.</p>
|
|
<p><emu-xref href="#sec-properties-of-the-regexp-prototype-object" id="_ref_990"><a href="text-processing.html#sec-properties-of-the-regexp-prototype-object">22.2.6</a></emu-xref> In ECMAScript 2015, the <emu-xref href="#sec-properties-of-the-regexp-prototype-object" id="_ref_17362"><a href="text-processing.html#sec-properties-of-the-regexp-prototype-object">RegExp prototype object</a></emu-xref> is not a RegExp instance. In previous editions it was a RegExp instance whose pattern is the empty String.</p>
|
|
<p><emu-xref href="#sec-properties-of-the-regexp-prototype-object" id="_ref_991"><a href="text-processing.html#sec-properties-of-the-regexp-prototype-object">22.2.6</a></emu-xref> In ECMAScript 2015, <emu-val>"source"</emu-val>, <emu-val>"global"</emu-val>, <emu-val>"ignoreCase"</emu-val>, and <emu-val>"multiline"</emu-val> are <emu-xref href="#sec-object-type" id="_ref_17363"><a href="ecmascript-data-types-and-values.html#sec-object-type">accessor properties</a></emu-xref> defined on the <emu-xref href="#sec-properties-of-the-regexp-prototype-object" id="_ref_17364"><a href="text-processing.html#sec-properties-of-the-regexp-prototype-object">RegExp prototype object</a></emu-xref>. In previous editions they were <emu-xref href="#sec-object-type" id="_ref_17365"><a href="ecmascript-data-types-and-values.html#sec-object-type">data properties</a></emu-xref> defined on RegExp instances.</p>
|
|
<p><emu-xref href="#sec-atomics.notify" id="_ref_992"><a href="structured-data.html#sec-atomics.notify">25.4.15</a></emu-xref>: In ECMAScript 2019, <code>Atomics.wake</code> has been renamed to <code>Atomics.notify</code> to prevent confusion with <code>Atomics.wait</code>.</p>
|
|
<p><emu-xref href="#sec-asyncfromsynciteratorcontinuation" id="_ref_993"><a href="control-abstraction-objects.html#sec-asyncfromsynciteratorcontinuation">27.1.5.4</a></emu-xref>, <emu-xref href="#sec-asyncgeneratorresume" id="_ref_994"><a href="control-abstraction-objects.html#sec-asyncgeneratorresume">27.6.3.6</a></emu-xref>: In ECMAScript 2019, the number of <emu-xref href="#job" id="_ref_17366"><a href="executable-code-and-execution-contexts.html#job">Jobs</a></emu-xref> enqueued by <code>await</code> was reduced, which could create an observable difference in resolution order between a <code>then()</code> call and an <code>await</code> expression.</p>
|
|
</emu-annex></div></body></html> |