{{ gecko_minversion_header("1.9.1") }}
JavaScript 1.8.1 is a modest update syntactically to JavaScript; the main change in this release is the addition of the Tracemonkey just-in-time compiler, which improves performance.
There is a notable API change removing the branch callback and replacing the operation callback detailed in this newsgroup posting.
Language additions
Object.getPrototypeOf()
- This new method returns the prototype of a specified object.
- Using native JSON
- Firefox 3.5 has native support for JSON.
- New trim methods on the String object
- The
String
object now hastrim()
,trimLeft()
, andtrimRight()
methods.
Other improvements
- Implicit setting of properties in object and array initializers no longer execute setters in JavaScript. This makes the behavior of setting the values of properties more predictable. See the blog post Object and array initializers should not invoke setters when evaluated for details.
{{ languages( { "ja": "ja/New_in_JavaScript_1.8.1"} ) }}