uTools-Manuals/docs/javascript/New_in_JavaScript/Firefox_JavaScript_changelog.html

766 lines
197 KiB
HTML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<article id="wikiArticle">
<div></div>
<p>下面是 Firefox 发布版本的 JavaScript 日志更新情况。</p>
<h2 id="Firefox_52">Firefox 52</h2>
<div><h4 id="New_features">New features</h4>
<ul>
<li>Support for the async functions has been added. This adds <a href="/en-US/docs/Web/JavaScript/Reference/Statements/async_function" title="The async function declaration defines an asynchronous function, which returns an AsyncFunction object."><code>async function</code></a>, <a href="/en-US/docs/Web/JavaScript/Reference/Operators/async_function" title="The async function keyword can be used to define async functions inside expressions."><code>async function expression</code></a>, and the <a href="/en-US/docs/Web/JavaScript/Reference/Operators/await" title="The await operator is used to wait for a Promise. It can only be used inside an async function."><code>await</code></a> keyword (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1185106" rel="noopener" title="FIXED: Implement async functions (ES 2017 proposal)">bug 1185106</a>).</li>
<li>Implemented ES2017 <a href="/en-US/docs/Web/JavaScript/Reference/Trailing_commas">trailing commas</a> in functions (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1303788" rel="noopener" title="FIXED: ES2017: Implement trailing comma proposal">bug 1303788</a>).</li>
<li>Implemented <a href="/en-US/docs/Web/JavaScript/Reference/Functions/rest_parameters#Destructuring_rest_parameters" title="The rest parameter syntax allows us to represent an indefinite number of arguments as an array.">rest parameter destructuring</a> (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1243717" rel="noopener" title="FIXED: Support destructuring for rest parameters">bug 1243717</a>).</li>
<li>The <a href="/en-US/docs/Web/JavaScript/Reference/Operators/Arithmetic_Operators#Exponentiation_(**)" title="Arithmetic operators take numerical values (either literals or variables) as their operands and return a single numerical value. The standard arithmetic operators are addition (+), subtraction (-), multiplication (*), and division (/).">exponentiation operator (**)</a> is now enabled by default (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1291212" rel="noopener" title="FIXED: Ship the Exponentiation Operator">bug 1291212</a>).</li>
<li>You can now use <a class="external" href="http://www.iana.org/time-zones" rel="noopener">IANA time zone names</a> in the <code>timeZone</code> option of date related APIs like <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat" title="The Intl.DateTimeFormat object is a constructor for objects that enable language-sensitive date and time formatting."><code>DateTimeFormat</code></a> or <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleString" title="The toLocaleString() method returns a string with a language sensitive representation of this date. The new locales and options arguments let applications specify the language whose formatting conventions should be used and customize the behavior of the function. In older implementations, which ignore the locales and options arguments, the locale used and the form of the string returned are entirely implementation dependent."><code>Date.toLocaleString()</code></a> (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=837961" rel="noopener" title="FIXED: Add support for IANA time zone names to internationalization API">bug 837961</a>).</li>
</ul>
<h4 id="Changes_and_removals">Changes and removals</h4>
<ul>
<li><a href="/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment#Assigning_the_rest_of_an_array_to_a_variable">Array destructuring</a> now throws a <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/SyntaxError" title="The SyntaxError object represents an error when trying to interpret syntactically invalid code."><code>SyntaxError</code></a> when using destructuring rest with trailing comma (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1041341" rel="noopener" title="ERROR: You have exceeded the rate limit.">bug 1041341</a>).</li>
<li>Duplicate <code>__proto__</code> properties are now allowed in <a href="/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment">object destructuring</a> ({{ bug }}).</li>
<li><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/toLocaleString" title="The toLocaleString() method returns a string representing the elements of the array. The elements are converted to Strings using their toLocaleString methods and these Strings are separated by a locale-specific String (such as a comma “,”)."><code>Array.prototype.toLocaleString()</code></a> has been re-implemented to support the Intl API parameters "<code>locales</code>" and "<code>options</code>" ({{ bug }}).</li>
<li><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray" title="A TypedArray object describes an array-like view of an underlying binary data buffer. There is no global property named TypedArray, nor is there a directly visible TypedArray constructor.  Instead, there are a number of different global properties, whose values are typed array constructors for specific element types, listed below. On the following pages you will find common properties and methods that can be used with any typed array containing elements of any type."><code>TypedArray</code></a> constructors now accept <a href="/en-US/docs/Web/JavaScript/Reference/Iteration_protocols">iterables</a> to create new typed arrays ({{ bug }}).</li>
<li><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/from" title="The TypedArray.from() method creates a new typed array from an array-like or iterable object. This method is nearly the same as Array.from()."><code>TypedArray.from()</code></a>, <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/of" title="The TypedArray.of() method creates a new typed array with a variable number of arguments. This method is nearly the same as Array.of()."><code>TypedArray.of()</code></a>, <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/filter" title="The filter() method creates a new typed array with all elements that pass the test implemented by the provided function. This method has the same algorithm as Array.prototype.filter(). TypedArray is one of the typed array types here."><code>TypedArray.prototype.filter()</code></a>, <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/map" title="The map() method creates a new typed array with the results of calling a provided function on every element in this typed array. This method has the same algorithm as Array.prototype.map(). TypedArray is one of the typed array types here."><code>TypedArray.prototype.map()</code></a>, <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/slice" title="The slice() method returns a shallow copy of a portion of a typed array into a new typed array object. This method has the same algorithm as Array.prototype.slice(). TypedArray is one of the typed array types here."><code>TypedArray.prototype.slice()</code></a>, <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/subarray" title="The subarray() method returns a new TypedArray on the same ArrayBuffer store and with the same element types as for this TypedArray object. The begin offset is inclusive and the end offset is exclusive. TypedArray is one of the typed array types."><code>TypedArray.prototype.subarray()</code></a> now require that their <code>this</code> values are valid Typed Array constructors ({{ bug }}).</li>
<li>The non-standard <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/slice" title="The slice() method returns a new ArrayBuffer whose contents are a copy of this ArrayBuffer's bytes from begin, inclusive, up to end, exclusive."><code>ArrayBuffer.slice()</code></a> method (not <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/slice" title="The slice() method returns a new ArrayBuffer whose contents are a copy of this ArrayBuffer's bytes from begin, inclusive, up to end, exclusive."><code>ArrayBuffer.prototype.slice()</code></a>) is deprecated and now presents a warning when used ({{ bug }}).</li>
<li><a href="/en-US/docs/Web/JavaScript/Reference/Lexical_grammar#Unicode_code_point_escapes">Unicode code point escapes</a> can now also be used as identifiers (e.g. "<code>let \u{61} = 123</code>", see {{ bug }}).</li>
<li>
<p>To conform with ES2015, <code>\u2e2f</code> and <code></code> now throw when used as identifier, for details see {{ bug }} and {{ bug }}.</p>
</li>
</ul></div>
<p>参阅:</p>
<ul>
<li><a class="external" href="https://bugzilla.mozilla.org/buglist.cgi?list_id=11242211&amp;resolution=FIXED&amp;classification=Components&amp;query_format=advanced&amp;bug_status=RESOLVED&amp;bug_status=VERIFIED&amp;component=JavaScript%20Engine&amp;component=JavaScript%20Engine%3A%20JIT&amp;component=JavaScript%3A%20GC&amp;component=JavaScript%3A%20Internationalization%20API&amp;component=JavaScript%3A%20Standard%20Library&amp;product=Core&amp;target_milestone=mozilla52" rel="noopener">All JavaScript engine bug fixes</a>.</li>
<li><a href="/en-US/Firefox/Releases/52">Complete release notes for Firefox 52</a>.</li>
</ul>
<h2 id="Firefox_51">Firefox 51</h2>
<div><ul>
<li>The ES2015 <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol/toStringTag" title="The Symbol.toStringTag well-known symbol is a string valued property that is used in the creation of the default string description of an object. It is accessed internally by the Object.prototype.toString() method."><code>Symbol.toStringTag</code></a> property has been implemented ({{ bug }}).</li>
<li>The ES2015 <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toString" title="The toString() method returns a string representing the specified array and its elements. This method has the same algorithm as Array.prototype.toString(). TypedArray is one of the typed array types here."><code>TypedArray.prototype.toString()</code></a> and <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/toLocaleString" title="The toLocaleString() method returns a string representing the elements of the typed array. The elements are converted to strings and are separated by a locale-specific string (such as a comma “,”). This method has the same algorithm as Array.prototype.toLocaleString() and, as the typed array elements are numbers, the same algorithm as Number.prototype.toLocaleString() applies for each element. TypedArray is one of the typed array types here."><code>TypedArray.prototype.toLocaleString()</code></a> methods have been implemented ({{ bug }}).</li>
<li>The <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat/formatToParts" title="The Intl.DateTimeFormat.prototype.formatToParts() method allows locale-aware formatting of strings produced by DateTimeFormat formatters."><code>DateTimeFormat.prototype.formatToParts()</code></a> method is now available ({{ bug }}).</li>
<li><a href="/en-US/docs/Web/JavaScript/Reference/Statements/const" title="The source for this interactive example is stored in a GitHub repository. If you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request."><code>const</code></a> and <a href="/en-US/docs/Web/JavaScript/Reference/Statements/let" title="The let statement declares a block scope local variable, optionally initializing it to a value."><code>let</code></a> are now fully ES2015-compliant ({{ bug }}).</li>
<li>Using <a href="/en-US/docs/Web/JavaScript/Reference/Statements/const" title="The source for this interactive example is stored in a GitHub repository. If you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request."><code>const</code></a> in <code><a href="/en-US/docs/Web/JavaScript/Reference/Statements/for...of">for...of</a></code> loops now has a fresh binding for each iteration and no longer throws a <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/SyntaxError" title="The SyntaxError object represents an error when trying to interpret syntactically invalid code."><code>SyntaxError</code></a> ({{ bug }}).</li>
<li>The deprecated <a href="/en-US/docs/Web/JavaScript/Reference/Statements/for_each...in">for each...in</a> loop now presents a <a href="/en-US/docs/Web/JavaScript/Reference/Errors/For-each-in_loops_are_deprecated">warning in the console</a> ({{ bug }}). Please migrate your code to use the standardized <code><a href="/en-US/docs/Web/JavaScript/Reference/Statements/for...of">for...of</a></code> loop.</li>
<li><a href="/en-US/docs/Web/JavaScript/Reference/Statements/function*">Generator functions</a> can't have a <a href="/en-US/docs/Web/JavaScript/Reference/Statements/label">label</a> anymore and "<code>let</code>" as a label name is disallowed now ({{ bug }}).</li>
<li>Deprecated <a href="/en-US/docs/Web/JavaScript/Reference/Statements/Legacy_generator_function">legacy generator functions</a> will now throw when used in <a href="/en-US/docs/Web/JavaScript/Reference/Functions/Method_definitions">method definitions</a> ({{ bug }}).</li>
<li>The <code>next()</code> method of the <a href="/en-US/docs/Web/JavaScript/Reference/Iteration_protocols#The_iterator_protocol">iterator protocol</a> will now throw a <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypeError" title="The TypeError object represents an error when a value is not of the expected type."><code>TypeError</code></a> if the returned value is not an object ({{ bug }}).</li>
<li>Child-indexed pseudo-class selectors should match without a parent ({{ bug }}).</li>
</ul></div>
<p>参阅:</p>
<ul>
<li><a class="external" href="https://bugzilla.mozilla.org/buglist.cgi?list_id=11242211&amp;resolution=FIXED&amp;classification=Components&amp;query_format=advanced&amp;bug_status=RESOLVED&amp;bug_status=VERIFIED&amp;component=JavaScript%20Engine&amp;component=JavaScript%20Engine%3A%20JIT&amp;component=JavaScript%3A%20GC&amp;component=JavaScript%3A%20Internationalization%20API&amp;component=JavaScript%3A%20Standard%20Library&amp;product=Core&amp;target_milestone=mozilla51" rel="noopener">All JavaScript engine bug fixes</a>.</li>
<li><a href="/en-US/Firefox/Releases/51">Complete release notes for Firefox 51</a>.</li>
</ul>
<h2 id="Firefox_50">Firefox 50</h2>
<div><ul>
<li>The ES2015 <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol/hasInstance" title="The Symbol.hasInstance well-known symbol is used to determine if a constructor object recognizes an object as its instance. The instanceof operator's behavior can be customized by this symbol."><code>Symbol.hasInstance</code></a> property has been implemented (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1054906" rel="noopener" title="FIXED: Implement ES6 Symbol.hasInstance">bug 1054906</a>).</li>
<li>The ES2017 <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/getOwnPropertyDescriptors" title="The Object.getOwnPropertyDescriptors() method returns all own property descriptors of a given object."><code>Object.getOwnPropertyDescriptors()</code></a> method has been implemented (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1245024" rel="noopener" title="FIXED: [es7] implement Object.getOwnPropertyDescriptors() proposal">bug 1245024</a>).</li>
<li>The behavior of \W in <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp" title="The RegExp constructor creates a regular expression object for matching text with a pattern."><code>RegExp</code></a> with unicode and ignoreCase flags is changed to match recent draft spec. Now it doesn't match to K, S, k, s, and KELVIN SIGN (U+212A), and LATIN SMALL LETTER LONG S (U+017F) (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1281739" rel="noopener" title="FIXED: Match updated spec for `/\w/iu` and `/\W/iu`">bug 1281739</a>).</li>
</ul></div>
<p>参阅:</p>
<ul>
<li><a class="external" href="https://bugzilla.mozilla.org/buglist.cgi?list_id=11242211&amp;resolution=FIXED&amp;classification=Components&amp;query_format=advanced&amp;bug_status=RESOLVED&amp;bug_status=VERIFIED&amp;component=JavaScript%20Engine&amp;component=JavaScript%20Engine%3A%20JIT&amp;component=JavaScript%3A%20GC&amp;component=JavaScript%3A%20Internationalization%20API&amp;component=JavaScript%3A%20Standard%20Library&amp;product=Core&amp;target_milestone=mozilla50" rel="noopener">All JavaScript engine bug fixes</a>.</li>
<li><a href="/en-US/Firefox/Releases/50">Complete release notes for Firefox 50</a>.</li>
</ul>
<h2 id="Firefox_49">Firefox 49</h2>
<div><ul>
<li>The ES2015 <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/handler/getPrototypeOf" title="The handler.getPrototypeOf() method is a trap for the [[GetPrototypeOf]] internal method."><code>getPrototypeOf()</code></a> and <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/handler/setPrototypeOf" title="The handler.setPrototypeOf() method is a trap for Object.setPrototypeOf()."><code>setPrototypeOf()</code></a> <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy" title="The Proxy object is used to define custom behavior for fundamental operations (e.g. property lookup, assignment, enumeration, function invocation, etc)."><code>Proxy</code></a> traps have been implemented (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=888969" rel="noopener" title="FIXED: Implement ES6 Proxy traps for getPrototypeOf and setPrototypeOf">bug 888969</a>).</li>
<li>The ES2015 <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/@@match" title="The [@@match]() method retrieves the matches when matching a string against a regular expression."><code>RegExp.prototype[@@match]()</code></a>, <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/@@replace" title="The [@@replace]() method replaces some or all matches of a this pattern in a string by a replacement, and returns the result of the replacement as a new string. The replacement can be a string or a function to be called for each match."><code>RegExp.prototype[@@replace]()</code></a>, <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/@@search" title="The [@@search]() method executes a search for a match between a this regular expression and a string."><code>RegExp.prototype[@@search]()</code></a>, and <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/@@split" title="The [@@split]() method splits a String object into an array of strings by separating the string into substrings."><code>RegExp.prototype[@@split]()</code></a> methods, and <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/@@species" title="The RegExp[@@species] accessor property returns the RegExp constructor."><code>RegExp[@@species]</code></a> getter have been implemented (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=887016" rel="noopener" title="FIXED: Implement ES6 RegExp.prototype methods and change String.prototype methods to delegate">bug 887016</a>).</li>
<li>The deprecated, non-standard <code>flags</code> argument of <code>String.prototype.</code><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/match" title="The match() method retrieves the matches when matching a string against a regular expression."><code>match</code></a>/<a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/search" title="The search() method executes a search for a match between a regular expression and this String object."><code>search</code></a>/<a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace" title="The replace() method returns a new string with some or all matches of a pattern replaced by a replacement."><code>replace</code></a> has been removed (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1108382" rel="noopener" title="FIXED: Remove non-standard flag argument from String.prototype.{search,match,replace}">bug 1108382</a>).</li>
<li>The behavior of the <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/parse" title="The Date.parse() method parses a string representation of a date, and returns the number of milliseconds since January 1, 1970, 00:00:00 UTC or NaN if the string is unrecognized or, in some cases, contains illegal date values (e.g. 2015-02-31)."><code>Date.parse()</code></a> method when parsing 2-digit years has been changed to be more interoperable with the Google Chrome browser (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1265136" rel="noopener" title="FIXED: new Date(&lt;mm/dd/yy&gt;) behaves differently in Firefox vs Chrome/Safari">bug 1265136</a>).</li>
</ul></div>
<p>参阅:</p>
<ul>
<li><a class="external" href="https://bugzilla.mozilla.org/buglist.cgi?list_id=11242211&amp;resolution=FIXED&amp;classification=Components&amp;query_format=advanced&amp;bug_status=RESOLVED&amp;bug_status=VERIFIED&amp;component=JavaScript%20Engine&amp;component=JavaScript%20Engine%3A%20JIT&amp;component=JavaScript%3A%20GC&amp;component=JavaScript%3A%20Internationalization%20API&amp;component=JavaScript%3A%20Standard%20Library&amp;product=Core&amp;target_milestone=mozilla49" rel="noopener">All JavaScript engine bug fixes</a>.</li>
<li><a href="/en-US/Firefox/Releases/49">Complete release notes for Firefox 49</a>.</li>
</ul>
<h2 id="Firefox_48">Firefox 48</h2>
<div><h4 id="New_APIs">New APIs</h4>
<ul>
<li>The <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/padStart" title="The padStart() method pads the current string with another string (multiple times, if needed) until the resulting string reaches the given length."><code>String.prototype.padStart()</code></a> and <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/padEnd" title="The padEnd() method pads the current string with a given string (repeated, if needed) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string."><code>String.prototype.padEnd()</code></a> methods have been implemented (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1260509" rel="noopener" title="FIXED: Implement String.prototype.padStart / padEnd">bug 1260509</a>).</li>
<li>The ES2015 <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol/unscopables" title="The Symbol.unscopables well-known symbol is used to specify an object value of whose own and inherited property names are excluded from the with environment bindings of the associated object."><code>Symbol.unscopables</code></a> and <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/@@unscopables" title="The @@unscopable symbol property contains property names that were not included in the ECMAScript standard prior to the ES2015 version. These properties are excluded from with statement bindings."><code>Array.prototype[@@unscopables]</code></a> properties have been implemented (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1054759" rel="noopener" title="FIXED: Implement ES6 Symbol.unscopables">bug 1054759</a> and <a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1258163" rel="noopener" title="FIXED: Implement Array.prototype[@@unscopables]">bug 1258163</a>).</li>
<li>The ES2015 <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol/isConcatSpreadable" title="The Symbol.isConcatSpreadable well-known symbol is used to configure if an object should be flattened to its array elements when using the Array.prototype.concat() method."><code>Symbol.isConcatSpreadable</code></a> symbol has been implemented (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1041586" rel="noopener" title="FIXED: Implement Symbol.isConcatSpreadable">bug 1041586</a>).</li>
<li>The ES2015 <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/@@species" title="The Array[@@species] accessor property returns the Array constructor."><code>Array[@@species]</code></a> getter has been implemented (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1165052" rel="noopener" title="FIXED: Implement Array[@@species] and ArraySpeciesCreate in Array prototype methods.">bug 1165052</a>).</li>
<li>The ES2015 <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/@@species" title="The ArrayBuffer[@@species] accessor property returns the ArrayBuffer constructor."><code>ArrayBuffer[@@species]</code></a> getter and <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/@@species" title="The TypedArray[@@species] accessor property returns the constructor of a typed array."><code>%TypedArray%[@@species]</code></a> getter have been implemented (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1165053" rel="noopener" title="FIXED: Implement %TypedArray%[@@species] and ArrayBuffer[@@species].">bug 1165053</a>).</li>
<li>The <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/getCanonicalLocales" title="The Intl.getCanonicalLocales() method returns an array containing the canonical locale names. Duplicates will be omitted and elements will be validated as structurally valid language tags."><code>Intl.getCanonicalLocales()</code></a> method of the ECMAScript Internationalization API draft has been implemented (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1263040" rel="noopener" title="FIXED: Add Intl.getCanonicalLocales">bug 1263040</a>).</li>
</ul>
<h4 id="Deprecations_and_removals">Deprecations and removals</h4>
<ul>
<li>The deprecated <a href="/en-US/docs/Archive/Web/Old_Proxy_API">old Proxy API</a> (<code>Proxy.create</code> and <code>Proxy.createFunction()</code>) has been removed. Use the standard <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy" title="The Proxy object is used to define custom behavior for fundamental operations (e.g. property lookup, assignment, enumeration, function invocation, etc)."><code>Proxy</code></a> object instead (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=892903" rel="noopener" title="FIXED: Remove Proxy.create and Proxy.createFunction">bug 892903</a>).</li>
<li>The <code>String.prototype.contains()</code> method has been removed (it was deprecated since version 40). Use the <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/includes" title="The includes() method determines whether one string may be found within another string, returning true or false as appropriate."><code>String.prototype.includes()</code></a> method instead (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1103588" rel="noopener" title="FIXED: Remove String.prototype.contains">bug 1103588</a>).</li>
<li>The non-standard <code>RegExp.multiline</code> property (not <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/multiline" title='The multiline property indicates whether or not the "m" flag is used with the regular expression. multiline is a read-only property of an individual regular expression instance.'><code>RegExp.prototype.multiline</code></a>) has been removed. Use the standard <a href="/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#Advanced_searching_with_flags">m flag</a> instead (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1219757" rel="noopener" title="FIXED: Remove nonstandard RegExp.multiline global switch">bug 1219757</a>).</li>
<li>The <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/__defineGetter__" title="The __defineGetter__ method binds an object's property to a function to be called when that property is looked up."><code>__defineGetter__</code></a> and <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/__defineSetter__" title="The __defineSetter__ method binds an object's property to a function to be called when an attempt is made to set that property."><code>__defineSetter__</code></a> methods can no longer be called at the global scope without any object. (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1253016" rel="noopener" title="FIXED: Remove legacy __defineGetter__/__defineSetter__ this behavior">bug 1253016</a>).</li>
</ul></div>
<p>参阅:</p>
<ul>
<li><a class="external" href="https://bugzilla.mozilla.org/buglist.cgi?list_id=11242211&amp;resolution=FIXED&amp;classification=Components&amp;query_format=advanced&amp;bug_status=RESOLVED&amp;bug_status=VERIFIED&amp;component=JavaScript%20Engine&amp;component=JavaScript%20Engine%3A%20JIT&amp;component=JavaScript%3A%20GC&amp;component=JavaScript%3A%20Internationalization%20API&amp;component=JavaScript%3A%20Standard%20Library&amp;product=Core&amp;target_milestone=mozilla48" rel="noopener">All JavaScript engine bug fixes</a>.</li>
<li><a href="/en-US/Firefox/Releases/48">Complete release notes for Firefox 48</a>.</li>
</ul>
<h2 id="Firefox_47">Firefox 47</h2>
<div><ul>
<li>The new ES2017 <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/values" title="The Object.values() method returns an array of a given object's own enumerable property values, in the same order as that provided by a for...in loop (the difference being that a for-in loop enumerates properties in the prototype chain as well)."><code>Object.values()</code></a> and <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/entries" title="The Object.entries() method returns an array of a given object's own enumerable property [key, value] pairs, in the same order as that provided by a for...in loop (the difference being that a for-in loop enumerates properties in the prototype chain as well) . The order of the array returned by Object.entries() does not depend on how an object is defined. If there is a need for certain ordering then the array needs to be sorted first like Object.entries(obj).sort((a, b) =&gt; a[0] - b[0]);."><code>Object.entries()</code></a> methods have been implemented (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1232639" rel="noopener" title="FIXED: Optimize Object.values() and Object.entries() and let them ride the trains">bug 1232639</a>).</li>
<li>The deprecated <a href="/en-US/docs/Archive/Web/Old_Proxy_API">old Proxy API</a> (<code>Proxy.create</code> and <code>Proxy.createFunction</code>) now presents a deprecation warning in the console and will be removed in a future version. Use the standard <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy" title="The Proxy object is used to define custom behavior for fundamental operations (e.g. property lookup, assignment, enumeration, function invocation, etc)."><code>Proxy</code></a> object instead (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=892903" rel="noopener" title="FIXED: Remove Proxy.create and Proxy.createFunction">bug 892903</a>).</li>
<li>Support for the deprecated non-standard <code>flags</code> argument of <code>String.prototype.</code><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/match" title="The match() method retrieves the matches when matching a string against a regular expression."><code>match</code></a>/<a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/search" title="The search() method executes a search for a match between a regular expression and this String object."><code>search</code></a>/<a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace" title="The replace() method returns a new string with some or all matches of a pattern replaced by a replacement."><code>replace</code></a> has been dropped in non-release builds (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1245801" rel="noopener" title="FIXED: Disable non-standard flag argument of String.prototype.{search,match,replace} in non-release build.">bug 1245801</a>).</li>
<li>As per the new ES2016 specification, the <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy" title="The Proxy object is used to define custom behavior for fundamental operations (e.g. property lookup, assignment, enumeration, function invocation, etc)."><code>Proxy</code></a> <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/handler/enumerate">enumerate</a> trap for <code><a href="/en-US/docs/Web/JavaScript/Reference/Statements/for...in">for...in</a></code> statements has been removed (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1246318" rel="noopener" title="FIXED: Remove [[Enumerate]] and associated reflective capabilities">bug 1246318</a>).</li>
<li>The <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/indexOf" title="The indexOf() method returns the first index at which a given element can be found in the array, or -1 if it is not present."><code>Array.prototype.indexOf()</code></a> and <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/lastIndexOf" title="The lastIndexOf() method returns the last index at which a given element can be found in the array, or -1 if it is not present. The array is searched backwards, starting at fromIndex."><code>Array.prototype.lastIndexOf()</code></a> methods (and their <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray" title="A TypedArray object describes an array-like view of an underlying binary data buffer. There is no global property named TypedArray, nor is there a directly visible TypedArray constructor.  Instead, there are a number of different global properties, whose values are typed array constructors for specific element types, listed below. On the following pages you will find common properties and methods that can be used with any typed array containing elements of any type."><code>TypedArray</code></a> equivalents) have been updated to never return <code>-0</code> as per the ECMAScript specification (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1242043" rel="noopener" title="FIXED: {Array,%TypedArray%}.prototype.{i,lastI}ndexOf should never return -0">bug 1242043</a>).</li>
</ul></div>
<p>参阅:</p>
<ul>
<li><a class="external" href="https://bugzilla.mozilla.org/buglist.cgi?list_id=11242211&amp;resolution=FIXED&amp;classification=Components&amp;query_format=advanced&amp;bug_status=RESOLVED&amp;bug_status=VERIFIED&amp;component=JavaScript%20Engine&amp;component=JavaScript%20Engine%3A%20JIT&amp;component=JavaScript%3A%20GC&amp;component=JavaScript%3A%20Internationalization%20API&amp;component=JavaScript%3A%20Standard%20Library&amp;product=Core&amp;target_milestone=mozilla47" rel="noopener">All JavaScript engine bug fixes</a>.</li>
<li><a href="/en-US/Firefox/Releases/47">Complete release notes for Firefox 47</a>.</li>
</ul>
<h2 id="Firefox_46">Firefox 46</h2>
<div><ul>
<li>The ES2015 <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/unicode" title='The unicode property indicates whether or not the "u" flag is used with a regular expression. unicode is a read-only property of an individual regular expression instance.'>RegExp unicode (u) flag</a> has been implemented (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1135377" rel="noopener" title="FIXED: Support /u flag and the relevant semantics on regular expressions">bug 1135377</a>).</li>
<li>The ES2015 block-level functions have been implemented (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1071646" rel="noopener" title="FIXED: Implement ES6 block-level functions">bug 1071646</a>).</li>
<li>The ES2015 <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/sort" title="The sort() method sorts the elements of a typed array numerically in place and returns the typed array. This method has the same algorithm as Array.prototype.sort(), except that sorts the values numerically instead of as strings. TypedArray is one of the typed array types here."><code>TypedArray.prototype.sort()</code></a> method has been implemented (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1121937" rel="noopener" title="FIXED: Implement %TypedArray%.prototype.sort">bug 1121937</a>).</li>
<li>The ES2015 <a href="/en-US/docs/Web/JavaScript/Reference/Functions/arguments/@@iterator" title="The initial value of the @@iterator property is the same function object as the initial value of the Array.prototype.values property."><code>arguments[@@iterator]</code></a> has been implemented (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1067049" rel="noopener" title="FIXED: The arguments object should support the ES6 @@iterator protocol">bug 1067049</a>).</li>
<li>The experimental <a class="external" href="http://tc39.github.io/ecmascript_sharedmem/shmem.html" rel="noopener">EcmaScript Shared Memory API</a> has been implemented. See the <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer" title="The SharedArrayBuffer object is used to represent a generic, fixed-length raw binary data buffer, similar to the ArrayBuffer object, but in a way that they can be used to create views on shared memory. Unlike an ArrayBuffer, a SharedArrayBuffer cannot become detached."><code>SharedArrayBuffer</code></a> and <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Atomics" title="The Atomics object provides atomic operations as static methods. They are used with SharedArrayBuffer objects."><code>Atomics</code></a> objects. To use this experimental API set <code>javascript.options.shared_memory</code> to <code>true</code> in about:config.</li>
<li>Redeclaration of <code><a href="/en-US/docs/Web/JavaScript/Reference/Statements/let">let</a></code> and <code><a href="/en-US/docs/Web/JavaScript/Reference/Statements/const">const</a></code> variables now throws a <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/SyntaxError" title="The SyntaxError object represents an error when trying to interpret syntactically invalid code."><code>SyntaxError</code></a> instead of a <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypeError" title="The TypeError object represents an error when a value is not of the expected type."><code>TypeError</code></a> as per the ECMAScript specification (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1198833" rel="noopener" title="FIXED: Redeclaration of variables should be a SyntaxError">bug 1198833</a>).</li>
<li>In <a href="/en-US/docs/Web/JavaScript/Reference/Strict_mode">Strict mode</a>, setting properties on <a class="glossaryLink" href="/en-US/docs/Glossary/primitive" title="primitive: A primitive (primitive value, primitive data type) is data that is not an object and has no methods. In JavaScript, there are 6 primitive data types: string, number, boolean, null, undefined, symbol (new in ECMAScript 2015).">primitive</a> values will now throw a <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypeError" title="The TypeError object represents an error when a value is not of the expected type."><code>TypeError</code></a> (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=603201" rel="noopener" title="FIXED: Strict getters on primitive wrapper prototypes receive wrapped |this| values">bug 603201</a>).</li>
<li>The non-standard <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakMap/clear" title="The clear() method used to remove all elements from a WeakMap object, but is no longer part of ECMAScript and its implementations."><code>WeakMap.prototype.clear()</code></a> and <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakSet/clear" title="The clear() method used to remove all elements from a WeakSet object, but is no longer part of ECMAScript and its implementations."><code>WeakSet.prototype.clear()</code></a> methods have been removed (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1101817" rel="noopener" title="FIXED: Remove Weak{Map,Set}.prototype.clear">bug 1101817</a>).</li>
<li>The non-standard, static <code>RegExp.multiline</code> property is now deprecated (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1220457" rel="noopener" title="FIXED: Show deprecation warning for non-standard RegExp.multiline.">bug 1220457</a>).</li>
<li>Built-in accessor function names now have a "get" or "set" prefix (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1180290" rel="noopener" title="FIXED: Builtin accessor functions must be named 'get foo' or 'set foo' (where 'foo' is the name of the property used to access the accessor)">bug 1180290</a>, <a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1235656" rel="noopener" title="FIXED: GlobalObject::getSelfHostedFunction may return a function with inconsistent name.">bug 1235656</a>).</li>
<li><a href="/en-US/docs/Web/JavaScript/Reference/Operators/Array_comprehensions#Differences_to_the_older_JS1.7JS1.8_comprehensions" title="The array comprehension syntax was a JavaScript expression which allowed you to quickly assemble a new array based on an existing one. However, it has been removed from the standard and the Firefox implementation. Do not use it!">JS1.7/JS1.8 (legacy) array comprehensions</a> and <a href="/en-US/docs/Web/JavaScript/Reference/Operators/Generator_comprehensions#Differences_to_the_older_JS1.7JS1.8_comprehensions" title="The generator comprehension syntax was a JavaScript expression which allowed you to quickly assemble a new generator function based on an existing iterable object. However, it has been removed from the standard and the Firefox implementation. Do not use it!">JS1.7/JS1.8 (legacy) generator comprehensions</a> have been removed (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1220564" rel="noopener" title="FIXED: Remove legacy array/generator comprehension.">bug 1220564</a>).</li>
</ul></div>
<p>参阅:</p>
<ul>
<li><a class="external" href="https://bugzilla.mozilla.org/buglist.cgi?list_id=11242211&amp;resolution=FIXED&amp;classification=Components&amp;query_format=advanced&amp;bug_status=RESOLVED&amp;bug_status=VERIFIED&amp;component=JavaScript%20Engine&amp;component=JavaScript%20Engine%3A%20JIT&amp;component=JavaScript%3A%20GC&amp;component=JavaScript%3A%20Internationalization%20API&amp;component=JavaScript%3A%20Standard%20Library&amp;product=Core&amp;target_milestone=mozilla46" rel="noopener">All JavaScript engine bug fixes</a>.</li>
<li><a href="/en-US/Firefox/Releases/46">Complete release notes for Firefox 46</a>.</li>
</ul>
<h2 id="Firefox_45">Firefox 45</h2>
<div><ul>
<li>ES2015 <a href="/en-US/docs/Web/JavaScript/Reference/Classes">Classes</a> are now enabled by default ({{ bug }}).</li>
<li><a href="/en-US/docs/Web/JavaScript/Reference/Operators/Expression_closures" title="Expression closures are a shorthand function syntax for writing simple functions.">Expression closures</a> are deprecated and will now present a warning in the console ({{ bug }}).</li>
<li><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace" title="The replace() method returns a new string with some or all matches of a pattern replaced by a replacement."><code>String.prototype.replace</code></a> does not restore <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/n" title="The non-standard $1, $2, $3, $4, $5, $6, $7, $8, $9 properties are static and read-only properties of regular expressions that contain parenthesized substring matches.">RegExp static properties</a> after executing function parameter anymore ({{ bug }}).</li>
<li><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/random" title="The Math.random() function returns a floating-point, pseudo-random number in the range 01 (inclusive of 0, but not 1) with approximately uniform distribution over that range — which you can then scale to your desired range. The implementation selects the initial seed to the random number generation algorithm; it cannot be chosen or reset by the user."><code>Math.random()</code></a> has been updated to the better XorShift128+ algorithm ({{ bug }}).</li>
</ul></div>
<p>参阅:</p>
<ul>
<li><a class="external" href="https://bugzilla.mozilla.org/buglist.cgi?list_id=11242211&amp;resolution=FIXED&amp;classification=Components&amp;query_format=advanced&amp;bug_status=RESOLVED&amp;bug_status=VERIFIED&amp;component=JavaScript%20Engine&amp;component=JavaScript%20Engine%3A%20JIT&amp;component=JavaScript%3A%20GC&amp;component=JavaScript%3A%20Internationalization%20API&amp;component=JavaScript%3A%20Standard%20Library&amp;product=Core&amp;target_milestone=mozilla45" rel="noopener">All JavaScript engine bug fixes</a>.</li>
<li><a href="/en-US/Firefox/Releases/45">Complete release notes for Firefox 45</a>.</li>
</ul>
<h2 id="Firefox_44">Firefox 44</h2>
<div><h4 id="New_APIs_2">New APIs</h4>
<ul>
<li><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol/toPrimitive" title="The Symbol.toPrimitive is a symbol that specifies a function valued property that is called to convert an object to a corresponding primitive value."><code>Symbol.toPrimitive</code></a>, <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol/@@toPrimitive" title="The [@@toPrimitive]() method converts a Symbol object to a primitive value."><code>Symbol.prototype[@@toPrimitive]</code></a>, and <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/@@toPrimitive" title="The [@@toPrimitive]() method converts a Date object to a primitive value."><code>Date.prototype[@@toPrimitive]</code></a> have been implemented (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1054756" rel="noopener" title="FIXED: Implement ES6 Symbol.toPrimitive">bug 1054756</a>).</li>
</ul>
<h4 id="Changes">Changes</h4>
<ul>
<li>The <code><a href="/en-US/docs/Web/JavaScript/Reference/Statements/let">let</a></code> and <code><a href="/en-US/docs/Web/JavaScript/Reference/Statements/const">const</a></code> bindings in the global level have been made compliant with ES2015 semantics. See <a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=589199" rel="noopener" title="FIXED: Add an extra scope chain object for top-level script execution, encountered just before the global object, containing top-level |let| declaration bindings">bug 589199</a> and the blog post <a class="external" href="https://blog.mozilla.org/addons/2015/10/14/breaking-changes-let-const-firefox-nightly-44/" rel="noopener">"Breaking changes in let and const in Firefox Nightly 44"</a>. In addition, <code>let</code> is now available to default Web JavaScript (strict and non-strict) and does not require a version opt-in anymore (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=932517" rel="noopener" title="FIXED: Enable let without version=1.7+ in non-strict mode">bug 932517</a>).</li>
<li>If <a href="/en-US/docs/Web/JavaScript/Typed_arrays">typed arrays'</a> (like <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int8Array" title="The Int8Array typed array represents an array of twos-complement 8-bit signed integers. The contents are initialized to 0. Once established, you can reference elements in the array using the object's methods, or using standard array index syntax (that is, using bracket notation)."><code>Int8Array</code></a>) and <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer" title="The ArrayBuffer object is used to represent a generic, fixed-length raw binary data buffer. You cannot directly manipulate the contents of an ArrayBuffer; instead, you create one of the typed array objects or a DataView object which represents the buffer in a specific format, and use that to read and write the contents of the buffer."><code>ArrayBuffer</code></a>) constructors are called as a function without the <a href="/en-US/docs/Web/JavaScript/Reference/Operators/new" title="The new operator lets developers create an instance of a user-defined object type or of one of the built-in object types that has a constructor function."><code>new</code></a> operator, a <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypeError" title="The TypeError object represents an error when a value is not of the expected type."><code>TypeError</code></a> is now thrown as per the ES2015 specification (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=980945" rel="noopener" title='FIXED: Typed array constructors should not work without "new" per spec'>bug 980945</a>, <a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1214936" rel="noopener" title="FIXED: Make the ArrayBuffer constructor throw if invoked without 'new'">bug 1214936</a>).</li>
<li>The <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp" title="The RegExp constructor creates a regular expression object for matching text with a pattern."><code>RegExp</code></a> sticky flag now follows the ES2015 standard for<a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/sticky#Anchored_sticky_flag"> anchored sticky regular expressions</a> (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=773687" rel="noopener" title="FIXED: RegExp flag /y (sticky) causes ^ anchor to apply to start of match attempt rather than entire target string">bug 773687</a>).</li>
<li>The <a href="/en-US/docs/Mozilla/Projects/SpiderMonkey/Introduction_to_the_JavaScript_shell">JavaScript shell</a> (SpiderMonkey's REPL) now defaults to the default, Web-compatible JS version (and not JS1.7+ anymore) (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1192329" rel="noopener" title="FIXED: Change JS shell to default to the standard version of JS (not 1.7+)">bug 1192329</a>).</li>
</ul>
<h4 id="Removals">Removals</h4>
<ul>
<li>Support for the non-standard <a href="/en-US/docs/Web/JavaScript/Reference/Statements/let#let_blocks"><code>let</code> blocks</a> has been dropped (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1167029" rel="noopener" title="FIXED: Remove SpiderMonkey support for let blocks">bug 1167029</a>.</li>
<li>The non-standard and deprecated property <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/noSuchMethod" title="The __noSuchMethod__ property used to reference a function to be executed when a non-existent method is called on an object, but this function is no longer available."><code>Object.prototype.__noSuchMethod__</code></a> has been removed (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=683218" rel="noopener" title="FIXED: can we remove __noSuchMethod__, use proxies instead?">bug 683218</a>).</li>
</ul></div>
<p>参阅:</p>
<ul>
<li><a class="external" href="https://bugzilla.mozilla.org/buglist.cgi?list_id=11242211&amp;resolution=FIXED&amp;classification=Components&amp;query_format=advanced&amp;bug_status=RESOLVED&amp;bug_status=VERIFIED&amp;component=JavaScript%20Engine&amp;component=JavaScript%20Engine%3A%20JIT&amp;component=JavaScript%3A%20GC&amp;component=JavaScript%3A%20Internationalization%20API&amp;component=JavaScript%3A%20Standard%20Library&amp;product=Core&amp;target_milestone=mozilla44" rel="noopener">All JavaScript engine bug fixes</a>.</li>
<li><a href="/en-US/Firefox/Releases/44">Complete release notes for Firefox 44</a>.</li>
</ul>
<h2 id="Firefox_43">Firefox 43</h2>
<div><h4 id="New_APIs_3">New APIs</h4>
<ul>
<li>The new ES2016 methods <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/includes" title="The includes() method determines whether an array includes a certain value among its entries, returning true or false as appropriate."><code>Array.prototype.includes()</code></a> and <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/includes" title="The includes() method determines whether a typed array includes a certain element, returning true or false as appropriate. This method has the same algorithm as Array.prototype.includes(). TypedArray is one of the typed array types here."><code>TypedArray.prototype.includes()</code></a> are now enabled by default (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1070767" rel="noopener" title="FIXED: Enable {Array, %TypedArray%}.prototype.includes in all builds">bug 1070767</a>).</li>
</ul>
<h4 id="Changes_regarding_the_arguments_object">Changes regarding the <code>arguments</code> object</h4>
<ul>
<li>To match the ES2015 specification, <a href="/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions">arrow functions</a> no longer have their own <code><a href="/en-US/docs/Web/JavaScript/Reference/Functions/arguments">arguments</a></code> object. The <code>arguments</code> object is now lexically bound (inherited from the outer function). In most cases, <a href="/en-US/docs/Web/JavaScript/Reference/Functions/rest_parameters">rest parameters</a> are a good alternative <code>(...args) =&gt; args[i]</code>, see <a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=889158" rel="noopener" title="FIXED: Calling an arrow function shouldn't create an 'arguments' binding">bug 889158</a>.</li>
<li>The <a href="/en-US/docs/Web/JavaScript/Reference/Functions/arguments">arguments</a> object is now allowed in conjunction with <a href="/en-US/docs/Web/JavaScript/Reference/Functions/rest_parameters">rest parameters</a> (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1133298" rel="noopener" title="FIXED: 'arguments' is allowed even with rest-parameters">bug 1133298</a>).</li>
<li>From now on, a mapped <code><a href="/en-US/docs/Web/JavaScript/Reference/Functions/arguments">arguments</a></code> object in non-strict functions is only provided if the function does <strong>not</strong> contain any <a href="/en-US/docs/Web/JavaScript/Reference/Functions/rest_parameters">rest parameters</a>, any <a href="/en-US/docs/Web/JavaScript/Reference/Functions/Default_parameters">default parameters</a> or any <a href="/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment">destructured parameters</a> (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1175394" rel="noopener" title="FIXED: Mapped arguments object should only be created when its FormalParameters is a SimpleParameterList">bug 1175394</a>).</li>
</ul>
<h4 id="Other_changes">Other changes</h4>
<ul>
<li><a href="/en-US/docs/Web/JavaScript/Reference/Statements/function*">Generators</a> and <a href="/en-US/docs/Web/JavaScript/Reference/Functions/Method_definitions">generator methods</a> are no longer constructable as per ES2016 (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1191486" rel="noopener" title="FIXED: Generators should not have [[Construct]]">bug 1191486</a>).</li>
</ul></div>
<p>参阅:</p>
<ul>
<li><a class="external" href="https://bugzilla.mozilla.org/buglist.cgi?list_id=11242211&amp;resolution=FIXED&amp;classification=Components&amp;query_format=advanced&amp;bug_status=RESOLVED&amp;bug_status=VERIFIED&amp;component=JavaScript%20Engine&amp;component=JavaScript%20Engine%3A%20JIT&amp;component=JavaScript%3A%20GC&amp;component=JavaScript%3A%20Internationalization%20API&amp;component=JavaScript%3A%20Standard%20Library&amp;product=Core&amp;target_milestone=mozilla43" rel="noopener">All JavaScript engine bug fixes</a>.</li>
<li><a href="/en-US/Firefox/Releases/43">Complete release notes for Firefox 43</a>.</li>
</ul>
<h2 id="Firefox_42">Firefox 42</h2>
<div><ul>
<li>The <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Reflect" title="Reflect is a built-in object that provides methods for interceptable JavaScript operations. The methods are the same as those of proxy handlers. Reflect is not a function object, so it's not constructible."><code>Reflect</code></a> object has been implemented (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=987514" rel="noopener" title="FIXED: Implement ES6 Reflect">bug 987514</a>).</li>
<li>The implementation of the <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy" title="The Proxy object is used to define custom behavior for fundamental operations (e.g. property lookup, assignment, enumeration, function invocation, etc)."><code>Proxy</code></a> <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/handler/ownKeys" title="The handler.ownKeys() method is a trap for Reflect.ownKeys()."><code>handler.ownKeys()</code></a> trap has been updated to match the final ES2015 specification (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1049662" rel="noopener" title='FIXED: Update ES6 scripted proxies "ownKeys" to ES6 final'>bug 1049662</a>).</li>
<li>Calling <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map" title="The Map object holds key-value pairs and remembers the original insertion order of the keys."><code>Map</code></a>, <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set" title="The Set object lets you store unique values of any type, whether primitive values or object references."><code>Set</code></a>, or <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakMap" title="The WeakMap object is a collection of key/value pairs in which the keys are weakly referenced.  The keys must be objects and the values can be arbitrary values."><code>WeakMap</code></a> without <a href="/en-US/docs/Web/JavaScript/Reference/Operators" title="This chapter documents all the JavaScript language operators, expressions and keywords."><code>new</code></a>, will now throw a <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypeError" title="The TypeError object represents an error when a value is not of the expected type."><code>TypeError</code></a> (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1083752" rel="noopener" title="FIXED: Calling Map/Set/WeakMap() (without `new`) should throw">bug 1083752</a>).</li>
</ul></div>
<p>参阅:</p>
<ul>
<li><a class="external" href="https://bugzilla.mozilla.org/buglist.cgi?list_id=11242211&amp;resolution=FIXED&amp;classification=Components&amp;query_format=advanced&amp;bug_status=RESOLVED&amp;bug_status=VERIFIED&amp;component=JavaScript%20Engine&amp;component=JavaScript%20Engine%3A%20JIT&amp;component=JavaScript%3A%20GC&amp;component=JavaScript%3A%20Internationalization%20API&amp;component=JavaScript%3A%20Standard%20Library&amp;product=Core&amp;target_milestone=mozilla42" rel="noopener">All JavaScript engine bug fixes</a>.</li>
<li><a href="/en-US/Firefox/Releases/42">Complete release notes for Firefox 42</a>.</li>
</ul>
<h2 id="Firefox_41">Firefox 41</h2>
<div><ul>
<li><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/prototype" title="The Date.prototype property represents the prototype for the Date constructor."><code>Date.prototype</code></a> is now an ordinary object, not a <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date" title="Creates a JavaScript Date instance that represents a single moment in time. Date objects use a Unix Time Stamp, an integer value that is the number of milliseconds since 1 January 1970 UTC."><code>Date</code></a> instance anymore (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=861219" rel="noopener" title="FIXED: Date.prototype should be a non-Date Object">bug 861219</a>).</li>
<li><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toString" title="The toString() method returns a string representing the specified Date object."><code>Date.prototype.toString</code></a> is now a generic method (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=861219" rel="noopener" title="FIXED: Date.prototype should be a non-Date Object">bug 861219</a>).</li>
<li><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol/species" title="The well-known symbol Symbol.species specifies a function-valued property that the constructor function uses to create derived objects."><code>Symbol.species</code></a> has been added (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1131043" rel="noopener" title="FIXED: Implement Symbol.species">bug 1131043</a>).</li>
<li><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/@@species" title="The Map[@@species] accessor property returns the Map constructor."><code>Map[@@species]</code></a> and <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set/@@species" title="The Set[@@species] accessor property returns the Set constructor."><code>Set[@@species]</code></a> getters have been added (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1131043" rel="noopener" title="FIXED: Implement Symbol.species">bug 1131043</a>).</li>
<li>Non-standard <a href="/en-US/docs/Web/JavaScript/Reference/Statements/let#let_expressions" title="The let statement declares a block scope local variable, optionally initializing it to a value.">let expression</a> support has been dropped (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1023609" rel="noopener" title="FIXED: Remove SpiderMonkey support for let expressions">bug 1023609</a>).</li>
<li><a href="/en-US/docs/Web/JavaScript/Reference/Functions/Default_parameters#Destructured_parameter_with_default_value_assignment" title="Default function parameters allow named parameters to be initialized with default values if no value or undefined is passed.">Destructured parameters with default value assignment</a> are now supported (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1018628" rel="noopener" title="FIXED: Destructured parameters incorrectly disallow default value in function">bug 1018628</a>).</li>
<li>Per ES2015, curly braces are required for <a href="/en-US/docs/Web/JavaScript/Reference/Functions/Method_definitions">method definitions</a>. Syntax without them will fail from now on (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1150855" rel="noopener" title="FIXED: Method definitions require curly brackets">bug 1150855</a>).</li>
<li><a href="/en-US/docs/Web/JavaScript/Reference/Functions/Method_definitions">Method definitions</a> (except for generator methods) are not constructable anymore (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1059908" rel="noopener" title="FIXED: Method definitions and getter/setter functions should not be constructors">bug 1059908</a> and <a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1166950" rel="noopener" title="FIXED: Generator methods incorrectly restricted from use as constructors">bug 1166950</a>).</li>
<li>As part of ES2015 specification compliance, parenthesized <a href="/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment">destructuring</a> patterns, like <code>([a, b]) = [1, 2]</code> or <code>({a, b}) = { a: 1, b: 2 }</code>, are now considered invalid and will throw a <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/SyntaxError" title="The SyntaxError object represents an error when trying to interpret syntactically invalid code."><code>SyntaxError</code></a>. See <a class="external" href="http://whereswalden.com/2015/06/20/new-changes-to-make-spidermonkeys-and-firefoxs-parsing-of-destructuring-patterns-more-spec-compliant/" rel="noopener">Jeff Walden's blog post</a> for more details.</li>
<li>The <code><a href="/en-US/docs/Web/JavaScript/Reference/Operators/new.target">new.target</a></code> syntax has been added (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1141865" rel="noopener" title="FIXED: Implement ES6 NewTarget">bug 1141865</a>).</li>
</ul></div>
<p>参阅:</p>
<ul>
<li><a class="external" href="https://bugzilla.mozilla.org/buglist.cgi?list_id=11242211&amp;resolution=FIXED&amp;classification=Components&amp;query_format=advanced&amp;bug_status=RESOLVED&amp;bug_status=VERIFIED&amp;component=JavaScript%20Engine&amp;component=JavaScript%20Engine%3A%20JIT&amp;component=JavaScript%3A%20GC&amp;component=JavaScript%3A%20Internationalization%20API&amp;component=JavaScript%3A%20Standard%20Library&amp;product=Core&amp;target_milestone=mozilla41" rel="noopener">All JavaScript engine bug fixes</a>.</li>
<li><a href="/en-US/Firefox/Releases/41">Complete release notes for Firefox 41</a>.</li>
</ul>
<h2 id="Firefox_40">Firefox 40</h2>
<div><ul>
<li>Unreachable code after <a href="/en-US/docs/Web/JavaScript/Reference/Statements/return" title="The return statement ends function execution and specifies a value to be returned to the function caller."><code>return</code></a> statement (including unreachable expression after <a href="/en-US/docs/Web/JavaScript/Reference/Statements/return#Automatic_semicolon_insertion" title="The return statement ends function execution and specifies a value to be returned to the function caller.">semicolon-less return statements</a>) will now show a warning in the console (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1005110" rel="noopener" title="FIXED: Warn about unreachable code after semicolon-less return statement">bug 1005110</a>, <a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1151931" rel="noopener" title='FIXED: Warning for "unreachable expression after semicolon-less return statement" triggers incorrectly (braceless if, ASI)'>bug 1151931</a>).</li>
<li><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol/match" title="The Symbol.match well-known symbol specifies the matching of a regular expression against a string. This function is called by the String.prototype.match() method."><code>Symbol.match</code></a> has been added (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1054755" rel="noopener" title="FIXED: Implement ES6 Symbol.match and IsRegExp intrinsic operation">bug 1054755</a>).</li>
<li>Passing an object which has a property named <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol/match" title="The Symbol.match well-known symbol specifies the matching of a regular expression against a string. This function is called by the String.prototype.match() method."><code>Symbol.match</code></a> with a <a class="glossaryLink" href="/en-US/docs/Glossary/truthy" title='truthy: In JavaScript, a truthy value is a value that is considered  true when encountered in a Boolean context. All values are truthy unless they are defined as falsy (i.e., except for false, 0, "", null, undefined, and NaN).'>truthy</a> value to <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith" title="The startsWith() method determines whether a string begins with the characters of a specified string, returning true or false as appropriate."><code>String.prototype.startsWith</code></a>, <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/endsWith" title="The endsWith() method determines whether a string ends with the characters of a specified string, returning true or false as appropriate."><code>String.prototype.endsWith</code></a>, and <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/contains" title="The documentation about this has not yet been written; please consider contributing!"><code>String.prototype.contains</code></a> now throws a <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypeError" title="The TypeError object represents an error when a value is not of the expected type."><code>TypeError</code></a> (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1054755" rel="noopener" title="FIXED: Implement ES6 Symbol.match and IsRegExp intrinsic operation">bug 1054755</a>).</li>
<li><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp" title="The RegExp constructor creates a regular expression object for matching text with a pattern."><code>RegExp</code></a> function returns pattern itself if called without <a href="/en-US/docs/Web/JavaScript/Reference/Operators/new" title="The new operator lets developers create an instance of a user-defined object type or of one of the built-in object types that has a constructor function."><code>new</code></a> and pattern object has a property named <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol/match" title="The Symbol.match well-known symbol specifies the matching of a regular expression against a string. This function is called by the String.prototype.match() method."><code>Symbol.match</code></a> with a <a class="glossaryLink" href="/en-US/docs/Glossary/truthy" title='truthy: In JavaScript, a truthy value is a value that is considered  true when encountered in a Boolean context. All values are truthy unless they are defined as falsy (i.e., except for false, 0, "", null, undefined, and NaN).'>truthy</a> value, and the pattern object's <code>constructor</code> property equals to  <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp" title="The RegExp constructor creates a regular expression object for matching text with a pattern."><code>RegExp</code></a> function. (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1147817" rel="noopener" title="FIXED: Update RegExp constructor match to ES6 spec.">bug 1147817</a>).</li>
<li>Support for the non-standard JS1.7 destructuring for-in has been dropped (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1083498" rel="noopener" title="FIXED: Remove SpiderMonkey support for destructuring for-in (JS1.7-only language extension)">bug 1083498</a>).</li>
<li><a href="/en-US/docs/Web/JavaScript/Reference/Statements/for...in#Firefox-specific_notes">Non-standard initializer expressions</a> in <a href="/en-US/docs/Web/JavaScript/Reference/Statements/for...in">for...in</a> loops are now ignored and will present a warning in the console. (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=748550" rel="noopener" title="FIXED: Remove InitialiserNoIn[opt] from ... in for(var ... in obj) to help simplify ES6">bug 748550</a> and <a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1164741" rel="noopener" title="FIXED: Add back partial support for |for (var i = 0 in obj);| syntax, ignoring the initializer rather than failing on it">bug 1164741</a>).</li>
<li><code><a href="/en-US/docs/Web/JavaScript/Reference/Lexical_grammar#Unicode_code_point_escapes">\u{xxxxxx}</a></code> Unicode code point escapes have been added (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=320500" rel="noopener" title="FIXED: Add \u{xxxxxx} string literals for non-BMP Unicode characters">bug 320500</a>).</li>
<li><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/includes#String.prototype.contains" title="The includes() method determines whether one string may be found within another string, returning true or false as appropriate."><code>String.prototype.contains</code></a> has been replaced with <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/includes" title="The includes() method determines whether one string may be found within another string, returning true or false as appropriate."><code>String.prototype.includes</code></a>, <code>String.prototype.contains</code> is kept as an alias (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1102219" rel="noopener" title="FIXED: Rename String.prototype.contains to String.prototype.includes">bug 1102219</a>).</li>
<li>If the <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView" title="The DataView view provides a low-level interface for reading and writing multiple number types in a binary ArrayBuffer, without having to care about the platform's endianness."><code>DataView</code></a> constructor is called as a function without the <a href="/en-US/docs/Web/JavaScript/Reference/Operators/new" title="The new operator lets developers create an instance of a user-defined object type or of one of the built-in object types that has a constructor function."><code>new</code></a> operator, a <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypeError" title="The TypeError object represents an error when a value is not of the expected type."><code>TypeError</code></a> is now thrown as per the ES2015 specification.</li>
<li>An issue regressed in Firefox 21, where proxyfied arrays without the <code>get</code> trap were not working properly, has been fixed. If the <code>get</code> trap in a <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy" title="The Proxy object is used to define custom behavior for fundamental operations (e.g. property lookup, assignment, enumeration, function invocation, etc)."><code>Proxy</code></a> was not defined, <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/length" title="The length property of an object which is an instance of type Array sets or returns the number of elements in that array. The value is an unsigned, 32-bit integer that is always numerically greater than the highest index in the array."><code>Array.length</code></a> returned <code>0</code> and the <code>set</code> trap didn't get called. A workaround was to add the <code>get</code> trap even if was not necessary in your code. This issue has been fixed now (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=895223" rel="noopener" title="FIXED: Can't JSON stringify a proxy to an array">bug 895223</a>).</li>
<li><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakMap/prototype" title="The WeakMap.prototype property represents the prototype for the WeakMap constructor."><code>WeakMap.prototype</code></a> and <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakSet/prototype" title="The WeakSet.prototype property represents the prototype for the WeakSet constructor."><code>WeakSet.prototype</code></a> have been updated to be just ordinary objects, per ES2015 specification (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1055473" rel="noopener" title="FIXED: {WeakSet, WeakMap}.prototype should be an ordinary object">bug 1055473</a>).</li>
</ul></div>
<p>参阅:</p>
<ul>
<li><a class="external" href="https://bugzilla.mozilla.org/buglist.cgi?list_id=11242211&amp;resolution=FIXED&amp;classification=Components&amp;query_format=advanced&amp;bug_status=RESOLVED&amp;bug_status=VERIFIED&amp;component=JavaScript%20Engine&amp;component=JavaScript%20Engine%3A%20JIT&amp;component=JavaScript%3A%20GC&amp;component=JavaScript%3A%20Internationalization%20API&amp;component=JavaScript%3A%20Standard%20Library&amp;product=Core&amp;target_milestone=mozilla40" rel="noopener">All JavaScript engine bug fixes</a>.</li>
<li><a href="/en-US/Firefox/Releases/40">Complete release notes for Firefox 40</a>.</li>
</ul>
<h2 id="Firefox_39">Firefox 39</h2>
<div><ul>
<li>The <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp"><code>RegExp</code> constructor</a> no longer throws when the first argument is a <code>RegExp</code> and the second <code>flags</code> argument is present (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1108949" rel="noopener" title="FIXED: RegExp(RegExp object, flags) no longer throws">bug 1108949</a>).</li>
<li>The <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/noSuchMethod" title="The __noSuchMethod__ property used to reference a function to be executed when a non-existent method is called on an object, but this function is no longer available."><code>Object.prototype.__noSuchMethod__</code></a> property is now deprecated and throws a console warning (see <a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1140428" rel="noopener" title="FIXED: Warn when __noSuchMethod__ is used">bug 1140428</a> and this <a class="external" href="https://groups.google.com/forum/#!topic/mozilla.dev.platform/0EkHgphxUo8" rel="noopener">platform announcement</a>).</li>
<li>The implementation of the <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy" title="The Proxy object is used to define custom behavior for fundamental operations (e.g. property lookup, assignment, enumeration, function invocation, etc)."><code>Proxy</code></a> object has been updated to comply more with the ES2015 specification:
<ul>
<li>The <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/handler/defineProperty" title="The handler.defineProperty() method is a trap for Object.defineProperty()."><code>defineProperty</code></a> and <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/handler/set" title="The handler.set() method is a trap for setting a property value."><code>set</code></a> handlers now need to explicitly return <code>true</code> to be successful, otherwise a <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypeError" title="The TypeError object represents an error when a value is not of the expected type."><code>TypeError</code></a> exception will be thrown in strict mode (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1132522" rel="noopener" title="FIXED: Treat false return value from certain Proxy handler methods as failure">bug 1132522</a>).</li>
<li>If the <a href="/en-US/docs/Web/API/Window" title="The Window interface represents a window containing a DOM document; the document property points to the DOM document loaded in that window."><code>window</code></a> object is set as the target, those handlers will now throw a <code>TypeError</code> (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=828137" rel="noopener" title="FIXED: Need APIs that would allow proxies to implement Reject in spec terms">bug 828137</a>).</li>
</ul>
</li>
<li>When using <a href="/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions">arrow functions</a> (<code>=&gt;</code>), a line terminator (<code>\n</code>) is no longer allowed after arrow function arguments (<code>() \n =&gt; {}</code>) (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1141392" rel="noopener" title="FIXED: Line terminator incorrectly allowed after arrow function arguments">bug 1141392</a>).</li>
<li><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/toString" title="The toString() method returns a string representing the regular expression."><code>RegExp.prototype.toString</code></a> is now a generic function (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1079919" rel="noopener" title="FIXED: Make RegExp.prototype.toString to be a generic function">bug 1079919</a>).</li>
<li>The non-standard <code>flags</code> argument of <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/match" title="The match() method retrieves the matches when matching a string against a regular expression."><code>String.prototype.match()</code></a>, <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/search" title="The search() method executes a search for a match between a regular expression and this String object."><code>String.prototype.search()</code></a>, and <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace" title="The replace() method returns a new string with some or all matches of a pattern replaced by a replacement."><code>String.prototype.replace()</code></a> is now deprecated and throws a console warning (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1142351" rel="noopener" title="FIXED: Add console warnings for non-standard flag argument of String.prototype.{search,match,replace}.">bug 1142351</a>).</li>
<li>The try/catch behavior of <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign" title="The Object.assign() method is used to copy the values of all enumerable own properties from one or more source objects to a target object. It will return the target object."><code>Object.assign()</code></a> has been removed to conform with the latest ES2015 draft (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1103344" rel="noopener" title="FIXED: Remove the try/catch behavior of Object.assign">bug 1103344</a>).</li>
</ul></div>
<p>参阅:</p>
<ul>
<li><a class="external" href="https://bugzilla.mozilla.org/buglist.cgi?list_id=11242211&amp;resolution=FIXED&amp;classification=Components&amp;query_format=advanced&amp;bug_status=RESOLVED&amp;bug_status=VERIFIED&amp;component=JavaScript%20Engine&amp;component=JavaScript%20Engine%3A%20JIT&amp;component=JavaScript%3A%20GC&amp;component=JavaScript%3A%20Internationalization%20API&amp;component=JavaScript%3A%20Standard%20Library&amp;product=Core&amp;target_milestone=mozilla39" rel="noopener">All JavaScript engine bug fixes</a>.</li>
<li><a href="/en-US/Firefox/Releases/39">Complete release notes for Firefox 39</a>.</li>
</ul>
<h2 id="Firefox_38">Firefox 38</h2>
<div><ul>
<li><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Generator/return" title="The return() method returns the given value and finishes the generator."><code>Generator.prototype.return()</code></a> is implemented (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1115868" rel="noopener" title="FIXED: Implement Generator.prototype.return">bug 1115868</a>).</li>
<li><a href="/en-US/docs/Web/JavaScript/Reference/Functions/set" title="The set syntax binds an object property to a function to be called when there is an attempt to set that property."><code>Setter</code></a> with a <a href="/en-US/docs/Web/JavaScript/Reference/Functions/rest_parameters" title="The rest parameter syntax allows us to represent an indefinite number of arguments as an array.">rest parameter</a> is now a <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/SyntaxError" title="The SyntaxError object represents an error when trying to interpret syntactically invalid code."><code>SyntaxError</code></a> (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1089632" rel="noopener" title="FIXED: Setter with a RestParameter should be a SyntaxError">bug 1089632</a>).</li>
<li>The <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/name" title="A Function object's read-only name property indicates the function's name as specified when it was created, or &quot;anonymous&quot; for functions created anonymously."><code>name</code></a> property of functions is configurable now (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1084019" rel="noopener" title='FIXED: ES6 "name" property of functions should be configurable'>bug 1084019</a>).</li>
<li>Several <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array" title="The JavaScript Array object is a global object that is used in the construction of arrays; which are high-level, list-like objects."><code>Array</code></a> methods have been implemented for <a href="/en-US/docs/Web/JavaScript/Typed_arrays">typed arrays</a> as well:
<ul>
<li>The <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/of" title="The TypedArray.of() method creates a new typed array with a variable number of arguments. This method is nearly the same as Array.of()."><code>of()</code></a> and <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/from" title="The TypedArray.from() method creates a new typed array from an array-like or iterable object. This method is nearly the same as Array.from()."><code>from()</code></a> methods (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=896608" rel="noopener" title="FIXED: Implement ES6 %TypedArray%.{of, from}">bug 896608</a>).</li>
<li>The <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/forEach" title="The forEach() method executes a provided function once per array element. This method has the same algorithm as Array.prototype.forEach(). TypedArray is one of the typed array types here."><code>forEach()</code></a> method (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1107645" rel="noopener" title="FIXED: Implement %TypedArray%.prototype.forEach">bug 1107645</a>).</li>
<li>The <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/filter" title="The filter() method creates a new typed array with all elements that pass the test implemented by the provided function. This method has the same algorithm as Array.prototype.filter(). TypedArray is one of the typed array types here."><code>filter()</code></a> and <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/map" title="The map() method creates a new typed array with the results of calling a provided function on every element in this typed array. This method has the same algorithm as Array.prototype.map(). TypedArray is one of the typed array types here."><code>map()</code></a> methods (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1121936" rel="noopener" title="FIXED: Implement %TypedArray%.prototype.{map, filter}">bug 1121936</a>).</li>
<li>The <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/slice" title="The slice() method returns a shallow copy of a portion of a typed array into a new typed array object. This method has the same algorithm as Array.prototype.slice(). TypedArray is one of the typed array types here."><code>slice()</code></a> method (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1121935" rel="noopener" title="FIXED: Implement %TypedArray%.prototype.slice">bug 1121935</a>).</li>
</ul>
</li>
<li>Duplicated parameter name is no longer allowed when rest-parameter is present (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1096376" rel="noopener" title="FIXED: Don't allow duplicate parameter names when rest-parameter is present">bug 1096376</a>).</li>
<li>Duplicated parameter name is no longer allowed in arrow functions (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1096377" rel="noopener" title="FIXED: Don't allow duplicate parameter names in arrow functions">bug 1096377</a>).</li>
<li>Duplicated parameter name is no longer allowed in concise method definitions (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1096378" rel="noopener" title="FIXED: Don't allow duplicate parameter names in concise method definitions">bug 1096378</a>).</li>
<li>Warning is shown when <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map" title="The Map object holds key-value pairs and remembers the original insertion order of the keys."><code>Map</code></a>/<a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set" title="The Set object lets you store unique values of any type, whether primitive values or object references."><code>Set</code></a>/<a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakMap" title="The WeakMap object is a collection of key/value pairs in which the keys are weakly referenced.  The keys must be objects and the values can be arbitrary values."><code>WeakMap</code></a> constructor is called without <a href="/en-US/docs/Web/JavaScript/Reference/Operators/new" title="The new operator lets developers create an instance of a user-defined object type or of one of the built-in object types that has a constructor function."><code>new</code></a> (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1108930" rel="noopener" title='FIXED: Fix in-tree consumers that call Map/Set/WeakMap constructors without "new"'>bug 1108930</a>).</li>
<li>The <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakMap/get" title="The get() method returns a specified element from a WeakMap object."><code>get</code></a>, <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakMap/has" title="The has() method returns a boolean indicating whether an element with the specified key exists in the WeakMap object or not."><code>has</code></a>, and <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakMap/delete" title="The delete() method removes the specified element from a WeakMap object."><code>delete</code></a> methods of <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakMap" title="The WeakMap object is a collection of key/value pairs in which the keys are weakly referenced.  The keys must be objects and the values can be arbitrary values."><code>WeakMap</code></a> objects no longer throw when the <code>key</code> parameter is not an object (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1127827" rel="noopener" title="FIXED: WeakMap.get, has and delete should not throw when key param is not an object">bug 1127827</a>).</li>
<li>The optional and non-standard second <code>fallback</code> parameter for <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakMap/get" title="The get() method returns a specified element from a WeakMap object."><code>WeakMap.prototype.get()</code></a> has been removed (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1127827" rel="noopener" title="FIXED: WeakMap.get, has and delete should not throw when key param is not an object">bug 1127827</a>).</li>
<li>When defining a <a href="/en-US/docs/Web/JavaScript/Reference/Functions/Method_definitions">generator method</a>, "<code>set</code>" and "<code>get</code>" are no longer invalid names (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1073809" rel="noopener" title='FIXED: Allow "get" and "set" as names for generator methods'>bug 1073809</a>).</li>
<li><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/source" title="The source property returns a String containing the source text of the regexp object, and it doesn't contain the two forward slashes on both sides and any flags."><code>RegExp.prototype.source</code></a> now returns "(?:)" instead of an empty string for empty regular expressions (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1130798" rel="noopener" title='FIXED: new RegExp().source should return "(?:)"'>bug 1130798</a>).</li>
<li><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/source" title="The source property returns a String containing the source text of the regexp object, and it doesn't contain the two forward slashes on both sides and any flags."><code>RegExp.prototype.source</code></a> and <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/toString" title="The toString() method returns a string representing the regular expression."><code>RegExp.prototype.toString()</code></a> now escape regular expression patterns properly (e.g. line terminators, "\n") (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1130860" rel="noopener" title="FIXED: Implement all of EscapeRegExpPattern instead of just escaping forward slashes">bug 1130860</a>).</li>
<li>The <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Regexp" title="The RegExp constructor creates a regular expression object for matching text with a pattern."><code>Regexp</code></a> <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Regexp/global" title='The global property indicates whether or not the "g" flag is used with the regular expression. global is a read-only property of an individual regular expression instance.'><code>global</code></a>, <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Regexp/ignoreCase" title='The ignoreCase property indicates whether or not the "i" flag is used with the regular expression. ignoreCase is a read-only property of an individual regular expression instance.'><code>ignoreCase</code></a>, <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Regexp/multiline" title='The multiline property indicates whether or not the "m" flag is used with the regular expression. multiline is a read-only property of an individual regular expression instance.'><code>multiline</code></a>, and <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Regexp/sticky" title="The sticky property reflects whether or not the search is sticky (searches in strings only from the index indicated by the lastIndex property of this regular expression). sticky is a read-only property of an individual regular expression object."><code>sticky</code></a> properties are now prototype accessor properties rather than own data properties of <code>RegExp</code> instances (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1120169" rel="noopener" title="FIXED: Implement RegExp.prototype.{global, ignoreCase, multiline, source, sticky, unicode}">bug 1120169</a>).</li>
<li>The <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/source" title="The source property returns a String containing the source text of the regexp object, and it doesn't contain the two forward slashes on both sides and any flags."><code>RegExp.prototype.source</code></a> property is now prototype accessor property rather than own data property of <code>RegExp</code> instances (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1120169" rel="noopener" title="FIXED: Implement RegExp.prototype.{global, ignoreCase, multiline, source, sticky, unicode}">bug 1120169</a>). Available only in non-Release version, due to <a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1150297" rel="noopener" title="FIXED: Move source property to RegExp instance again.">bug 1150297</a>.</li>
<li><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/toString" title="The toString() method returns a string representing the source code of the function."><code>Function.prototype.toString()</code></a> now throws for <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy" title="The Proxy object is used to define custom behavior for fundamental operations (e.g. property lookup, assignment, enumeration, function invocation, etc)."><code>Proxy</code></a> objects (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1100936" rel="noopener" title="FIXED: Handle various operations on revoked proxies">bug 1100936</a>).</li>
</ul></div>
<p>参阅:</p>
<ul>
<li><a class="external" href="https://bugzilla.mozilla.org/buglist.cgi?list_id=11242211&amp;resolution=FIXED&amp;classification=Components&amp;query_format=advanced&amp;bug_status=RESOLVED&amp;bug_status=VERIFIED&amp;component=JavaScript%20Engine&amp;component=JavaScript%20Engine%3A%20JIT&amp;component=JavaScript%3A%20GC&amp;component=JavaScript%3A%20Internationalization%20API&amp;component=JavaScript%3A%20Standard%20Library&amp;product=Core&amp;target_milestone=mozilla38" rel="noopener">All JavaScript engine bug fixes</a>.</li>
<li><a href="/en-US/Firefox/Releases/38">Complete release notes for Firefox 38</a>.</li>
</ul>
<h2 id="Firefox_37">Firefox 37</h2>
<div><ul>
<li>The <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map" title="The Map object holds key-value pairs and remembers the original insertion order of the keys."><code>Map</code></a>, <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set" title="The Set object lets you store unique values of any type, whether primitive values or object references."><code>Set</code></a>, <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakMap" title="The WeakMap object is a collection of key/value pairs in which the keys are weakly referenced.  The keys must be objects and the values can be arbitrary values."><code>WeakMap</code></a> and <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakSet" title="The WeakSet object lets you store weakly held objects in a collection."><code>WeakSet</code></a> constructors now ignore null iterable (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1092538" rel="noopener" title="FIXED: Ignore `null` iterable in Map, Set, WeakMap and WeakSet constructors">bug 1092538</a>).</li>
<li>The <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map" title="The Map object holds key-value pairs and remembers the original insertion order of the keys."><code>Map</code></a>, <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set" title="The Set object lets you store unique values of any type, whether primitive values or object references."><code>Set</code></a>, <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakMap" title="The WeakMap object is a collection of key/value pairs in which the keys are weakly referenced.  The keys must be objects and the values can be arbitrary values."><code>WeakMap</code></a> and <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakSet" title="The WeakSet object lets you store weakly held objects in a collection."><code>WeakSet</code></a> constructors now supports monkey-patched <code>prototype.set</code> or <code>prototype.add</code> (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=804279" rel="noopener" title="FIXED: Support monkey-patched/overridden adder in Map, Set, WeakMap, and WeakSet constructors.">bug 804279</a>).</li>
<li>The Non-standard <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/quote" title='The non-standard quote() method returns a copy of the string, replacing various special characters in the string with their escape sequences and wrapping the result in double-quotes (").'><code>String.prototype.quote()</code></a> method has been removed (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1103181" rel="noopener" title="FIXED: Remove String.prototype.quote">bug 1103181</a>).</li>
<li>The <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/flags" title="The flags property returns a string consisting of the flags of the current regular expression object."><code>RegExp.prototype.flags</code></a> property has been implemented (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1108467" rel="noopener" title="FIXED: Implement RegExp.prototype.flags">bug 1108467</a>).</li>
<li>Several <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array" title="The JavaScript Array object is a global object that is used in the construction of arrays; which are high-level, list-like objects."><code>Array</code></a> methods have been implemented for <a href="/en-US/docs/Web/JavaScript/Typed_arrays">typed arrays</a> as well:
<ul>
<li>The <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/every" title="The every() method tests whether all elements in the typed array pass the test implemented by the provided function. This method has the same algorithm as Array.prototype.every(). TypedArray is one of the typed array types here."><code>every()</code></a> and <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/some" title="The some() method tests whether some element in the typed array passes the test implemented by the provided function. This method has the same algorithm as Array.prototype.some(). TypedArray is one of the typed array types here."><code>some()</code></a> methods (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1116390" rel="noopener" title="FIXED: Implement %TypedArray%.prototype.{every, some}">bug 1116390</a>).</li>
<li>The <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/find" title="The find() method returns a value in the typed array, if an element satisfies the provided testing function. Otherwise undefined is returned. TypedArray is one of the typed array types here."><code>find()</code></a> and <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/findIndex" title="The findIndex() method returns an index in the typed array, if an element in the typed array satisfies the provided testing function. Otherwise -1 is returned."><code>findIndex()</code></a> methods (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1078975" rel="noopener" title="FIXED: Implement %TypedArray%.prototype.{find, findIndex}">bug 1078975</a>).</li>
<li>The <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/fill" title="The fill() method fills all the elements of a typed array from a start index to an end index with a static value. This method has the same algorithm as Array.prototype.fill(). TypedArray is one of the typed array types here."><code>fill()</code></a> method (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1113722" rel="noopener" title="FIXED: Implement %TypedArray%.prototype.fill">bug 1113722</a>).</li>
<li>The <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/indexOf" title="The indexOf() method returns the first index at which a given element can be found in the typed array, or -1 if it is not present. This method has the same algorithm as Array.prototype.indexOf(). TypedArray is one of the typed array types here."><code>indexOf()</code></a> and <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/lastIndexOf" title="The lastIndexOf() method returns the last index at which a given element can be found in the typed array, or -1 if it is not present. The typed array is searched backwards, starting at fromIndex. This method has the same algorithm as Array.prototype.lastIndexOf(). TypedArray is one of the typed array types here."><code>lastIndexOf()</code></a> methods (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1107601" rel="noopener" title="FIXED: Implement %TypedArray%.prototype.{indexOf, lastIndexOf}">bug 1107601</a>).</li>
<li>The <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/join" title="The join() method joins all elements of an array into a string. This method has the same algorithm as Array.prototype.join(). TypedArray is one of the typed array types here."><code>join()</code></a> method (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1115817" rel="noopener" title="FIXED: Implement %TypedArray%.prototype.join">bug 1115817</a>).</li>
<li>The <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reduce" title="The reduce() method applies a function against an accumulator and each value of the typed array (from left-to-right) has to reduce it to a single value. This method has the same algorithm as Array.prototype.reduce(). TypedArray is one of the typed array types here."><code>reduce()</code></a> and <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reduceRight" title="The reduceRight() method applies a function against an accumulator and each value of the typed array (from right-to-left) has to reduce it to a single value. This method has the same algorithm as Array.prototype.reduceRight(). TypedArray is one of the typed array types here."><code>reduceRight()</code></a> methods (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1117350" rel="noopener" title="FIXED: Implement %TypedArray%.prototype.{reduce, reduceRight}">bug 1117350</a>).</li>
<li>The <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/reverse" title="The reverse() method reverses a typed array in place. The first typed array element becomes the last and the last becomes the first. This method has the same algorithm as Array.prototype.reverse(). TypedArray is one of the typed array types here."><code>reverse()</code></a> method (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1111516" rel="noopener" title="FIXED: Implement %TypedArray%.prototype.reverse">bug 1111516</a>).</li>
<li>The <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/keys" title="The keys() method returns a new Array Iterator object that contains the keys for each index in the array."><code>keys()</code></a>, <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/values" title="The values() method returns a new Array Iterator object that contains the values for each index in the array."><code>values()</code></a>, and <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/entries" title="The entries() method returns a new Array Iterator object that contains the key/value pairs for each index in the array."><code>entries()</code></a> methods (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1119217" rel="noopener" title="FIXED: Implement %TypedArray%.prototype.{keys, values, entries}">bug 1119217</a>).</li>
</ul>
</li>
<li>ES2015 Proxy <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/handler/enumerate" title="The handler.enumerate() method used to be a trap for for...in statements, but has been removed from the ECMAScript standard in ES2016 and is deprecated in browsers."><code>enumerate</code></a> trap is implemented (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=783829" rel="noopener" title="FIXED: Using for-in on a proxy should call the enumerate trap, not the iterate trap">bug 783829</a>).</li>
<li>The <code>configurable</code> attribute of the <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/length" title="The length property indicates the number of parameters expected by the function."><code>Function.length</code></a> property is now <code>true</code> per the ES2015 specification (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=911142" rel="noopener" title='FIXED: ES6 "length" property of functions should be configurable'>bug 911142</a>).</li>
<li>The development of <a class="external" href="http://wiki.ecmascript.org/doku.php?id=strawman:data_parallelism" rel="noopener">ParallelJS (PJS)</a> has been discontinued due to the limited future prospects, little attention and code complexity. The experimental implementation that had been enabled only on the Nightly channel, including the <code>Array.prototype.mapPar</code>, <code>filterPar</code> and <code>reducePar</code> methods, has been completely removed.</li>
</ul></div>
<p>参阅:</p>
<ul>
<li><a class="external" href="https://bugzilla.mozilla.org/buglist.cgi?list_id=11242211&amp;resolution=FIXED&amp;classification=Components&amp;query_format=advanced&amp;bug_status=RESOLVED&amp;bug_status=VERIFIED&amp;component=JavaScript%20Engine&amp;component=JavaScript%20Engine%3A%20JIT&amp;component=JavaScript%3A%20GC&amp;component=JavaScript%3A%20Internationalization%20API&amp;component=JavaScript%3A%20Standard%20Library&amp;product=Core&amp;target_milestone=mozilla37" rel="noopener">All JavaScript engine bug fixes</a>.</li>
<li><a href="/en-US/Firefox/Releases/37">Complete release notes for Firefox 37</a>.</li>
</ul>
<h2 id="Firefox_36">Firefox 36</h2>
<div><ul>
<li>The <a href="/en-US/docs/Web/JavaScript/New_in_JavaScript/ECMAScript_6_support_in_Mozilla">ECMAScript 2015</a> Symbol data type has been enabled by default (was available in the Nightly channel since version 33) (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1066322" rel="noopener" title="FIXED: Enable ES6 symbols in all builds">bug 1066322</a>):
<ul>
<li><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol" title='The Symbol() function returns a value of type symbol, has static properties that expose several members of built-in objects, has static methods that expose the global symbol registry, and resembles a built-in object class but is incomplete as a constructor because it does not support the syntax "new Symbol()".'><code>Symbol</code></a></li>
<li><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol/for" title="The Symbol.for(key) method searches for existing symbols in a runtime-wide symbol registry with the given key and returns it if found. Otherwise a new symbol gets created in the global symbol registry with this key."><code>Symbol.for()</code></a></li>
<li><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol/keyFor" title="The Symbol.keyFor(sym) method retrieves a shared symbol key from the global symbol registry for the given symbol."><code>Symbol.keyFor()</code></a></li>
<li><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/getOwnPropertySymbols" title="The Object.getOwnPropertySymbols() method returns an array of all symbol properties found directly upon a given object."><code>Object.getOwnPropertySymbols()</code></a></li>
</ul>
</li>
<li>The old placeholder string <code>"@@iterator"</code> has been replaced with the real ES2015 well-known symbol <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol/iterator" title="The Symbol.iterator well-known symbol specifies the default iterator for an object. Used by for...of."><code>Symbol.iterator</code></a> for the <a href="/en-US/docs/Web/JavaScript/Guide/iterable">iterable</a> interface property key (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=918828" rel="noopener" title="FIXED: Use @@iterator symbol instead of placeholder string">bug 918828</a>).</li>
<li>The spec-internal abstract operation <code>ToNumber(string)</code> now supports binary (<code>0b</code>) and octal (<code>0o</code>) literals, this is a potentially breaking change from ES5 (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1079120" rel="noopener" title="FIXED: Make ToNumber(string) support binary and octal literals">bug 1079120</a>).
<ul>
<li><code>Number("0b11")</code> now returns <code>3</code>, not <code>NaN</code>.</li>
<li><code>"0o11" == 9</code> now returns <code>true</code>, not <code>false</code>.</li>
</ul>
</li>
<li>The <a href="/en-US/docs/Web/JavaScript/Reference/Statements/const"><code>const</code></a> declaration is now block-scoped and requires an initializer (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=611388" rel="noopener" title="FIXED: const should be block-scoped and an initializer should be required">bug 611388</a>). It also can not be redeclared anymore (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1095439" rel="noopener" title="FIXED: Assigning to a const variable is a syntax error">bug 1095439</a>).
<ul>
<li><code>{const a=1}; a;</code> now throws a <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/ReferenceError" title="The ReferenceError object represents an error when a non-existent variable is referenced."><code>ReferenceError</code></a> and does not return <code>1</code> anymore due to block-scoping.</li>
<li><code>const a;</code> now throws a <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/SyntaxError" title="The SyntaxError object represents an error when trying to interpret syntactically invalid code."><code>SyntaxError</code></a> ("missing = in const declaration<code>"</code>): An initializer is required.</li>
<li><code>const a = 1; a = 2;</code> now also throws a <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/SyntaxError" title="The SyntaxError object represents an error when trying to interpret syntactically invalid code."><code>SyntaxError</code></a> ("invalid assignment to const a").</li>
</ul>
</li>
<li>The ES2016 method <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/includes" title="The includes() method determines whether an array includes a certain value among its entries, returning true or false as appropriate."><code>Array.prototype.includes</code></a> has been implemented, but for now, it is only enabled in Nightly builds (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1069063" rel="noopener" title="FIXED: Implement Array.prototype.includes">bug 1069063</a>).</li>
<li>The <a href="/en-US/docs/Web/JavaScript/Reference/Operators/delete"><code>delete</code></a> operator now triggers the "<a href="/en-US/docs/Web/JavaScript/Reference/Statements/let#Temporal_dead_zone_and_errors_with_let">temporal dead zone</a>" when using with <a href="/en-US/docs/Web/JavaScript/Reference/Statements/let"><code>let</code></a> and <a href="/en-US/docs/Web/JavaScript/Reference/Statements/const"><code>const</code></a> (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1074571" rel="noopener" title="FIXED: The delete operator should trigger TDZ">bug 1074571</a>).</li>
<li>The non-standard <a href="/en-US/docs/Web/JavaScript/Reference/Statements/let#Non-standard_let_extensions"><code>let</code> blocks and <code>let</code> expressions</a> are deprecated and will now log a warning in the console. Do not use them anymore, they will be removed in the future.</li>
<li><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakMap">WeakMap</a> constructor now handles optional iterable argument (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1092537" rel="noopener" title="FIXED: Handle optional iterable argument in WeakMap constructor">bug 1092537</a>).</li>
</ul></div>
<p>参阅:</p>
<ul>
<li><a class="external" href="https://bugzilla.mozilla.org/buglist.cgi?list_id=11242211&amp;resolution=FIXED&amp;classification=Components&amp;query_format=advanced&amp;bug_status=RESOLVED&amp;bug_status=VERIFIED&amp;component=JavaScript%20Engine&amp;component=JavaScript%20Engine%3A%20JIT&amp;component=JavaScript%3A%20GC&amp;component=JavaScript%3A%20Internationalization%20API&amp;component=JavaScript%3A%20Standard%20Library&amp;product=Core&amp;target_milestone=mozilla36" rel="noopener">All JavaScript engine bug fixes</a>.</li>
<li><a href="/en-US/Firefox/Releases/36">Complete release notes for Firefox 36</a>.</li>
</ul>
<h2 id="Firefox_35">Firefox 35</h2>
<div><ul>
<li>The "<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/let#Temporal_dead_zone_and_errors_with_let">temporal dead zone</a>" for <a href="/en-US/docs/Web/JavaScript/Reference/Statements/let"><code>let</code></a> declarations has been implemented. In conformance with ES2015 <code>let</code> semantics, the following situations<br/>
now throw errors. See also this<a class="external" href="https://groups.google.com/forum/#!topic/mozilla.dev.platform/tezdW299Zds" rel="noopener"> newsgroup announcement</a> and <a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1001090" rel="noopener" title='FIXED: Implement ES6 "temporal dead zone" for let'>bug 1001090</a>.
<ul>
<li>Redeclaring existing variables or arguments using <code>let</code> within the same scope in function bodies is now a syntax error.</li>
<li>Using a variable declared using <code>let</code> in function bodies before the declaration is reached and evaluated is now a runtime error.</li>
</ul>
</li>
<li>ES2015 <a href="/en-US/docs/Web/JavaScript/Reference/Symbols" title="REDIRECT Symbol [en-US]"><code>Symbols</code></a> (only available in the Nightly channel) have been updated to conform with recent specification changes:
<ul>
<li><code>String(Symbol("1"))</code> now no longer throws a <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypeError" title="The TypeError object represents an error when a value is not of the expected type."><code>TypeError</code></a>; instead a string (<code>"Symbol(1)"</code>) gets returned (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1058396" rel="noopener" title="FIXED: String(aSymbol) now returns the symbols description in ES6 draft rev 27">bug 1058396</a>).</li>
</ul>
</li>
<li>The various <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#TypedArray_objects"><em>TypedArray</em> constructors</a> now have as their <code>[[Prototype]]</code> a single function, denoted <code>%TypedArray%</code>  in ES2015 (but otherwise not directly exposed).  Each typed array prototype now inherits from <code>%TypedArray%.prototype</code>.  (<code>%TypedArray%</code> and <code>%TypedArray%.prototype</code> inherit from <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/prototype"><code>Function.prototype</code></a> and <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/prototype"><code>Object.prototype</code></a>, respectively, so that typed array constructors and instances still have the properties found on those objects.)  Typed array function properties now reside on <code>%TypedArray%.prototype</code> and work on any typed array.  See <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#Description"><em>TypedArray</em></a> and <a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=896116" rel="noopener" title="FIXED: Implement ES6 %TypedArray% superclass that all ArrayBufferViews inherit from">bug 896116</a> for more information.</li>
<li>ES2015 semantics for <a href="/en-US/docs/Web/JavaScript/Reference/Operators/Object_initializer#Prototype_mutation">prototype mutations using object literals</a> have been implemented (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1061853" rel="noopener" title="FIXED: Implement ES6 object-literal __proto__ restrictions/semantics">bug 1061853</a>).
<ul>
<li>Now only a single member notated as <code>__proto__:value</code> will mutate the <code>[[Prototype]]</code> in the object literal syntax.</li>
<li>Method members like <code>__proto__() {}</code> will not overwrite the <code>[[Prototype]]</code> anymore.</li>
</ul>
</li>
</ul></div>
<p>参阅:</p>
<ul>
<li><a class="external" href="https://bugzilla.mozilla.org/buglist.cgi?list_id=11242211&amp;resolution=FIXED&amp;classification=Components&amp;query_format=advanced&amp;bug_status=RESOLVED&amp;bug_status=VERIFIED&amp;component=JavaScript%20Engine&amp;component=JavaScript%20Engine%3A%20JIT&amp;component=JavaScript%3A%20GC&amp;component=JavaScript%3A%20Internationalization%20API&amp;component=JavaScript%3A%20Standard%20Library&amp;product=Core&amp;target_milestone=mozilla35" rel="noopener">All JavaScript engine bug fixes</a>.</li>
<li><a href="/en-US/Firefox/Releases/35">Complete release notes for Firefox 35</a>.</li>
</ul>
<h2 id="Firefox_34">Firefox 34</h2>
<div><ul>
<li>The ES2015 syntax for <a href="/en-US/docs/Web/JavaScript/Reference/Operators/Object_initializer#Computed_property_names">computed property names on object literals</a> has been implemented (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=924688" rel="noopener" title="FIXED: Implement ES6 computed property names">bug 924688</a>).
<ul>
<li>This includes <a href="/en-US/docs/Web/JavaScript/Reference/Functions/get">getter</a> and <a href="/en-US/docs/Web/JavaScript/Reference/Functions/set">setter</a> method names as well (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1048384" rel="noopener" title="FIXED: Getter/setter syntax should work with computed property names">bug 1048384</a>) and can also be used with <a href="/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment#Computed_object_property_names_and_destructuring">destructuring</a>.</li>
</ul>
</li>
<li>The ES2015<a href="/en-US/docs/Web/JavaScript/Reference/Functions/Method_definitions"> shorthand syntax for defining methods</a> on objects has been implemented (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=924672" rel="noopener" title="FIXED: Implement ES6 Method Definitions">bug 924672</a>).</li>
<li>The ES2015 <code>Object</code> method <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign" title="The Object.assign() method is used to copy the values of all enumerable own properties from one or more source objects to a target object. It will return the target object."><code>Object.assign()</code></a> has been implemented (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=937855" rel="noopener" title="FIXED: Implement ES6 Object.assign">bug 937855</a>).</li>
<li>ES2015 <a href="/en-US/docs/Web/JavaScript/Reference/template_strings">template strings</a> and the <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/raw" title="The static String.raw() method is a tag function of template literals, similar to the r prefix in Python or the @ prefix in C# for string literals (yet there is a difference: see explanations in this issue). It's used to get the raw string form of template strings, that is, substitutions (e.g. ${foo}) are processed, but escapes (e.g. \n) are not."><code>String.raw()</code></a> method are now supported (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1038259" rel="noopener" title="FIXED: Enable template strings in all builds">bug 1038259</a>, <a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1039774" rel="noopener" title="FIXED: Implement ES6 String.raw">bug 1039774</a>).</li>
<li>A new ES2015 object <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakSet" title="The WeakSet object lets you store weakly held objects in a collection."><code>WeakSet</code></a> has been added (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=792439" rel="noopener" title="FIXED: Implement ES6 WeakSet">bug 792439</a>).</li>
<li>ES2015 <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol">Symbols</a> (only available in the Nightly channel) have been updated to conform with recent specification changes (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1042602" rel="noopener" title="FIXED: Symbol behavior changes in ES6 draft rev 26">bug 1042602</a>):
<ul>
<li>When trying to convert a symbol to a number, a <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypeError" title="The TypeError object represents an error when a value is not of the expected type."><code>TypeError</code></a> will be thrown now.</li>
<li>When using loose equality, <code>Object(sym) == sym</code> returns <code>true</code> now.</li>
</ul>
</li>
<li>The experimental <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/move" title="The move() method used to copy the sequence of array elements within the array to the position starting at target. However, this non-standard method has been replaced with the standard TypedArray.prototype.copyWithin() method. TypedArray is one of the typed array types here."><code>TypedArray.prototype.move()</code></a> method (only available in former Nightly and Aurora channels) has been replaced with the now implemented standard ES2015 <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/copyWithin" title="The copyWithin() method copies the sequence of array elements within the array to the position starting at target. The copy is taken from the index positions of the second and third arguments start and end. The end argument is optional and defaults to the length of the array. This method has the same algorithm as Array.prototype.copyWithin. TypedArray is one of the typed array types here."><code>TypedArray.prototype.copyWithin()</code></a> method (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1021379" rel="noopener" title="FIXED: Rename typed arrays' move method to copyWithin, fix up to ES6 semantics">bug 1021379</a>).</li>
<li>In <a href="/en-US/docs/Web/JavaScript/Reference/Strict_mode">strict mode</a>, setting a <a href="/en-US/docs/Web/JavaScript/Reference/Operators/Object_initializer#Duplicate_property_names">duplicate property name in object literals</a> will no longer throw a <code>SyntaxError</code> as per ES2015 specification (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1041128" rel="noopener" title="FIXED: Duplicate property name in object literal is allowed in ES6 strict mode">bug 1041128</a>).</li>
<li>In regular expressions (including <code>String.replace</code>), the matched text for a capturing group is now <code>undefined</code> instead of the empty string when that capturing group didn't get consulted because quantifiers prevented its exercise (see <a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=369778" rel="noopener" title="FIXED: Javascript regular expression captures broken with alternation in some cases.">bug 369778</a> and <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp#Gecko_specific_notes">this example code</a>). Note that due to web compatibility, RegExp.$N will still return an empty string (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1053944" rel="noopener" title="FIXED: RegExp.$N changed behavior since FF 33">bug 1053944</a>).</li>
<li>The ES2015 <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Spread_operator">spread operator</a> is now supported in <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment">destructuring</a> (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=933276" rel="noopener" title="FIXED: Implement [...x] in assignment target (spread operator)">bug 933276</a>).</li>
<li><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment">Destructuring</a> now uses iterator protocol instead of array-like protocol (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=933276" rel="noopener" title="FIXED: Implement [...x] in assignment target (spread operator)">bug 933276</a>).</li>
<li><span class="message"><span class="content"><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/revocable" title="The Proxy.revocable() method is used to create a revocable Proxy object."><code>Proxy.revocable()</code></a> has been implemented</span></span> (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=978279" rel="noopener" title="FIXED: ES6 Proxies: Implement revocation semantics">bug 978279</a>).</li>
</ul></div>
<p>参阅:</p>
<ul>
<li><a class="external" href="https://bugzilla.mozilla.org/buglist.cgi?list_id=11242211&amp;resolution=FIXED&amp;classification=Components&amp;query_format=advanced&amp;bug_status=RESOLVED&amp;bug_status=VERIFIED&amp;component=JavaScript%20Engine&amp;component=JavaScript%20Engine%3A%20JIT&amp;component=JavaScript%3A%20GC&amp;component=JavaScript%3A%20Internationalization%20API&amp;component=JavaScript%3A%20Standard%20Library&amp;product=Core&amp;target_milestone=mozilla34" rel="noopener">All JavaScript engine bug fixes (244)</a>.</li>
<li><a href="/en-US/Firefox/Releases/34">Complete release notes for Firefox 34</a>.</li>
</ul>
<h2 id="Firefox_33">Firefox 33</h2>
<div><ul>
<li>The non-standard method <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toInteger" title="The Number.toInteger() method used to evaluate the passed value and convert it to an integer, but its implementation has been removed."><code>Number.toInteger()</code></a> has been removed (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1022396" rel="noopener" title="FIXED: remove Number.toInteger">bug 1022396</a>).</li>
<li>The <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/set" title="The set() method adds or updates an element with a specified key and value to a Map object."><code>Map.prototype.set()</code></a>, <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakMap/set" title="The set() method adds a new element with a specified key and value to a WeakMap object."><code>WeakMap.prototype.set()</code></a> and <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set/add" title="The add() method appends a new element with a specified value to the end of a Set object."><code>Set.prototype.add()</code></a> methods are now chainable, return their equivalent objects and no longer <code>undefined</code> (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1031632" rel="noopener" title="FIXED: Map.prototype.set, WeakMap.prototype.set and Set.prototype.add should be chainable">bug 1031632</a>).</li>
<li>A <a href="/en-US/docs/Web/JavaScript/Reference/Functions/Default_parameters">default parameter</a> is evaluated before function declarations inside the function body, so those functions cannot be referred from default parameter (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1022962" rel="noopener" title="FIXED: Default parameters should be evaluated before function declarations">bug 1022962</a>).</li>
<li>Shorthand properties are now allowed in object literals: if not explicitly defined, property keys are initialized by variables of the same name. E.g. <code>function f(x, y) { return {x, y}; }</code> is equivalent to <code>function f(x, y) { return {x: x, y: y}; }</code> (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=875002" rel="noopener" title="FIXED: Allow shorthand properties in object literals">bug 875002</a>).</li>
<li>The parsing of <code><a href="/en-US/docs/Web/JavaScript/Reference/Operators/yield">yield</a></code> and <code><a href="/en-US/docs/Web/JavaScript/Reference/Operators/yield*">yield*</a></code> has been updated to conform with the latest ES2015 specification (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=981599" rel="noopener" title="FIXED: Update parsing of 'yield' to match latest spec">bug 981599</a>).</li>
<li>The non-standard <code>hasOwn</code> trap has been removed (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=980565" rel="noopener" title="FIXED: ES6 Proxies: There's no such thing as [[HasOwnProperty]]">bug 980565</a>).</li>
</ul></div>
<p>参阅:</p>
<ul>
<li><a class="external" href="https://bugzilla.mozilla.org/buglist.cgi?list_id=11242211&amp;resolution=FIXED&amp;classification=Components&amp;query_format=advanced&amp;bug_status=RESOLVED&amp;bug_status=VERIFIED&amp;component=JavaScript%20Engine&amp;component=JavaScript%20Engine%3A%20JIT&amp;component=JavaScript%3A%20GC&amp;component=JavaScript%3A%20Internationalization%20API&amp;component=JavaScript%3A%20Standard%20Library&amp;product=Core&amp;target_milestone=mozilla33" rel="noopener">All JavaScript engine bug fixes (298)</a>.</li>
<li><a href="/en-US/Firefox/Releases/33">Complete release notes for Firefox 33</a>.</li>
</ul>
<h2 id="Firefox_32">Firefox 32</h2>
<div><ul>
<li>The following new ECMAScript 2015 built-in methods got implemented:
<ul>
<li><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/from" title="The Array.from() method creates a new, shallow-copied Array instance from an array-like or iterable object."><code>Array.from()</code></a> (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=904723" rel="noopener" title="FIXED: Implement ES6 Array.from">bug 904723</a>),</li>
<li><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/copyWithin" title="The copyWithin() method shallow copies part of an array to another location in the same array and returns it, without modifying its size."><code>Array.prototype.copyWithin()</code></a> (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=934423" rel="noopener" title="FIXED: Implement Array#copyWithin">bug 934423</a>),</li>
<li><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isSafeInteger" title="The Number.isSafeInteger() method determines whether the provided value is a number that is a safe integer."><code>Number.isSafeInteger()</code></a> (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1003764" rel="noopener" title="FIXED: Implement ES6 Number.isSafeInteger()">bug 1003764</a>).</li>
</ul>
</li>
</ul></div>
<p>参阅:</p>
<ul>
<li><a class="external" href="https://bugzilla.mozilla.org/buglist.cgi?list_id=11242211&amp;resolution=FIXED&amp;classification=Components&amp;query_format=advanced&amp;bug_status=RESOLVED&amp;bug_status=VERIFIED&amp;component=JavaScript%20Engine&amp;component=JavaScript%20Engine%3A%20JIT&amp;component=JavaScript%3A%20GC&amp;component=JavaScript%3A%20Internationalization%20API&amp;component=JavaScript%3A%20Standard%20Library&amp;product=Core&amp;target_milestone=mozilla32" rel="noopener">All JavaScript engine bug fixes (294)</a>.</li>
<li><a href="/en-US/Firefox/Releases/32">Complete release notes for Firefox 32</a>.</li>
</ul>
<h2 id="Firefox_31">Firefox 31</h2>
<div><p>New ECMAScript 2015 features implemented:</p>
<ul>
<li>New <code>Array</code> built-in: <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/fill" title="The fill() method fills all the elements of an array from a start index to an end index with a static value. The end index is not included."><code>Array.prototype.fill()</code></a> (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=911147" rel="noopener" title="FIXED: Implement ES6 Array.prototype.fill">bug 911147</a>)</li>
<li>New <code>Math</code> function: <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/clz32" title="The Math.clz32() function returns the number of leading zero bits in the 32-bit binary representation of a number."><code>Math.clz32()</code></a> (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=925123" rel="noopener" title="FIXED: Add Math.clz32 builtin">bug 925123</a>)</li>
<li>New <code>String</code> built-in: <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/normalize" title="The normalize() method returns the Unicode Normalization Form of a given string (if the value isn't a string, it will be converted to one first)."><code>String.prototype.normalize()</code></a> is available in Firefox Desktop (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=918987" rel="noopener" title="FIXED: Implement String.prototype.normalize">bug 918987</a>).</li>
<li>New <code>Object</code> method <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/setPrototypeOf" title="The Object.setPrototypeOf() method sets the prototype (i.e., the internal [[Prototype]] property) of a specified object to another object or null."><code>Object.setPrototypeOf()</code></a>.</li>
<li>New <code>Number</code> constants: <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER" title="The Number.MAX_SAFE_INTEGER constant represents the maximum safe integer in JavaScript (253 - 1)."><code>Number.MAX_SAFE_INTEGER</code></a> and <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MIN_SAFE_INTEGER" title="The Number.MIN_SAFE_INTEGER constant represents the minimum safe integer in JavaScript (-(253 - 1))."><code>Number.MIN_SAFE_INTEGER</code></a>.</li>
<li>The ES2015 Proxy <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/handler/isExtensible" title="The handler.isExtensible() method is a trap for Object.isExtensible()."><code>isExtensible</code></a> trap have been implemented (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=978235" rel="noopener" title="FIXED: ES6 Proxies: Implement [[IsExtensible]] trap">bug 978235</a>).</li>
</ul></div>
<p>参阅:</p>
<ul>
<li><a class="external" href="https://bugzilla.mozilla.org/buglist.cgi?list_id=11242211&amp;resolution=FIXED&amp;classification=Components&amp;query_format=advanced&amp;bug_status=RESOLVED&amp;bug_status=VERIFIED&amp;component=JavaScript%20Engine&amp;component=JavaScript%20Engine%3A%20JIT&amp;component=JavaScript%3A%20GC&amp;component=JavaScript%3A%20Internationalization%20API&amp;component=JavaScript%3A%20Standard%20Library&amp;product=Core&amp;target_milestone=mozilla31" rel="noopener">All JavaScript engine bug fixes (231)</a>.</li>
<li><a href="/en-US/Firefox/Releases/31">Complete release notes for Firefox 31</a>.</li>
</ul>
<h2 id="Firefox_30">Firefox 30</h2>
<div><ul>
<li>New ES2015-compatible <a href="/en-US/docs/Web/JavaScript/Reference/Operators/Array_comprehensions">array comprehensions</a> <code>[for (item of iterable) item]</code> and <a href="/en-US/docs/Web/JavaScript/Reference/Operators/Generator_comprehensions">generator comprehensions</a> <code>(for (item of iterable) item)</code> have been implemented (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=979865" rel="noopener" title="FIXED: Implement ES6 array and generator comprehensions">bug 979865</a>).</li>
<li><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#Property_access">Typed arrays</a> are now extensible and support new named properties (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=695438" rel="noopener" title="FIXED: TypedArrays don't support new named properties">bug 695438</a>).</li>
<li>The <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/stack" title="The non-standard stack property of Error objects offer a trace of which functions were called, in what order, from which line and file, and with what arguments. The stack string proceeds from the most recent calls to earlier ones, leading back to the original global scope call."><code>Error.prototype.stack</code></a> property now contains column numbers (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=762556" rel="noopener" title="FIXED: Error stack should contain column number">bug 762556</a>) and has been improved <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/Stack#Stack_of_eval'ed_code">when using <code>Function()</code> and <code>eval()</code> calls</a>. This can help you to better debug minified or generated JavaScript code.</li>
<li>The <code>Promise.cast()</code> method has been renamed to <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/resolve" title='The Promise.resolve() method returns a Promise object that is resolved with a given value. If the value is a promise, that promise is returned; if the value is a thenable (i.e. has a "then" method), the returned promise will "follow" that thenable, adopting its eventual state; otherwise the returned promise will be fulfilled with the value. This function flattens nested layers of promise-like objects (e.g. a promise that resolves to a promise that resolves to something) into a single layer.'><code>Promise.resolve()</code></a> (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=966348" rel="noopener" title="FIXED: Rename Promise.cast to Promise.resolve">bug 966348</a>).</li>
</ul></div>
<p>参阅:</p>
<ul>
<li><a class="external" href="https://bugzilla.mozilla.org/buglist.cgi?list_id=11242211&amp;resolution=FIXED&amp;classification=Components&amp;query_format=advanced&amp;bug_status=RESOLVED&amp;bug_status=VERIFIED&amp;component=JavaScript%20Engine&amp;component=JavaScript%20Engine%3A%20JIT&amp;component=JavaScript%3A%20GC&amp;component=JavaScript%3A%20Internationalization%20API&amp;component=JavaScript%3A%20Standard%20Library&amp;product=Core&amp;target_milestone=mozilla30" rel="noopener">All JavaScript engine bug fixes (248)</a>.</li>
<li><a href="/en-US/Firefox/Releases/30">Complete release notes for Firefox 30</a>.</li>
</ul>
<h2 id="Firefox_29">Firefox 29</h2>
<div><ul>
<li>New ECMAScript 2015 String methods: <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/codePointAt" title="The codePointAt() method returns a non-negative integer that is the Unicode code point value."><code>String.prototype.codePointAt()</code></a> and <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/fromCodePoint" title="The static String.fromCodePoint() method returns a string created by using the specified sequence of code points."><code>String.prototype.fromCodePoint()</code></a> have been implemented (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=918879" rel="noopener" title="FIXED: Implement String#codePointAt and String.fromCodePoint">bug 918879</a>).</li>
<li>The <a class="external" href="http://www.ecma-international.org/ecma-402/1.0/" rel="noopener">ECMAScript Internationalization API (ECMA-402)</a> has been implemented and is now enabled by default in Firefox Desktop (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=853301" rel="noopener" title="FIXED: Enable ECMAScript Internationalization API for desktop Firefox">bug 853301</a>):
<ul>
<li>New objects in the new <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl" title="The Intl object is the namespace for the ECMAScript Internationalization API, which provides language sensitive string comparison, number formatting, and date and time formatting. The INTL object provides access to several constructors as well as functionality common to the internationalization constructors and other language sensitive functions."><code>Intl</code></a> object namespace:
<ul>
<li><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Collator" title="The Intl.Collator object is a constructor for collators, objects that enable language sensitive string comparison."><code>Intl.Collator</code></a></li>
<li><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat" title="The Intl.DateTimeFormat object is a constructor for objects that enable language-sensitive date and time formatting."><code>Intl.DateTimeFormat</code></a></li>
<li><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/NumberFormat" title="The Intl.NumberFormat object is a constructor for objects that enable language sensitive number formatting."><code>Intl.NumberFormat</code></a></li>
</ul>
</li>
<li>The following methods of <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/String" title="The String global object is a constructor for strings or a sequence of characters."><code>String</code></a>, <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number" title="The Number JavaScript object is a wrapper object allowing you to work with numerical values. A Number object is created using the Number() constructor. A primitive type object number created using the Number() function."><code>Number</code></a> and <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date" title="Creates a JavaScript Date instance that represents a single moment in time. Date objects use a Unix Time Stamp, an integer value that is the number of milliseconds since 1 January 1970 UTC."><code>Date</code></a> have been updated to include the <code>locales</code> and <code>options</code> arguments per ECMA-402:
<ul>
<li><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/localeCompare" title="The localeCompare() method returns a number indicating whether a reference string comes before or after or is the same as the given string in sort order."><code>String.prototype.localeCompare()</code></a></li>
<li><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toLocaleString" title="The toLocaleString() method returns a string with a language-sensitive representation of this number."><code>Number.prototype.toLocaleString()</code></a></li>
<li><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleString" title="The toLocaleString() method returns a string with a language sensitive representation of this date. The new locales and options arguments let applications specify the language whose formatting conventions should be used and customize the behavior of the function. In older implementations, which ignore the locales and options arguments, the locale used and the form of the string returned are entirely implementation dependent."><code>Date.prototype.toLocaleString()</code></a></li>
<li><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleDateString" title="The toLocaleDateString() method returns a string with a language sensitive representation of the date portion of this date. The new locales and options arguments let applications specify the language whose formatting conventions should be used and allow to customize the behavior of the function. In older implementations, which ignore the locales and options arguments, the locale used and the form of the string returned are entirely implementation dependent."><code>Date.prototype.toLocaleDateString()</code></a></li>
<li><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleTimeString" title="The toLocaleTimeString() method returns a string with a language sensitive representation of the time portion of this date. The new locales and options arguments let applications specify the language whose formatting conventions should be used and customize the behavior of the function. In older implementations, which ignore the locales and options arguments, the locale used and the form of the string returned are entirely implementation dependent."><code>Date.prototype.toLocaleTimeString()</code></a></li>
</ul>
</li>
</ul>
</li>
<li>To match the updated ECMAScript 2015 draft specification, the <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map" title="The Map object holds key-value pairs and remembers the original insertion order of the keys."><code>Map</code></a> and <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set" title="The Set object lets you store unique values of any type, whether primitive values or object references."><code>Set</code></a> objects now treat <code>-0</code> and <code>+0</code> as the same when checking for key and value equality.</li>
<li><code>Promise</code> has been enabled by default (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=918806" rel="noopener" title="FIXED: Enable promises by default">bug 918806</a>).</li>
<li>Completed <a href="/en-US/docs/Web/JavaScript/Reference/Statements/function*">generators</a> now return an <code>IteratorResult</code> object instead of throwing (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=958951" rel="noopener" title="FIXED: Return IteratorResult object for completed generators instead of throwing">bug 958951</a>).</li>
<li>A malformed JSON string parsed by <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse" title="The JSON.parse() method parses a JSON string, constructing the JavaScript value or object described by the string. An optional reviver function can be provided to perform a transformation on the resulting object before it is returned."><code>JSON.parse()</code></a> now yields a more detailed error message containing the line and column number that caused the parsing error. This is useful when debugging large JSON data.</li>
<li>The <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/isView" title="The ArrayBuffer.isView() method returns true if arg is one of the ArrayBuffer views, such as typed array objects or a DataView; false otherwise."><code>ArrayBuffer.isView()</code></a> method has been added (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=896105" rel="noopener" title="FIXED: Implement ES6 ArrayBuffer.isView">bug 896105</a>).</li>
</ul></div>
<p>参阅:</p>
<ul>
<li><a class="external" href="https://bugzilla.mozilla.org/buglist.cgi?list_id=11242211&amp;resolution=FIXED&amp;classification=Components&amp;query_format=advanced&amp;bug_status=RESOLVED&amp;bug_status=VERIFIED&amp;component=JavaScript%20Engine&amp;component=JavaScript%20Engine%3A%20JIT&amp;component=JavaScript%3A%20GC&amp;component=JavaScript%3A%20Internationalization%20API&amp;component=JavaScript%3A%20Standard%20Library&amp;product=Core&amp;target_milestone=mozilla29" rel="noopener">All JavaScript engine bug fixes (331)</a>.</li>
<li><a href="/en-US/Firefox/Releases/29">Complete release notes for Firefox 29</a>.</li>
</ul>
<h2 id="Firefox_28">Firefox 28</h2>
<div><ul>
<li><a href="/en-US/docs/Web/JavaScript/ECMAScript_6_support_in_Mozilla" title="/en-US/docs/Web/JavaScript/ECMAScript_6_support_in_Mozilla">ECMAScript 2015</a> implementation continues:
<ul>
<li>New <code>Array</code> methods have been implemented: <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/entries" title="The entries() method returns a new Array Iterator object that contains the key/value pairs for each index in the array."><code>Array.prototype.entries()</code></a> and <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/keys" title="The keys() method returns a new Array Iterator object that contains the keys for each index in the array."><code>Array.prototype.keys()</code></a> (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=894658" rel="noopener" title="FIXED: Implement ES6 Array.prototype.{keys, entries}">bug 894658</a>).</li>
</ul>
</li>
<li>A bug causing that <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/getOwnPropertyNames" title="The Object.getOwnPropertyNames() method returns an array of all properties (including non-enumerable properties except for those which use Symbol) found directly in a given object."><code>Object.getOwnPropertyNames()</code></a> did not see unresolved properties of <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error" title="The Error constructor creates an error object. Instances of Error objects are thrown when runtime errors occur. The Error object can also be used as a base object for user-defined exceptions. See below for standard built-in error types."><code>Error</code></a> objects has been fixed (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=724768" rel="noopener" title="FIXED: Object.getOwnPropertyNames does not see unresolved properties of Error objects">bug 724768</a>).</li>
</ul></div>
<p>参阅:</p>
<ul>
<li><a class="external" href="https://bugzilla.mozilla.org/buglist.cgi?list_id=11242211&amp;resolution=FIXED&amp;classification=Components&amp;query_format=advanced&amp;bug_status=RESOLVED&amp;bug_status=VERIFIED&amp;component=JavaScript%20Engine&amp;component=JavaScript%20Engine%3A%20JIT&amp;component=JavaScript%3A%20GC&amp;component=JavaScript%3A%20Internationalization%20API&amp;component=JavaScript%3A%20Standard%20Library&amp;product=Core&amp;target_milestone=mozilla28" rel="noopener">All JavaScript engine bug fixes (343)</a>.</li>
<li><a href="/en-US/Firefox/Releases/28">Complete release notes for Firefox 28</a>.</li>
</ul>
<h2 id="Firefox_27">Firefox 27</h2>
<div><p><a href="/en-US/docs/Web/JavaScript/ECMAScript_6_support_in_Mozilla" title="/en-US/docs/Web/JavaScript/ECMAScript_6_support_in_Mozilla">EcmaScript 2015</a> implementation continues!</p>
<ul>
<li>The <a href="/en-US/docs/Web/JavaScript/Reference/Operators/Spread_operator">spread operator</a> is now supported in Function calls (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=762363" rel="noopener" title="FIXED: implement the spread operator in calls">bug 762363</a>).</li>
<li>The mathematical function <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/hypot" title="The Math.hypot() function returns the square root of the sum of squares of its arguments, that is:"><code>Math.hypot()</code></a> has been implemented (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=896264" rel="noopener" title="FIXED: Math.hypot returns NaN when only one argument is passed">bug 896264</a>).</li>
<li>The <a href="/en-US/docs/Web/JavaScript/Reference/Operators/yield*" title="The yield* expression is used to delegate to another generator or iterable object."><code>yield*</code></a> expression is now implemented (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=666396" rel="noopener" title="FIXED: implement yield* operator">bug 666396</a>).</li>
<li>The <code>MapIterator</code>, <code>SetIterator</code> and <code>ArrayIterator</code> objects now match the specification (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=881226" rel="noopener" title="FIXED: Change {Array, Map, Set} iterator methods to mach the latest spec">bug 881226</a>).</li>
<li><a href="/en-US/docs/Web/JavaScript/Reference/Statements/for...of">for..of</a> loops now expect the ES2015 standard <a href="/en-US/docs/Web/JavaScript/Guide/The_Iterator_protocol">iterator protocol</a> moving away from SpiderMonkey old iterator protocol using <code>StopIteration</code>.</li>
<li><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/match" title="The match() method retrieves the matches when matching a string against a regular expression."><code>String.match</code></a> and <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace" title="The replace() method returns a new string with some or all matches of a pattern replaced by a replacement."><code>String.replace</code></a> now reset <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/lastIndex" title="The lastIndex is a read/write integer property of regular expression instances that specifies the index at which to start the next match."><code>RegExp.lastIndex</code></a> (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=501739" rel="noopener" title="FIXED: String match and replace methods do not update global regexp lastIndex per ES3&amp;5">bug 501739</a>).</li>
</ul></div>
<p>参阅:</p>
<ul>
<li><a class="external" href="https://bugzilla.mozilla.org/buglist.cgi?list_id=11242211&amp;resolution=FIXED&amp;classification=Components&amp;query_format=advanced&amp;bug_status=RESOLVED&amp;bug_status=VERIFIED&amp;component=JavaScript%20Engine&amp;component=JavaScript%20Engine%3A%20JIT&amp;component=JavaScript%3A%20GC&amp;component=JavaScript%3A%20Internationalization%20API&amp;component=JavaScript%3A%20Standard%20Library&amp;product=Core&amp;target_milestone=mozilla27" rel="noopener">All JavaScript engine bug fixes (350)</a>.</li>
<li><a href="/en-US/Firefox/Releases/27">Complete release notes for Firefox 27</a>.</li>
</ul>
<h2 id="Firefox_26">Firefox 26</h2>
<div><p><a href="/en-US/docs/Web/JavaScript/ECMAScript_6_support_in_Mozilla" title="/en-US/docs/Web/JavaScript/ECMAScript_6_support_in_Mozilla">EcmaScript 2015</a> implementation continues!</p>
<ul>
<li>The ECMAScript 2015 compliant syntax for <a class="external" href="http://wiki.ecmascript.org/doku.php?id=harmony:generators" rel="noopener">Generators (yield)</a> has been implemented (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=666399" rel="noopener" title="FIXED: new Harmony syntax for generators">bug 666399</a>).</li>
<li>Generator/Iterator results are now boxed like <code>{ value: foo, done: bool }</code> (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=907744" rel="noopener" title="FIXED: Implement iterator result boxing in ES6 generators">bug 907744</a>).</li>
<li>New mathematical methods have been implemented on <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math" title="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math"><code>Math</code></a>: <a href="/en-US/docs/JavaScript/Reference/Global_Objects/Math/fround" title="/en-US/docs/JavaScript/Reference/Global_Objects/Math/fround"><code>Math.fround()</code></a> (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=900125" rel="noopener" title="FIXED: Float32: add Math.fround to the interpreter">bug 900125</a>).</li>
<li>The <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Reserved_Words">reserved words</a> cannot be used for function names:such a usage now throws a <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SyntaxError"><code>SyntaxError</code></a> (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=907958" rel="noopener" title="FIXED: Restrict function names to non-keywords">bug 907958</a>).</li>
<li>The <a href="/en-US/docs/Web/JavaScript/Reference/Functions/Default_parameters">default parameter</a> syntax has been updated to allow<span id="summary_alias_container"><span id="short_desc_nonedit_display"> parameters without defaults after default parameters, such as<code> <span id="summary_alias_container"><span id="short_desc_nonedit_display">function f(x=1, y)</span></span></code></span></span>. See <a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=777060" rel="noopener" title="FIXED: Allow parameters without defaults after default parameters">bug 777060</a>.</li>
<li><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/GeneratorFunction" title="The GeneratorFunction constructor creates a new generator function object. In JavaScript every generator function is actually a GeneratorFunction object."><code>GeneratorFunction</code></a> is implemented (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=904701" rel="noopener" title="FIXED: Implement prototype madness for ES6 generators">bug 904701</a>).</li>
</ul></div>
<p>参阅:</p>
<ul>
<li><a class="external" href="https://bugzilla.mozilla.org/buglist.cgi?list_id=11242211&amp;resolution=FIXED&amp;classification=Components&amp;query_format=advanced&amp;bug_status=RESOLVED&amp;bug_status=VERIFIED&amp;component=JavaScript%20Engine&amp;component=JavaScript%20Engine%3A%20JIT&amp;component=JavaScript%3A%20GC&amp;component=JavaScript%3A%20Internationalization%20API&amp;component=JavaScript%3A%20Standard%20Library&amp;product=Core&amp;target_milestone=mozilla26" rel="noopener">All JavaScript engine bug fixes (318)</a>.</li>
<li><a href="/en-US/Firefox/Releases/26">Complete release notes for Firefox 26</a>.</li>
</ul>
<h2 id="Firefox_25">Firefox 25</h2>
<div><p><a href="/en-US/docs/Web/JavaScript/ECMAScript_6_support_in_Mozilla" title="/en-US/docs/Web/JavaScript/ECMAScript_6_support_in_Mozilla">EcmaScript 2015</a> implementation continues!</p>
<ul>
<li>The method <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/of" title="The Array.of() method creates a new Array instance with a variable number of arguments, regardless of number or type of the arguments."><code>Array.of()</code></a> is now implemented on <code><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array" title="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array">Array</a></code> (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=866849" rel="noopener" title="FIXED: Implement ES6 Array.of">bug 866849</a>).</li>
<li>Support for the methods <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find" title="The find() method returns the value of the first element in the array that satisfies the provided testing function. Otherwise undefined is returned."><code>Array.prototype.find()</code></a> and <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex" title="The findIndex() method returns the index of the first element in the array that satisfies the provided testing function. Otherwise, it returns -1, indicating no element passed the test."><code>Array.prototype.findIndex()</code></a> has been added (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=885553" rel="noopener" title="FIXED: Implement ES6 Array.prototype.find and Array.prototype.findIndex">bug 885553</a>).</li>
<li>The methods <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/parseInt" title="The Number.parseInt() method parses a string argument and returns an integer of the specified radix or base."><code>Number.parseInt()</code></a> and <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/parseFloat" title="The Number.parseFloat() method parses a string argument and returns a floating point number. This method behaves identically to the global function parseFloat() and is part of ECMAScript 2015 (its purpose is modularization of globals)."><code>Number.parseFloat()</code></a> have been implemented (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=886949" rel="noopener" title="FIXED: Add Number.parseInt and Number.parseFloat">bug 886949</a>)</li>
<li>The methods <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/forEach" title="The forEach() method executes a provided function once per each key/value pair in the Map object, in insertion order."><code>Map.prototype.forEach()</code></a> and <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set/forEach" title="The forEach() method executes a provided function once for each value in the Set object, in insertion order."><code>Set.prototype.forEach()</code></a> are now implemented (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=866847" rel="noopener" title="FIXED: Implement Map#forEach and Set#forEach">bug 866847</a>).</li>
<li>New mathematical methods have been implemented on <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math" title="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math"><code>Math</code></a>: <code>Math.log10()</code>, <code>Math.log2()</code>, <code>Math.log1p()</code>, <code>Math.expm1()</code>, <code>Math.cosh()</code>, <code>Math.sinh()</code>, <code>Math.tanh()</code>, <code>Math.acosh()</code>, <code>Math.asinh()</code>, <code>Math.atanh()</code>, <code>Math.trunc()</code>, <code>Math.sign()</code> and <code>Math.cbrt()</code> (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=717379" rel="noopener" title="FIXED: Implement the new ES6 math functions">bug 717379</a>).</li>
<li>Support for binary and octal integer literals has been added: <code>0b10101010</code>, <code>0B1010</code>, <code>0o777</code>, <code>0O237</code> are now valid (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=894026" rel="noopener" title="FIXED: Implement BinaryIntegerLiteral and OctalIntegerLiteral">bug 894026</a>).</li>
<li>The machine epsilon constant, that is <font>the smallest representible number that added to 1 will not be 1,</font> is now available as <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/EPSILON" title="The Number.EPSILON property represents the difference between 1 and the smallest floating point number greater than 1."><code>Number.EPSILON</code></a> (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=885798" rel="noopener" title="FIXED: Add new ES6 Number constants: EPSILON, MAX_SAFE_INTEGER, MIN_SAFE_INTEGER">bug 885798</a>).</li>
<li><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray">Typed arrays</a> have been updated to <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray#Indexed_property_access">no longer search in the prototype chain for indexed properties</a> (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=829896" rel="noopener" title="FIXED: typed array indexing should never consult the prototype">bug 829896</a>).</li>
</ul></div>
<p>参阅:</p>
<ul>
<li><a class="external" href="https://bugzilla.mozilla.org/buglist.cgi?list_id=11242211&amp;resolution=FIXED&amp;classification=Components&amp;query_format=advanced&amp;bug_status=RESOLVED&amp;bug_status=VERIFIED&amp;component=JavaScript%20Engine&amp;component=JavaScript%20Engine%3A%20JIT&amp;component=JavaScript%3A%20GC&amp;component=JavaScript%3A%20Internationalization%20API&amp;component=JavaScript%3A%20Standard%20Library&amp;product=Core&amp;target_milestone=mozilla25" rel="noopener">All JavaScript engine bug fixes (376)</a>.</li>
<li><a href="/en-US/Firefox/Releases/25">Complete release notes for Firefox 25</a>.</li>
</ul>
<h2 id="Firefox_24">Firefox 24</h2>
<div><ul>
<li><a href="/en-US/docs/Web/JavaScript/Reference/arrow_functions" title="/en-US/docs/Web/JavaScript/Reference/arrow_functions">Arrow functions</a> are no longer automatically in strict mode unless explicitly requested with <code>"use strict"</code> (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=852762" rel="noopener" title="FIXED: Arrow functions are not automatically strict after all">bug 852762</a>).</li>
<li>The <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/repeat" title="/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/repeat"><code>String.prototype.repeat</code></a> JS method has been implemented (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=815431" rel="noopener" title="FIXED: implement String.prototype.repeat">bug 815431</a>).</li>
<li>The <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set/values" title="The values() method returns a new Iterator object that contains the values for each element in the Set object in insertion order."><code>Set.prototype.values()</code></a>, <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set/keys" title="REDIRECT Set.prototype.values() [en-US]"><code>Set.prototype.keys()</code></a> and <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set/entries" title="The entries() method returns a new Iterator object that contains an array of [value, value] for each element in the Set object, in insertion order. For Set objects there is no key like in Map objects. However, to keep the API similar to the Map object, each entry has the same value for its key and value here, so that an array [value, value] is returned."><code>Set.prototype.entries()</code></a> methods on <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set" title="The Set object lets you store unique values of any type, whether primitive values or object references."><code>Set</code></a> objects have been implemented (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=869996" rel="noopener" title="FIXED: Set.prototype.{keys, values, entries}">bug 869996</a>).</li>
</ul></div>
<p>参阅:</p>
<ul>
<li><a class="external" href="https://bugzilla.mozilla.org/buglist.cgi?list_id=11242211&amp;resolution=FIXED&amp;classification=Components&amp;query_format=advanced&amp;bug_status=RESOLVED&amp;bug_status=VERIFIED&amp;component=JavaScript%20Engine&amp;component=JavaScript%20Engine%3A%20JIT&amp;component=JavaScript%3A%20GC&amp;component=JavaScript%3A%20Internationalization%20API&amp;component=JavaScript%3A%20Standard%20Library&amp;product=Core&amp;target_milestone=mozilla24" rel="noopener">All JavaScript engine bug fixes (321)</a>.</li>
<li><a href="/en-US/Firefox/Releases/24">Complete release notes for Firefox 24</a>.</li>
</ul>
<h2 id="Firefox_23">Firefox 23</h2>
<div><ul>
<li>The <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty" title="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty"><code>Object.defineProperty</code></a> method can now be used to redefine the <code>length</code> property of an <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array" title="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array"><code>Array</code></a> object.</li>
<li>The option to disable JavaScript, including the options to allow moving windows/replace context menu, have been removed. You may still disable JavaScript by double clicking the "javascript.enabled" option in about:config.</li>
</ul></div>
<p>参阅:</p>
<ul>
<li><a class="external" href="https://bugzilla.mozilla.org/buglist.cgi?list_id=11242211&amp;resolution=FIXED&amp;classification=Components&amp;query_format=advanced&amp;bug_status=RESOLVED&amp;bug_status=VERIFIED&amp;component=JavaScript%20Engine&amp;component=JavaScript%20Engine%3A%20JIT&amp;component=JavaScript%3A%20GC&amp;component=JavaScript%3A%20Internationalization%20API&amp;component=JavaScript%3A%20Standard%20Library&amp;product=Core&amp;target_milestone=mozilla23" rel="noopener">All JavaScript engine bug fixes (290)</a>.</li>
<li><a href="/en-US/Firefox/Releases/23">Complete release notes for Firefox 23</a>.</li>
</ul>
<h2 id="Firefox_22">Firefox 22</h2>
<div><ul>
<li><a class="external" href="http://asmjs.org/spec/latest/" rel="noopener" title="http://asmjs.org/spec/latest/">Asm.js </a>optimizations are enabled, making it possible to compile C/C++ applications to a subset of JavaScript for better performance.</li>
<li>ES2015 <a href="/en-US/docs/JavaScript/Reference/arrow_functions" title="/en-US/docs/JavaScript/Reference/arrow_functions">Arrow Function</a> syntax has been implemented (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=846406" rel="noopener" title="FIXED: Implement arrow functions">bug 846406</a>).</li>
<li>The new <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is" title="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is">Object.is</a> function has been added (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=839979" rel="noopener" title="FIXED: Implement Object.is">bug 839979</a>).</li>
<li><code><a href="/en-US/docs/Web/JavaScript/Reference/Functions/arguments">arguments</a></code> in generator expressions is now inherited from enclosing lexical scope (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=848051" rel="noopener" title="FIXED: Allow 'arguments' in generator-expressions">bug 848051</a>).</li>
<li>The ES2015 Proxy <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/handler/preventExtensions" title="The handler.preventExtensions() method is a trap for Object.preventExtensions()."><code>preventExtensions</code></a> trap have been implemented (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=789897" rel="noopener" title="FIXED: Implement the preventExtensions and isExtensible trap for proxies">bug 789897</a>).</li>
</ul></div>
<p>参阅:</p>
<ul>
<li><a class="external" href="https://bugzilla.mozilla.org/buglist.cgi?list_id=11242211&amp;resolution=FIXED&amp;classification=Components&amp;query_format=advanced&amp;bug_status=RESOLVED&amp;bug_status=VERIFIED&amp;component=JavaScript%20Engine&amp;component=JavaScript%20Engine%3A%20JIT&amp;component=JavaScript%3A%20GC&amp;component=JavaScript%3A%20Internationalization%20API&amp;component=JavaScript%3A%20Standard%20Library&amp;product=Core&amp;target_milestone=mozilla22" rel="noopener">All JavaScript engine bug fixes (255)</a>.</li>
<li><a href="/en-US/Firefox/Releases/22">Complete release notes for Firefox 22</a>.</li>
</ul>
<h2 id="Firefox_21">Firefox 21</h2>
<div><ul>
<li><a href="/en-US/docs/E4X" title="E4X">E4X</a>, an ancient JavaScript extension, has been removed. Implemented only in Gecko, it never got significant traction (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=788293" rel="noopener" title="FIXED: Remove E4X from SpiderMonkey">bug 788293</a>).</li>
<li><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/parseInt" title="">parseInt</a> no longer treats strings with leading "0" as octal (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=786135" rel="noopener" title='FIXED: Make parseInt("042") === 42, now that other engines are moving that way'>bug 786135</a>).</li>
</ul></div>
<p>参阅:</p>
<ul>
<li><a class="external" href="https://bugzilla.mozilla.org/buglist.cgi?list_id=11242211&amp;resolution=FIXED&amp;classification=Components&amp;query_format=advanced&amp;bug_status=RESOLVED&amp;bug_status=VERIFIED&amp;component=JavaScript%20Engine&amp;component=JavaScript%20Engine%3A%20JIT&amp;component=JavaScript%3A%20GC&amp;component=JavaScript%3A%20Internationalization%20API&amp;component=JavaScript%3A%20Standard%20Library&amp;product=Core&amp;target_milestone=mozilla21" rel="noopener">All JavaScript engine bug fixes (289)</a>.</li>
<li><a href="/en-US/Firefox/Releases/21">Complete release notes for Firefox 21</a>.</li>
</ul>
<h2 id="Firefox_20">Firefox 20</h2>
<div><ul>
<li>Support for the <code><a href="/en-US/docs/JavaScript/Reference/Global_Objects/WeakMap" title="JavaScript/Reference/Global_Objects/WeakMap">Weakmap</a>.prototype.clear()</code> method, recently added to the Harmony (EcmaScript 2015) draft proposal has been added (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=814562" rel="noopener" title="FIXED: Implement clear() on WeakMaps">bug 814562</a>).</li>
<li>Support for the <a href="/en-US/docs/JavaScript/Reference/Global_Objects/Math/imul" title="JavaScript/Reference/Global_Objects/Math/imul"><code>Math.imul()</code></a> method, a C-style 32-bit multiplication function. Though proposed for Harmony (EcmaScript 2015) it has not yet accepted and still is non-standard (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=808148" rel="noopener" title="FIXED: prototype Math.imul">bug 808148</a>).</li>
<li>Web apps using draggable text with Kinetic 3.x are working, even when using the Cairo canvas backend (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=835064" rel="noopener" title="Firefox 18 won't drag text on some installations.">bug 835064</a>).</li>
<li>The <a href="/en-US/docs/JavaScript/Reference/Statements/for_each...in" title="JavaScript/Reference/Statements/for_each...in"><code>for each…in</code></a> statement has been deprecated and should not be used. Consider using the new <a href="/en-US/docs/JavaScript/Reference/Statements/for...of" title="JavaScript/Reference/Statements/for...of"><code>for…of</code></a> statement (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=804834" rel="noopener" title='FIXED: Hide "for each" from content'>bug 804834</a>).</li>
<li>Support for the <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/keys" title="The keys() method returns a new Iterator object that contains the keys for each element in the Map object in insertion order."><code>Map.prototype.keys()</code></a>, <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/values" title="The values() method returns a new Iterator object that contains the values for each element in the Map object in insertion order."><code>Map.prototype.values()</code></a>, and <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/entries" title="The entries() method returns a new Iterator object that contains the [key, value] pairs for each element in the Map object in insertion order."><code>Map.prototype.entries()</code></a> has been added (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=817368" rel="noopener" title="FIXED: Map.prototype.{keys,values,entries}">bug 817368</a>).</li>
</ul></div>
<p>参阅:</p>
<ul>
<li><a class="external" href="https://bugzilla.mozilla.org/buglist.cgi?list_id=11242211&amp;resolution=FIXED&amp;classification=Components&amp;query_format=advanced&amp;bug_status=RESOLVED&amp;bug_status=VERIFIED&amp;component=JavaScript%20Engine&amp;component=JavaScript%20Engine%3A%20JIT&amp;component=JavaScript%3A%20GC&amp;component=JavaScript%3A%20Internationalization%20API&amp;component=JavaScript%3A%20Standard%20Library&amp;product=Core&amp;target_milestone=mozilla20" rel="noopener">All JavaScript engine bug fixes (242)</a>.</li>
<li><a href="/en-US/Firefox/Releases/20">Complete release notes for Firefox 20</a>.</li>
</ul>
<h2 id="Firefox_19">Firefox 19</h2>
<div><ul>
<li><code><a href="/en-US/docs/JavaScript/Reference/Global_Objects/Map" title="JavaScript/Reference/Global_Objects/Map">Map</a></code> and <code><a href="/en-US/docs/JavaScript/Reference/Global_Objects/Set" title="JavaScript/Reference/Global_Objects/Set">Set</a></code> objects have changed from having a <code>size()</code> method to a <code>size</code> property (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=807001" rel="noopener" title="FIXED: Map.prototype.size and Set.prototype.size should be accessor properties">bug 807001</a>)</li>
<li><code><a href="/en-US/docs/JavaScript/Reference/Global_Objects/Map" title="JavaScript/Reference/Global_Objects/Map">Map</a></code> and <code><a href="/en-US/docs/JavaScript/Reference/Global_Objects/Set" title="JavaScript/Reference/Global_Objects/Set">Set</a></code> objects also have a clear() method now. (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=805003" rel="noopener" title="FIXED: Implement Map.prototype.clear and Set.prototype.clear methods">bug 805003</a>)</li>
</ul></div>
<p>参阅:</p>
<ul>
<li><a class="external" href="https://bugzilla.mozilla.org/buglist.cgi?list_id=11242211&amp;resolution=FIXED&amp;classification=Components&amp;query_format=advanced&amp;bug_status=RESOLVED&amp;bug_status=VERIFIED&amp;component=JavaScript%20Engine&amp;component=JavaScript%20Engine%3A%20JIT&amp;component=JavaScript%3A%20GC&amp;component=JavaScript%3A%20Internationalization%20API&amp;component=JavaScript%3A%20Standard%20Library&amp;product=Core&amp;target_milestone=mozilla19" rel="noopener">All JavaScript engine bug fixes (165)</a>.</li>
<li><a href="/en-US/Firefox/Releases/19">Complete release notes for Firefox 19</a>.</li>
</ul>
<h2 id="Firefox_18">Firefox 18</h2>
<div><ul>
<li>Harmony's (ECMAScript 2015) <a href="/en-US/docs/JavaScript/Reference/Global_Objects/Proxy">Direct Proxies</a> have been landed (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=703537" rel="noopener" title="FIXED: Implement Harmony direct proxies">bug 703537</a>). Warning: the implementation contains a couple of known bugs, missing features and misalignements with the current state of the spec. Do not rely on it for production code.</li>
<li>The ECMAScript 2015 <code>contains()</code> method is now implemented on strings. This is unfortunately not compatible with Mootools 1.2, which expects different behavior from <code>contains()</code> on strings but does not ensure it. Newer versions of Mootools fix this issue; sites should upgrade their Mootools version to something newer than 1.2.</li>
</ul></div>
<p>参阅:</p>
<ul>
<li><a class="external" href="https://bugzilla.mozilla.org/buglist.cgi?list_id=11242211&amp;resolution=FIXED&amp;classification=Components&amp;query_format=advanced&amp;bug_status=RESOLVED&amp;bug_status=VERIFIED&amp;component=JavaScript%20Engine&amp;component=JavaScript%20Engine%3A%20JIT&amp;component=JavaScript%3A%20GC&amp;component=JavaScript%3A%20Internationalization%20API&amp;component=JavaScript%3A%20Standard%20Library&amp;product=Core&amp;target_milestone=mozilla18" rel="noopener">All JavaScript engine bug fixes (221)</a>.</li>
<li><a href="/en-US/Firefox/Releases/18">Complete release notes for Firefox 18</a>.</li>
</ul>
<h2 id="Firefox_17">Firefox 17</h2>
<div><ul>
<li><a href="/en-US/docs/JavaScript/Reference/Global_Objects/String"><code>String</code></a> object now offers Harmony <a href="/en-US/docs/JavaScript/Reference/Global_Objects/String/startsWith" title="JavaScript/Reference/Global_Objects/String/startsWith"><code>startsWith</code></a>, <a href="/en-US/docs/JavaScript/Reference/Global_Objects/String/endsWith" title="JavaScript/Reference/Global_Objects/String/endsWith"><code>endsWith</code></a>, and <a href="/en-US/docs/JavaScript/Reference/Global_Objects/String/contains" title="JavaScript/Reference/Global_Objects/String/contains"><code>contains</code></a> methods (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=772733" rel="noopener" title="FIXED: implement harmony string methods">bug 772733</a>).</li>
<li>The String methods <a href="/en-US/docs/JavaScript/Reference/Global_Objects/String/link" title="JavaScript/Reference/Global_Objects/String/link">link</a> and <a href="/en-US/docs/JavaScript/Reference/Global_Objects/String/anchor" title="JavaScript/Reference/Global_Objects/String/anchor">anchor</a> now escape the <code>'<strong>"</strong>'</code> (quotation mark) (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=352437" rel="noopener" title="FIXED: string.link does not escape url">bug 352437</a>).</li>
<li>Experimental support for strawman <a href="/en-US/docs/JavaScript/Reference/Global_Objects/ParallelArray" title="JavaScript/Reference/Global_Objects/ParallelArray"><code>ParallelArray</code></a> object has been implemented (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=778559" rel="noopener" title="FIXED: Update sequential ParallelArray implementation to new API">bug 778559</a>).</li>
<li>Support to iterate <code><a href="/en-US/docs/JavaScript/Reference/Global_Objects/Map" title="JavaScript/Reference/Global_Objects/Map">Map</a></code>/<code><a href="/en-US/docs/JavaScript/Reference/Global_Objects/Set" title="JavaScript/Reference/Global_Objects/Set">Set</a></code> (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=725909" rel="noopener" title="FIXED: Make Maps and Sets iterable">bug 725909</a>).</li>
<li>Disabled <a href="/en-US/docs/E4X" title="E4X">E4X</a> for web content by default (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=778851" rel="noopener" title="FIXED: Turn javascript.options.xml.content off by default">bug 778851</a>).</li>
<li><code>__exposedProps__</code> must now be set for Chrome JavaScript objects exposed to content. Attempts to access Chrome objects from content without <code>__exposedProps__</code> set will fail silently (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=553102" rel="noopener" title="FIXED: Flip __exposedProps__ default for non-WN objects to default-safe">bug 553102</a>).</li>
<li><a href="/en-US/docs/Web/JavaScript/Reference/Statements/for...of"><code>for..of</code></a> loops now work in terms of <code>.iterator()</code> and <code>.next()</code> (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=725907" rel="noopener" title="FIXED: Change for-of loop to work in terms of .iterator() and .next()">bug 725907</a>).</li>
</ul></div>
<p>参阅:</p>
<ul>
<li><a class="external" href="https://bugzilla.mozilla.org/buglist.cgi?list_id=11242211&amp;resolution=FIXED&amp;classification=Components&amp;query_format=advanced&amp;bug_status=RESOLVED&amp;bug_status=VERIFIED&amp;component=JavaScript%20Engine&amp;component=JavaScript%20Engine%3A%20JIT&amp;component=JavaScript%3A%20GC&amp;component=JavaScript%3A%20Internationalization%20API&amp;component=JavaScript%3A%20Standard%20Library&amp;product=Core&amp;target_milestone=mozilla17" rel="noopener">All JavaScript engine bug fixes (231)</a>.</li>
<li><a href="/en-US/Firefox/Releases/17">Complete release notes for Firefox 17</a>.</li>
</ul>
<h2 id="Firefox_16">Firefox 16</h2>
<div><ul>
<li><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number" title="JavaScript/Reference/Global_Objects/Number"><code>Number</code></a> objects now offer <code><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isFinite">isFinite</a>()</code>, <code><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toInteger">toInteger</a>()</code>, and <code><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isInteger">isInteger</a>()</code> methods. (<a class="external link-https" href="https://bugzilla.mozilla.org/show_bug.cgi?id=761480" rel="noopener">bug 761480</a>, <a class="external link-https" href="https://bugzilla.mozilla.org/show_bug.cgi?id=761495" rel="noopener">bug 761495</a>)</li>
<li>The Harmony <a class="external" href="http://wiki.ecmascript.org/doku.php?id=harmony:spread" rel="noopener" title="http://wiki.ecmascript.org/doku.php?id=harmony:spread">spread operator</a> is now supported in <a href="/en-US/docs/JavaScript/Reference/Global_Objects/Array" title="JavaScript/Reference/Global_Objects/Array"><code>Array</code></a> initializers (<a class="external link-https" href="https://bugzilla.mozilla.org/show_bug.cgi?id=574130" rel="noopener">bug 574130</a>). Note it is not yet supported in calls (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=762363" rel="noopener" title="https://bugzilla.mozilla.org/show_bug.cgi?id=762363">bug 762363</a>).</li>
<li>The experimental <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/move" title="The move() method used to copy the sequence of array elements within the array to the position starting at target. However, this non-standard method has been replaced with the standard TypedArray.prototype.copyWithin() method. TypedArray is one of the typed array types here."><code>TypedArray.prototype.move()</code></a> method has been added (available in Aurora and Nightly channels only) (<a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=730873" rel="noopener" title="FIXED: (memmove) ArrayBufferView.prototype.move">bug 730873</a>).</li>
</ul></div>
<p>参阅:</p>
<ul>
<li><a class="external" href="https://bugzilla.mozilla.org/buglist.cgi?list_id=11242211&amp;resolution=FIXED&amp;classification=Components&amp;query_format=advanced&amp;bug_status=RESOLVED&amp;bug_status=VERIFIED&amp;component=JavaScript%20Engine&amp;component=JavaScript%20Engine%3A%20JIT&amp;component=JavaScript%3A%20GC&amp;component=JavaScript%3A%20Internationalization%20API&amp;component=JavaScript%3A%20Standard%20Library&amp;product=Core&amp;target_milestone=mozilla16" rel="noopener">All JavaScript engine bug fixes (186)</a>.</li>
<li><a href="/en-US/Firefox/Releases/16">Complete release notes for Firefox 16</a>.</li>
</ul>
<h2 id="Firefox_15">Firefox 15</h2>
<div><ul>
<li>Support for the <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView" title="JavaScript_typed_arrays/DataView"><code>DataView</code></a> interface from the Typed Arrays specification has been added. This provides low-level access to the data contained in an <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer" title="JavaScript_typed_arrays/ArrayBuffer"><code>ArrayBuffer</code></a>.</li>
<li>Support for new ECMAScript 2015 built-ins:  <a href="/en-US/docs/JavaScript/Reference/Global_Objects/Number/isNaN" title="JavaScript/Reference/Global_Objects/isNaN"><code>Number.isNaN()</code></a>, <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toInteger"><code>Number.toInteger()</code></a>, <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isInteger"><code>Number.isInteger()</code></a>, <a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isFinite"><code>Number.isFinite()</code></a> has been added. (<a class="external link-https" href="https://bugzilla.mozilla.org/show_bug.cgi?id=749818" rel="noopener" title="https://bugzilla.mozilla.org/show_bug.cgi?id=749818">bug 749818</a>, <a class="external link-https" href="https://bugzilla.mozilla.org/show_bug.cgi?id=749818" rel="noopener" title="https://bugzilla.mozilla.org/show_bug.cgi?id=761495">bug 761495</a>, <a class="external link-https" href="https://bugzilla.mozilla.org/show_bug.cgi?id=749818" rel="noopener" title="https://bugzilla.mozilla.org/show_bug.cgi?id=761480">bug 761480</a>).</li>
<li>Support for ECMAScript 2015 <a href="/en-US/docs/Web/JavaScript/Reference/Functions/Default_parameters">default parameters</a> has been added. (<a class="external link-https" href="https://bugzilla.mozilla.org/show_bug.cgi?id=757676" rel="noopener" title="https://bugzilla.mozilla.org/show_bug.cgi?id=757676">bug 757676</a>).</li>
<li>Support for ECMAScript 2015 <a href="/en-US/docs/Web/JavaScript/Reference/Functions/rest_parameters" title="JavaScript/Reference/rest_parameters">rest parameters</a> has been added. (<a class="external link-https" href="https://bugzilla.mozilla.org/show_bug.cgi?id=574132" rel="noopener" title="https://bugzilla.mozilla.org/show_bug.cgi?id=574132">bug 574132</a>).</li>
</ul></div>
<p>参阅:</p>
<ul>
<li><a class="external" href="https://bugzilla.mozilla.org/buglist.cgi?list_id=11242211&amp;resolution=FIXED&amp;classification=Components&amp;query_format=advanced&amp;bug_status=RESOLVED&amp;bug_status=VERIFIED&amp;component=JavaScript%20Engine&amp;component=JavaScript%20Engine%3A%20JIT&amp;component=JavaScript%3A%20GC&amp;component=JavaScript%3A%20Internationalization%20API&amp;component=JavaScript%3A%20Standard%20Library&amp;product=Core&amp;target_milestone=mozilla15" rel="noopener">All JavaScript engine bug fixes (203)</a>.</li>
<li><a href="/en-US/Firefox/Releases/15">Complete release notes for Firefox 15</a>.</li>
</ul>
<h2 id="Firefox_14">Firefox 14</h2>
<div><p><em>No change.</em></p></div>
<p>参阅:</p>
<ul>
<li><a class="external" href="https://bugzilla.mozilla.org/buglist.cgi?list_id=11242211&amp;resolution=FIXED&amp;classification=Components&amp;query_format=advanced&amp;bug_status=RESOLVED&amp;bug_status=VERIFIED&amp;component=JavaScript%20Engine&amp;component=JavaScript%20Engine%3A%20JIT&amp;component=JavaScript%3A%20GC&amp;component=JavaScript%3A%20Internationalization%20API&amp;component=JavaScript%3A%20Standard%20Library&amp;product=Core&amp;target_milestone=mozilla14" rel="noopener">All JavaScript engine bug fixes (135)</a>.</li>
<li><a href="/en-US/Firefox/Releases/14">Complete release notes for Firefox 14</a>.</li>
</ul>
<h2 id="Firefox_13">Firefox 13</h2>
<div><ul>
<li>Support for the ECMAScript 2015 <a href="/en-US/docs/JavaScript/Reference/Statements/for...of" title="for...of"><code>for..of</code></a> construct has been added.</li>
<li>Experimental support for ECMAScript 2015 <a href="/en-US/docs/JavaScript/Reference/Global_Objects/Map" title="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Map">Map</a> and <a href="/en-US/docs/JavaScript/Reference/Global_Objects/Set" title="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Set">Set</a> objects has been implemented.</li>
</ul></div>
<p>参阅:</p>
<ul>
<li><a class="external" href="https://bugzilla.mozilla.org/buglist.cgi?list_id=11242211&amp;resolution=FIXED&amp;classification=Components&amp;query_format=advanced&amp;bug_status=RESOLVED&amp;bug_status=VERIFIED&amp;component=JavaScript%20Engine&amp;component=JavaScript%20Engine%3A%20JIT&amp;component=JavaScript%3A%20GC&amp;component=JavaScript%3A%20Internationalization%20API&amp;component=JavaScript%3A%20Standard%20Library&amp;product=Core&amp;target_milestone=mozilla13" rel="noopener">All JavaScript engine bug fixes (175)</a>.</li>
<li><a href="/en-US/Firefox/Releases/13">Complete release notes for Firefox 13</a>.</li>
</ul>
<h2 id="Firefox_12">Firefox 12</h2>
<div><ul>
<li>Support for <a href="/en-US/docs/JavaScript/Sharp_variables_in_JavaScript" title="Sharp variables in JavaScript">sharp variables</a> (a Netscape non-standard extension) has been dropped.</li>
<li><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/slice" title="The slice() method returns a new ArrayBuffer whose contents are a copy of this ArrayBuffer's bytes from begin, inclusive, up to end, exclusive."><code>ArrayBuffer.prototype.slice()</code></a> has been implemented.</li>
</ul></div>
<p>参阅:</p>
<ul>
<li><a class="external" href="https://bugzilla.mozilla.org/buglist.cgi?list_id=11242211&amp;resolution=FIXED&amp;classification=Components&amp;query_format=advanced&amp;bug_status=RESOLVED&amp;bug_status=VERIFIED&amp;component=JavaScript%20Engine&amp;component=JavaScript%20Engine%3A%20JIT&amp;component=JavaScript%3A%20GC&amp;component=JavaScript%3A%20Internationalization%20API&amp;component=JavaScript%3A%20Standard%20Library&amp;product=Core&amp;target_milestone=mozilla12" rel="noopener">All JavaScript engine bug fixes (177)</a>.</li>
<li><a href="/en-US/Firefox/Releases/12">Complete release notes for Firefox 12</a>.</li>
</ul>
<h2 id="Firefox_11">Firefox 11</h2>
<div><p><em>No change.</em></p></div>
<p>参阅:</p>
<ul>
<li><a class="external" href="https://bugzilla.mozilla.org/buglist.cgi?list_id=11242211&amp;resolution=FIXED&amp;classification=Components&amp;query_format=advanced&amp;bug_status=RESOLVED&amp;bug_status=VERIFIED&amp;component=JavaScript%20Engine&amp;component=JavaScript%20Engine%3A%20JIT&amp;component=JavaScript%3A%20GC&amp;component=JavaScript%3A%20Internationalization%20API&amp;component=JavaScript%3A%20Standard%20Library&amp;product=Core&amp;target_milestone=mozilla11" rel="noopener">All JavaScript engine bug fixes (167)</a>.</li>
<li><a href="/en-US/Firefox/Releases/11">Complete release notes for Firefox 11</a>.</li>
</ul>
<h2 id="Firefox_10">Firefox 10</h2>
<div><ul>
<li>The method <code><a href="/en/JavaScript/Reference/Global_Objects/WeakMap" title="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/WeakMap">WeakMap</a>.set()</code> now returns <em><code>undefined</code></em>, instead of itself.</li>
<li>A bug was introduced in regular expression handling in Firefox 7; this has been fixed. See <a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=683838" rel="noopener" title="FIXED: Different regular expression result since Firefox 7">bug 683838</a> if you want the gory details.</li>
<li>You can no longer use <a href="/en/E4X" title="E4X">E4X</a> syntax while in <a href="/en/JavaScript/Reference/Functions_and_function_scope/Strict_mode" title="Strict mode">ECMAScript 5 strict mode</a> (that is, after <code>"use strict;"</code>).</li>
</ul></div>
<p>参阅:</p>
<ul>
<li><a class="external" href="https://bugzilla.mozilla.org/buglist.cgi?list_id=11242211&amp;resolution=FIXED&amp;classification=Components&amp;query_format=advanced&amp;bug_status=RESOLVED&amp;bug_status=VERIFIED&amp;component=JavaScript%20Engine&amp;component=JavaScript%20Engine%3A%20JIT&amp;component=JavaScript%3A%20GC&amp;component=JavaScript%3A%20Internationalization%20API&amp;component=JavaScript%3A%20Standard%20Library&amp;product=Core&amp;target_milestone=mozilla10" rel="noopener">All JavaScript engine bug fixes (165)</a>.</li>
<li><a href="/en-US/Firefox/Releases/10">Complete release notes for Firefox 10</a>.</li>
</ul>
<h2 id="Firefox_9">Firefox 9</h2>
<div><p><em>No change.</em></p></div>
<p>参阅:</p>
<ul>
<li><a class="external" href="https://bugzilla.mozilla.org/buglist.cgi?list_id=11242211&amp;resolution=FIXED&amp;classification=Components&amp;query_format=advanced&amp;bug_status=RESOLVED&amp;bug_status=VERIFIED&amp;component=JavaScript%20Engine&amp;component=JavaScript%20Engine%3A%20JIT&amp;component=JavaScript%3A%20GC&amp;component=JavaScript%3A%20Internationalization%20API&amp;component=JavaScript%3A%20Standard%20Library&amp;product=Core&amp;target_milestone=mozilla9" rel="noopener">All JavaScript engine bug fixes (132)</a>.</li>
<li><a href="/en-US/Firefox/Releases/9">Complete release notes for Firefox 9</a>.</li>
</ul>
<h2 id="Firefox_8">Firefox 8</h2>
<div><ul>
<li><code><a href="/en/JavaScript/Reference/Global_Objects/RegExp/exec" title="en/JavaScript/Reference/Global Objects/RegExp/exec">RegExp.exec()</a></code> and <code><a href="/en/JavaScript/Reference/Global_Objects/RegExp/test" title="en/JavaScript/Reference/Global Objects/RegExp/test">RegExp.test()</a></code> called with no arguments now match against the string "undefined".</li>
<li><code><a href="/en/JavaScript/Reference/Global_Objects/String/search" title="en/JavaScript/Reference/Global Objects/String/search">String.search()</a></code> and <code><a href="/en/JavaScript/Reference/Global_Objects/String/match" title="en/JavaScript/Reference/Global Objects/String/match">String.match()</a></code> called with no arguments or <code>undefined</code> now match against the empty string and thus match every string.</li>
<li>Support for watchlists has been implemented with the new (non-standard) <a href="/en/JavaScript/Reference/Global_Objects/Object/watch" title="en/JavaScript/Reference/Global_Objects/Object/watch"><code>watch()</code></a> and <a href="/en/JavaScript/Reference/Global_Objects/Object/unwatch" title="en/JavaScript/Reference/Global_Objects/Object/unwatch"><code>unwatch()</code></a> methods.</li>
</ul></div>
<p>参阅:</p>
<ul>
<li><a class="external" href="https://bugzilla.mozilla.org/buglist.cgi?list_id=11242211&amp;resolution=FIXED&amp;classification=Components&amp;query_format=advanced&amp;bug_status=RESOLVED&amp;bug_status=VERIFIED&amp;component=JavaScript%20Engine&amp;component=JavaScript%20Engine%3A%20JIT&amp;component=JavaScript%3A%20GC&amp;component=JavaScript%3A%20Internationalization%20API&amp;component=JavaScript%3A%20Standard%20Library&amp;product=Core&amp;target_milestone=mozilla8" rel="noopener">All JavaScript engine bug fixes (154)</a>.</li>
<li><a href="/en-US/Firefox/Releases/8">Complete release notes for Firefox 8</a>.</li>
</ul>
<h2 id="Firefox_7">Firefox 7</h2>
<div><ul>
<li>The <code><a href="/en/JavaScript/Reference/Global_Objects/Function/arity" title="en/JavaScript/Reference/Global_Objects/Function/arity">Function.arity</a></code> property has been removed; use <code><a href="/en/JavaScript/Reference/Global_Objects/Function/length" title="en/JavaScript/Reference/Global_Objects/Function/length">Function.length</a></code> instead.</li>
</ul></div>
<p>参阅:</p>
<ul>
<li><a class="external" href="https://bugzilla.mozilla.org/buglist.cgi?list_id=11242211&amp;resolution=FIXED&amp;classification=Components&amp;query_format=advanced&amp;bug_status=RESOLVED&amp;bug_status=VERIFIED&amp;component=JavaScript%20Engine&amp;component=JavaScript%20Engine%3A%20JIT&amp;component=JavaScript%3A%20GC&amp;component=JavaScript%3A%20Internationalization%20API&amp;component=JavaScript%3A%20Standard%20Library&amp;product=Core&amp;target_milestone=mozilla7" rel="noopener">All JavaScript engine bug fixes (40)</a>.</li>
<li><a href="/en-US/Firefox/Releases/7">Complete release notes for Firefox 7</a>.</li>
</ul>
<h2 id="Firefox_6">Firefox 6</h2>
<div><ul>
<li>In the past, it was possible to use the <code>new</code> operator on several built-in functions (eval, parseInt, Date.parse...) that should not have allowed it, according to the specification. This behavior is no longer supported. Using the <code>new</code> operator in this way was never officially supported and was not widely done, so it's unlikely that this change affects you.</li>
<li>ECMAScript 2015 <a href="/en/JavaScript/Reference/Global_Objects/WeakMap" title="en/JavaScript/Reference/Global_Objects/WeakMap">WeakMaps</a> have been added as a prototype implementation.</li>
</ul></div>
<p>参阅:</p>
<ul>
<li><a class="external" href="https://bugzilla.mozilla.org/buglist.cgi?list_id=11242211&amp;resolution=FIXED&amp;classification=Components&amp;query_format=advanced&amp;bug_status=RESOLVED&amp;bug_status=VERIFIED&amp;component=JavaScript%20Engine&amp;component=JavaScript%20Engine%3A%20JIT&amp;component=JavaScript%3A%20GC&amp;component=JavaScript%3A%20Internationalization%20API&amp;component=JavaScript%3A%20Standard%20Library&amp;product=Core&amp;target_milestone=mozilla6" rel="noopener">All JavaScript engine bug fixes (45)</a>.</li>
<li><a href="/en-US/Firefox/Releases/6">Complete release notes for Firefox 6</a>.</li>
</ul>
<h2 id="Firefox_5">Firefox 5</h2>
<div><ul>
<li>Regular expressions are no longer callable as if they were functions; this change has been made in concert with the WebKit team to ensure compatibility (see <a class="external" href="https://bugs.webkit.org/show_bug.cgi?id=28285" rel="external noopener" title="">WebKit bug 28285</a>. This feature had existed for a long time but was never documented (at least, not here on MDC).</li>
<li>The <a href="/en/JavaScript/Reference/Global_Objects/Function/isGenerator" title="en/JavaScript/Reference/Global Objects/Function/isGenerator"><code>Function.prototype.isGenerator()</code></a> method is now supported; this lets you determine if a function is a <a href="/en/JavaScript/Guide/Iterators_and_Generators#Generators.3a_a_better_way_to_build_Iterators" title="en/Core JavaScript 1.5 Guide/Iterators and Generators#Generators.3a a better way to build Iterators">generator</a>.</li>
<li>The following <a href="/en/JavaScript/Reference/Reserved_Words" title="en/JavaScript/Reference/Reserved Words">reserved words</a> were previously only treated as reserved when in strict mode; now they're always treated as reserved: <code>class</code>, <code>enum</code>, <code>export</code>, <code>extends</code>, <code>import</code>, and <code>super</code>.</li>
<li>DOM documents created in chrome code may no longer be exposed to sandboxed scripts.</li>
<li>The JSON parser has been re-written for improved speed and compliance. This includes a fix for <a class="external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=572279" rel="noopener" title="FIXED: JSON.parse should not allow trailing decimals">bug 572279</a>.</li>
</ul></div>
<p>参阅:</p>
<ul>
<li><a class="external" href="https://bugzilla.mozilla.org/buglist.cgi?list_id=11242211&amp;resolution=FIXED&amp;classification=Components&amp;query_format=advanced&amp;bug_status=RESOLVED&amp;bug_status=VERIFIED&amp;component=JavaScript%20Engine&amp;component=JavaScript%20Engine%3A%20JIT&amp;component=JavaScript%3A%20GC&amp;component=JavaScript%3A%20Internationalization%20API&amp;component=JavaScript%3A%20Standard%20Library&amp;product=Core&amp;target_milestone=mozilla5" rel="noopener">All JavaScript engine bug fixes (23)</a>.</li>
<li><a href="/en-US/Firefox/Releases/5">Complete release notes for Firefox 5</a>.</li>
</ul>
<h2 id="更早版本">更早版本</h2>
<div>
<p>对于 Firefox 5 之前版本,请查看 <a href="New_in_JavaScript#JavaScript版本">old  JavaScript versions</a></p>
</div>
<p> </p>
</article>