--- title: Firefox 6 技術文件 slug: Mozilla/Firefox/Releases/6 translation_of: Mozilla/Firefox/Releases/6 ---

Firefox 6, based on Gecko 6.0, was released on August 16, 2011. This article provides links to information about the changes that affect developers in this release.

Changes for web developers

HTML

CSS

-moz-text-decoration-color
This new property lets you set the color used by text decorations, such as underlines, overlines, and strikethroughs.
-moz-text-decoration-line
This new property lets you set the kind of text decorations added to an element.
-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.
-moz-hyphens
This new property lets you control how hyphenation of words during line wrapping is handled.
-moz-orient
A new (currently Mozilla-specific) property which lets you control the vertical or horizontal orientation of certain elements (particularly <progress>).
::-moz-progress-bar
A Mozilla-specific pseudo-element that lets you style the area of an <progress> element representing the completed portion of a task.

Other changes

DOM

Using media queries from code
You can now test the result of a media query string programmatically using the window.matchMedia() method and the MediaQueryList interface.
Touch events
Firefox 6 adds support for W3C standard touch events; these make it easy to interpret one or more touches at a time on touch-sensitive surfaces such as touch screens and trackpads.
Server-sent events
Server-sent events make it possible for a web application to ask a server to send events just like any locally-created DOM event.

JavaScript

SVG

MathML

Accessibility (ARIA)

Networking

WebSockets
WebSockets was updated to protocol version 07 for Firefox 6. In addition, the global WebSocket object has been renamed to MozWebSocket to prevent it from incorrectly being used to detect the availability of unprefixed WebSockets.

Other changes

Changes for Mozilla and add-on developers

For an overview of the changes you may need to make in order to make your add-on compatible with Firefox 6, see Updating add-ons for Firefox 6.

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

XPCOMUtils.jsm

XPCOM

Using the DOM from chrome

Using the DOM File API in chrome code
Although you've always been able to use the DOM File API from chrome code, the 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 nsIFile object.

Interface changes

New interfaces

mozIAsyncFavicons
A new service that lets you access the favicon service asynchronously.
nsIEventSource
Details forthcoming.
nsIGSettingsCollection
Details forthcoming.
nsIGSettingsService
Details forthcoming.
nsIHttpUpgradeListener
The callback interface for handling HTTP upgrade requests via the nsIHttpChannelInternal.HTTPUpgrade() method.
nsIStructuredCloneContainer
A container for objects that have been serialized using the structured clone algorithm.
nsITelemetry
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.
nsITimedChannel
See bug 576006.
nsIWebSocketListener
See bug 640003.
nsIWebSocketProtocol
See bug 640003.

Removed interfaces

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

Other changes

Using preferences from application code
A new static API is available for easily accessing preferences; this is only available to application code and can't be used by add-ons.

See also