Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Revision 112646 of New in JavaScript 1.8.1

  • Revision slug: JavaScript/New_in_JavaScript/1.8.1
  • Revision title: New in JavaScript 1.8.1
  • Revision id: 112646
  • Created:
  • Creator: user01
  • Is current revision? No
  • Comment no changes; page display name changed to 'New in JavaScript 1.8.1'

Revision Content

{{ 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 has trim(), trimLeft(), and trimRight() methods.

Other improvements

{{ languages( { "ja": "ja/New_in_JavaScript_1.8.1"} ) }}

Revision Source

<p>{{ gecko_minversion_header("1.9.1") }}</p>
<p>JavaScript 1.8.1 is a modest update syntactically to JavaScript; the main change in this release is the addition of the <a class="internal" href="/En/SpiderMonkey/Internals/Tracing_JIT" title="En/SpiderMonkey/Internals/Tracing JIT">Tracemonkey just-in-time compiler</a>, which improves performance.</p>
<p>There is a notable API change removing the branch callback and replacing the operation callback <a class="external" href="https://groups.google.com/group/mozilla.dev.tech.js-engine/browse_thread/thread/a4d1fe147761aacb#" title="https://groups.google.com/group/mozilla.dev.tech.js-engine/browse_thread/thread/a4d1fe147761aacb#">detailed in this newsgroup posting</a>.</p>
<h2 id="Language_additions">Language additions</h2>
<dl> <dt><a class="internal" href="../../../../En/Core_JavaScript_1.5_Reference/Global_Objects/Object/GetPrototypeOf" rel="internal"><code>Object.getPrototypeOf()</code></a></dt> <dd>This new method returns the prototype of a specified object.</dd> <dt><a class="internal" href="/En/Using_native_JSON" title="En/Using JSON in Firefox">Using native JSON</a></dt> <dd>Firefox 3.5 has native support for <a class="internal" href="/en/JSON" title="En/JSON">JSON</a>.</dd> <dt>New trim methods on the String object</dt> <dd>The <a class="internal" href="../../../../en/Core_JavaScript_1.5_Reference/Global_Objects/String" rel="internal"><code>String</code></a> object now has <a class="internal" href="../../../../En/Core_JavaScript_1.5_Reference/Global_Objects/String/Trim" rel="internal"><code>trim()</code></a>, <a class="internal" href="../../../../En/Core_JavaScript_1.5_Reference/Global_Objects/String/TrimLeft" rel="internal"><code>trimLeft()</code></a>, and <a class="internal" href="../../../../En/Core_JavaScript_1.5_Reference/Global_Objects/String/TrimRight" rel="internal"><code>trimRight()</code></a> methods.</dd>
</dl>
<h2 id="Other_improvements">Other improvements</h2>
<ul> <li>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 <a class="external" href="/web-tech/2009/04/29/object-and-array-initializers-should-not-invoke-setters-when-evaluated" title="https://developer.mozilla.org/editor/fckeditor/core/editor/web-tech/2009/04/29/object-and-array-initializers-should-not-invoke-setters-when-evaluated/">Object and array initializers should not invoke setters when evaluated</a> for details.</li>
</ul>
<p>{{ languages( { "ja": "ja/New_in_JavaScript_1.8.1"} ) }}</p>
Revert to this revision