ECMAScript 6 support in Mozilla

  • Revision slug: Web/JavaScript/ECMAScript_6_support_in_Mozilla
  • Revision title: ECMAScript 6 support in Mozilla
  • Revision id: 419131
  • Created:
  • Creator: Sheppy
  • Is current revision? No
  • Comment add text to status boxes for a11y

Revision Content

ECMAScript 6 is the next version of the standard, code-named "Harmony" or "ES.next". Specification drafts can be found on the official wiki. If you wish to send feedback about the standard, do it on es-discuss.

TC39 Consensus is marked by three levels:

Consensus Ongoing Discussion Controversial

These represent an estimate of the current state of consensus in TC39 of the features and their design. The three levels mean:

  • Consensus: no major remaining disagreements over the design
  • Ongoing discussion: the feature has consensus but there are aspects of the design that are still being discussed
  • Controversial: there remain significant disagreements about the design

Features already supported in Firefox

Syntax

Feature Version Comment TC39 Consensus
const ? Not compliant with the current specification: scoped like var not let Consensus
let (global scope) ? Not compliant with the current specification Ongoing Discussion
let (local scope) ? Not compliant with the current specification Consensus
Destructuring assignment JS 1.7 Not compliant with the current specification Consensus
for...of statement {{fx_minversion_inline("13")}}   Consensus
Iterators and generators ? Not compliant with the current specification Consensus
Rest parameters {{fx_minversion_inline("15")}}   Consensus
Default parameters {{fx_minversion_inline("15")}}   Consensus
Spread operator of Array {{fx_minversion_inline("16")}}   Consensus
Arrow functions {{fx_minversion_inline("22")}}   Consensus

Standard library

Feature Version Comment TC39 Consensus
Map {{fx_minversion_inline("13")}} A new type of collections Consensus
Map Iteration {{fx_minversion_inline("17")}} Iterable in for-of Consensus
Map methods   forEach, entries, keys, values Ongoing Discussion
Set {{fx_minversion_inline("13")}} A new type of collections Consensus
Set Iteration {{fx_minversion_inline("17")}} Iterable in for-of Consensus
Set methods   forEach, entries, keys, values Ongoing Discussion
Array Iteration {{fx_minversion_inline("13")}} Iterable in for-of Consensus
WeakMap {{fx_minversion_inline("6")}} A new type of collections Consensus
weakmap.clear() {{fx_minversion_inline("20")}}   Controversial
Proxy {{fx_minversion_inline("18")}}   Ongoing Discussion
RegExp sticky (y) flag ?   Consensus
Number.isNaN() {{fx_minversion_inline("16")}}   Consensus
Number.isFinite() {{fx_minversion_inline("16")}}   Consensus
Number.toInteger() {{fx_minversion_inline("16")}}    
Number.isInteger() {{fx_minversion_inline("16")}}    
string.startsWith() {{fx_minversion_inline("17")}}   Consensus
string.endsWith() {{fx_minversion_inline("17")}}   Consensus
string.contains() {{fx_minversion_inline("17")}}   Consensus
string.repeat() {{fx_minversion_inline("24")}}   Consensus
Object.is     Ongoing Discussion
Math.imul {{fx_minversion_inline("20")}} C-like 32-bit integer multiplication Consensus

Features not yet supported

  • is and isnt operator {{obsolete_inline()}}
  • New Math functions (log10, log2, log1p, expm1, cosh, sinh, tanh, acosh, asinh, atanh, hypot, trunc, sign)
  • Modules
  • Symbols

See also

Revision Source

<p>ECMAScript 6 is the next version of the standard, code-named "Harmony" or "ES.next". <a href="http://wiki.ecmascript.org/doku.php?id=harmony:specification_drafts">Specification drafts can be found on the official wiki</a>. If you wish to send feedback about the standard, do it on <a href="https://mail.mozilla.org/listinfo/es-discuss">es-discuss</a>.</p>
<p>TC39 Consensus is marked by three levels:</p>
<table>
  <tbody>
    <tr>
      <td style="background-color: green;"><span style="color: rgb(240, 255, 240);">Consensus</span></td>
      <td style="background-color: yellow;">Ongoing Discussion</td>
      <td style="background-color: orange;">Controversial</td>
    </tr>
  </tbody>
</table>
<p>These represent an estimate of the current state of consensus in TC39 of the features and their design. The three levels mean:</p>
<ul>
  <li><strong>Consensus:</strong> no major remaining disagreements over the design</li>
  <li><strong>Ongoing discussion:</strong> the feature has consensus but there are aspects of the design that are still being discussed</li>
  <li><strong>Controversial:</strong> there remain significant disagreements about the design</li>
</ul>
<h2 id="Features_already_supported_in_Firefox">Features already supported in Firefox</h2>
<h3 id="Syntax">Syntax</h3>
<table class="standard-table">
  <thead>
    <tr>
      <th scope="col">Feature</th>
      <th scope="col">Version</th>
      <th scope="col">Comment</th>
      <th scope="col">TC39 Consensus</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code><a href="/en-US/JavaScript/Reference/Statements/const" title="const">const</a></code></td>
      <td>?</td>
      <td><em>Not compliant with the current specification</em><em>: scoped like var not let</em></td>
      <td style="background-color: green;"><span style="color: rgb(240, 255, 240);">Consensus</span></td>
    </tr>
    <tr>
      <td><code><a href="/en-US/JavaScript/Reference/Statements/let" title="let">let</a></code> (global scope)</td>
      <td>?</td>
      <td><em>Not compliant with the current specification</em></td>
      <td style="background-color: yellow;">Ongoing Discussion</td>
    </tr>
    <tr>
      <td><code><a href="/en-US/JavaScript/Reference/Statements/let" title="let">let</a></code> (local scope)</td>
      <td>?</td>
      <td><em>Not compliant with the current specification</em></td>
      <td style="background-color: green;"><span style="color: rgb(240, 255, 240);">Consensus</span></td>
    </tr>
    <tr>
      <td><a href="/en-US/JavaScript/New_in_JavaScript/1.7#Destructuring_assignment_%28Merge_into_own_page.2Fsection%29" title="https://developer.mozilla.org/en-US/New_in_JavaScript_1.7#Destructuring_assignment_%28Merge_into_own_page.2Fsection%29">Destructuring assignment</a></td>
      <td>JS 1.7</td>
      <td><em>Not compliant with the current specification</em></td>
      <td style="background-color: green;"><span style="color: rgb(240, 255, 240);">Consensus</span></td>
    </tr>
    <tr>
      <td><code><a href="/en-US/JavaScript/Reference/Statements/for...of" title="for...of">for...of</a></code> statement</td>
      <td>{{fx_minversion_inline("13")}}</td>
      <td>&nbsp;</td>
      <td style="background-color: green;"><span style="color: rgb(240, 255, 240);">Consensus</span></td>
    </tr>
    <tr>
      <td><a href="/en-US/JavaScript/Guide/Iterators_and_Generators" title="Iterators and generators">Iterators and generators</a></td>
      <td>?</td>
      <td><em>Not compliant with the current specification</em></td>
      <td style="background-color: green;"><span style="color: rgb(240, 255, 240);">Consensus</span></td>
    </tr>
    <tr>
      <td><a href="/en-US/JavaScript/Reference/rest_parameters" title="rest parameters">Rest parameters</a></td>
      <td>{{fx_minversion_inline("15")}}</td>
      <td>&nbsp;</td>
      <td style="background-color: green;"><span style="color: rgb(240, 255, 240);">Consensus</span></td>
    </tr>
    <tr>
      <td><a href="/en-US/docs/JavaScript/Reference/default_parameters" title="default_parameters">Default parameters</a></td>
      <td>{{fx_minversion_inline("15")}}</td>
      <td>&nbsp;</td>
      <td style="background-color: green;"><span style="color: rgb(240, 255, 240);">Consensus</span></td>
    </tr>
    <tr>
      <td><a href="/en-US/docs/JavaScript/Reference/Spread_operator" title="Spread_operator"><span class="external">Spread operator</span></a> of Array</td>
      <td>{{fx_minversion_inline("16")}}</td>
      <td>&nbsp;</td>
      <td style="background-color: green;"><span style="color: rgb(240, 255, 240);">Consensus</span></td>
    </tr>
    <tr>
      <td><a href="/en-US/docs/JavaScript/Reference/arrow_functions" title="Arrow functions">Arrow functions</a></td>
      <td>{{fx_minversion_inline("22")}}</td>
      <td>&nbsp;</td>
      <td style="background-color: green;"><span style="color: rgb(240, 255, 240);">Consensus</span></td>
    </tr>
  </tbody>
</table>
<h3 id="Standard_library">Standard library</h3>
<table class="standard-table">
  <tbody>
    <tr>
      <th scope="col">Feature</th>
      <th scope="col">Version</th>
      <th scope="col">Comment</th>
      <th scope="col">TC39&nbsp;<span style="line-height: 1.572;">Consensus</span></th>
    </tr>
    <tr>
      <td><code><a href="/en-US/JavaScript/Reference/Global_Objects/Map" title="en-US/JavaScript/Reference/Global_Objects/Map">Map</a></code></td>
      <td>{{fx_minversion_inline("13")}}</td>
      <td>A new type of collections</td>
      <td style="background-color: green;"><span style="color: rgb(240, 255, 240);">Consensus</span></td>
    </tr>
    <tr>
      <td><code><a href="/en-US/JavaScript/Reference/Global_Objects/Map" title="en-US/JavaScript/Reference/Global_Objects/Map">Map</a></code> Iteration</td>
      <td>{{fx_minversion_inline("17")}}</td>
      <td>Iterable in for-of</td>
      <td style="background-color: green;"><span style="color: rgb(240, 255, 240);">Consensus</span></td>
    </tr>
    <tr>
      <td><code><a href="/en-US/JavaScript/Reference/Global_Objects/Map" title="en-US/JavaScript/Reference/Global_Objects/Map">Map methods</a></code></td>
      <td>&nbsp;</td>
      <td>forEach, entries, keys, values</td>
      <td style="background-color: yellow;">Ongoing Discussion</td>
    </tr>
    <tr>
      <td><code><a href="/en-US/JavaScript/Reference/Global_Objects/Set" title="en-US/JavaScript/Reference/Global_Objects/Set">Set</a></code></td>
      <td>{{fx_minversion_inline("13")}}</td>
      <td>A new type of collections</td>
      <td style="background-color: green;"><span style="color: rgb(240, 255, 240);">Consensus</span></td>
    </tr>
    <tr>
      <td><code><a href="/en-US/JavaScript/Reference/Global_Objects/Set" title="en-US/JavaScript/Reference/Global_Objects/Set">Set</a></code> Iteration</td>
      <td>{{fx_minversion_inline("17")}}</td>
      <td>Iterable in for-of</td>
      <td style="background-color: green;"><span style="color: rgb(240, 255, 240);">Consensus</span></td>
    </tr>
    <tr>
      <td><code><a href="/en-US/JavaScript/Reference/Global_Objects/Set" title="en-US/JavaScript/Reference/Global_Objects/Set">Set methods</a></code></td>
      <td>&nbsp;</td>
      <td>forEach, entries, keys, values</td>
      <td style="background-color: yellow;">Ongoing Discussion</td>
    </tr>
    <tr>
      <td><code><a href="/en-US/JavaScript/Reference/Global_Objects/Array" title="en-US/JavaScript/Reference/Global_Objects/Array">Array</a></code> Iteration</td>
      <td>{{fx_minversion_inline("13")}}</td>
      <td>Iterable in for-of</td>
      <td style="background-color: green;"><span style="color: rgb(240, 255, 240);">Consensus</span></td>
    </tr>
    <tr>
      <td><code><a href="/en-US/JavaScript/Reference/Global_Objects/WeakMap" title="WeakMap">WeakMap</a></code></td>
      <td>{{fx_minversion_inline("6")}}</td>
      <td>A new type of collections</td>
      <td style="background-color: green;"><span style="color: rgb(240, 255, 240);">Consensus</span></td>
    </tr>
    <tr>
      <td><code><a href="/en-US/JavaScript/Reference/Global_Objects/WeakMap" title="WeakMap">weakmap.clear()</a></code></td>
      <td>{{fx_minversion_inline("20")}}</td>
      <td>&nbsp;</td>
      <td style="background-color: orange;">Controversial</td>
    </tr>
    <tr>
      <td><code><a href="/en-US/JavaScript/Reference/Global_Objects/Proxy" title="Proxy">Proxy</a></code></td>
      <td>{{fx_minversion_inline("18")}}</td>
      <td>&nbsp;</td>
      <td style="background-color: yellow;">Ongoing Discussion</td>
    </tr>
    <tr>
      <td><a href="/en-US/JavaScript/Reference/Global_Objects/RegExp" title="RegExp"><span class="external text"><code>RegExp</code> sticky (<code>y</code>) flag</span></a></td>
      <td>?</td>
      <td>&nbsp;</td>
      <td style="background-color: green;"><span style="color: rgb(240, 255, 240);">Consensus</span></td>
    </tr>
    <tr>
      <td><code><a href="/en-US/docs/JavaScript/Reference/Global_Objects/Number/isNaN" title="/en-US/docs/JavaScript/Reference/Global_Objects/Number/isNaN">Number.isNaN()</a></code></td>
      <td>{{fx_minversion_inline("16")}}</td>
      <td>&nbsp;</td>
      <td style="background-color: green;"><span style="color: rgb(240, 255, 240);">Consensus</span></td>
    </tr>
    <tr>
      <td><code>Number.isFinite()</code></td>
      <td>{{fx_minversion_inline("16")}}</td>
      <td>&nbsp;</td>
      <td style="background-color: green;"><span style="color: rgb(240, 255, 240);">Consensus</span></td>
    </tr>
    <tr>
      <td><code>Number.toInteger()</code></td>
      <td>{{fx_minversion_inline("16")}}</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td><code>Number.isInteger()</code></td>
      <td>{{fx_minversion_inline("16")}}</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td><code><a href="/en-US/docs/JavaScript/Reference/Global_Objects/String/startsWith" title="/en-US/docs/JavaScript/Reference/Global_Objects/String/startsWith">string.startsWith()</a></code></td>
      <td>{{fx_minversion_inline("17")}}</td>
      <td>&nbsp;</td>
      <td style="background-color: green;"><span style="color: rgb(240, 255, 240);">Consensus</span></td>
    </tr>
    <tr>
      <td><code><a href="/en-US/docs/JavaScript/Reference/Global_Objects/String/endsWith" title="/en-US/docs/JavaScript/Reference/Global_Objects/String/endsWith">string.endsWith()</a></code></td>
      <td>{{fx_minversion_inline("17")}}</td>
      <td>&nbsp;</td>
      <td style="background-color: green;"><span style="color: rgb(240, 255, 240);">Consensus</span></td>
    </tr>
    <tr>
      <td><code><a href="/en-US/docs/JavaScript/Reference/Global_Objects/String/contains" title="/en-US/docs/JavaScript/Reference/Global_Objects/String/contains">string.contains()</a></code></td>
      <td>{{fx_minversion_inline("17")}}</td>
      <td>&nbsp;</td>
      <td style="background-color: green;"><span style="color: rgb(240, 255, 240);">Consensus</span></td>
    </tr>
    <tr>
      <td><code><a href="/en-US/docs/JavaScript/Reference/Global_Objects/String/repeat" title="/en-US/docs/JavaScript/Reference/Global_Objects/String/contains">string.repeat()</a></code></td>
      <td>{{fx_minversion_inline("24")}}</td>
      <td>&nbsp;</td>
      <td style="background-color: green;"><span style="color: rgb(240, 255, 240);">Consensus</span></td>
    </tr>
    <tr>
      <td><a href="/en-US/docs/JavaScript/Reference/Global_Objects/Object/is" title="/en-US/docs/JavaScript/Reference/Global_Objects/Object/is">Object.is</a></td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td style="background-color: yellow;">Ongoing Discussion</td>
    </tr>
    <tr>
      <td><a href="/en-US/docs/JavaScript/Reference/Global_Objects/Math/imul" title="/en-US/docs/JavaScript/Reference/Global_Objects/Math/imul">Math.imul</a></td>
      <td>{{fx_minversion_inline("20")}}</td>
      <td>C-like 32-bit integer multiplication</td>
      <td style="background-color: green;"><span style="color: rgb(240, 255, 240);">Consensus</span></td>
    </tr>
  </tbody>
</table>
<h2 id="Features_not_yet_supported">Features not yet supported</h2>
<ul>
  <li><code>is</code> and <code>isnt</code> operator {{obsolete_inline()}}</li>
  <li>New <code>Math</code> functions (<code>log10</code>, <code>log2</code>, <code>log1p</code>, <code>expm1</code>, <code>cosh</code>, <code>sinh</code>, <code>tanh</code>, <code>acosh</code>, <code>asinh</code>, <code>atanh</code>, <code>hypot</code>, <code>trunc</code>, <code>sign</code>)</li>
  <li>Modules</li>
  <li>Symbols</li>
</ul>
<h2 id="See_also">See also</h2>
<ul>
  <li><a class="external" href="http://www.ecmascript.org/" title="http://www.ecmascript.org/">ECMAScript web site</a></li>
  <li><a class="external" href="http://wiki.ecmascript.org/doku.php?id=harmony:specification_drafts" title="http://wiki.ecmascript.org/doku.php?id=harmony:specification_drafts">ECMAScript 6 specification drafts</a></li>
  <li><a class="link-https" href="https://bugzilla.mozilla.org/show_bug.cgi?id=694100" title="https://bugzilla.mozilla.org/show_bug.cgi?id=694100">Mozilla Harmony tracking bug</a></li>
</ul>
Revert to this revision