On 2015-05-26 at 09:00 PST, MDN search will be unavailable for 5-10 minutes for system maintenance.

mozilla

Revision 456865 of Firefox 18 for developers

  • Revision slug: Mozilla/Firefox/Releases/18
  • Revision title: Firefox 18 for developers
  • Revision id: 456865
  • Created:
  • Creator: teoli
  • Is current revision? No
  • Comment

Revision Content

{{draft}}

Firefox 18 was released on January 8, 2013. This article lists key changes that are useful not only for web developers, but also Firefox and Gecko developers as well as add-on developers.

Want to help document Firefox 18? See the list of bugs that need to be written about and pitch in!

Changes for Web developers

HTML

  • The {{htmlattrxref("reversed","ol")}} attribute of the {{HTMLElement("ol")}} element is now supported ({{bug("601912")}}).
  • The {{htmlattrxref("crossorigin","link")}} attribute of the {{HTMLElement("link")}} element is now supported ({{bug("786564")}}).
  • The {{htmlattrxref("allowfullscreen", "iframe")}} attribute of the {{HTMLElement("iframe")}} has been implemented and it's prefixed predecessor {{htmlattrxref("mozallowfullscreen", "iframe")}} is now deprecated.

CSS

  • The {{cssxref("min-width")}} and {{cssxref("min-height")}} now uses the auto keyword as initial value (This has an effect only on flex items as it resolves to 0, the previous initial value, for other items). ({{bug("763689")}})
  • The cascade has been updated: now author !important rules override CSS animations. ({{bug("783714")}})
  • The {{cssxref("background")}} shorthand property now recognizes CSS3 {{cssxref("background-size")}} property specified inside. ({{bug("570326")}})
  • Initial support for the CSS Flexbox Module has been landed. It is disabled by default but can be enabled by setting layout.css.flexbox.enabled to true. ({{bug('666041')}})

DOM/APIs

  • navigator.mozPay has been landed. ({{bug("767818")}})
  • window.devicePixelRatio has been landed. ({{bug("564815")}})
  • The MacOS X backend for window.navigator.battery has been implemented. ({{bug("696045")}})
  • {{domxref("BlobBuilder", "MozBlobBuilder")}} is removed. Developers need to use {{domxref("Blob")}} constuctor for creating a Blob object. ({{bug("744907")}})
  • The {{event("visibilitychange")}} event and the Page Visibility API has been unprefixed ({{bug("812086")}}).
  • {{domxref("TextDecoder")}} and {{domxref("TextEncoder")}} have been added. Note that the implementation and spec of these evolved and have been changed in Firefox 19 ({{bug("764234")}}).
  • HTMLMediaElement.src has been separate in two properties: the standard src property, dealing with {{domxref("DOMString")}}, and the prefixed mozSrcObject property, dealing with media streams ({{bug("792665")}}).
  • Support for transferable objects

JavaScript

  • Harmony's (ECMAScript 6) 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 6 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.

WebGL

SVG

MathML

XUL

Network

  • Quality factors ("q-values") are now clamped to 2 digits in HTTP Accept-Language header ({{bug("672448")}}).
  • The ALLOW-FROM syntax of the X-FRAME-OPTIONS HTTP Response header is now supported ({{bug("690168")}}).

Developer tools

Changes for add-on and Mozilla developers

Interface changes

{{interface("nsIStreamListener")}}
The 4th parameter (aOffset) of onDataAvailable() method changes to unsigned long long. ({{bug("784912")}})
{{interface("nsIUploadChannel")}}
setUploadStream() supports over 2GB content-length ({{bug("790617")}})
{{interface("nsIEditor")}}
addEditorObserver() has been removed, use setEditorObserver() instead, removeEditorObserver() no longer takes a {{interface("nsIEditorObserver")}} parameter ({{bug("785091")}})
{{interface("nsIHttpProtocolHandler")}}
http-on-modify-request observers are no longer guaranteed to be called synchronously during
nsIChannel.asyncOpen(). For observers that need to be called during asyncOpen(), the new http-on-opening-request observer topic has been added. See ({{bug("800799")}})
{{interface("nsIProtocolProxyService")}}
The resolve method has been removed. Now, only the asyncResolve method can be used. See ({{bug("769764")}})

New interfaces

Removed interfaces

The following interfaces have been removed.

  • {{interface("nsIEditorObserver")}}

See also

Older versions

{{Firefox_for_developers('17')}}

Revision Source

<div>
  {{draft}}</div>
<p>Firefox 18 was released on January 8, 2013. This article lists key changes that are useful not only for web developers, but also Firefox and Gecko developers as well as add-on developers.</p>
<p>Want to help document Firefox 18? See the <a href="http://beta.elchi3.de/doctracker/#list=fx&amp;version=18.0">list of bugs that need to be written about</a> and pitch in!</p>
<h2 id="Changes_for_Web_developers">Changes for Web developers</h2>
<h3 id="HTML">HTML</h3>
<ul>
  <li>The {{htmlattrxref("reversed","ol")}} attribute of the {{HTMLElement("ol")}} element is now supported ({{bug("601912")}}).</li>
  <li>The {{htmlattrxref("crossorigin","link")}} attribute of the {{HTMLElement("link")}} element is now supported ({{bug("786564")}}).</li>
  <li>The {{htmlattrxref("allowfullscreen", "iframe")}} attribute of the {{HTMLElement("iframe")}} has been implemented and it's prefixed predecessor {{htmlattrxref("mozallowfullscreen", "iframe")}} is now deprecated.</li>
</ul>
<h3 id="CSS">CSS</h3>
<ul>
  <li>The {{cssxref("min-width")}} and {{cssxref("min-height")}} now uses the <code>auto</code> keyword as <em>initial value </em>(This has an effect only on flex items as it resolves to <code>0</code>, the previous initial value, for other items). ({{bug("763689")}})</li>
  <li>The cascade has been updated: now author <code>!important</code> rules override <a href="/en-US/docs/CSS/Using_CSS_animations" title="CSS/Using_CSS_animations">CSS animations</a>. ({{bug("783714")}})</li>
  <li>The {{cssxref("background")}} shorthand property now recognizes CSS3 {{cssxref("background-size")}} property specified inside. ({{bug("570326")}})</li>
  <li>Initial support for the CSS Flexbox Module has been landed. It is disabled by default but can be enabled by setting <code>layout.css.flexbox.enabled</code> to true. ({{bug('666041')}})</li>
</ul>
<h3 id="DOM">DOM/APIs</h3>
<ul>
  <li><code>navigator.mozPay</code> has been landed. ({{bug("767818")}})</li>
  <li><code>window.devicePixelRatio</code> has been landed. ({{bug("564815")}})</li>
  <li>The MacOS X backend for <code>window.navigator.battery</code> has been implemented. ({{bug("696045")}})</li>
  <li>{{domxref("BlobBuilder", "MozBlobBuilder")}} is removed. Developers need to use {{domxref("Blob")}} constuctor for creating a <code>Blob</code> object. ({{bug("744907")}})</li>
  <li>The {{event("visibilitychange")}} event and the <a href="/en-US/docs/DOM/Using_the_Page_Visibility_API" title="DOM/Using_the_Page_Visibility_API">Page Visibility API</a> has been unprefixed ({{bug("812086")}}).</li>
  <li>{{domxref("TextDecoder")}} and {{domxref("TextEncoder")}} have been added. Note that the implementation and spec of these evolved and have been changed in Firefox 19 ({{bug("764234")}}).</li>
  <li><code>HTMLMediaElement</code><code>.src</code> has been separate in two properties: the standard <code>src</code> property, dealing with {{domxref("DOMString")}}, and the prefixed <code>mozSrcObject</code> property, dealing with <a href="/en-US/docs/WebRTC/MediaStream_API" title="WebRTC/MediaStream_API">media streams</a> ({{bug("792665")}}).</li>
  <li>Support for <a href="/en-US/docs/DOM/Using_web_workers#Passing_data_by_transferring_.C2.A0ownership_%28transferable_objects%29" title="DOM/Using_web_workers#Passing_data_by_transferring_.C2.A0ownership_%28transferable_objects%29">transferable objects</a></li>
</ul>
<h3 id="JavaScript">JavaScript</h3>
<ul>
  <li>Harmony's (ECMAScript 6) <a href="/en-US/docs/JavaScript/Reference/Global_Objects/Proxy">Direct Proxies</a> 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.</li>
  <li>The ECMAScript 6 <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>
<h3 id="WebGL">WebGL</h3>
<h3 id="SVG">SVG</h3>
<h3 id="MathML">MathML</h3>
<h3 id="XUL">XUL</h3>
<h3 id="Network">Network</h3>
<ul>
  <li>Quality factors ("q-values") are now clamped to 2 digits in HTTP <code>Accept-Language</code> header ({{bug("672448")}}).</li>
  <li>The <code>ALLOW-FROM</code> syntax of the <a href="/en-US/docs/The_X-FRAME-OPTIONS_response_header" title="The_X-FRAME-OPTIONS_response_header"><code>X-FRAME-OPTIONS</code></a> HTTP Response header is now supported ({{bug("690168")}}).</li>
</ul>
<h3 id="Developer_tools">Developer tools</h3>
<h2 id="Changes_for_add-on_and_Mozilla_developers">Changes for add-on and Mozilla developers</h2>
<h3 id="Interface_changes">Interface changes</h3>
<dl>
  <dt>
    {{interface("nsIStreamListener")}}</dt>
  <dd>
    The 4th parameter (aOffset) of <code>onDataAvailable()</code> method changes to unsigned long long. ({{bug("784912")}})</dd>
  <dt>
    {{interface("nsIUploadChannel")}}</dt>
  <dd>
    <code>setUploadStream()</code> supports over 2GB content-length ({{bug("790617")}})</dd>
  <dt>
    {{interface("nsIEditor")}}</dt>
  <dd>
    <code>addEditorObserver()</code> has been removed, use <code>setEditorObserver()</code> instead, <code>removeEditorObserver()</code> no longer takes a {{interface("nsIEditorObserver")}} parameter ({{bug("785091")}})</dd>
  <dt>
    {{interface("nsIHttpProtocolHandler")}}</dt>
  <dd>
    <code>http-on-modify-request</code> observers are no longer guaranteed to be called synchronously during<br />
    <code>nsIChannel.asyncOpen(). </code>For observers that need to be called during <code>asyncOpen</code>(), the new <code>http-on-opening-request</code> observer topic has been added. <code>See</code> ({{bug("800799")}})</dd>
  <dt>
    {{interface("nsIProtocolProxyService")}}</dt>
  <dd>
    The <code>resolve</code> method has been removed. Now, only the <code>asyncResolve</code> method can be used. See ({{bug("769764")}})</dd>
</dl>
<h4 id="New_interfaces">New interfaces</h4>
<h4 id="Removed_interfaces">Removed interfaces</h4>
<p>The following interfaces have been removed.</p>
<ul>
  <li>{{interface("nsIEditorObserver")}}</li>
</ul>
<h2 id="See_also">See also</h2>
<ul>
  <li><a href="http://www.mozilla.org/en-US/firefox/18.0beta/releasenotes/">Firefox 18 Beta Release Notes</a></li>
  <li><a href="https://hacks.mozilla.org/2012/10/aurora-18-hidpi-touch-events/">Aurora 18: HiDPI &amp; Touch Events</a> (Mozilla Hacks)</li>
  <li><a href="/en-US/docs/Site_Compatibility_for_Firefox_18">Site Compatibility for Firefox 18</a></li>
  <li><a href="https://blog.mozilla.org/addons/2012/12/28/compatibility-for-firefox-18/">Add-on Compatibility for Firefox 18</a> (Add-ons Blog)</li>
</ul>
<h3 id="Older_versions">Older versions</h3>
<div>
  {{Firefox_for_developers('17')}}</div>
Revert to this revision