Firefox 11 for developers

  • Revision slug: Firefox_11_for_developers
  • Revision title: Firefox 11 for developers
  • Revision id: 8177
  • Created:
  • Creator: Sheppy
  • Is current revision? No
  • Comment 28 words added

Revision Content

Firefox 11 shipped on March 13, 2012. This article provides information about the new features and key bugs fixed in this release, as well as links to more detailed documentation for both web developers and add-on developers.

Changes for Web developers

HTML

  • The attributes muted and loop on {{ HTMLElement("audio") }} and {{ HTMLElement("video") }} elements have been implemented.

DOM

  • The {{ domxref("element.outerHTML") }} property is now supported on HTML elements.
  • XMLHttpRequest supports HTML parsing.
  • Removed support for using the {{ domxref("XMLHttpRequest") }} responseType and withCredentials attributes when performing synchronous requests. Attempting to do so throws an NS_ERROR_DOM_INVALID_ACCESS_ERR exception. This change has been proposed to the W3C for standardization.
  • The new {{ domxref("window.navigator.mozVibrate()") }} method lets you vibrate the device where supported; this is implemented as mozVibrate() on Gecko.
  • {{ domxref("window.navigator.mozApps") }} returns an Apps object you can use to install and manage open web applications.
  • MozBeforePaint events are no longer fired. {{ domxref("window.requestAnimationFrame", "mozRequestAnimationFrame()") }} consumers who used these should pass a callback function instead.
  • Support for canceling animation frame requests has been added; {{ domxref("window.requestAnimationFrame", "window.mozRequestAnimationFrame()") }} now returns a request ID value, which you can pass to {{ domxref("window.cancelAnimationFrame", "window.mozCancelAnimationFrame()") }} to cancel the request.
  • Several {{ domxref("Event") }} constructors (Event, HTML events, UIEvent, and MouseEvent) introduced in DOM4 specifications are now supported.
  • The {{ domxref("window.navigator.mozBattery", "Battery API") }} is now enabled by default.
  • Support for the defaultMuted, loop and muted properties on HTMLMediaElement has been added.
  • Calling {{ domxref("document.mozCancelFullScreen()") }} now restores the previously full-screen element if some other element was in full-screen mode when the current element's {{ domxref("element.mozRequestFullScreen()") }} method was called.
  • The {{ domxref("window.requestAnimationFrame", "window.mozRequestAnimationFrame()") }} method no longer supports a no-argument form. This form was not used much and is unlikely to become part of the standard.
  • SVG-as-an-image can now be drawn into a canvas without tainting the canvas.
  • The non-standard countryCode property of the GeoPositionAddress interface has been removed; see {{ interface("nsIDOMGeoPositionAddress") }}.
  • Server-sent events now support CORS.
  • In the past, when the user followed a link, the values set on the {{ domxref("window.navigator") }} object were retained by the new page. Now a new navigator object is created for the new page. This makes Firefox behave like all other browsers.

CSS

SVG

  • The {{ domxref("SVGSVGElement") }} DOM interface now support the getElementById method.

WebSocket

  • WebSocket API now supports binary messages (see {{ bug("676439") }}).
  • Both the protocol and the API has been updated to the latest draft of the specification and the API has been unprefixed (see {{ bug("666349") }} and {{ bug("695635") }}).
  • Previously, messages sent and received using WebSockets in Firefox were limited to 16 MB in size; they may now be up to 2 GB (although memory capacity limitations may prevent them from being that large, Firefox supports it).

IndexedDB

  • The support for IDBFactory.cmp() has been added.
  • An IndexedDB key can also be of one of the following types: Date, Arrays and Float (and not only String and Integer).

Network

Developer tools

Changes for Mozilla and add-on developers

JavaScript code modules

NetUtil.jsm

  • readInputStreamToString() has a new, optional, parameter to configure the character set interpretation while reading the input stream.

New JavaScript code modules

source-editor.jsm
Provides a convenient, easy-to-use source code editor that you can use in your add-ons. This is the same editor used by Scratchpad and other developer tools integrated into Firefox.

Interface changes

  • The {{ interface("mozIAsyncHistory") }} interface has a new method {{ ifmethod("mozIAsyncHistory","isURIVisited") }} to check if a URI has been visited.
  • A new interface {{ interface("mozIVisitStatusCallback") }} has been added to provide callback handling functionality for {{ ifmethod("mozIAsyncHistory","isURIVisited") }}.
  • The {{ interface("nsIMacDockSupport") }} interface now supports adding a text badge to the application's icon in the Dock using its new badgeText attribute.
  • In the {{ interface("nsINavHistoryResultObserver") }} interface, you now need to implement {{ ifmethod("nsINavHistoryResultObserver", "containerStateChanged") }} instead of the obsolete containerOpened() and containerClosed() methods.

Removed interfaces

The following interfaces were implementation details that are no longer needed:

  • {{ interface("nsICharsetResolver") }}
  • {{ interface("nsIDOMNSElement") }}, see bug707576, use {{ interface("nsIDOMElement") }} instead.
  • The omni.jar file is now called omni.ja.

Preference changes

{{ Pref("ui.tooltipDelay") }}
Specifies the delay, in milliseconds, between the mouse cursor beginning to hover and the display of a tooltip.

Build system changes

  • The --enable-tracejit build option has been removed.

Other changes

  • Add-ons that have not been updated in a long time are no longer assumed to be compatible by default; this is currently add-ons that indicate a maxVersion of 4.0.

See also

{{ languages( { "ja": "ja/Firefox_11_for_developers" } ) }}

Revision Source

<p>Firefox 11 shipped on March 13, 2012. This article provides information about the new features and key bugs fixed in this release, as well as links to more detailed documentation for both web developers and add-on developers.</p>
<h2 id="Changes_for_Web_developers">Changes for Web developers</h2>
<h3 id="HTML">HTML</h3>
<ul> <li>The attributes <code>muted</code> and <code>loop</code> on {{ HTMLElement("audio") }} and {{ HTMLElement("video") }} elements have been implemented.</li>
</ul>
<h3 id="DOM">DOM</h3>
<ul> <li>The {{ domxref("element.outerHTML") }} property is now supported on HTML elements.</li> <li><a href="/en/HTML_in_XMLHttpRequest" title="en/HTML_in_XMLHttpRequest"><code>XMLHttpRequest</code> supports HTML parsing</a>.</li> <li>Removed support for using the {{ domxref("XMLHttpRequest") }} <code>responseType</code> and <code>withCredentials</code> attributes when performing synchronous requests. Attempting to do so throws an <code>NS_ERROR_DOM_INVALID_ACCESS_ERR</code> exception. This change has been proposed to the W3C for standardization.</li> <li>The new {{ domxref("window.navigator.mozVibrate()") }} method lets you vibrate the device where supported; this is implemented as <code>mozVibrate()</code> on Gecko.</li> <li>{{ domxref("window.navigator.mozApps") }} returns an <a href="/en/DOM/Apps" title="Apps"><code>Apps</code></a> object you can use to install and manage <a href="/en/Apps" title="en/Apps">open web applications</a>.</li> <li><code>MozBeforePaint</code> events are no longer fired. {{ domxref("window.requestAnimationFrame", "mozRequestAnimationFrame()") }} consumers who used these should pass a callback function instead.</li> <li>Support for canceling animation frame requests has been added; {{ domxref("window.requestAnimationFrame", "window.mozRequestAnimationFrame()") }} now returns a request ID value, which you can pass to {{ domxref("window.cancelAnimationFrame", "window.mozCancelAnimationFrame()") }} to cancel the request.</li> <li>Several {{ domxref("Event") }} constructors (<code>Event</code>, HTML events, <code>UIEvent</code>, and <code>MouseEvent</code>) introduced in DOM4 specifications are now supported.</li> <li>The {{ domxref("window.navigator.mozBattery", "Battery API") }} is now enabled by default.</li> <li>Support for the <a href="/en/DOM/HTMLMediaElement" title="en/DOM/HTMLMediaElement"><code>defaultMuted</code></a>, <code><a href="/en/DOM/HTMLMediaElement" title="en/DOM/HTMLMediaElement">loop</a></code> and <a href="/en/DOM/HTMLMediaElement" title="en/DOM/HTMLMediaElement"><code>muted</code></a> properties on <a href="/en/DOM/HTMLMediaElement" title="en/DOM/HTMLMediaElement"><code>HTMLMediaElement</code></a> has been added.</li> <li>Calling {{ domxref("document.mozCancelFullScreen()") }} now restores the previously full-screen element if some other element was in full-screen mode when the current element's {{ domxref("element.mozRequestFullScreen()") }} method was called.</li> <li>The {{ domxref("window.requestAnimationFrame", "window.mozRequestAnimationFrame()") }} method no longer supports a no-argument form. This form was not used much and is unlikely to become part of the standard.</li> <li>SVG-as-an-image can now be drawn into a canvas without <a href="/en/CORS_Enabled_Image#What_is_a_.22tainted.22_canvas.3F" title="en/CORS_Enabled_Image#What_is_a_.22tainted.22_canvas.3F">tainting the canvas</a>.</li> <li>The non-standard <code>countryCode</code> property of the <code>GeoPositionAddress</code> interface has been removed; see {{ interface("nsIDOMGeoPositionAddress") }}.</li> <li><a href="/en/Server-sent_events" title="Server-sent events">Server-sent events</a> now support <a href="/En/HTTP_access_control" title="HTTP access control (CORS)">CORS</a>.</li> <li>In the past, when the user followed a link, the values set on the {{ domxref("window.navigator") }} object were retained by the new page. Now a new <code>navigator</code> object is created for the new page. This makes Firefox behave like all other browsers.</li>
</ul><h3 id="CSS">CSS</h3>
<ul> <li>the <a href="/en/CSS/text-size-adjust" title="text-size-adjust"><code>text-size-adjust</code></a> property is now supported</li> <li><a href="/en/CSS/CSS3" title="CSS3">CSS3</a> <a href="/en/CSS/CSS3#Conditional_Rules" title="CSS3 Conditional Rules">Conditional Rules</a> are now better supported: nested statements can now be added to <a href="/en/CSS/@media" title="@media">@media</a>, <a href="/en/CSS/@document" title="@document">@-moz-document</a>. (See <a href="/en/CSS/Syntax" title="Syntax">CSS Syntax</a> and <a href="/en/CSS/At-rule" title="At-rule">CSS at-rules</a>).</li>
</ul>
<h3 id="SVG">SVG</h3>
<ul> <li>The {{ domxref("SVGSVGElement") }} DOM interface now support the <code>getElementById</code> method.</li>
</ul>
<h3 id="WebSocket">WebSocket</h3>
<ul> <li><a href="/en/WebSockets" title="en/WebSockets">WebSocket</a> API now supports binary messages (see {{ bug("676439") }}).</li> <li>Both the protocol and the API has been updated to the latest draft of the specification and the API has been unprefixed (see {{ bug("666349") }} and {{ bug("695635") }}).</li> <li>Previously, messages sent and received using WebSockets in Firefox were limited to 16 MB in size; they may now be up to 2 GB (although memory capacity limitations may prevent them from being that large, Firefox supports it).</li>
</ul>
<h3 id="IndexedDB">IndexedDB</h3>
<ul> <li>The support for <a href="/en/IndexedDB/IDBFactory#cmp%28%29" title="https://developer.mozilla.org/en/IndexedDB/IDBFactory#cmp%28%29">IDBFactory.cmp()</a> has been added.</li> <li>An <a href="/en/IndexedDB/Basic_Concepts_Behind_IndexedDB#section_6" title="https://developer.mozilla.org/en/IndexedDB/Basic_Concepts_Behind_IndexedDB#section_6">IndexedDB key</a> can also be of one of the following types: Date, Arrays and Float (and not only String and Integer).</li>
</ul>
<h3 id="Network">Network</h3>
<ul> <li>The change in Firefox 8 that removed support for double quote characters as delimiters for {{ rfc("2231") }} and {{ rfc("5987") }} has been reverted, as this broke some sites, including Outlook Web Access.</li> <li>The user agent string in HTTP headers now includes an identifier that <a href="/en/Gecko_user_agent_string_reference#Mobile_and_Tablet_indicators" title="en/Gecko_user_agent_string_reference#Mobile_and_Tablet_indicators">lets the server know if the Firefox accessing it is a phone or a tablet</a>.</li>
</ul><h3 id="Developer_tools">Developer tools</h3>
<ul> <li>The <a href="/en/Tools/Page_Inspector" title="Page Inspector">Page Inspector</a> now offers a <a href="/en/Tools/Page_Inspector/3D_view" title="3D view">3D view</a> if your system supports <a href="/en/WebGL" title="WebGL">WebGL</a>.</li> <li>The new <a href="/en/Tools/Style_Editor" title="Style Editor">Style Editor</a> provides a free-form way to edit and compose CSS style sheets in real-time.</li> <li>The <a href="/en/View_source" title="https://developer.mozilla.org/en/View_source">View Source feature</a> now uses the new HTML5 parser instead of the old HTML parser.</li>
</ul><h2 id="Changes_for_Mozilla_and_add-on_developers">Changes for Mozilla and add-on developers</h2>
<h3 id="JavaScript_code_modules">JavaScript code modules</h3>
<h4 id="NetUtil.jsm">NetUtil.jsm</h4>
<ul> <li><a href="/en/JavaScript_code_modules/NetUtil.jsm#readInputStreamToString()" title="en/JavaScript_code_modules/NetUtil.jsm#readInputStreamToString()"><code>readInputStreamToString()</code></a> has a new, optional, parameter to configure the character set interpretation while reading the input stream.</li>
</ul>
<h4 id="New_JavaScript_code_modules">New JavaScript code modules</h4>
<dl> <dt><a href="/en/JavaScript_code_modules/source-editor.jsm" title="source-editor.jsm"><code>source-editor.jsm</code></a></dt> <dd>Provides a convenient, easy-to-use source code editor that you can use in your add-ons. This is the same editor used by <a href="/en/Tools/Scratchpad" title="Scratchpad">Scratchpad</a> and other developer tools integrated into Firefox.</dd>
</dl>
<h3 id="Interface_changes">Interface changes</h3>
<ul> <li>The {{ interface("mozIAsyncHistory") }} interface has a new method {{ ifmethod("mozIAsyncHistory","isURIVisited") }} to check if a URI has been visited.</li> <li>A new interface {{ interface("mozIVisitStatusCallback") }} has been added to provide callback handling functionality for {{ ifmethod("mozIAsyncHistory","isURIVisited") }}.</li> <li>The {{ interface("nsIMacDockSupport") }} interface now supports adding a text badge to the application's icon in the Dock using its new <code>badgeText</code> attribute.</li> <li>In the {{ interface("nsINavHistoryResultObserver") }} interface, you now need to implement {{ ifmethod("nsINavHistoryResultObserver", "containerStateChanged") }} instead of the obsolete <code>containerOpened()</code> and <code>containerClosed()</code> methods.</li>
</ul>
<h4 id="Removed_interfaces">Removed interfaces</h4>
<p>The following interfaces were implementation details that are no longer needed:</p>
<ul> <li>{{ interface("nsICharsetResolver") }}</li> <li>{{ interface("nsIDOMNSElement") }}, see <a class="link-https" href="https://bugzilla.mozilla.org/show_bug.cgi?id=707576" title="https://bugzilla.mozilla.org/show_bug.cgi?id=707576">bug707576</a>, use {{ interface("nsIDOMElement") }} instead.</li>
</ul><h3 id="Theme-related_changes">Theme-related changes</h3>
<ul> <li>The <code>omni.jar</code> file is now called <a href="/en/Mozilla/About_omni.ja_(formerly_omni.jar)" title="en/Mozilla/About_omni.ja_%28formerly_omni.jar%29"><code>omni.ja</code></a>.</li>
</ul>
<h3 id="Preference_changes">Preference changes</h3>
<dl> <dt>{{ Pref("ui.tooltipDelay") }}</dt> <dd>Specifies the delay, in milliseconds, between the mouse cursor beginning to hover and the display of a tooltip.</dd>
</dl>
<h3 id="Build_system_changes">Build system changes</h3>
<ul> <li>The <code>--enable-tracejit</code> build option has been removed.</li>
</ul>
<h3 id="Other_changes">Other changes</h3>
<ul> <li>Add-ons that have not been updated in a long time are no longer assumed to be compatible by default; this is currently add-ons that indicate a <code>maxVersion</code> of 4.0.</li>
</ul>
<h3 id="See_also">See also</h3>
<ul> <li><a href="/en/Firefox_10_for_developers" title="en/Firefox 10 for developers">Firefox 10 for developers</a></li> <li><a href="/en/Firefox_9_for_developers" title="en/Firefox 9 for developers">Firefox 9 for developers</a></li> <li><a href="/en/Firefox_8_for_developers" title="en/Firefox 8 for developers">Firefox 8 for developers</a></li> <li><a href="/en/Firefox_7_for_developers" title="en/Firefox 7 for developers">Firefox 7 for developers</a></li> <li><a href="/en/Firefox_6_for_developers" title="en/Firefox 6 for developers">Firefox 6 for developers</a></li> <li><a href="/en/Firefox_5_for_developers" title="en/Firefox 5 for developers">Firefox 5 for developers </a></li> <li><a href="/en/Firefox_4_for_developers" title="en/Firefox 4 for developers">Firefox 4 for developers </a></li> <li><a href="/en/Firefox_3.6_for_developers" title="en/Firefox 3.6 for developers">Firefox 3.6 for developers </a></li> <li><a href="/En/Firefox_3.5_for_developers" title="en/Firefox 3.5 for developers">Firefox 3.5 for developers</a></li> <li><a href="/en/Firefox_3_for_developers" title="en/Firefox 3 for developers">Firefox 3 for developers</a></li> <li><a href="/en/Firefox_2_for_developers" title="en/Firefox 2 for developers">Firefox 2 for developers</a></li> <li><a href="/en/Firefox_1.5_for_developers" title="en/Firefox 1.5 for developers">Firefox 1.5 for developers</a></li>
</ul>
<p>{{ languages( { "ja": "ja/Firefox_11_for_developers" } ) }}</p>
Revert to this revision