Revision Content

{{ draft() }}

Firefox 6, based on Gecko 6.0, will ship in the third quarter of 2011. This article provides links to information about the changes that affect developers in this release. Nightly builds of what will become Firefox 6 are currently available on the Aurora channel (that is, mozilla-aurora).

Note: This page is nowhere near complete. A great many changes are not yet listed, but will be soon.

Note: Items listed here are tentatively slated for Firefox 6; however, they may be held for a future release if testing shows they're not ready by the time Firefox 6 is due to ship. Please keep an eye on this page to stay up to date on the plans for Firefox 6.

Changes for web developers

HTML

The HTML5 {{ HTMLElement("progress") }} element, which lets you create a progress bar, is now supported.

The parsing of the HTML5 {{ HTMLElement("track") }} element, which specifies text tracks for media elements, is now supported. This element should appear in the DOM now, though its behavior is still not implemented.

The {{ HTMLElement("iframe") }} element is now clipped correctly by its container when the container's corners have been rounded using the {{ cssxref("border-radius") }} property.

{{ HTMLElement("form") }} elements' text {{ HTMLElement("input") }} fields no longer support the XUL {{ xulprop("maxwidth") }} property; this was never intentional, and is in violation of the HTML specification. You should instead use the {{ HTMLAttrXref("size", "input") }} attribute to set the maximum width of input fields.

The {{ HTMLElement("canvas") }} {{ domxref("CanvasRenderingContext2d") }} properties fillStyle and strokeStyle used to ignore garbage included after a valid color definition; now this is correctly treated as an error. For example, "red blue" as a color used to be treated as "red", when it should have been ignored.

The width and height of {{ HTMLElement("canvas") }} elements can now properly be set to 0px; previously, these were getting arbitrarily set to 300px when you tried to do that.

Support for the HTML custom data attributes (data-*) has been added. The DOM {{ domxref("element.dataset") }} property allows to access them.

When a {{ HTMLElement("textarea") }} element receives focus, the text insertion point is now placed, by default, at the beginning of the text rather than at the end. This makes Firefox's behavior consistent with other browsers.

CSS

{{ cssxref("text-decoration-color", "-moz-text-decoration-color") }}

This new property lets you set the color used by text decorations, such as underlines, overlines, and strikethroughs.

{{ cssxref("text-decoration-line", "-moz-text-decoration-line") }}

This new property lets you set the kind of text decorations added to an element.

{{ cssxref("text-decoration-style", "-moz-text-decoration-style") }}

This new property lets you set the style of text decorations, such as underlines, overlines, and strikethroughs. Styles include single-strokes, double strokes, wavy lines, dotted lines, and so forth.

{{ cssxref("hyphens", "-moz-hyphens") }}

This new property lets you control how hyphenation of words during line wrapping is handled.

{{ cssxref("orient", "-moz-orient") }}

A new (currently Mozilla-specific) property which lets you control the vertical or horizontal orientation of certain elements (particularly {{ HTMLElement("progress") }}).

Other changes

The {{ cssxref("@-moz-document") }} property has a new regexp() function, which lets you match the document's URL to a regular expression.

The {{ cssxref("azimuth") }} CSS property is no longer supported, as we have removed what little code we had for the aural media group. It was never significantly implemented, so it made more sense to remove the crufty implementation for the time being rather than try to patch it up.

In the past, the {{ cssxref(":hover") }} pseudoclass was not applied to class selectors when in quirks mode; for example, .someclass:hover did not work. This quirk has been removed.

The {{ cssxref(":indeterminate") }} pseudo-class can be applied to {{ HTMLElement("progress") }} elements. This is non-standard, but we hope it will be adopted by other browsers, because it will be useful.

The {{ domxref("DocumentType") }} object's entities and notations properties, which were never implemented and always returned null, have been removed, since they've been removed from the specification anyway.

The DOMConfiguration interface and the document.domConfig property that used it have both been removed; they were never supported and have since been removed from the DOM specification.

The document.strictErrorChecking property has been removed, since it was never implemented and was removed from the DOM specification.

The standard {{ domxref("event.defaultPrevented") }} property is now supported; you should use this instead of the non-standard getPreventdefault() method to detect whether or not {{ domxref("event.preventDefault()") }} was called on the event.

The {{ domxref("window.top") }} property is now properly read only.

DOM views, which we never documented, have been removed. This was a bit of implementation detail that was unnecessarily complicating things, so we got rid of it. If you notice this change, you're probably doing something wrong.

The EventTarget function addEventListener()'s useCapture parameter is now optional, as it is in WebKit (and as per the latest version of the specification).

The mozResponseArrayBuffer property of the XMLHttpRequest object has been replaced with the responseType and response properties.

JavaScript

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 Harmony WeakMaps have been added as a prototype implementation.

SVG

The {{ SVGAttr("pathLength") }} attribute is now supported.

SVG patterns, gradients, and filters now work correctly when loaded from data: URLs.

HTTP

Parsing of the "Content-Disposition" header has been fixed to properly interpret backslash-escaped ASCII characters as just that character itself. Previously it was incorrectly replacing that character with an underscore ("_").

The "Accept-Charset" header is no longer sent; its usefulness is minimal now that UTF-8 support is nearly universal, and it could be used to obtain (minimal) information about users.

Cookies

The value of the path field on Set-Cookie headers is now interpreted correctly when quotes are used; previously, they were being treated as part of the path string instead of as delimiters. This change may affect compatibility with some web sites, so authors should check their code.

Other changes

Support for microsummaries has been removed; these were never widely used, were not very discoverable, and continuing to support them was making improvements to the Places (bookmark and history) architecture difficult.

Changes for Mozilla and add-on developers

Note: Firefox 6 requires that binary components be recompiled, as do all major releases of Firefox. See Binary Interfaces for details.

JavaScript code modules

FileUtils.jsm

The openSafeFileOutputStream() method now opens files with the DEFER_OPENbehavior flag instead of attempting to open them immediately.

XPCOMUtils.jsm

The new importRelative() method lets you load one JavaScript code module from a path relative to the path of another JavaScript code module. This makes it easier to build modules that depend on each other.

XPCOM

Using the DOM from chrome

Although you've always been able to use the DOM File API from chrome code, the {{ domxref("File") }} constructor now supports specifying a local pathname string when used from chrome. In addition, you can also specify the file to access using the DOM File API using an {{ interface("nsIFile") }} object.

Interface changes

{{ interface("nsINavHistoryQueryOptions") }} now supports sorting in frecency order using the new SORT_BY_FRECENCY_ASCENDING and SORT_BY_FRECENCY_DESCENDING constants.

{{ interface("nsIFilePicker") }} has a new {{ ifattribute("nsIFilePicker", "addToRecentDocs") }} attribute, which lets you indicate that the selected file should be added to the user's "recent documents" list if there is one. This attribute has no effect when in private browsing mode.

See also

Revision Source

<p>{{ draft() }}</p>
<p>Firefox 6, based on Gecko 6.0, will ship in the third quarter of 2011. This article provides links to information about the changes that affect developers in this release. Nightly builds of what will become Firefox 6 are <a class=" link-ftp" href="ftp://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-mozilla-aurora/" title="ftp://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-mozilla-aurora/">currently available</a> on the Aurora channel (that is, <a href="/En/Developer_Guide/Source_Code/Mercurial#mozilla-aurora_(second-stage_development_tree)" title="https://developer.mozilla.org/En/Developer_Guide/Source_Code/Mercurial#mozilla-aurora_(second-stage_development_tree)">mozilla-aurora</a>).</p>
<div class="note"><strong>Note:</strong> This page is nowhere near complete. A great many changes are not yet listed, but will be soon.</div>
<div class="note"><strong>Note:</strong> Items listed here are tentatively slated for Firefox 6; however, they may be held for a future release if testing shows they're not ready by the time Firefox 6 is due to ship. Please keep an eye on this page to stay up to date on the plans for Firefox 6.</div>
<h2>Changes for web developers</h2>
<h3>HTML</h3>
<dl> <dt><a href="/en/WebSockets" title="en/WebSockets">WebSockets</a></dt> <dd>WebSockets was updated to protocol version 07 for Firefox 6.</dd>
</dl>
<ul> <li>The HTML5 {{ HTMLElement("progress") }} element, which lets you create a progress bar, is now supported.</li> <li>The parsing of the HTML5 {{ HTMLElement("track") }} element, which specifies text tracks for media elements, is now supported. This element should appear in the DOM now, though its behavior is still not implemented.</li> <li>The {{ HTMLElement("iframe") }} element is now clipped correctly by its container when the container's corners have been rounded using the {{ cssxref("border-radius") }} property.</li> <li>{{ HTMLElement("form") }} elements' text {{ HTMLElement("input") }} fields no longer support the XUL {{ xulprop("maxwidth") }} property; this was never intentional, and is in violation of the HTML specification. You should instead use the {{ HTMLAttrXref("size", "input") }} attribute to set the maximum width of input fields.</li> <li>The {{ HTMLElement("canvas") }} {{ domxref("CanvasRenderingContext2d") }} properties <code>fillStyle</code> and <code>strokeStyle</code> used to ignore garbage included after a valid color definition; now this is correctly treated as an error. For example, "red blue" as a color used to be treated as "red", when it should have been ignored.</li> <li>The width and height of {{ HTMLElement("canvas") }} elements can now properly be set to 0px; previously, these were getting arbitrarily set to 300px when you tried to do that.</li> <li>Support for the HTML <a href="/en/HTML/Global_attributes#attr-data-*" title="https://developer.mozilla.org/en/HTML/Global_attributes#attr-data-*">custom data attributes</a> (data-*) has been added. The DOM {{ domxref("element.dataset") }} property allows to access them.</li> <li>When a {{ HTMLElement("textarea") }} element receives focus, the text insertion point is now placed, by default, at the beginning of the text rather than at the end. This makes Firefox's behavior consistent with other browsers.</li>
</ul><h3>CSS</h3>
<dl> <dt>{{ cssxref("text-decoration-color", "-moz-text-decoration-color") }}</dt> <dd>This new property lets you set the color used by text decorations, such as underlines, overlines, and strikethroughs.</dd> <dt>{{ cssxref("text-decoration-line", "-moz-text-decoration-line") }}</dt> <dd>This new property lets you set the kind of text decorations added to an element.</dd> <dt>{{ cssxref("text-decoration-style", "-moz-text-decoration-style") }}</dt> <dd>This new property lets you set the style of text decorations, such as underlines, overlines, and strikethroughs. Styles include single-strokes, double strokes, wavy lines, dotted lines, and so forth.</dd> <dt>{{ cssxref("hyphens", "-moz-hyphens") }}</dt> <dd>This new property lets you control how hyphenation of words during line wrapping is handled.</dd> <dt>{{ cssxref("orient", "-moz-orient") }}</dt> <dd>A new (currently Mozilla-specific) property which lets you control the vertical or horizontal orientation of certain elements (particularly {{ HTMLElement("progress") }}).</dd>
</dl>
<h4>Other changes</h4>
<ul> <li>The {{ cssxref("@-moz-document") }} property has a new <code>regexp()</code> function, which lets you match the document's URL to a <a href="/en/JavaScript/Guide/Regular_Expressions" title="en/Core JavaScript 1.5 Guide/Regular Expressions">regular expression</a>.</li> <li>The {{ cssxref("azimuth") }} CSS property is no longer supported, as we have removed what little code we had for the <code>aural</code> media group. It was never significantly implemented, so it made more sense to remove the crufty implementation for the time being rather than try to patch it up.</li> <li>In the past, the {{ cssxref(":hover") }} pseudoclass was not applied to class selectors when in quirks mode; for example, <code>.someclass:hover</code> did not work. This quirk has been removed.</li> <li>The {{ cssxref(":indeterminate") }} pseudo-class can be applied to {{ HTMLElement("progress") }} elements. This is non-standard, but we hope it will be adopted by other browsers, because it will be useful.</li>
</ul>
<h3>DOM</h3>
<dl> <dt><a href="/en/CSS/Using_media_queries_from_code" title="en/CSS/Using media queries from code">Using media queries from code</a></dt> <dd>You can now test the result of a media query string programmatically using the {{ domxref("window.matchMedia()") }} method and the {{ domxref("MediaQueryList") }} interface.</dd>
</dl>
<ul> <li><code>navigator.securityPolicy</code>, which has returned an empty string for a long time, has been removed outright.</li> <li>{{ domxref("BlobBuilder") }} is now implemented, although for now it's prefixed (so you need to use <code>MozBlobBuilder</code>).</li> <li>The {{ domxref("document.height") }} and {{ domxref("document.width") }} have been removed. {{ Bug("585877") }}</li> <li>The {{ domxref("DocumentType") }} object's <code>entities</code> and <code>notations</code> properties, which were never implemented and always returned <code>null</code>, have been removed, since they've been removed from the specification anyway.</li> <li>The <code>DOMConfiguration</code> interface and the <code>document.domConfig</code> property that used it have both been removed; they were never supported and have since been removed from the DOM specification.</li> <li>The <code>hashchange</code> event now correctly includes <a href="/en/DOM/window.onhashchange#The_hashchange_event" title="en/DOM/window.onhashchange#The hashchange event">the <code>newURL</code> and <code>oldURL</code> fields</a>.</li> <li>The {{ domxref("FileReader") }} interface's <code>abort()</code> method now throws an exception when used if no file read is in progress.</li> <li>You can now <a href="/en/Printing#Detecting_print_requests" title="https://developer.mozilla.org/en/Printing#Detecting_print_requests">detect when printing has been initiated and has completed</a> by listening for the new <code>beforeprint</code> and <code>afterprint</code> events.</li> <li>The <code>document.strictErrorChecking</code> property has been removed, since it was never implemented and was removed from the DOM specification.</li> <li>The standard {{ domxref("event.defaultPrevented") }} property is now supported; you should use this instead of the non-standard <code>getPreventdefault()</code> method to detect whether or not {{ domxref("event.preventDefault()") }} was called on the event.</li> <li>The {{ domxref("window.top") }} property is now properly read only.</li> <li>DOM views, which we never documented, have been removed. This was a bit of implementation detail that was unnecessarily complicating things, so we got rid of it. If you notice this change, you're probably doing something wrong.</li> <li>The <code>EventTarget</code> function <a href="/en/XPCOM_Interface_Reference/nsIDOMEventTarget" title="en/XPCOM Interface Reference/nsIDOMEventTarget"><code>addEventListener()</code></a>'s <code>useCapture</code> parameter is now optional, as it is in WebKit (and as per the latest version of the specification).</li> <li>The <code>mozResponseArrayBuffer</code> property of the <a href="/en/XMLHttpRequest" title="en/XMLHttpRequest"><code>XMLHttpRequest</code></a> object has been replaced with the <code>responseType</code> and <code>response</code> properties.</li> <li>The {{ domxref("element.dataset") }} property has been added to the <a href="/en/DOM/HTMLElement" title="en/DOM/HTMLElement"><code>HTMLElement</code></a> interface allowing access to the <a href="/en/HTML/Global_attributes#attr-data-*" title="https://developer.mozilla.org/en/HTML/Global_attributes#attr-data-*"><code>data-*</code> global attributes</a> of an element.</li>
</ul><h3>JavaScript</h3>
<ul> <li>In the past, it was possible to use the <code>new</code> 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 <code>new</code> operator in this way was never officially supported and was not widely done, so it's unlikely that this change affects you.</li> <li>ECMAScript Harmony <a href="/en/JavaScript/Reference/Global_Objects/WeakMap" title="en/JavaScript/Reference/Global_Objects/WeakMap">WeakMaps</a> have been added as a prototype implementation.</li>
</ul>
<h3>SVG</h3>
<ul> <li>The {{ SVGAttr("pathLength") }} attribute is now supported.</li> <li>SVG patterns, gradients, and filters now work correctly when loaded from <a href="/en/data_URIs" title="https://developer.mozilla.org/en/data_URIs"><code>data:</code> URLs</a>.</li>
</ul>
<h3>HTTP</h3>
<ul> <li>Parsing of the "Content-Disposition" header has been fixed to properly interpret backslash-escaped ASCII characters as just that character itself. Previously it was incorrectly replacing that character with an underscore ("_").</li> <li>The "Accept-Charset" header is no longer sent; its usefulness is minimal now that UTF-8 support is nearly universal, and it could be used to obtain (minimal) information about users.</li>
</ul>
<h3>Cookies</h3>
<ul> <li>The value of the path field on <code>Set-Cookie</code> headers is now interpreted correctly when quotes are used; previously, they were being treated as part of the path string instead of as delimiters. <strong>This change may affect compatibility with some web sites</strong>, so authors should check their code.</li>
</ul>
<h3>Other changes</h3>
<ul> <li>Support for microsummaries has been removed; these were never widely used, were not very discoverable, and continuing to support them was making improvements to the Places (bookmark and history) architecture difficult.</li> <li>WebGL now supports the <a class=" external" href="http://www.khronos.org/registry/gles/extensions/OES/OES_texture_float.txt" title="http://www.khronos.org/registry/gles/extensions/OES/OES_texture_float.txt"><code>OES_texture_float</code></a> extension.</li>
</ul>
<h2>Changes for Mozilla and add-on developers</h2>
<div class="note"><strong>Note:</strong> Firefox 6 requires that binary components be recompiled, as do all major releases of Firefox. See <a href="/En/Developer_Guide/Interface_Compatibility#Binary_Interfaces" title="En/Developer Guide/Interface Compatibility#Binary Interfaces">Binary Interfaces</a> for details.</div>
<h3>JavaScript code modules</h3>
<h4>FileUtils.jsm</h4>
<ul> <li>The <code>openSafeFileOutputStream()</code> method now opens files with the <code>DEFER_OPEN</code> <a href="/en/XPCOM_Interface_Reference/nsIFileOutputStream#Behavior_flag_constants" title="en/XPCOM Interface Reference/nsIFileOutputStream#Behavior flag constants">behavior flag</a> instead of attempting to open them immediately.</li>
</ul>
<h4>XPCOMUtils.jsm</h4>
<ul> <li>The new <a href="/en/JavaScript_code_modules/XPCOMUtils.jsm#importRelative()" title="en/JavaScript code modules/XPCOMUtils.jsm#importRelative()"><code>importRelative()</code></a> method lets you load one JavaScript code module from a path relative to the path of another JavaScript code module. This makes it easier to build modules that depend on each other.</li>
</ul>
<h3>XPCOM</h3>
<ul> <li><a href="/en/XPCOM_array_guide#nsCOMArray.3cT.3e" title="en/XPCOM array guide#nsCOMArray.3cT.3e"><code>nsCOMArray&lt;T&gt;</code></a> now has a <a href="/en/XPCOM_array_guide#Deleting_objects" title="en/XPCOM array guide#Deleting objects"><code>RemoveObjectsAt()</code></a> method for removing multiple objects at once from the array.</li>
</ul>
<h3>Using the DOM from chrome</h3>
<dl> <dt><a href="/en/Extensions/Using_the_DOM_File_API_in_chrome_code" title="en/Extensions/Using the DOM File API in chrome code">Using the DOM File API in chrome code</a></dt> <dd>Although you've always been able to use the DOM File API from chrome code, the {{ domxref("File") }} constructor now supports specifying a local pathname string when used from chrome. In addition, you can also specify the file to access using the DOM File API using an {{ interface("nsIFile") }} object.</dd>
</dl>
<h3>Interface changes</h3>
<ul> <li>{{ interface("nsINavHistoryQueryOptions") }} now supports sorting in frecency order using the new <code>SORT_BY_FRECENCY_ASCENDING</code> and <code>SORT_BY_FRECENCY_DESCENDING</code> constants.</li> <li>{{ interface("nsIFilePicker") }} has a new {{ ifattribute("nsIFilePicker", "addToRecentDocs") }} attribute, which lets you indicate that the selected file should be added to the user's "recent documents" list if there is one. This attribute has no effect when in private browsing mode.</li> <li>{{ interface("nsINavBookmarkObserver") }} methods with item ID parameters now require a GUID as well.</li> <li>{{ ifmethod("nsIPrefBranch", "clearUserPref") }} no longer throws an exception if the specified preference doesn't exist or has no user-set value. Instead, it simply does nothing.</li> <li>The {{ interface("nsIMemoryReporter") }} interface now provides support for indicating the kind of memory being described (mapped, heap, or other).</li>
</ul>
<h4>New interfaces</h4>
<dl> <dt>{{ interface("mozIAsyncFavicons") }}</dt> <dd>A new service that lets you access the favicon service asynchronously.</dd> <dt>{{ interface("nsIEventSource") }}</dt> <dd><em>Details forthcoming.</em></dd> <dt>{{ interface("nsIGSettingsCollection") }}</dt> <dd><em>Details forthcoming.</em></dd> <dt>{{ interface("nsIGSettingsService") }}</dt> <dd><em>Details forthcoming.</em></dd> <dt>{{ interface("nsIHttpUpgradeListener") }}</dt> <dd>The callback interface for handling HTTP upgrade requests via the {{ ifmethod("nsIHttpChannelInternal", "HTTPUpgrade") }} method.</dd> <dt>{{ interface("nsIStructuredCloneContainer") }}</dt> <dd>A container for objects that have been serialized using the <a href="/en/HTML/Structured_clones" title="en/HTML/Structured clones">structured clone algorithm</a>.</dd> <dt>{{ interface("nsITelemetry") }}</dt> <dd>Implements telemetry support to allow recording of telemetry data to be used to present histograms for performance tracking purposes. See {{ bug("649502") }} and {{ bug("585196") }}.</dd> <dt>{{ interface("nsITimedChannel") }}</dt> <dd>See {{ bug("576006") }}.</dd> <dt>{{ interface("nsIWebSocketListener") }}</dt> <dd>See {{ bug("640003") }}.</dd> <dt>{{ interface("nsIWebSocketProtocol") }}</dt> <dd>See {{ bug("640003") }}.</dd>
</dl><h4>Removed interfaces</h4>
<p>The following interfaces were implementation details that are no longer needed:</p>
<ul> <li><code>nsIDOMDocumentTraversal</code></li> <li><code>nsIDOMDocumentRange</code></li> <li><code>IWeaveCrypto</code></li> <li><code>nsIDOM3DocumentEvent</code></li> <li><code>nsIDOMAbstractView</code></li> <li><code>nsILiveTitleNotificationSubject</code></li> <li><code>nsIPlugin</code> (see {{ bug("637253") }})</li> <li><code>nsIPluginInstance</code> (see {{ bug("637253") }})</li>
</ul><h3>See also</h3> <ul> <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 class="internal" href="/En/Firefox_3.5_for_developers" title="En/Firefox 3.5 for developers">Firefox 3.5 for developers</a></li> <li><a class="internal" href="/en/Firefox_3_for_developers" title="en/Firefox 3 for developers">Firefox 3 for developers</a></li> <li><a class="internal" href="/en/Firefox_2_for_developers" title="en/Firefox 2 for developers">Firefox 2 for developers</a></li> <li><a class="internal" href="/en/Firefox_1.5_for_developers" title="en/Firefox 1.5 for developers">Firefox 1.5 for developers</a></li> </ul>