下面是 Firefox 发布版本的 JavaScript 日志更新情况。

## Firefox 52

#### New features

- Support for the async functions has been added. This adds `async function`, `async function expression`, and the `await` keyword (bug 1185106).
- Implemented ES2017 trailing commas in functions (bug 1303788).
- Implemented rest parameter destructuring (bug 1243717).
- The exponentiation operator (**) is now enabled by default (bug 1291212).
- You can now use IANA time zone names in the `timeZone` option of date related APIs like `DateTimeFormat` or `Date.toLocaleString()` (bug 837961).

#### Changes and removals

- Array destructuring now throws a `SyntaxError` when using destructuring rest with trailing comma (bug 1041341).
- Duplicate `__proto__` properties are now allowed in object destructuring ({{ bug }}).
- `Array.prototype.toLocaleString()` has been re-implemented to support the Intl API parameters "`locales`" and "`options`" ({{ bug }}).
- `TypedArray` constructors now accept iterables to create new typed arrays ({{ bug }}).
- `TypedArray.from()`, `TypedArray.of()`, `TypedArray.prototype.filter()`, `TypedArray.prototype.map()`, `TypedArray.prototype.slice()`, `TypedArray.prototype.subarray()` now require that their `this` values are valid Typed Array constructors ({{ bug }}).
- The non-standard `ArrayBuffer.slice()` method (not `ArrayBuffer.prototype.slice()`) is deprecated and now presents a warning when used ({{ bug }}).
- Unicode code point escapes can now also be used as identifiers (e.g. "`let \u{61} = 123`", see {{ bug }}).

- To conform with ES2015, `\u2e2f` and `ⸯ` now throw when used as identifier, for details see {{ bug }} and {{ bug }}.

参阅:

- All JavaScript engine bug fixes.
- Complete release notes for Firefox 52.

## Firefox 51

- The ES2015 `Symbol.toStringTag` property has been implemented ({{ bug }}).
- The ES2015 `TypedArray.prototype.toString()` and `TypedArray.prototype.toLocaleString()` methods have been implemented ({{ bug }}).
- The `DateTimeFormat.prototype.formatToParts()` method is now available ({{ bug }}).
- `const` and `let` are now fully ES2015-compliant ({{ bug }}).
- Using `const` in `for...of` loops now has a fresh binding for each iteration and no longer throws a `SyntaxError` ({{ bug }}).
- The deprecated for each...in loop now presents a warning in the console ({{ bug }}). Please migrate your code to use the standardized `for...of` loop.
- Generator functions can't have a label anymore and "`let`" as a label name is disallowed now ({{ bug }}).
- Deprecated legacy generator functions will now throw when used in method definitions ({{ bug }}).
- The `next()` method of the iterator protocol will now throw a `TypeError` if the returned value is not an object ({{ bug }}).
- Child-indexed pseudo-class selectors should match without a parent ({{ bug }}).

参阅：

- All JavaScript engine bug fixes.
- Complete release notes for Firefox 51.

## Firefox 50

- The ES2015 `Symbol.hasInstance` property has been implemented (bug 1054906).
- The ES2017 `Object.getOwnPropertyDescriptors()` method has been implemented (bug 1245024).
- The behavior of \W in `RegExp` 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) (bug 1281739).

参阅：

- All JavaScript engine bug fixes.
- Complete release notes for Firefox 50.

## Firefox 49

- The ES2015 `getPrototypeOf()` and `setPrototypeOf()` `Proxy` traps have been implemented (bug 888969).
- The ES2015 `RegExp.prototype[@@match]()`, `RegExp.prototype[@@replace]()`, `RegExp.prototype[@@search]()`, and `RegExp.prototype[@@split]()` methods, and `RegExp[@@species]` getter have been implemented (bug 887016).
- The deprecated, non-standard `flags` argument of `String.prototype.``match`/`search`/`replace` has been removed (bug 1108382).
- The behavior of the `Date.parse()` method when parsing 2-digit years has been changed to be more interoperable with the Google Chrome browser (bug 1265136).

参阅：

- All JavaScript engine bug fixes.
- Complete release notes for Firefox 49.

## Firefox 48

#### New APIs

- The `String.prototype.padStart()` and `String.prototype.padEnd()` methods have been implemented (bug 1260509).
- The ES2015 `Symbol.unscopables` and `Array.prototype[@@unscopables]` properties have been implemented (bug 1054759 and bug 1258163).
- The ES2015 `Symbol.isConcatSpreadable` symbol has been implemented (bug 1041586).
- The ES2015 `Array[@@species]` getter has been implemented (bug 1165052).
- The ES2015 `ArrayBuffer[@@species]` getter and `%TypedArray%[@@species]` getter have been implemented (bug 1165053).
- The `Intl.getCanonicalLocales()` method of the ECMAScript Internationalization API draft has been implemented (bug 1263040).

#### Deprecations and removals

- The deprecated old Proxy API (`Proxy.create` and `Proxy.createFunction()`) has been removed. Use the standard `Proxy` object instead (bug 892903).
- The `String.prototype.contains()` method has been removed (it was deprecated since version 40). Use the `String.prototype.includes()` method instead (bug 1103588).
- The non-standard `RegExp.multiline` property (not `RegExp.prototype.multiline`) has been removed. Use the standard m flag instead (bug 1219757).
- The `__defineGetter__` and `__defineSetter__` methods can no longer be called at the global scope without any object. (bug 1253016).

参阅：

- All JavaScript engine bug fixes.
- Complete release notes for Firefox 48.

## Firefox 47

- The new ES2017 `Object.values()` and `Object.entries()` methods have been implemented (bug 1232639).
- The deprecated old Proxy API (`Proxy.create` and `Proxy.createFunction`) now presents a deprecation warning in the console and will be removed in a future version. Use the standard `Proxy` object instead (bug 892903).
- Support for the deprecated non-standard `flags` argument of `String.prototype.``match`/`search`/`replace` has been dropped in non-release builds (bug 1245801).
- As per the new ES2016 specification, the `Proxy` enumerate trap for `for...in` statements has been removed (bug 1246318).
- The `Array.prototype.indexOf()` and `Array.prototype.lastIndexOf()` methods (and their `TypedArray` equivalents) have been updated to never return `-0` as per the ECMAScript specification (bug 1242043).

参阅：

- All JavaScript engine bug fixes.
- Complete release notes for Firefox 47.

## Firefox 46

- The ES2015 RegExp unicode (u) flag has been implemented (bug 1135377).
- The ES2015 block-level functions have been implemented (bug 1071646).
- The ES2015 `TypedArray.prototype.sort()` method has been implemented (bug 1121937).
- The ES2015 `arguments[@@iterator]` has been implemented (bug 1067049).
- The experimental EcmaScript Shared Memory API has been implemented. See the `SharedArrayBuffer` and `Atomics` objects. To use this experimental API set `javascript.options.shared_memory` to `true` in about:config.
- Redeclaration of `let` and `const` variables now throws a `SyntaxError` instead of a `TypeError` as per the ECMAScript specification (bug 1198833).
- In Strict mode, setting properties on primitive values will now throw a `TypeError` (bug 603201).
- The non-standard `WeakMap.prototype.clear()` and `WeakSet.prototype.clear()` methods have been removed (bug 1101817).
- The non-standard, static `RegExp.multiline` property is now deprecated (bug 1220457).
- Built-in accessor function names now have a "get" or "set" prefix (bug 1180290, bug 1235656).
- JS1.7/JS1.8 (legacy) array comprehensions and JS1.7/JS1.8 (legacy) generator comprehensions have been removed (bug 1220564).

参阅：

- All JavaScript engine bug fixes.
- Complete release notes for Firefox 46.

## Firefox 45

- ES2015 Classes are now enabled by default ({{ bug }}).
- Expression closures are deprecated and will now present a warning in the console ({{ bug }}).
- `String.prototype.replace` does not restore RegExp static properties after executing function parameter anymore ({{ bug }}).
- `Math.random()` has been updated to the better XorShift128+ algorithm ({{ bug }}).

参阅：

- All JavaScript engine bug fixes.
- Complete release notes for Firefox 45.

## Firefox 44

#### New APIs

- `Symbol.toPrimitive`, `Symbol.prototype[@@toPrimitive]`, and `Date.prototype[@@toPrimitive]` have been implemented (bug 1054756).

#### Changes

- The `let` and `const` bindings in the global level have been made compliant with ES2015 semantics. See bug 589199 and the blog post "Breaking changes in let and const in Firefox Nightly 44". In addition, `let` is now available to default Web JavaScript (strict and non-strict) and does not require a version opt-in anymore (bug 932517).
- If typed arrays' (like `Int8Array`) and `ArrayBuffer`) constructors are called as a function without the `new` operator, a `TypeError` is now thrown as per the ES2015 specification (bug 980945, bug 1214936).
- The `RegExp` sticky flag now follows the ES2015 standard for anchored sticky regular expressions (bug 773687).
- The JavaScript shell (SpiderMonkey's REPL) now defaults to the default, Web-compatible JS version (and not JS1.7+ anymore) (bug 1192329).

#### Removals

- Support for the non-standard `let` blocks has been dropped (bug 1167029.
- The non-standard and deprecated property `Object.prototype.__noSuchMethod__` has been removed (bug 683218).

参阅：

- All JavaScript engine bug fixes.
- Complete release notes for Firefox 44.

## Firefox 43

#### New APIs

- The new ES2016 methods `Array.prototype.includes()` and `TypedArray.prototype.includes()` are now enabled by default (bug 1070767).

#### Changes regarding the `arguments` object

- To match the ES2015 specification, arrow functions no longer have their own `arguments` object. The `arguments` object is now lexically bound (inherited from the outer function). In most cases, rest parameters are a good alternative `(...args) => args[i]`, see bug 889158.
- The arguments object is now allowed in conjunction with rest parameters (bug 1133298).
- From now on, a mapped `arguments` object in non-strict functions is only provided if the function does not contain any rest parameters, any default parameters or any destructured parameters (bug 1175394).

#### Other changes

- Generators and generator methods are no longer constructable as per ES2016 (bug 1191486).

参阅：

- All JavaScript engine bug fixes.
- Complete release notes for Firefox 43.

## Firefox 42

- The `Reflect` object has been implemented (bug 987514).
- The implementation of the `Proxy` `handler.ownKeys()` trap has been updated to match the final ES2015 specification (bug 1049662).
- Calling `Map`, `Set`, or `WeakMap` without `new`, will now throw a `TypeError` (bug 1083752).

参阅：

- All JavaScript engine bug fixes.
- Complete release notes for Firefox 42.

## Firefox 41

- `Date.prototype` is now an ordinary object, not a `Date` instance anymore (bug 861219).
- `Date.prototype.toString` is now a generic method (bug 861219).
- `Symbol.species` has been added (bug 1131043).
- `Map[@@species]` and `Set[@@species]` getters have been added (bug 1131043).
- Non-standard let expression support has been dropped (bug 1023609).
- Destructured parameters with default value assignment are now supported (bug 1018628).
- Per ES2015, curly braces are required for method definitions. Syntax without them will fail from now on (bug 1150855).
- Method definitions (except for generator methods) are not constructable anymore (bug 1059908 and bug 1166950).
- As part of ES2015 specification compliance, parenthesized destructuring patterns, like `([a, b]) = [1, 2]` or `({a, b}) = { a: 1, b: 2 }`, are now considered invalid and will throw a `SyntaxError`. See Jeff Walden's blog post for more details.
- The `new.target` syntax has been added (bug 1141865).

参阅：

- All JavaScript engine bug fixes.
- Complete release notes for Firefox 41.

## Firefox 40

- Unreachable code after `return` statement (including unreachable expression after semicolon-less return statements) will now show a warning in the console (bug 1005110, bug 1151931).
- `Symbol.match` has been added (bug 1054755).
- Passing an object which has a property named `Symbol.match` with a truthy value to `String.prototype.startsWith`, `String.prototype.endsWith`, and `String.prototype.contains` now throws a `TypeError` (bug 1054755).
- `RegExp` function returns pattern itself if called without `new` and pattern object has a property named `Symbol.match` with a truthy value, and the pattern object's `constructor` property equals to `RegExp` function. (bug 1147817).
- Support for the non-standard JS1.7 destructuring for-in has been dropped (bug 1083498).
- Non-standard initializer expressions in for...in loops are now ignored and will present a warning in the console. (bug 748550 and bug 1164741).
- `\u{xxxxxx}` Unicode code point escapes have been added (bug 320500).
- `String.prototype.contains` has been replaced with `String.prototype.includes`, `String.prototype.contains` is kept as an alias (bug 1102219).
- If the `DataView` constructor is called as a function without the `new` operator, a `TypeError` is now thrown as per the ES2015 specification.
- An issue regressed in Firefox 21, where proxyfied arrays without the `get` trap were not working properly, has been fixed. If the `get` trap in a `Proxy` was not defined, `Array.length` returned `0` and the `set` trap didn't get called. A workaround was to add the `get` trap even if was not necessary in your code. This issue has been fixed now (bug 895223).
- `WeakMap.prototype` and `WeakSet.prototype` have been updated to be just ordinary objects, per ES2015 specification (bug 1055473).

参阅：

- All JavaScript engine bug fixes.
- Complete release notes for Firefox 40.

## Firefox 39

- The `RegExp` constructor no longer throws when the first argument is a `RegExp` and the second `flags` argument is present (bug 1108949).
- The `Object.prototype.__noSuchMethod__` property is now deprecated and throws a console warning (see bug 1140428 and this platform announcement).
- The implementation of the `Proxy` object has been updated to comply more with the ES2015 specification:
  - The `defineProperty` and `set` handlers now need to explicitly return `true` to be successful, otherwise a `TypeError` exception will be thrown in strict mode (bug 1132522).
  - If the `window` object is set as the target, those handlers will now throw a `TypeError` (bug 828137).
- When using arrow functions (`=>`), a line terminator (`\n`) is no longer allowed after arrow function arguments (`() \n => {}`) (bug 1141392).
- `RegExp.prototype.toString` is now a generic function (bug 1079919).
- The non-standard `flags` argument of `String.prototype.match()`, `String.prototype.search()`, and `String.prototype.replace()` is now deprecated and throws a console warning (bug 1142351).
- The try/catch behavior of `Object.assign()` has been removed to conform with the latest ES2015 draft (bug 1103344).

参阅：

- All JavaScript engine bug fixes.
- Complete release notes for Firefox 39.

## Firefox 38

- `Generator.prototype.return()` is implemented (bug 1115868).
- `Setter` with a rest parameter is now a `SyntaxError` (bug 1089632).
- The `name` property of functions is configurable now (bug 1084019).
- Several `Array` methods have been implemented for typed arrays as well:
  - The `of()` and `from()` methods (bug 896608).
  - The `forEach()` method (bug 1107645).
  - The `filter()` and `map()` methods (bug 1121936).
  - The `slice()` method (bug 1121935).
- Duplicated parameter name is no longer allowed when rest-parameter is present (bug 1096376).
- Duplicated parameter name is no longer allowed in arrow functions (bug 1096377).
- Duplicated parameter name is no longer allowed in concise method definitions (bug 1096378).
- Warning is shown when `Map`/`Set`/`WeakMap` constructor is called without `new` (bug 1108930).
- The `get`, `has`, and `delete` methods of `WeakMap` objects no longer throw when the `key` parameter is not an object (bug 1127827).
- The optional and non-standard second `fallback` parameter for `WeakMap.prototype.get()` has been removed (bug 1127827).
- When defining a generator method, "`set`" and "`get`" are no longer invalid names (bug 1073809).
- `RegExp.prototype.source` now returns "(?:)" instead of an empty string for empty regular expressions (bug 1130798).
- `RegExp.prototype.source` and `RegExp.prototype.toString()` now escape regular expression patterns properly (e.g. line terminators, "\n") (bug 1130860).
- The `Regexp` `global`, `ignoreCase`, `multiline`, and `sticky` properties are now prototype accessor properties rather than own data properties of `RegExp` instances (bug 1120169).
- The `RegExp.prototype.source` property is now prototype accessor property rather than own data property of `RegExp` instances (bug 1120169). Available only in non-Release version, due to bug 1150297.
- `Function.prototype.toString()` now throws for `Proxy` objects (bug 1100936).

参阅：

- All JavaScript engine bug fixes.
- Complete release notes for Firefox 38.

## Firefox 37

- The `Map`, `Set`, `WeakMap` and `WeakSet` constructors now ignore null iterable (bug 1092538).
- The `Map`, `Set`, `WeakMap` and `WeakSet` constructors now supports monkey-patched `prototype.set` or `prototype.add` (bug 804279).
- The Non-standard `String.prototype.quote()` method has been removed (bug 1103181).
- The `RegExp.prototype.flags` property has been implemented (bug 1108467).
- Several `Array` methods have been implemented for typed arrays as well:
  - The `every()` and `some()` methods (bug 1116390).
  - The `find()` and `findIndex()` methods (bug 1078975).
  - The `fill()` method (bug 1113722).
  - The `indexOf()` and `lastIndexOf()` methods (bug 1107601).
  - The `join()` method (bug 1115817).
  - The `reduce()` and `reduceRight()` methods (bug 1117350).
  - The `reverse()` method (bug 1111516).
  - The `keys()`, `values()`, and `entries()` methods (bug 1119217).
- ES2015 Proxy `enumerate` trap is implemented (bug 783829).
- The `configurable` attribute of the `Function.length` property is now `true` per the ES2015 specification (bug 911142).
- The development of ParallelJS (PJS) 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 `Array.prototype.mapPar`, `filterPar` and `reducePar` methods, has been completely removed.

参阅：

- All JavaScript engine bug fixes.
- Complete release notes for Firefox 37.

## Firefox 36

- The ECMAScript 2015 Symbol data type has been enabled by default (was available in the Nightly channel since version 33) (bug 1066322):
  - `Symbol`
  - `Symbol.for()`
  - `Symbol.keyFor()`
  - `Object.getOwnPropertySymbols()`
- The old placeholder string `"@@iterator"` has been replaced with the real ES2015 well-known symbol `Symbol.iterator` for the iterable interface property key (bug 918828).
- The spec-internal abstract operation `ToNumber(string)` now supports binary (`0b`) and octal (`0o`) literals, this is a potentially breaking change from ES5 (bug 1079120).
  - `Number("0b11")` now returns `3`, not `NaN`.
  - `"0o11" == 9` now returns `true`, not `false`.
- The `const` declaration is now block-scoped and requires an initializer (bug 611388). It also can not be redeclared anymore (bug 1095439).
  - `{const a=1}; a;` now throws a `ReferenceError` and does not return `1` anymore due to block-scoping.
  - `const a;` now throws a `SyntaxError` ("missing = in const declaration`"`): An initializer is required.
  - `const a = 1; a = 2;` now also throws a `SyntaxError` ("invalid assignment to const a").
- The ES2016 method `Array.prototype.includes` has been implemented, but for now, it is only enabled in Nightly builds (bug 1069063).
- The `delete` operator now triggers the "temporal dead zone" when using with `let` and `const` (bug 1074571).
- The non-standard `let` blocks and `let` expressions are deprecated and will now log a warning in the console. Do not use them anymore, they will be removed in the future.
- WeakMap constructor now handles optional iterable argument (bug 1092537).

参阅：

- All JavaScript engine bug fixes.
- Complete release notes for Firefox 36.

## Firefox 35

- The "temporal dead zone" for `let` declarations has been implemented. In conformance with ES2015 `let` semantics, the following situations
  now throw errors. See also this newsgroup announcement and bug 1001090.
  - Redeclaring existing variables or arguments using `let` within the same scope in function bodies is now a syntax error.
  - Using a variable declared using `let` in function bodies before the declaration is reached and evaluated is now a runtime error.
- ES2015 `Symbols` (only available in the Nightly channel) have been updated to conform with recent specification changes:
  - `String(Symbol("1"))` now no longer throws a `TypeError`; instead a string (`"Symbol(1)"`) gets returned (bug 1058396).
- The various TypedArray constructors now have as their `[[Prototype]]` a single function, denoted `%TypedArray%` in ES2015 (but otherwise not directly exposed). Each typed array prototype now inherits from `%TypedArray%.prototype`. (`%TypedArray%` and `%TypedArray%.prototype` inherit from `Function.prototype` and `Object.prototype`, respectively, so that typed array constructors and instances still have the properties found on those objects.) Typed array function properties now reside on `%TypedArray%.prototype` and work on any typed array. See TypedArray and bug 896116 for more information.
- ES2015 semantics for prototype mutations using object literals have been implemented (bug 1061853).
  - Now only a single member notated as `__proto__:value` will mutate the `[[Prototype]]` in the object literal syntax.
  - Method members like `__proto__() {}` will not overwrite the `[[Prototype]]` anymore.

参阅：

- All JavaScript engine bug fixes.
- Complete release notes for Firefox 35.

## Firefox 34

- The ES2015 syntax for computed property names on object literals has been implemented (bug 924688).
  - This includes getter and setter method names as well (bug 1048384) and can also be used with destructuring.
- The ES2015 shorthand syntax for defining methods on objects has been implemented (bug 924672).
- The ES2015 `Object` method `Object.assign()` has been implemented (bug 937855).
- ES2015 template strings and the `String.raw()` method are now supported (bug 1038259, bug 1039774).
- A new ES2015 object `WeakSet` has been added (bug 792439).
- ES2015 Symbols (only available in the Nightly channel) have been updated to conform with recent specification changes (bug 1042602):
  - When trying to convert a symbol to a number, a `TypeError` will be thrown now.
  - When using loose equality, `Object(sym) == sym` returns `true` now.
- The experimental `TypedArray.prototype.move()` method (only available in former Nightly and Aurora channels) has been replaced with the now implemented standard ES2015 `TypedArray.prototype.copyWithin()` method (bug 1021379).
- In strict mode, setting a duplicate property name in object literals will no longer throw a `SyntaxError` as per ES2015 specification (bug 1041128).
- In regular expressions (including `String.replace`), the matched text for a capturing group is now `undefined` instead of the empty string when that capturing group didn't get consulted because quantifiers prevented its exercise (see bug 369778 and this example code). Note that due to web compatibility, RegExp.$N will still return an empty string (bug 1053944).
- The ES2015 spread operator is now supported in destructuring (bug 933276).
- Destructuring now uses iterator protocol instead of array-like protocol (bug 933276).
- `Proxy.revocable()` has been implemented (bug 978279).

参阅：

- All JavaScript engine bug fixes (244).
- Complete release notes for Firefox 34.

## Firefox 33

- The non-standard method `Number.toInteger()` has been removed (bug 1022396).
- The `Map.prototype.set()`, `WeakMap.prototype.set()` and `Set.prototype.add()` methods are now chainable, return their equivalent objects and no longer `undefined` (bug 1031632).
- A default parameter is evaluated before function declarations inside the function body, so those functions cannot be referred from default parameter (bug 1022962).
- Shorthand properties are now allowed in object literals: if not explicitly defined, property keys are initialized by variables of the same name. E.g. `function f(x, y) { return {x, y}; }` is equivalent to `function f(x, y) { return {x: x, y: y}; }` (bug 875002).
- The parsing of `yield` and `yield*` has been updated to conform with the latest ES2015 specification (bug 981599).
- The non-standard `hasOwn` trap has been removed (bug 980565).

参阅：

- All JavaScript engine bug fixes (298).
- Complete release notes for Firefox 33.

## Firefox 32

- The following new ECMAScript 2015 built-in methods got implemented:
  - `Array.from()` (bug 904723),
  - `Array.prototype.copyWithin()` (bug 934423),
  - `Number.isSafeInteger()` (bug 1003764).

参阅：

- All JavaScript engine bug fixes (294).
- Complete release notes for Firefox 32.

## Firefox 31

New ECMAScript 2015 features implemented:

- New `Array` built-in: `Array.prototype.fill()` (bug 911147)
- New `Math` function: `Math.clz32()` (bug 925123)
- New `String` built-in: `String.prototype.normalize()` is available in Firefox Desktop (bug 918987).
- New `Object` method `Object.setPrototypeOf()`.
- New `Number` constants: `Number.MAX_SAFE_INTEGER` and `Number.MIN_SAFE_INTEGER`.
- The ES2015 Proxy `isExtensible` trap have been implemented (bug 978235).

参阅：

- All JavaScript engine bug fixes (231).
- Complete release notes for Firefox 31.

## Firefox 30

- New ES2015-compatible array comprehensions `[for (item of iterable) item]` and generator comprehensions `(for (item of iterable) item)` have been implemented (bug 979865).
- Typed arrays are now extensible and support new named properties (bug 695438).
- The `Error.prototype.stack` property now contains column numbers (bug 762556) and has been improved when using `Function()` and `eval()` calls. This can help you to better debug minified or generated JavaScript code.
- The `Promise.cast()` method has been renamed to `Promise.resolve()` (bug 966348).

参阅：

- All JavaScript engine bug fixes (248).
- Complete release notes for Firefox 30.

## Firefox 29

- New ECMAScript 2015 String methods: `String.prototype.codePointAt()` and `String.prototype.fromCodePoint()` have been implemented (bug 918879).
- The ECMAScript Internationalization API (ECMA-402) has been implemented and is now enabled by default in Firefox Desktop (bug 853301):
  - New objects in the new `Intl` object namespace:
    - `Intl.Collator`
    - `Intl.DateTimeFormat`
    - `Intl.NumberFormat`
  - The following methods of `String`, `Number` and `Date` have been updated to include the `locales` and `options` arguments per ECMA-402:
    - `String.prototype.localeCompare()`
    - `Number.prototype.toLocaleString()`
    - `Date.prototype.toLocaleString()`
    - `Date.prototype.toLocaleDateString()`
    - `Date.prototype.toLocaleTimeString()`
- To match the updated ECMAScript 2015 draft specification, the `Map` and `Set` objects now treat `-0` and `+0` as the same when checking for key and value equality.
- `Promise` has been enabled by default (bug 918806).
- Completed generators now return an `IteratorResult` object instead of throwing (bug 958951).
- A malformed JSON string parsed by `JSON.parse()` 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.
- The `ArrayBuffer.isView()` method has been added (bug 896105).

参阅：

- All JavaScript engine bug fixes (331).
- Complete release notes for Firefox 29.

## Firefox 28

- ECMAScript 2015 implementation continues:
  - New `Array` methods have been implemented: `Array.prototype.entries()` and `Array.prototype.keys()` (bug 894658).
- A bug causing that `Object.getOwnPropertyNames()` did not see unresolved properties of `Error` objects has been fixed (bug 724768).

参阅：

- All JavaScript engine bug fixes (343).
- Complete release notes for Firefox 28.

## Firefox 27

EcmaScript 2015 implementation continues!

- The spread operator is now supported in Function calls (bug 762363).
- The mathematical function `Math.hypot()` has been implemented (bug 896264).
- The `yield*` expression is now implemented (bug 666396).
- The `MapIterator`, `SetIterator` and `ArrayIterator` objects now match the specification (bug 881226).
- for..of loops now expect the ES2015 standard iterator protocol moving away from SpiderMonkey old iterator protocol using `StopIteration`.
- `String.match` and `String.replace` now reset `RegExp.lastIndex` (bug 501739).

参阅：

- All JavaScript engine bug fixes (350).
- Complete release notes for Firefox 27.

## Firefox 26

EcmaScript 2015 implementation continues!

- The ECMAScript 2015 compliant syntax for Generators (yield) has been implemented (bug 666399).
- Generator/Iterator results are now boxed like `{ value: foo, done: bool }` (bug 907744).
- New mathematical methods have been implemented on `Math`: `Math.fround()` (bug 900125).
- The reserved words cannot be used for function names:such a usage now throws a `SyntaxError` (bug 907958).
- The default parameter syntax has been updated to allow parameters without defaults after default parameters, such as`function f(x=1, y)`. See bug 777060.
- `GeneratorFunction` is implemented (bug 904701).

参阅：

- All JavaScript engine bug fixes (318).
- Complete release notes for Firefox 26.

## Firefox 25

EcmaScript 2015 implementation continues!

- The method `Array.of()` is now implemented on `Array` (bug 866849).
- Support for the methods `Array.prototype.find()` and `Array.prototype.findIndex()` has been added (bug 885553).
- The methods `Number.parseInt()` and `Number.parseFloat()` have been implemented (bug 886949)
- The methods `Map.prototype.forEach()` and `Set.prototype.forEach()` are now implemented (bug 866847).
- New mathematical methods have been implemented on `Math`: `Math.log10()`, `Math.log2()`, `Math.log1p()`, `Math.expm1()`, `Math.cosh()`, `Math.sinh()`, `Math.tanh()`, `Math.acosh()`, `Math.asinh()`, `Math.atanh()`, `Math.trunc()`, `Math.sign()` and `Math.cbrt()` (bug 717379).
- Support for binary and octal integer literals has been added: `0b10101010`, `0B1010`, `0o777`, `0O237` are now valid (bug 894026).
- The machine epsilon constant, that is the smallest representible number that added to 1 will not be 1, is now available as `Number.EPSILON` (bug 885798).
- Typed arrays have been updated to no longer search in the prototype chain for indexed properties (bug 829896).

参阅：

- All JavaScript engine bug fixes (376).
- Complete release notes for Firefox 25.

## Firefox 24

- Arrow functions are no longer automatically in strict mode unless explicitly requested with `"use strict"` (bug 852762).
- The `String.prototype.repeat` JS method has been implemented (bug 815431).
- The `Set.prototype.values()`, `Set.prototype.keys()` and `Set.prototype.entries()` methods on `Set` objects have been implemented (bug 869996).

参阅：

- All JavaScript engine bug fixes (321).
- Complete release notes for Firefox 24.

## Firefox 23

- The `Object.defineProperty` method can now be used to redefine the `length` property of an `Array` object.
- 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.

参阅：

- All JavaScript engine bug fixes (290).
- Complete release notes for Firefox 23.

## Firefox 22

- Asm.js optimizations are enabled, making it possible to compile C/C++ applications to a subset of JavaScript for better performance.
- ES2015 Arrow Function syntax has been implemented (bug 846406).
- The new Object.is function has been added (bug 839979).
- `arguments` in generator expressions is now inherited from enclosing lexical scope (bug 848051).
- The ES2015 Proxy `preventExtensions` trap have been implemented (bug 789897).

参阅：

- All JavaScript engine bug fixes (255).
- Complete release notes for Firefox 22.

## Firefox 21

- E4X, an ancient JavaScript extension, has been removed. Implemented only in Gecko, it never got significant traction (bug 788293).
- parseInt no longer treats strings with leading "0" as octal (bug 786135).

参阅：

- All JavaScript engine bug fixes (289).
- Complete release notes for Firefox 21.

## Firefox 20

- Support for the `Weakmap.prototype.clear()` method, recently added to the Harmony (EcmaScript 2015) draft proposal has been added (bug 814562).
- Support for the `Math.imul()` method, a C-style 32-bit multiplication function. Though proposed for Harmony (EcmaScript 2015) it has not yet accepted and still is non-standard (bug 808148).
- Web apps using draggable text with Kinetic 3.x are working, even when using the Cairo canvas backend (bug 835064).
- The `for each…in` statement has been deprecated and should not be used. Consider using the new `for…of` statement (bug 804834).
- Support for the `Map.prototype.keys()`, `Map.prototype.values()`, and `Map.prototype.entries()` has been added (bug 817368).

参阅：

- All JavaScript engine bug fixes (242).
- Complete release notes for Firefox 20.

## Firefox 19

- `Map` and `Set` objects have changed from having a `size()` method to a `size` property (bug 807001)
- `Map` and `Set` objects also have a clear() method now. (bug 805003)

参阅：

- All JavaScript engine bug fixes (165).
- Complete release notes for Firefox 19.

## Firefox 18

- Harmony's (ECMAScript 2015) Direct Proxies have been landed (bug 703537). 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.
- The ECMAScript 2015 `contains()` method is now implemented on strings. This is unfortunately not compatible with Mootools 1.2, which expects different behavior from `contains()` 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.

参阅：

- All JavaScript engine bug fixes (221).
- Complete release notes for Firefox 18.

## Firefox 17

- `String` object now offers Harmony `startsWith`, `endsWith`, and `contains` methods (bug 772733).
- The String methods link and anchor now escape the `'"'` (quotation mark) (bug 352437).
- Experimental support for strawman `ParallelArray` object has been implemented (bug 778559).
- Support to iterate `Map`/`Set` (bug 725909).
- Disabled E4X for web content by default (bug 778851).
- `__exposedProps__` must now be set for Chrome JavaScript objects exposed to content. Attempts to access Chrome objects from content without `__exposedProps__` set will fail silently (bug 553102).
- `for..of` loops now work in terms of `.iterator()` and `.next()` (bug 725907).

参阅：

- All JavaScript engine bug fixes (231).
- Complete release notes for Firefox 17.

## Firefox 16

- `Number` objects now offer `isFinite()`, `toInteger()`, and `isInteger()` methods. (bug 761480, bug 761495)
- The Harmony spread operator is now supported in `Array` initializers (bug 574130). Note it is not yet supported in calls (bug 762363).
- The experimental `TypedArray.prototype.move()` method has been added (available in Aurora and Nightly channels only) (bug 730873).

参阅：

- All JavaScript engine bug fixes (186).
- Complete release notes for Firefox 16.

## Firefox 15

- Support for the `DataView` interface from the Typed Arrays specification has been added. This provides low-level access to the data contained in an `ArrayBuffer`.
- Support for new ECMAScript 2015 built-ins: `Number.isNaN()`, `Number.toInteger()`, `Number.isInteger()`, `Number.isFinite()` has been added. (bug 749818, bug 761495, bug 761480).
- Support for ECMAScript 2015 default parameters has been added. (bug 757676).
- Support for ECMAScript 2015 rest parameters has been added. (bug 574132).

参阅：

- All JavaScript engine bug fixes (203).
- Complete release notes for Firefox 15.

## Firefox 14

No change.

参阅：

- All JavaScript engine bug fixes (135).
- Complete release notes for Firefox 14.

## Firefox 13

- Support for the ECMAScript 2015 `for..of` construct has been added.
- Experimental support for ECMAScript 2015 Map and Set objects has been implemented.

参阅：

- All JavaScript engine bug fixes (175).
- Complete release notes for Firefox 13.

## Firefox 12

- Support for sharp variables (a Netscape non-standard extension) has been dropped.
- `ArrayBuffer.prototype.slice()` has been implemented.

参阅：

- All JavaScript engine bug fixes (177).
- Complete release notes for Firefox 12.

## Firefox 11

No change.

参阅：

- All JavaScript engine bug fixes (167).
- Complete release notes for Firefox 11.

## Firefox 10

- The method `WeakMap.set()` now returns `undefined`, instead of itself.
- A bug was introduced in regular expression handling in Firefox 7; this has been fixed. See bug 683838 if you want the gory details.
- You can no longer use E4X syntax while in ECMAScript 5 strict mode (that is, after `"use strict;"`).

参阅：

- All JavaScript engine bug fixes (165).
- Complete release notes for Firefox 10.

## Firefox 9

No change.

参阅：

- All JavaScript engine bug fixes (132).
- Complete release notes for Firefox 9.

## Firefox 8

- `RegExp.exec()` and `RegExp.test()` called with no arguments now match against the string "undefined".
- `String.search()` and `String.match()` called with no arguments or `undefined` now match against the empty string and thus match every string.
- Support for watchlists has been implemented with the new (non-standard) `watch()` and `unwatch()` methods.

参阅：

- All JavaScript engine bug fixes (154).
- Complete release notes for Firefox 8.

## Firefox 7

- The `Function.arity` property has been removed; use `Function.length` instead.

参阅：

- All JavaScript engine bug fixes (40).
- Complete release notes for Firefox 7.

## Firefox 6

- In the past, it was possible to use the `new` 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 `new` operator in this way was never officially supported and was not widely done, so it's unlikely that this change affects you.
- ECMAScript 2015 WeakMaps have been added as a prototype implementation.

参阅：

- All JavaScript engine bug fixes (45).
- Complete release notes for Firefox 6.

## Firefox 5

- 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 WebKit bug 28285. This feature had existed for a long time but was never documented (at least, not here on MDC).
- The `Function.prototype.isGenerator()` method is now supported; this lets you determine if a function is a generator.
- The following reserved words were previously only treated as reserved when in strict mode; now they're always treated as reserved: `class`, `enum`, `export`, `extends`, `import`, and `super`.
- DOM documents created in chrome code may no longer be exposed to sandboxed scripts.
- The JSON parser has been re-written for improved speed and compliance. This includes a fix for bug 572279.

参阅：

- All JavaScript engine bug fixes (23).
- Complete release notes for Firefox 5.

## 更早版本

对于 Firefox 5 之前版本，请查看 old JavaScript versions。