Firefox 4 for developers - Mozilla

Firefox 4 for developers
========================

Firefox 4, which shipped on March 22, 2011, enhances performance, adds more support for HTML5 and other evolving Web technologies, and further improves security. This article provides information about this release and what features are available for Web developers, add-on developers, and Gecko platform developers alike.

Features for web developers
---------------------------

Gecko now uses the HTML5 parser, which fixes bugs, improves interoperability, and improves performance. It also lets content embed SVG and MathML directly in the HTML markup.

### HTML

Meet the HTML5 parser

A look at what the HTML5 parser means to you, and how to embed SVG and MathML into your content inline.

Forms in HTML5

A look at improvements to web forms. Among these changes are added input types in the `<input>` element, data validation, and more.

HTML5 Sections

Gecko now supports the new HTML5 elements related to sections in a document: `<article>`, `<section>`, `<nav>`, `<aside>`, `<hgroup>`, `<header>` and `<footer>`.

HTML5 hidden attribute

This attribute, common to all elements, is used to hide content in a webpage that is not currently relevant to the user.

Other HTML5 elements

Gecko now also supports the following new HTML5 elements: `<mark>`, `<figure>`, and `<figcaption>`.

WebSockets

A guide to using the new WebSockets API for real-time communication between a web application and a server. Note that WebSockets as implemented in Firefox 4 is not compatible with the final standard, and should not generally be used.

#### Canvas improvements

The following changes were made to the `CanvasRenderingContext2D` interface to bring our `<canvas>` implementation closer to being in line with the specification:

* Specifying a negative radius when calling `arc()` now correctly throws an `INDEX_SIZE_ERR` exception.
* Specifying non-finite values when calling `createLinearGradient()` and `createRadialGradient()` now throws `NOT_SUPPORTED_ERR` instead of `SYNTAX_ERR`.
* Setting `miterLimit` to a negative value no longer throws an exception; instead, it properly ignores non-positive values.
* Setting `lineWidth` to a negative value no longer throws an exception; instead, it properly ignores non-positive values.
* The `putImageData()` method now supports the optional parameters `dirtyX`, `dirtyY`, `dirtyWidth`, and `dirtyHeight`.

#### Miscellaneous HTML changes

* `<textarea>` elements are now resizable by default; you can use the `resize` CSS property to disable this.
* `canvas.getContext` and `canvas.toDataURL` no longer throw an exception when called with unrecognized arguments.
* The `<canvas>` element now supports the Mozilla-specific `mozGetAsFile()` method, which lets you obtain a memory-based file containing an image of the canvas's contents. See `HTMLCanvasElement` for details.
* `canvas2dcontext.lineCap` and `canvas2dcontext.lineJoin` no longer throw an exception when set to an unrecognized value.
* `canvas2dcontext.globalCompositeOperation` no longer throws an exception when set to an unrecognized value, and no longer supports the non-standard `darker` value.
* Support for the obsolete `<spacer>` element, which was absent in all other browsers, has been removed.
* The `<isindex>` element, when created by calling `document.createElement()`, is now created as a simple element with no properties or methods.
* Gecko now supports calling `click()` on `<input>` elements to open the file picker. See the example in the article Using files from web applications.
* The `<input>` element supports a new `mozactionhint` attribute, which lets you specify the label for the enter key on virtual keyboards.
* `<script>` elements inside `<iframe>`, `<noembed>`, and `<noframes>` elements now get executed, which they weren't in previous versions of Firefox. This is in compliance with the specification, and matches the behavior of other browsers.
### CSS

CSS transitions

New CSS transitions support is available in Firefox 4.

Computed values in CSS

Support for `-moz-calc` has been added. This lets you specify `<length>` values as mathematical expressions.

Selector grouping

Support for `:-moz-any` to group selectors and factorize combinators.

Background image subrectangle support

The `-moz-image-rect()` function makes it possible to use subrectangles of images as a `background-image`.

CSS touch properties

Support for touch properties is added. Details, and real article names, to come later.

Using arbitrary elements as CSS backgrounds

You can use the `-moz-element` CSS function and the `document.mozSetImageElement()` DOM function to use arbitrary HTML elements as backgrounds.

Privacy and the :visited selector

Changes have been made to what information can be obtained about the style of visited links using CSS selectors. This may affect some web applications.

#### New CSS properties

|  |  |
| --- | --- |
| Property | Description |
| `-moz-font-feature-settings` | Lets you customized advanced features of OpenType fonts. |
| `-moz-tab-size` |
 Specifies the width in space characters of a tab character (U+0009) when
 rendering text.
  |
| `resize` | Lets you control the dimensions in which an element may be resized. |

#### New CSS pseudo-classes

|  |  |
| --- | --- |
| Pseudo-class | Description |
| `:-moz-handler-crashed` | Used to style elements whose plugins have crashed. |
| `:-moz-placeholder` | Applied to placeholder text in form fields. |
| `:-moz-submit-invalid` |
 Applied to the submit button on forms when one or more of the form's
 fields doesn't validate.
  |
| `:-moz-window-inactive` | Applied to elements in inactive windows. |
| `:invalid` |
 Automatically applied to `<input>` fields when
 their contents are invalid.
  |
| `:optional` |
 Automatically applied to `<input>` fields that
 don't specify the `required` attribute.
  |
| `:required` |
 Automatically applied to `<input>` fields that
 specify the `required` attribute.
  |
| `:valid` |
 Automatically applied to `<input>` fields when
 their contents validate successfully.
  |

#### New CSS pseudo-selectors

|  |  |
| --- | --- |
| Pseudo-selector | Description |
| `:-moz-focusring` |
 Lets you specify the appearance of an element when Gecko believes it
 should have a focus indication rendered.
  |

#### New CSS functions

|  |  |
| --- | --- |
| Function | Description |
| `:-moz-any` | Lets you group selectors and factorize combinators. |
| `-moz-calc` |
 Lets you specify
 `<length>` values as
 mathematical expressions.
  |
| `-moz-element` |
 Lets you use an arbitrary element as a background for
 `background-image` and
 `background`.
  |
| `-moz-image-rect` |
 Lets you use a subrectangle of an image as a
 `background-image` or
 `background`.
  |

#### Renamed CSS properties

| Old Name | New Name | Notes |
| --- | --- | --- |
| `-moz-background-size` | `background-size` | The name `-moz-background-size` is no longer supported. |
| `-moz-border-radius` | `border-radius` | The old name is supported for a limited time to allow you time to update your sites. Rendering changes have also been made to match the latest version of the specification. |
| `-moz-box-shadow` | `box-shadow` |  |

#### Miscellaneous CSS changes

* The `text-shadow` property now caps the blur radius to 300px for sanity and performance reasons.
* The `overflow` property no longer applies to table-group elements (`<thead>`, `<tbody>`, and `<tfoot>`).
* The `-moz-appearance` property now supports the `-moz-win-borderless-glass` value, which applies a borderless Aero Glass look to an element.
* The `-moz-device-pixel-ratio` media feature has been added, allowing the use of the device pixels per CSS pixel ratio to be used in Media Queries.
* Gecko's handling of CSS `<length>` units has been revised to better match other browsers, and to more accurately translate absolute lengths into screen pixel counts based on the device's DPI.
### Graphics and video

WebGL

The developing WebGL standard is now supported by Firefox.

Optimizing graphics performance

Tips and tricks for getting the most out of graphics and video performance in Firefox 4.

Support for WebM video

The new open WebM video format is supported by Gecko 2.0.

SVG animation with SMIL

Support for SMIL animation of SVG is now available.

Using SVG as images and as CSS backgrounds

You can now use SVG with the `<img>` element, as well as a CSS `background-image`.

Media `buffered` attribute support

The `buffered` attribute on `<video>` and `<audio>` elements is now supported, letting you determine which ranges of a media file have been buffered. The `TimeRanges` DOM interface has been implemented to support this.

Media `preload` attribute

The `preload` attribute from the HTML5 specification has been implemented, replacing the previously-implemented (and no longer supported) `autobuffer` attribute. This affects the `<video>` and `<audio>` elements, as well as the `nsIDOMHTMLMediaElement` interface.

SVG text positioning improvements

You can now specify lists for the values of the `x`, `y`, `dx`, and `dy` properties on SVG `<text>` and `<tspan>` elements. This lets you control the positioning of each character in a string individually.

### DOM

JavaScript typed arrays

Support has been added for JavaScript typed arrays; this allows you to manipulate buffers containing raw data using native data types. Several APIs make use of this, including the File API, WebGL, and WebSockets.

Obtaining boundary rectangles for ranges

The `Range` object now has `range.getClientRects()` and `range.getBoundingClientRect()` methods.

Capturing mouse events on arbitrary elements

Support for the Internet Explorer-originated `setCapture()` and `releaseCapture()` APIs has been added. See Firefox bug 503943.

Manipulating the browser history

The existing document history object, available through the `window.history` object, now supports the new HTML5 `pushState()` and `replaceState()` methods.

Animations using MozBeforePaint

A new event has been added which, in concert with the `window.mozRequestAnimationFrame()` method and `window.mozAnimationStartTime` property, provides a way to create animations that are synchronized with one another.

Touch and multi-touch events

Support has been added for touch and multi-touch events.

#### HTML elements' DOM interfaces have changed

Several HTML elements have had their DOM interfaces changed to the ones required by the HTML5 specification, as shown below.

| Interface in Firefox 3.6 | Interface in Firefox 4 | HTML Element |
| --- | --- | --- |
| `HTMLSpanElement` | `HTMLElement` | `<abbr>`, `<acronym>`, `<address>`, `<b>`, `<bdo>`, `<big>`, `<blink>`, `<center>`, `<cite>`, `<code>`, `<dd>`, `<dfn>`, `<dt>`, `<em>`, `<i>`, `<kbd>`, `<listing>`, `<nobr>`, `<plaintext>`, `<s>`, `<samp>`, `<small>`, `<strike>`, `<strong>`, `<sub>`, `<sup>`, , `<tt>`, `<u>`, `<var>`, `<xmp>` |
| `HTMLDivElement` | `HTMLElement` | `<noembed>`, `<noframes>`, `<noscript>` |
| `HTMLWBRElement` | `HTMLElement` | `<wbr>` |

#### Miscellaneous DOM changes

* The wrapping of a `<textarea>` element can now be controlled via the DOM, via the `wrap` DOM attribute. Firefox bug 41464
* `<script>` elements created using `document.createElement()` and inserted into a document now behave according to the HTML5 specification by default. Scripts with the `src` attribute execute as soon as available (without maintaining ordering) and scripts without the `src` attribute execute synchronously. To make script-inserted scripts that have the `src` attribute execute in the insertion order, set `.async=false` on them.
* DOM `file` objects now offer a `url` property.
* FormData support for XMLHttpRequest.
* The `element.isContentEditable` property has been implemented.
* The `document.currentScript` property lets you determine which `<script>` element's script is currently executing. The new `element.onbeforescriptexecute` and `element.onafterscriptexecute` events are fired before and after a script element executes.
* Added the `mozSourceNode` property to the `DragTransfer` object.
* Added the `selection.modify()` method to the `Selection` object; this lets you easily alter the current text selection or cursor position in a browser window.
* Support for the `window.directories` object and the `directories` feature for `window.open`, which are not supported in any other browser, has been removed. Use `personalbar` instead. Firefox bug 474058
* The `event.mozInputSource` property has been added to DOM user interface events; this non-standard property lets you determine the type of device that generated an event.
* The `document.onreadystatechange` event has been implemented.
* The `document.createElement` method no longer accepts `<` and `>` around the tag name in quirks mode.
* The `element.setCapture()` and `document.releaseCapture()` methods have been added, allowing elements to continue tracking mouse events even while the mouse is outside their normal tracking area after a `mousedown` event has occurred.
* The `window.mozPaintCount` property has been added; it lets you determine how many times a document has been painted. This can be useful when testing performance of your web application.
* The language token has been removed from `window.navigator.appVersion` and `window.navigator.userAgent`. Use `window.navigator.language` or the Accept-Language header instead. Firefox bug 572656
* The XMLHttpRequest object now exposes the response as a JavaScript typed array as well as a string, using the Gecko-specific `mozResponseArrayBuffer` property.
* Mouse events now include a `mozPressure` property indicating the amount of pressure on supported pressure-sensitive input devices.
* The `URL.createObjectURL()` and `URL.revokeObjectURL()` methods let you create object URLs which reference local files.
* The `DOMImplementation.createHTMLDocument()` method lets you create a new HTML document.
* `Node.mozMatchesSelector()` now throws a `SYNTAX_ERR` exception if the specified selector string is invalid, instead of incorrectly returning `false`.
* You can now set an element's SVG properties' values using the same shorthand syntax as with CSS. For example: `element.style.fill = 'lime'`. See `element.style` for details.
* The document root now has a `privatebrowsingmode` attribute that describes the state of private browsing mode, including an indication of whether private browsing is temporary or permanent for the session.
* The second parameter of the `window.getComputedStyle()` method is now optional, as it is in every other major browser.
* The DOM `StorageEvent` object now matches the latest version of the specification.
* The minimum allowed delay for the `setTimeout()` method is now a preference, `dom.min_timeout_value`.
* The `MozAfterPaint` event is no longer sent by default, due to a potential security issue. It can be re-enabled by setting a preference.
### Security

Content Security Policy (CSP)

Content Security Policy (CSP) is a Mozilla proposal designed to help web designers and server administrators specify how content on their websites interacts. The goal is to help detect and mitigate attacks including cross-site scripting and data injection attacks.

HTTP Strict Transport Security

HTTP Strict Transport Security is a security feature that lets a website tell browsers that it should only be communicated with using HTTPS, instead of using HTTP.

The X-FRAME-OPTIONS response header

The X-FRAME-OPTIONS HTTP response header introduced in Internet Explorer 8 is now supported by Firefox. This allows sites to indicate whether or not their pages can be used in frames, and if so, whether or not to restrict that to the same origin.

User Agent string changes

As a means to reduce the amount of data and entropy sent out in HTTP requests (see Firefox bug 572650), the crypto strength and language tokens have been removed from the user agent string.

### JavaScript

For an overview of the changes implemented in JavaScript 1.8.5, see New in JavaScript 1.8.5. JavaScript in Firefox 4 will have additional adherence to the ECMAScript 5 standard.

### Developer tools

Using the Web Console

The Web Console tool is a useful debugging aid for web developers and extension developers alike.

>
> \*\*Note:\*\*The Error Console is disabled by default starting in Gecko 2.0. You can re-enable it by changing the `devtools.errorconsole.enabled` preference to `true` and restarting the browser.
>
>
>

Changes for Mozilla and add-on developers
-----------------------------------------

For helpful tips on updating existing extensions for Firefox 4, see Updating extensions for Firefox 4. There are several key changes that break compatibility with existing add-ons, so be sure to read that article.

If you're a theme developer, you should read Theme changes in Firefox 4 to understand some critical changes you'll need to be aware of.

### JavaScript code modules

Services.jsm

The `Services.jsm` code module provides getters that make it easy to obtain references to commonly-used services, such as the preferences service or the window mediator, among others.

JS-ctypes API

The JS-ctypes API makes it possible to call C-compatible foreign library functions without using XPCOM.

Add-ons Manager

The new Add-ons Manager provides information about installed add-ons, support for managing them, and provides ways to install and remove add-ons.

PopupNotifications.jsm

The new popup notifications module makes it easy to present attractive, non-modal notifications to the user. You can see how to use this API in Using popup notifications.

Loading code modules from chrome: URLs

You can now load JavaScript code modules using **chrome:** URLs, even inside JAR files.

DownloadLastDir.jsm

The `DownloadLastDir.jsm` code module provides the `gDownloadLastDir` global variable, which contains a string you can use to learn the path of the directory into which the last download occurred. This module handles issues related to private browsing for you.

Measuring performance using the PerfMeasurement.jsm code module

The `PerfMeasurement.jsm` code module provides an API to measure CPU-level performance data in JavaScript code.

#### Miscellaneous changes to code modules

* The `NetUtil.jsm` code module now offers the `readInputStreamToString()` method, which lets you read arbitrary bytes from a stream into a string, even if the stream includes zeroes.
* The XPCOMUtils.jsm code module now offers IterSimpleEnumerator() and IterStringEnumerator() helpers to iterate over XPCOM enumerators.
* You can now use workers in JavaScript code modules.
### DOM changes

`ChromeWorker`

A new type of worker for privileged code; this lets you use things like js-ctypes from workers in extensions and application code.

Touch events

Support for (non-standard) touch events has been added; these let you track multiple fingers moving on a touch screen at the same time.

#### Other DOM changes

* The new "document-element-inserted" notification is sent when a document's root element is created, but before any scripts are executed on it.
### XUL

#### Changes to the tabbrowser element

Several changes were made to the `<xul:tabbrowser>` element that impact extensions that interact with tabs. In addition to supporting app tabs, these changes also change the tab bar into a standard toolbar, which lets the user drag toolbar buttons into it.

* The `TabClose`, `TabSelect`, and `TabOpen` events no longer bubble up to the `<xul:tabbrowser>` element (`gBrowser`). Event listeners for those events should be added to `gBrowser.tabContainer` rather than to `gBrowser` directly.
* The tab context menu is no longer an anonymous child of the `<xul:tabbrowser>`. It can therefore be overlaid directly with XUL overlays. It can also be accessed more directly in JavaScript via `gBrowser.tabContextMenu`. See this blog post for more details.
* The new `visibleTabs` property was added to let you get an array of the currently visible tabs; this lets you determine which tabs are visible in the current tab set. This is used by Firefox Panorama, for example.
* Added the new `showOnlyTheseTabs` method; this is used by Firefox Panorama.
* Added the new `getIcon` method, which lets you get a tab's favicon without having to pull up the `<xul:browser>` element.
* Added the new `tabbrowser.tabs` property, which lets you easily get a list of the tabs in a `<xul:tabbrowser>` element.
* The new `pinTab` and `unpinTab` methods let you pin and unpin tabs (that is, switch them between being app tabs and regular tabs).
* Added the `getTabModalPromptBox` method and `tabmodalPromptShowing` attribute to the `<xul:tabbrowser>` to support tab-modal alerts.

#### Changes to popups

* The `<xul:popup>` element is no longer supported; you should use `<xul:menupopup>` instead. (If you continue using `popup`, you will encounter glitches, since the element has no special meaning anymore. For example, `<xul:menuseparator>` can appear transparent when used in a `<xul:popup>`.)
* The `<xul:menupopup>` XUL element now has a `triggerNode` property, which indicates the node on which the event occurred that caused the popup to open. This also required the addition of a trigger event parameter to the `openPopup` method. Also, the `anchorNode` property has been added; it returns the anchor specified when the popup was created.
* The `<xul:panel>` element now offers `fade` and `flip` attributes, which are used to configure the behavior of new "arrow" style notification panels.

#### Remote XUL support removed

Remote XUL is no longer supported; this affects XUL documents being served through HTTP; also, you can no longer load XUL documents using `file://` URLs unless you create the preference `dom.allow_XUL_XBL_for_file` and set it to `true`. There is, however, a whitelist feature that can be used to allow specific domains to load remote XUL.

#### Miscellaneous XUL changes

* The `readonly` attribute now correctly works for XBL fields.
* The `<xul:resizer>` element now lets you use the `element` attribute to specify an element to resize, instead of resizing the window.
* The `<xul:resizer>` element now has a `type` attribute that lets you specify that the resizer is for a window instead of an element, to prevent the window resizer from being drawn twice.
* The `"active"` attribute no longer gets set on active XUL windows. Instead, you can use the new `:-moz-window-inactive` pseudoclass in order to assign different styles to background windows.
* The `emptytext` attribute is now deprecated; you should use `placeholder` instead.
* The `<xul:window>` element now offers an `accelerated` attribute; when true, the hardware layer manager is permitted to accelerate the window.
* The `<xul:stack>` element now supports the `bottom` and `right` attributes.
* Events are now fired during `<xul:toolbox>` customization, allowing you to detect changes to toolbars.
* The `alternatingbackground` attribute for `<xul:tree>` elements is no longer supported; you can use the `:-moz-tree-row` pseudo-class instead.
* The Bookmarks Toolbar overflow button with anonid chevronPopup is no longer anonymous; it has an ID of "PlacesChevron".
* The `<xul:tabs>` element now has a `tabbox` property, replacing the old `_tabbox` property, which has been deprecated (and was never documented).
* XUL `<xul:window>` elements now have the `drawintitlebar` attribute; if this is `true`, the window's content area includes the title bar, allowing drawing into the title bar.
* New `TabPinned` and `TabUnpinned` events are available, allowing you to detect when tabs are pinned and unpinned.
* The new `TabAttrModified` event is sent when a tab's `label`, `crop`, `busy`, `image`, or `selected` attributes change.
* `<xul:tab>` elements now have a `pinned` attribute, letting you determine whether or not a tab is currently pinned.
* The `setDirectionIndicator` class on `xul:tree elements hasn't done anything for some time now; now it's not used at all anymore.
* The `<xul:window>` element now has a `chromemargin` attribute that lets you set the margin between chrome and content on each side of a window; you can use this to draw into the title bar, for example.
* The `<xul:window>` element now has a `disablechrome` attribute; this is used to hide most of the chrome in a window when it's being used to display in-browser UI, such as `about:addons`.
* The `<xul:window>` element now has a `disablefastfind` attribute, which lets you disable the find bar in a window when the content doesn't support it. This is used, for example, by the add-ons panel.
* Toolbars can now be external to toolboxes, while still being considered a member of the `<xul:toolbox>`, by setting the `toolboxid` property of the `<xul:toolbar>`. Also, the `<xul:toolbox>` element now has a `externalToolbars` property, which lists all the toolbars that are considered members of the toolbox.
* Support has been added for logging XUL templates for debugging purposes.
### UI changes affecting developers

The add-on bar

The status bar has been removed in favor of the new add-on bar. You'll need to update your extension to use this if you've been adding UI to the status bar in the past.

Hiding browser chrome

You can now hide the browser's chrome when it's desirable to do so; for example, `about:addons` does this.

### Storage

#### Miscellaneous storage API changes

* The `mozIStorageBindingParamsArray` interface now has a length attribute that indicates the number of `mozIStorageBindingParams` objects in the array.
* The `mozIStorageStatement.bindParameters()` method now returns an error if the specified `mozIStorageBindingParamsArray` is empty.
* Added the `mozIStorageConnection.clone()` method, which lets you clone an existing database connection.
* Added the `mozIStorageConnection.asyncClose()` method, which lets you close a database connection asynchronously; you specify a callback to be notified when the close operation is complete.
* Added the `mozIStorageConnection.setGrowthIncrement()` method, which lets you specify the amount by which a database file is grown at a time, in order to help SQLite reduce fragmentation.
* The `SQLITE_CONSTRAINT` error is now reported as `NS_ERROR_STORAGE_CONSTRAINT` instead of as `NS_ERROR_FAILURE`.
### XPCOM

In addition to the specific changes referenced below, it's important to note that there are no longer any frozen interfaces. All interfaces are now unfrozen, regardless of what the documentation may say. We'll update the documentation over time.

XPCOM changes in Gecko 2.0

Details about changes to XPCOM that impact compatibility in Firefox 4.

Components.utils.getGlobalForObject()

This new method returns the global object with which an object is associated; this replaces a common use case of the now-removed `__parent__`.

### Places

* Places query results may now be observed by multiple observers, and queries may be executed asynchronously. This means there have been some changes to the `nsINavHistoryResult`, `nsINavHistoryQueryOptions`, and `nsINavHistoryContainerResultNode` interfaces. More significantly, the `nsINavHistoryResultViewer` interface has been renamed to `nsINavHistoryResultObserver`.
* Some new notifications have been added to enable the browser to track the shutdown process of the Places service more reliably. Of these, most are for internal use only, but the `places-connection-closed` notification is available to know when the Places service has completed its shutdown process.
* The array size output parameter on several Places methods is now optional.
* Support for `<menupopup type="places">` has been removed. Instead, you need to create and populate a menu with Places information manually, instead of having it done for you. See Displaying Places information using views: Menu view for details.
### Interface changes

* The `nsIDocShell` and `nsIWebBrowser` interfaces now have a new `isActive` attribute, which is used to allow optimization of code paths for documents that aren't currently visible.
* The `nsIMemory` method `nsIMemory.isLowMemory()` has been deprecated. You should use "memory-pressure" notifications to watch for low memory situations instead.
* The API for handling redirects on HTTP channels has changed to let them be processed asynchronously. Any code that implements redirect handling using `nsIChannelEventSink.onChannelRedirect()` needs to be updated to use `nsIChannelEventSink.asyncOnChannelRedirect()` instead. This accepts a callback handler that must be called when a redirect is successfully completed.
* The `nsINavHistoryResultObserver.batching()` method has been added, providing a way to group Places operations into batches, reducing the number of update notifications delivered, which can improve performance when observers are performing relatively involved tasks (such as refreshing views).
* The long-obsolete `nsIPref` interface has finally been removed. If you haven't already switched to `nsIPrefService`, now is the time.
* The `nsISessionStore` and `nsISessionStartup` interfaces received changes to support on-demand session restore. See the `nsISessionStore.restoreLastSession()` method.
* The `nsIPrincipal` methods `nsIPrincipal.subsumes()` and `nsIPrincipal.checkMayLoad()`, as well as its `origin`, `csp`, and `URI` attributes, are now available from script; previously they were only available from native code.
* The `nsIPrompt` interface now supports tab-modal alerts; see Using tab-modal prompts for details.
* The `nsIEffectiveTLDService.getPublicSuffixFromHost()` method now correctly rejects host name starting with a period (".").
* The `mozIJSSubScriptLoader.loadSubScript()` method now has an optional argument allowing you to specify the character set of the script; if one is not provided, ASCII is assumed (as was always assumed previously).
* The `nsIAccessProxy` interface has been removed. It was an implementation detail that has outlived its usefulness.
* The `nsIContentView` and `nsIContentViewManager` interfaces have been added for Firefox Mobile. It represents a scrollable content view whose contents are actually drawn by a separate process.
* The `nsIDiskCacheStreamInternal` interface has been added.
* The `nsIExternalURLHandlerService` interface has been added.
* The `nsISyncJPAKE` interface has been added. See Firefox bug 601645.
* The `nsIINIParserWriter` interface was added in Gecko 1.9.2.4 to support writing to INI files.
### Memory management

Infallible memory allocation

Mozilla now provides infallible memory allocators that are guaranteed not to return null. You should read this article to learn how they work and how to explicitly request fallible versus infallible memory allocation.

### Other changes

* Most of the resources contained within Firefox have been combined into a single JAR archive, `omni.jar`, which improves startup performance by reducing I/O. For details, read About omni.jar.
* The `accessibility.disablecache` preference is no longer supported; it was only exposed for debugging purposes and is no longer used.
* Addons whose GUID changes from one version to another can now be updated properly.
* As a side effect of the removal of platform-specific directories in add-on bundles, you can no longer provide different default preferences for each platform.
* By default, extensions are no longer unpacked when they are installed, but are instead run directly from the XPI file. Extensions can use the unpack property in the install manifest to choose the old behavior. Extensions that use binary components, DLLs loaded using js-ctypes, search plugins, dictionaries, and window icons must specify that they need to be unpacked. Extensions that create SQLite database, or do copy things from the filesystem relatively to the extension's directory, may also need to change their code.
* You may now include extensions that automatically get installed at application startup within a customized Firefox.
Other changes
-------------

Only the root chrome.manifest file is loaded

Only the root `chrome.manifest` file is loaded now; if you need secondary manifest files to be loaded, you can use the `manifest` command in your root `chrome.manifest` to load them.

Gopher support removed

The Gopher protocol is no longer supported natively. Continued support is available via the OverbiteFF extension.

Content process event handling

In order to support out-of-process plugins and other multiple-process features, a new API has been introduced to support sending messages across processes.

Bootstrapped extensions

You can now create extensions that can be installed, uninstalled, and upgraded (or downgraded) without requiring a browser restart.

Default plugin removed

The default plugin has been removed. The application plugins folder has also been removed by default, however support for installing plugins via this folder still exists. See Firefox bug 533891.

Extension Manager replaced by Addon Manager

`nsIExtensionManager` has been replaced by AddonManager.

Child HWNDs no longer used

Firefox no longer creates child HWNDs for its internal use on Windows. If you've written an extension that uses native code to manipulate these HWNDs, your extension will not work on Firefox 4. You'll need to either stop using HWNDs or wrap your code that relies on HWNDs in an NPAPI plugin. That's a lot of work, so if you can avoid using HWNDs directly, you should.

Gesture changes

The three finger up and down swipe gestures on trackpads have been changed to, by default, open and close Firefox Panorama view (neé TabCandy). To change these back to the previous scroll-to-top and scroll-to-bottom commands, open about:config and set `browser.gesture.swipe.down` to `cmd_scrollBottom` and `browser.gesture.swipe.up` to `cmd_scrollTop`.

See also
--------

* Firefox 3.6 for developers
* Firefox 3.5 for developers
* Firefox 3 for developers
* Firefox 2 for developers
* Firefox 1.5 for developers


Firefox 14 for developers - Mozilla

Firefox 14 for developers
=========================

Firefox 14 shipped on July 17, 2012. This article lists key changes that are useful for not only Web developers to know about, but also Firefox and Gecko developers as well as add-on developers.

Changes for Web developers
--------------------------

### HTML

* The `<progress>` element is no longer incorrectly classified as a form element, and therefore no longer has a `form` attribute.
* The default modifier keys for the `accesskey` of HTML contents on Mac are changed to Control+Option. This is the same as WebKit-based browsers on Mac.
### DOM

* input events are fired also on editing host element of contenteditable editor and root element of designMode editor.
* `DOMException.code` is now deprecated per latest DOM Level 4 specification.
* The `Range.insertNode()` method now works correctly when used on collapsed ranges.
* The `MozBlobBuilder` interface has been deprecated in favor of the constructor on `Blob`. If you use `MozBlobBuilder` you'll see a warning message in the Web Console.
* The `Blob()` constructor is now available to workers (Firefox bug 736686).
* Support for the Mutation Observers has been landed. It is designed as a replacement for the Mutation Events in DOM3, which has a number of issues regarding performance.
* The `HTMLImageElement` interface's `x` and `y` properties were removed in Firefox 7.0 but restored in this release for compatibility reasons.
* The `Document` methods `execCommandShowHelp()` and `queryCommandText()`, which never did anything, have been removed.
* The `GeoPositionAddress` interface, an obsolete part of the Geolocation API, has been removed.
* `localStorage/sessionStorage` now correctly return `undefined` instead of `null` for undeclared keys through property access.ff
* The `ImageData` object has been implemented (Firefox bug 550309).
* Attributes and methods related to child nodes on `Attr` interface were obsoleted (Firefox bug 737122).
### CSS

* The `text-transform` and `font-variant` CSS properties have been fixed to correctly handle the `i` → `İ` and `ı` → `I` Turkic-specific case pairs.
* The Dutch IJ digraph is now correctly handled by `text-transform: capitalization`. Similarly the Greek letter `Σ`, which has two lowercase forms, `σ` and `ς`, is now correctly handled by `text-transform: lowercase`.
* Support for the `skew()` function has been removed from `transform` property, as it has been removed from the draft standard.
* The syntax for `border-image` has been updated to match the latest revision of the specification; it no longer accepts a trailing slash ("/").
### JavaScript

*No change.*

### MathML

* The syntax of the `statusline` action type on `<maction>` elements has been adjusted to follow the MathML specification.
### HTTP

* Gecko now supports the new HTTP `308 Permanent Redirect` status code. As Gecko doesn't make a distinction between permanent and temporary redirects, it behaves like the `307 Temporary Redirect` status code, as it forbids the user agent from changing the HTTP method used between the two requests (`POST` will stay `POST`, `GET` will stay `GET`).
Changes for Mozilla and add-on developers
-----------------------------------------

### JavaScript code modules

#### source-editor.jsm

* Added a keyboard shortcut to toggle commenting for the current selection (Ctrl-/ or Cmd-/ on Mac OS X).
* Added the Ctrl-[ and Ctrl-] keyboard shortcuts for moving the text input position to the beginning and end of the current block.
* Added the new `getLineStart()` and `getLineEnd()` methods.
### XUL

* Added the new `fullscreenbutton` attribute to the `<window>` element; setting this to `true` adds a button to the window's chrome to enable full screen mode.
### Interfaces

* The `nsILocalFile` interface has been merged into `nsIFile` (bug 682360).
* The methods in `nsIPlacesImportExportService` for importing bookmarks have all been removed in favor of the `BookmarkHTMLUtils.jsm` JavaScript code module.
* The `nsIDOMGeoPositionAddress` interface has been removed.
* The `getItemGUID`, `setItemGUID` and `getItemIdForGUID` methods have been removed from `nsINavBookmarksService` (Firefox bug 715355).
### Spellchecking

* Dictionary names are now parsed as full BCP 47 language tags (bug 730209, bug 741842). Developers are encouraged to not hard-code the name of their language in their dictionary names.
See also
--------

* Firefox 13 for developers
* Firefox 12 for developers
* Firefox 11 for developers
* Firefox 10 for developers
* Firefox 9 for developers
* Firefox 8 for developers
* Firefox 7 for developers
* Firefox 6 for developers
* Firefox 5 for developers
* Firefox 4 for developers
* Firefox 3.6 for developers
* Firefox 3.5 for developers
* Firefox 3 for developers
* Firefox 2 for developers
* Firefox 1.5 for developers


Firefox 115 for developers - Mozilla

Firefox 115 for developers
==========================

This article provides information about the changes in Firefox 115 that affect developers. Firefox 115 was released on July 04, 2023.

Changes for web developers
--------------------------

### HTML

* The `modulepreload` keyword for the `rel` attribute of the `<link>` element is now supported.
 This allows early (and asynchronous) fetching of module scripts and their dependencies in parallel, which are then stored in the document's module map (Firefox bug 1425310).
### CSS

* The CSS `animation-composition` property is now supported by default. You can use this property to specify the composite operation to use when multiple animations affect the same property simultaneously. (Firefox bug 1823862).
* The `supports-conditions` in the CSS `@import` at-rule `supports()` function is now supported by default. This feature allows stylesheets to be imported only if the specified feature is supported in the user's browser. (Firefox bug 1830779).
### JavaScript

* The `Array.fromAsync()` static method is now supported.
 The method asynchronously returns a new, shallow-copied `Array` instance from an async iterable, iterable, or array-like object (Firefox bug 1795816).
* The `Array` and `TypedArray` methods `Array.toReversed()`, `Array.toSorted()`, `Array.toSpliced()`, `Array.with()`, `TypedArrays.toReversed()`, `TypedArrays.toSorted()`, and `TypedArrays.with()` are now supported.
 These methods return a new array with elements that have been shallow copied (similarly named methods without the `to` prefix modify the array elements in place).
 (Firefox bug 1811057).
### SVG

No notable changes.

### HTTP

* The `Sec-Purpose` HTTP fetch metadata request header is now included in requests to Prefetch resources.
 This allows servers to provide any special handling that might be needed, such as adjusting the caching expiry for the request (Firefox bug 1836328).
### APIs

* The `Response.json()` static method is now supported, making it easier to construct `Response` objects for returning JSON data.
 The method will be useful for service workers and any other code that needs to respond to browser requests with JSON data (Firefox bug 1758943).
* The `URL.canParse()` static method can now be used to parse and validate an absolute URL, or a relative URL and base URL.
 This provides a fast and easy way to check if URLs are valid, instead of constructing them within a `try...catch` block and handling exceptions.
 (Firefox bug 1823354).
* The `URLSearchParams.has()` and `URLSearchParams.delete()` methods now support the optional `value` argument.
 This allows matching a search parameter on both the `name` and `value`, making it possible to work with query strings that contain multiple search parameters that have the same name.
 (Firefox bug 1831587).

#### Removals

* The deprecated `mozPreservesPitch` alias of HTMLMediaElement.preservesPitch has been disabled by default, and may be fully removed in a future release (Firefox bug 1831205).
### WebDriver conformance (WebDriver BiDi, Marionette)

#### WebDriver BiDi

* The payload now always includes stack traces for responses and events without capping it after the first 50 "throw" usages in a realm (Firefox bug 1791715).
* When using `input.performActions`, any ongoing wheel transaction is now reset at the end of the command to not retain state and to not leak into following actions within the same tab (Firefox bug 1821733).
* When using a `pointerMove` action with `input.performActions`, an invalid element origin now correctly raises a "no such error" failure (Firefox bug 1832028).
* A race condition for the initial page load has been fixed that could appear when directly interacting with a newly opened tab or window (Firefox bug 1832891).

#### Marionette

* Both the commands `WebDriver:GetComputedLabel` and `WebDriver:GetComputedRole` now correctly wait for the requested accessibility object for an element to exist if it just got inserted into the DOM (Firefox bug 1828816).
* All instances of `window.setTimeout()` in our privileged code running in content processes now use a variant timer that is not affected by the throttling of the timers in case the given tab for automation is in the background.
Changes for add-on developers
-----------------------------

* To support its deprecation from Manifest V3 extensions, manifest key property `browser_style` defaults to `false` in `options_ui` and `sidebar_action` for Manifest V3 extensions (Firefox bug 1830710). See Manifest v3 migration for information about transitioning from `browser_style` in Manifest V3 extensions.
* The `commands.onChanged` event, which enables web extensions to listen for changes to command shortcuts, has been added (Firefox bug 1801531).
* Support has been added for `storage.session`, which provides the ability to store data in memory for the duration of the browser session (Firefox bug 18237131).
Older versions
--------------

* Firefox 114 for developers
* Firefox 113 for developers
* Firefox 112 for developers
* Firefox 111 for developers
* Firefox 110 for developers
* Firefox 109 for developers
* Firefox 108 for developers
* Firefox 107 for developers
* Firefox 106 for developers
* Firefox 105 for developers
* Firefox 104 for developers
* Firefox 103 for developers
* Firefox 102 for developers
* Firefox 101 for developers
* Firefox 100 for developers
* Firefox 99 for developers
* Firefox 98 for developers
* Firefox 97 for developers
* Firefox 96 for developers
* Firefox 95 for developers
* Firefox 94 for developers
* Firefox 93 for developers
* Firefox 92 for developers
* Firefox 91 for developers
* Firefox 90 for developers
* Firefox 89 for developers
* Firefox 88 for developers
* Firefox 87 for developers
* Firefox 86 for developers
* Firefox 85 for developers
* Firefox 84 for developers


Firefox 76 for developers - Mozilla

Firefox 76 for developers
=========================

This article provides information about the changes in Firefox 76 that will affect developers. Firefox 76 was released on May 5, 2020.

**See also the accompanying hacks post — Firefox 76: Audio worklets and other tricks.**

Changes for web developers
--------------------------

### Developer tools

#### Debugger

* You can now enable/disable blackboxing of source groups and folders listed in the Source list pane via context menu options (Firefox bug 1118152).
* The Call stack pane's *Copy stack trace* context menu option now copies full URLs, not just filenames (Firefox bug 1619039).

#### Network monitor

* In the network request list, you can now double-click a column divider to resize the column to the left of it to fit its contents (Firefox bug 1615102).
* The network request *Copy > Copy as cURL* context menu option has a new option available, `--globoff`, which suppresses cURL's globbing (wildcard matching) feature if the copied URL includes square bracket characters (Firefox bug 1549773).
* The *Messages* tab of the details pane for web socket requests has a new filter — *Control* — for showing control frames, and the filters are now grouped together into a selection list (Firefox bug 1566780).

#### Web console

* In multi-line mode, code snippets longer than five lines are abbreviated to five lines, preceded by a disclosure triangle (or "twisty"), and followed by an ellipsis (…). You can click anywhere in this area to show the code, and click again in that area to collapse it (Firefox bug 1578212).
* DOM element references outputted into the console now have a "Reveal in inspector" context menu option, which shows the element in the HTML pane of the Page inspector (Firefox bug 1612276).

#### Remote debugging

* Because of differences in DevTools versions, it is not possible to debug releases of Firefox for Android that are based on version 68, from desktop Firefox versions 69 or later. When attempting to do this, the Firefox desktop browser will now show a message informing the user of this problem, and offering possible next steps (Firefox bug 1625906). See Connection to Firefox for Android 68 for more information.
### HTML

* The `<input>` element's `min` and `max` attributes now work correctly when the value of `min` is greater than the value of `max` for control types whose values are periodic (that is, values that wrap around at some point). This is particularly helpful, for example, with date and time inputs, where you might want to specify a time range of 11 PM to 2 AM (Firefox bug 1608010).
### CSS

* Firefox now supports CSS colors level 4 system colors (Firefox bug 1590894).
### SVG

*No changes.*

### JavaScript

* The `numberingSystem` and `calendar` options of the `Intl.NumberFormat`, `Intl.DateTimeFormat`, and `Intl.RelativeTimeFormat` constructors are now enabled by default (Firefox bug 1625975).
### APIs

#### New APIs

* Firefox now supports audio worklets by default, with support for `AudioContext.audioWorklet`, which lets you use the `AudioWorkletProcessor` and `AudioWorkletNode` interfaces to process audio in real time off the main thread (Firefox bug 1616725).

#### DOM

* UI-parts related items in the `windowFeatures` parameter of `window.open()` can no longer control the visibility of each UI part separately, but become a condition for whether to open a popup or not (Firefox bug 1507375).
* Attempts to navigate to an unknown protocol using methods such as `location.href` or `<meta http-equiv="refresh">` are now blocked (see Firefox bug 1528305.
* The `IntersectionObserver()` constructor now accepts a `Document` object as its `root`, as well as an `Element` object (Firefox bug 1623623). This lets you explicitly use a window's entire content area as the intersection bounds.
* The Fetch API now supports the `audioworklet` `destination` for requests. This causes received data to be dispatched to an `AudioWorklet` (Firefox bug 1402784).

#### Removals

* We've completely removed the Window `appinstalled` event (and the associated `Window.onappinstalled` handler property) — these were never shipped, and have now been removed from the Web Manifest spec (Firefox bug 1625384).
### HTTP

*No changes.*

### Security

*No changes.*

### WebDriver conformance (Marionette)

* Firefox no longer reports `false` for `navigator.webdriver` when used for automation / testing via geckodriver (Firefox bug 1632556).
Changes for add-on developers
-----------------------------

*No changes.*

Older versions
--------------

* Firefox 75 for developers
* Firefox 74 for developers
* Firefox 73 for developers
* Firefox 72 for developers
* Firefox 71 for developers
* Firefox 70 for developers
* Firefox 69 for developers
* Firefox 68 for developers
* Firefox 67 for developers
* Firefox 66 for developers
* Firefox 65 for developers
* Firefox 64 for developers
* Firefox 63 for developers
* Firefox 62 for developers
* Firefox 61 for developers
* Firefox 60 for developers
* Firefox 59 for developers
* Firefox 58 for developers
* Firefox 57 for developers
* Firefox 56 for developers
* Firefox 55 for developers
* Firefox 54 for developers
* Firefox 53 for developers
* Firefox 52 for developers
* Firefox 51 for developers
* Firefox 50 for developers
* Firefox 49 for developers
* Firefox 48 for developers
* Firefox 47 for developers
* Firefox 46 for developers
* Firefox 45 for developers


Firefox 47 for developers - Mozilla

Firefox 47 for developers
=========================

To test the latest developer features of Firefox, install Firefox Developer Edition Firefox 47 was released on June 6, 2016. 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.

Changes for Web developers
--------------------------

### Developer Tools

* User-agent spoofing from the Responsive mode
* Retaining paths panel in memory tool
* Service workers and Push API debugging
    + about:debugging dashboard for workers
    + Cached requests are now shown in Network Monitor
    + Support for cache storage in Storage Inspector
* Ability to filter Storage Inspector entries
* Console now detects incomplete input and switches multi-line mode
* Updated breakpoint style in Debugger
* Prevent panels from hiding automatically using the Browser Toolbox, to aid browser and add-on debugging
* Font inspector has been disabled by default
* 3D view has been removed
* Developer tools theme refresh
* Disable the Font Panel (Firefox bug 1247723).
### HTML

*No change.*

### CSS

* Support for the `::backdrop` pseudo-element has been added (Firefox bug 1064843).
* The case-insensitive modifier `i` (like in `[foo=bar i]`) for attribute selectors has been implemented (Firefox bug 888190).
* An experimental implementation of CSS Mask Image properties landed. For the moment, this will only be available on Nightly versions of Firefox.y: shorthand version of `mask`, as well as `mask-repeat`, `mask-position`, `mask-size` are now available (Firefox bug 686281).
* The `clip-path` property now experimentally supports `polygon()`, `ellipse()`, and `circle()` on HTML elements (does not support inset() and path()), behind the pref `layout.css.clip-path-shapes.enabled` that defaults to `false` (Firefox bug 1075457). Interpolation (and therefore animation) of these values is not yet supported.
* Our still experimental grid implementation has been updated:
    + `align-content`: `normal` behaves now as `stretch` for grid containers (Firefox bug 1237754).
    + The order of column/row values for `grid`, `grid-template`, and `grid-gap` properties has been swapped (Firefox bug 1251999).
* The `display-mode` media feature is now supported (Firefox bug 1104916).
* The value `true` of `text-align` and `text-align-last` has been renamed to `unsafe` (Firefox bug 1250342).
### JavaScript

* The new ES2017 `Object.values()` and `Object.entries()` methods have been implemented (Firefox bug 1232639).
* The deprecated, old Proxy API (`Proxy.create` and `Proxy.createFunction`) now presents a deprecation warning in the console and will be removed in a future version. Use the standard `Proxy` object instead (Firefox bug 892903).
* Support for the deprecated non-standard `flags` argument of `String.prototype.``match`/`search`/`replace` has been dropped in non-release builds (Firefox bug 1245801).
* As per the new ES2016 specification, the `Proxy` enumerate trap for `for...in` statements has been removed (Firefox bug 1246318).
* The `Array.prototype.indexOf()` and `Array.prototype.lastIndexOf()` methods (and their `TypedArray` equivalents) have been updated to never return `-0` as per the ECMAScript specification (Firefox bug 1242043).
### Interfaces/APIs/DOM

#### DOM & HTML DOM

* The property `Document.scrollingElement` has been implemented behind the pref `dom.document.scrollingElement.enabled` that defaults to `false` (Firefox bug 1153322).

#### WebGL

*No change.*

#### IndexedDB

* The `IDBKeyRange.includes()` method has been implemented (Firefox bug 1251498).

#### Service Worker and related APIs

* The `Request()` constructor can now accept a referrer option in its init object (Firefox bug 1251448).
* The `Request.referrerPolicy` property is now supported (Firefox bug 1251872).
* Service workers and Push have been disabled in the Firefox 45 Extended Support Release (ESR) (Firefox bug 1232029).

#### WebRTC

* Support for the `RTCIceServer` dictionary has been updated in keeping with revisions to the WebGL 1.0 specification by adding support for the credentialType property. This property is a string that specifies whether the credential is a password or a token. Currently, Firefox only supports `"password"`.

#### New APIs

*No change.*

#### Others

* `Cache.add()` and `Cache.addAll()` now raises a `TypeError` exception if the response status is not in the `200` range (Firefox bug 1244764).
* The App installation and management APIs (`navigator.mozApps.*`) are no longer exposed to non-Firefox OS platforms (Firefox bug 1238576).
* Web Crypto API methods can now use the RSA-PSS cryptographic algorithm (Firefox bug 1191936).
* The Permissions API has had the `Permissions.revoke()` method added (Firefox bug 1197461).
* The Browser API, which extends the functionality of `<iframe>`s to allow the creation of frames for displaying web content using HTML — and was previously only available in Firefox OS — is now available to desktop chrome code too (Firefox bug 1238160).
* The Notification API's `requestPermission()` method has been updated from a callback to a promised-based syntax (Firefox bug 1241278).
* The Fullscreen API has been updated to the latest spec and unprefixed. Some methods have been renamed or have seen their capitalization changed (Firefox bug 743198). Note that this is behind the `full-screen-api.unprefix.enabled` preference, defaulting to false (Firefox bug 1268749).
### Audio/Video

* Now WAV file with u-law compression encoding can be played(Firefox bug 851530).
* Widevine Content Decryption Module provided by Google Inc. is available via the Encrypted Media Extensions API for use with MP4 (only; see Firefox bug 1257716 for EME-with-WebM support) on Windows Vista and later and on Mac OS X enabling migration off Silverlight (Firefox bug 1265270).
HTTP
----

* The default value of the `Accept` header for images is now `*/*` instead of `image/png,image/*;q=0.8,*/*;q=0.5` (Firefox bug 1249474).
Networking
----------

*No change.*

Security
--------

* URLs with the `view-source:` protocol don't open the View Source tool anymore when used from a Web page (Firefox bug 1172165).
* The Firefox click-to-activate plugin whitelist has been removed: only Flash doesn't need to be clicked to be activated (Firefox bug 1263630).
Changes for add-on and Mozilla developers
-----------------------------------------

### Interfaces

* The CSS tokenizer is now available in JavaScript for add-ons (Firefox bug 1152033).
### FUEL

The FUEL JavaScript library, introduced back in Firefox 3, **has been removed**. This library was designed to aid in add-on development and with the introduction of the Add-on SDK and, now, by WebExtensions support, is no longer useful. (Firefox bug 1090880)

### XUL

*No change.*

### JavaScript code modules

*No change.*

### XPCOM

*No change.*

### Other

*No change.*

Older versions
--------------

* Firefox 46 for developers
* Firefox 45 for developers
* Firefox 44 for developers
* Firefox 43 for developers
* Firefox 42 for developers
* Firefox 41 for developers
* Firefox 40 for developers
* Firefox 39 for developers
* Firefox 38 for developers
* Firefox 37 for developers
* Firefox 36 for developers
* Firefox 35 for developers
* Firefox 34 for developers
* Firefox 33 for developers
* Firefox 32 for developers
* Firefox 31 for developers
* Firefox 30 for developers
* Firefox 29 for developers
* Firefox 28 for developers
* Firefox 27 for developers
* Firefox 26 for developers
* Firefox 25 for developers
* Firefox 24 for developers
* Firefox 23 for developers
* Firefox 22 for developers
* Firefox 21 for developers
* Firefox 20 for developers
* Firefox 19 for developers
* Firefox 18 for developers
* Firefox 17 for developers
* Firefox 16 for developers


Firefox 10 for developers - Mozilla

Firefox 10 for developers
=========================

Firefox 10 shipped on January 31, 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.

**Note:** Firefox 10 is the first release of this browser with two digits. This may lead to problem with some UA-sniffing scripts. Be sure to check them, and those contained in 3rd-party software you embed in your pages, like libraries. For more information about this, look at the Firefox goes 2-digit article on hack.mozilla.org.

Changes for Web developers
--------------------------

### HTML

* The new HTML5 `<bdi>` element, bi-directional isolation, allowing isolation of parts of text with a different directionality has been implemented. This is especially useful when displaying text with an unknown directionality, coming from a database for example, in the middle of text with a known, and potentially, different one.
* You may now specify a fragment of "top" for the `href` attribute to create a link to the top of the page. This used to work, then went away for a while, and now it's back, for compatibility with the HTML5 specification. For example: `<a href="#top">Return to top of page</a>`.
### JavaScript

* The method `WeakMap.set()` now returns `undefined`, instead of itself.
* A bug was introduced in regular expression handling in Firefox 7; this has been fixed. See Firefox bug 683838 if you want the gory details.
* You can no longer use the deprecated EcmaScript for XML (E4X) syntax while in ECMAScript 5 strict mode (that is, after `"use strict;"`).
### DOM

#### DOM3 Events

* The DOM Event method `event.stopImmediatePropagation` has been implemented.
* The mouse events `mouseenter` and `mouseleave` have been implemented.

#### DOM4

* The attribute `document.xmlVersion` (which was only gettable and not settable) has been removed as it has been deprecated in the DOM4 specification. The article for `document.xmlVersion` now suggests a way to detect whether the document is HTML or XML without using that property.
* The attribute `document.xmlStandalone` has been removed as it has been deprecated in the DOM4 specification.
* The attribute `document.xmlEncoding` has been removed as it has been deprecated in the DOM4 specification.
* The attribute `text.isElementContentWhiteSpace` has been removed as it has been deprecated in the DOM4 specification.
* The method `text.replaceWholeText` has been removed as it has been deprecated in the DOM4 specification.
* The method `node.isSameNode` has been removed as it has been deprecated in the DOM4 specification. Instead of `node1.isSameNode(node2)`, you can use the `===` operator, like this: `node1 === node2`.

#### Page Visibility API

* The Page Visibility API has been implemented (prefixed): `document.mozHidden`, `document.mozVisibilityState` are available and the event `mozvisibilitychanged` is sent when the state is modified.

#### Full Screen API

* Support for `Document/fullscreenEnabled` has been added.
* The new `:-moz-full-screen-ancestor` property has been added. This lets you match against elements that are ancestors of an element in full screen mode.

#### Battery API

* Experimental support for `window.navigator.mozBattery` has been added (can be enabled setting the preference `dom.battery.enabled` to `true` and will be enabled by default starting with Firefox 11).

#### Canvas

* The `createPattern()` method now throws an exception if a zero-sized source canvas is specified.
* If you use a non-finite value for any of the numeric parameters to `putImageData()`, the call is now silently ignored instead of throwing an exception, in keeping with the specification.

#### WebGL

* Firefox 10 now supports the `OES_standard_derivatives` extension.
* New preferences have been added to help test WebGL code for compatibility with minimally-capable devices on your full development platform.

#### Web Workers

* The attribute `XMLHttpRequest.responseType` and `XMLHttpRequest.response` are now available from inside Workers.
* The `Worker()` constructor now accepts data URLs.

#### IndexedDB

Great progress has been made to update IndexedDB to the latest draft specification. This effort will continue in Firefox 11.

* The `IDBIndex.count()` and `IDBObjectStore.count()` methods have been added.
* The `IDBCursor.advance()` method has been added.
* When encountering an unknown optional parameter in `IDBObjectStore.createIndex()` or `IDBDatabase.createObjectStore()`, Gecko will not fire an exception anymore, but ignore it.
* When `IDBTransaction.abort()` is called, all pending `IDBRequest` have their `errorCode` set to `ABORT_ERROR`.
* The methods `IDBObjectStore.delete()` and `IDBCursor.delete()` now set the `result` attribute of the returned `IDBRequest` to `undefined`.
* The method `IDBDatabase.setVersion()` has been removed as it was removed from the latest spec. The version of the database is given through the `IDBFactory.open()` method which has been updated and the `onupgradeneeded` callback allows the schema of the database to be upgraded. The version itself has been changed from a `DOMString` to an `unsigned long long`. The `IDBVersionChangeRequest` interface has been removed and replaced by the new `IDBOpenDBRequest` interface.
* When opening a database with `IDBFactory.open()`, if the `version` parameter is not provided and the database does not exist, then it will be created with a version of `1`.
* The method `IDBFactory.deleteDatabase()` method has been added.
* Methods that search via an `IDBKeyRange` (such as `IDBObjectStore.openCursor` and `IDBIndex.getKey`) can accept either a single key or key range.

#### Other

* When the proper MIME type is passed, `image/svg+xml`, the `DOMParser` now creates a `SVGDocument` when given a string with SVG.
* In the past, when `element.setAttribute()` parsed integers, it would report an error if the integer included any non-numeric characters (for example "42foo"). Now it correctly truncates this as the number 42, in accordance with the specification.
* The ESC key no longer incorrectly results in the `onkeydown` handler incorrectly getting called.
* The `NameList` interface is no longer implemented; it previously had an implementation with no way to actually get access to one.
* The `document.createProcessingInstruction()` method now works on HTML documents as well as XML documents. `ProcessingInstruction` nodes are still only supported on XML documents, but since nodes can be moved among documents, it's helpful to be able to create them on HTML documents as well.
* The `XMLHttpRequest` `responseType` "`moz-json`" introduced in Firefox 9 has been updated to the latest draft of the specification and has been unprefixed. See note in Firefox bug 707142.
### CSS

* CSS 3D Transforms are now supported. This includes support for the `transform-style`, `perspective`, `perspective-origin` and `backface-visibility` properties, as well as for 3D transform functions in the `transform` and `<transform-function>` properties. See Using CSS transforms for details.
* Two new values for the CSS property `unicode-bidi` have been added: `-moz-isolation` and `-moz-plaintext`. The `-moz-isolation` value isolates, from a directionality point of view, the element from its environment, letting it have a different directionality. An element with `unicode-bidi:-moz-isolation` behaves like a `<bdi>` element. The `-moz-plaintext` indicates the browser to use the Unicode browser heuristic to determine directionality and not the CSS `direction` property.
* The CSS `gradient/linear-gradient()` and `gradient/repeating-linear-gradient()` properties have been updated to support the new `to` syntax and the *magic corner* algorithm. This allows to give a precise color on the corner of a gradient-filled box.
* The `text-overflow` property's handling of cases in which the box overflows on both sides while the `text-overflow` property is set to overflow on only one has been corrected.
* Handling of the `position` property on elements inside positioned `<table>` elements has been fixed. **This change will affect layout of pages; however, we now comply with the CSS specification and with other browsers, so this should be easy to fix.**
* Margin collapsing around `<table>` elements has been fixed to match the CSS specification. Previously, table elements' margins would not be collapsed along with other adjacent elements, leading to incorrect layout. **This change will affect layout of pages; however, we now comply with the CSS specification and with other browsers, so this should be easy to fix.**
### SVG

* The `<mask>` element has been updated to support both sRGB and linearRGB, and now defaults to sRGB, in compliance with the latest revision of the SVG 1.1 specification.
### Networking

* The HTTP `Accept-Charset` header is no longer sent in HTTP requests. In its absence, servers should respond by sending UTF-8.
### Developer tools

* The `console` object has two new methods, `console.time()` and `console.timeEnd()`, which can be used to set timers on a page.
* The new Page Inspector has been added, providing an excellent way to examine and manipulate the HTML and CSS behind your content.
Changes for Mozilla and add-on developers
-----------------------------------------

For an overview of likely issues that may arise when updating your add-ons to support Firefox 10, see Updating add-ons for Firefox 10.

**Note:** The old `PRBool` data type has been retired! Anywhere in the documentation that refers to it now uses the standard C++ `bool` type instead. Documentation will be updated in the future, but for now, just keep this in mind.

### Manifests

* Support for `<em:strictCompatibility>` has been added to the install manifest. It allows add-ons authors to opt in to checking the maximum version of their extension. If set to `true` the add-on will be disabled if the application version is greater than `<em:maxVersion>`. Firefox 10 defaults to add-ons being compatible, regardless of their specified maximum version. This flag overrides that preference. You should set this if your add-on does things that are likely to be broken by Firefox updates, **but not** if your add-on has a binary component, since such add-ons always get strictly checked (remember that binary components must always be recompiled for each major Firefox release).
* If you wish to revert to the old behavior — that is, to strict compatibility checking for all add-ons, regardless of the value of the `strictCompatibility` flag in their manifests, you can set the `extensions.strictCompatibility` preference to `true`.
### XUL

* Bootstrapped add-ons using a `chrome.manifest` file now have the manifest file registered automatically. See the section Adding user interface with a chrome.manifest for details.
### XPConnect

* Several new properties and methods have been added to `Components.utils`, granting access to assorted debugging-related information.
### Interface changes

* The `mozISpellCheckingEngine` and `nsIEditorSpellCheck` interfaces have been updated to allow restartless add-ons to add dictionaries to the spell checker.
* The `nsIBrowserHistory.lastPageVisited` attribute has been removed.
* The `nsIDocumentViewer` interface has been merged into `nsIContentViewer`.
* The `nsIURIFixup` interface has a new flag, `FIXUP_FLAG_USE_UTF8`, which lets you tell it to use UTF-8 instead of the platform character set, when doing conversions.
### Plug-in changes

* The new variable `NPNVdocumentOrigin` has been added; this returns the document origin, and is more secure than `window.location`.
### Build system changes

* The `--disable-rdf` build option, which actually made it impossible to successfully build, has been removed. Work is ongoing on being able to actually remove RDF support entirely, but at present XUL still requires it to function. See Firefox bug 559505 for progress on removing the last vestiges of RDF being required.
* The `--disable-smil` build option has been removed.
### See also

* Firefox 9 for developers
* Firefox 8 for developers
* Firefox 7 for developers
* Firefox 6 for developers
* Firefox 5 for developers
* Firefox 4 for developers
* Firefox 3.6 for developers
* Firefox 3.5 for developers
* Firefox 3 for developers
* Firefox 2 for developers
* Firefox 1.5 for developers


Firefox 111 for developers - Mozilla

Firefox 111 for developers
==========================

This article provides information about the changes in Firefox 111 that affect developers. Firefox 111 was released on March 14, 2023.

Changes for web developers
--------------------------

### HTML

* The `autocapitalize` global attribute is now supported by default. The default value for the attribute is `none`, so no capitalization occurs (Firefox bug 1692007).
* The `translate` global attribute is now supported (Firefox bug 1418449).
### CSS

* CSS color functions `color()`, `lab()`, `lch()`, `oklab()`, and `oklch()` are now supported.
 These features are disabled by default and can be enabled by setting the preference `layout.css.more_color_4.enabled` to true.
 For more information, see the CSS color value documentation (Firefox bug 1352757 and Firefox bug 1128204).
### JavaScript

No notable changes.

### SVG

* The `context-stroke` and `context-fill` values are now supported inside `<marker>` elements.
 For more information on using these values with `fill` and `stroke` properties, see the `<marker>` documentation (Firefox bug 752638).
### HTTP

* The HTTP `Authorization` header is removed from cross origin redirects.
 See Firefox bug 1802086 for more details.
### APIs

* Origin private file system (OPFS) is now supported when using the File System API.
 The data in this file system is origin-specific: permission prompts are not required to access files, and clearing data for the site/origin deletes the storage.
 The OPFS is accessed with the `StorageManager.getDirectory()` method, by calling `navigator.storage.getDirectory()` in a worker or the main thread.
 See Firefox bug 1785123 for more details.
* The HTTP `Authorization` header is removed from `fetch()` and `XMLHttpRequest` requests that are redirected cross-origin (`fetch()` headers may be added by developers using the `option.headers` argument).
 See Firefox bug 1802086 for more details.

#### DOM

* The `FormData` constructor now accepts a second optional `submitter` parameter to specify a submit button. If the button has a name or is an image button, it will contribute to the form data set. This makes it possible to create a `FormData` object with the same data set as a vanilla form submission triggered by the button. See Firefox bug 1812696 for more details.

#### Media, WebRTC, and Web Audio

* `RTCInboundRtpStreamStats.trackIdentifier` is now supported.
 This allows developers to associate `inbound-rtp` statistics with a particular track when using `RTCPeerConnection.getStats()`.
 (For more information see Firefox bug 1804676.)
### WebDriver conformance (WebDriver BiDi, Marionette)

#### WebDriver BiDi

* Changed the behaviors for handling stale elements checks based on recently updated WebDriver classic specification. See Firefox bug 1808894 for more details.

#### Marionette

* Fixed an issue where returning a ShadowRoot from `WebDriver:ExecuteScript` causes a `cyclic object value` error. See Firefox bug 1764594 for more details.
Changes for add-on developers
-----------------------------

* `matchDiacritics` has been added to the `Find.find` API. This option enables searches to distinguish between accented letters and their base letters. For example, when set to `true`, searching for "résumé" does not find a match for "resume" Firefox bug 1680606.
* `search.query` has been added, providing search API compatibility with Chromium-based browsers Firefox bug 1804357.
* The `disposition` property has been added to `search.search`, enabling results to be displayed in a new tab or window Firefox bug 1811274.
Older versions
--------------

* Firefox 110 for developers
* Firefox 109 for developers
* Firefox 108 for developers
* Firefox 107 for developers
* Firefox 106 for developers
* Firefox 105 for developers
* Firefox 104 for developers
* Firefox 103 for developers
* Firefox 102 for developers
* Firefox 101 for developers
* Firefox 100 for developers
* Firefox 99 for developers
* Firefox 98 for developers
* Firefox 97 for developers
* Firefox 96 for developers
* Firefox 95 for developers
* Firefox 94 for developers
* Firefox 93 for developers
* Firefox 92 for developers
* Firefox 91 for developers
* Firefox 90 for developers
* Firefox 89 for developers
* Firefox 88 for developers
* Firefox 87 for developers
* Firefox 86 for developers
* Firefox 85 for developers
* Firefox 84 for developers
* Firefox 83 for developers
* Firefox 82 for developers
* Firefox 81 for developers
* Firefox 80 for developers


Firefox 83 for developers - Mozilla

Firefox 83 for developers
=========================

This article provides information about the changes in Firefox 83 that will affect developers. Firefox 83 was released on November 17, 2020.

**Note:** See also Firefox 83 is upon us on Mozilla hacks

Changes for web developers
--------------------------

### Developer Tools

* When using the `:screenshot` helper command in the Web Console, the `--dpr` parameter is no longer ignored when taking a fullscreen screenshot using `--fullpage` (Firefox bug 1645284).
* Developers can use the `scroll` badge in the Page Inspector to Debug scrollable overflow. Selecting the badge highlights elements that are *causing* overflow and marks them with the `overflow` badge (Firefox bug 1669129).
### HTML/XML

* The `crossorigin` attribute is now supported for `<link rel=icon>` (Firefox bug 1661075).
* The `displaystyle` attribute is now implemented for all MathML elements (Firefox bug 1666075).
### CSS

* The vendor prefixed `:-moz-any()` is now aliased to the standard `:is()` CSS pseudo-class function (Firefox bug 1666086).
* We've added support for CSS Conic Gradients (Firefox bug 1632351) and (Firefox bug 1175958).
### JavaScript

* `Intl[@@toStringTag]` has been added, returning a default value of `Intl` (recent addition to the ECMA spec). (Firefox bug 1670053)
### HTTP

*No changes.*

### APIs

*No changes.*

### WebDriver conformance (Marionette)

* We've removed preliminary support for `WebDriver:SwitchToShadowRoot`, which hasn't been added to the WebDriver specification yet (Firefox bug 1662468).
* We fixed a bug in `WebDriver:Back` and `WebDriver:Forward` that caused Marionette to hang when the navigation was triggered from within an `<iframe>` that gets removed (Firefox bug 1672758).
Changes for add-on developers
-----------------------------

*No changes.*

Older versions
--------------

* Firefox 82 for developers
* Firefox 81 for developers
* Firefox 80 for developers
* Firefox 79 for developers
* Firefox 78 for developers
* Firefox 77 for developers
* Firefox 76 for developers
* Firefox 75 for developers
* Firefox 74 for developers
* Firefox 73 for developers
* Firefox 72 for developers
* Firefox 71 for developers
* Firefox 70 for developers
* Firefox 69 for developers
* Firefox 68 for developers
* Firefox 67 for developers
* Firefox 66 for developers
* Firefox 65 for developers
* Firefox 64 for developers
* Firefox 63 for developers
* Firefox 62 for developers
* Firefox 61 for developers
* Firefox 60 for developers
* Firefox 59 for developers
* Firefox 58 for developers
* Firefox 57 for developers
* Firefox 56 for developers
* Firefox 55 for developers
* Firefox 54 for developers
* Firefox 53 for developers
* Firefox 52 for developers


Firefox 120 for developers - Mozilla

Firefox 120 for developers
==========================

This article provides information about the changes in Firefox 120 that affect developers. Firefox 120 was released on November 21, 2023.

Changes for web developers
--------------------------

### HTML

* Support for the `media` attribute in the `<source>` element has been reintroduced and expanded to include `<audio>` and `<video>` elements. This attribute was first added in Firefox 15 but was removed in Firefox 53 when its use was limited to `<source>` element within `<picture>`. With this release, the `media` attribute will be available in `<source>` elements within `<audio>`, `<video>`, and `<picture>` (Firefox bug 1836128).
### CSS

* The `light-dark()` CSS Color function is now supported. This allows the setting of a colors for both light & dark without the need for `prefers-color-scheme` media feature (Firefox bug 1856999).
* The `lh` and `rlh` line height units are now supported. These allow setting properties relative to the line height of an element, for example, precisely aligning background decoration with multiline text (Firefox bug 1310170).

#### Removals

* The non-standard `-moz-image-rect()` CSS function for clipping background images has been removed. First introduced in Firefox 4, this function was never standardized or implemented in other browsers (Firefox bug 1856999).
### JavaScript

* `Date.parse()` now accepts several additional date formats:
    + Numeric dashed dates which do not meet the formal ISO standard are now accepted (Firefox bug 1557650), including:
        - `"01-12-1999"` (month first)
        - `"1999-1-5"` (single-digit month or day)
        - `"10000-01-12"` (year > 9999)
        - `"99-01-05"` or `"01-05-99"` (2-digit year, year must be >31 if it comes first)
        - `"1999-01-05 10:00:00"` (space between date and time).These dates will be parsed with behavior typical of other non-ISO dates, such as local time zone and month rollover (April 31 rolls over to May 1 since April 31 doesn't exist).
    + Requirements for characters directly following numbers have been loosened to accept new formats (Firefox bug 449921), including:
        - `"DDMonYYYY"`
        - `"Mon.DD.YYYY"`
        - `"DD.Mon.YYYY"`
        - `"YYYY.MM.DD"`
        - `"Mon DD YYYY hh:mmXm"` (`am`/`pm` directly following time)
    + Timezone `'Z'` is now accepted for non-ISO formats (e.g. `Jan 1 1970 10:00Z`) (Firefox bug 1852422)
### SVG

No notable changes

### HTTP

* The `103 Early Hints` HTTP information response status code is enabled for preconnecting to a particular origin (that the page is likely to need resources from).
 For more details see Firefox bug 1858712.
* Firefox supports the Global Privacy Control `Sec-GPC` request header, which may be sent to indicate that the user does not consent to a website or service selling or sharing their personal information with third parties.
 Users can enable the header, in both normal and private browsing modes, by setting the preference `privacy.globalprivacycontrol.enabled` to `true` (in `about:config`).
 The `Navigator.globalPrivacyControl` and `WorkerNavigator.globalPrivacyControl` properties allow JavaScript to check the user consent preference (Firefox bug 1856029).
### Security

No notable changes

### APIs

* The `authenticatorAttachment` property of the `PublicKeyCredential` interface is now supported.
 This allows web application client and server code to configure itself based on whether the authenticator is part of the device running web authentication, or can roam between devices (see Firefox bug 1810851).
* The Minimum PIN Length Extension (`minPinLength`) of the Web Authentication API is supported, allowing a relying party server to request the authenticator's minimum PIN length during creation/registration (Firefox bug 1844450).
* The `Navigator.userActivation` property and `UserActivation` interface are now supported.
 These can be used to check whether the user is interacting with the page, or has interacted with it since page load (see Firefox bug 1791079).
### WebDriver conformance (WebDriver BiDi, Marionette)

#### WebDriver BiDi

* Added serialization support for `Proxy` and `Generator` objects (Firefox bug 1841786).
* Added `authChallenges` property (the list of authentication challenges present in the headers), to `responseStarted` and `responseCompleted` network events, which will be useful in order to handle the upcoming `network.authRequired` event (Firefox bug 1855149).
Changes for add-on developers
-----------------------------

No notable changes

Older versions
--------------

* Firefox 119 for developers
* Firefox 118 for developers
* Firefox 117 for developers
* Firefox 116 for developers
* Firefox 115 for developers
* Firefox 114 for developers
* Firefox 113 for developers
* Firefox 112 for developers
* Firefox 111 for developers
* Firefox 110 for developers
* Firefox 109 for developers
* Firefox 108 for developers
* Firefox 107 for developers
* Firefox 106 for developers
* Firefox 105 for developers
* Firefox 104 for developers
* Firefox 103 for developers
* Firefox 102 for developers
* Firefox 101 for developers
* Firefox 100 for developers
* Firefox 99 for developers
* Firefox 98 for developers
* Firefox 97 for developers
* Firefox 96 for developers
* Firefox 95 for developers
* Firefox 94 for developers
* Firefox 93 for developers
* Firefox 92 for developers
* Firefox 91 for developers
* Firefox 90 for developers
* Firefox 89 for developers


Firefox 21 for developers - Mozilla

Firefox 21 for developers
=========================

Firefox 21 was released on May 14, 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.

Changes for Web developers
--------------------------

### HTML

* The `scoped` attribute has been added to the `<style>` element. It allows to include styles that are isolated from the rest of the document. Such styles can be selected using the `:scope` CSS pseudo-element introduced in Firefox 20. (Firefox bug 508725).
* The new HTML `<main>` element has been implemented (Firefox bug 820508).
### JavaScript

* EcmaScript for XML (E4X), an ancient JavaScript extension, has been removed. Implemented only in Gecko, it never got significant traction (Firefox bug 788293).
* parseInt no longer treats strings with leading "0" as octal (Firefox bug 786135).
### CSS

* The `none` value of `-moz-user-select` has now the same behavior than the `-moz-none` value, aligning Gecko on WebKit (Chrome, Safari), Presto (Opera) and Trident (Internet Explorer) (Firefox bug 816298).
* On XHTML content, the `auto` value of `-moz-hyphens` incorrectly applied hyphenation rules when the language was not explicitly declared. This is fixed by (Firefox bug 702121).
* An `auto` value has been added to the CSS `-moz-orient` property. The `auto` value is equivalent to `horizontal` when applied to `<meter>` and `<progress>` (Firefox bug 835883).
* The media query `-moz-windows-glass` has been added on Windows 7 and earlier Windows system (Firefox bug 816803).
### DOM

* Support for `RTCPeerConnection` (as `MozRTCPeerConnection`) is now enabled by default (Firefox bug 796463). It can be disabled again if necessary by setting `media.peerconnection.enabled` to false.
* The `origin` property has been added to the `window.location` (Firefox bug 828261).
* The `valueAsDate` and `valueAsNumber` methods have been added for `<input type="time">` (Firefox bug 781570).
* The `min` and `max` attributes now apply to `<input type="time">` too (Firefox bug 781572).
* Some new keyCodes for volume control are supported (Firefox bug 674739).
* Some new keyCodes for ancient keyboard layout such as AS/400 are now supported on Windows and Linux (Firefox bug 833719).
* Various keyCode values for OEM specific keys on Windows are now supported again (Firefox bug 833719).
* The function `window.crypto.getRandomValues` has been implemented (Firefox bug 440046).
* The non-standard methods `NodeIterator.expandEntityReferences()` and `TreeWalker.expandEntityReferences()` have been removed (Firefox bug 672190).
* CSSOM: the method `CSSKeyframesRule``.insertRule` has been removed to `CSSKeyframesRule``.appendRule` to match a spec change (Firefox bug 841896).
* CSSOM If the given parameter given to `CSSStyleSheet.insertRule` contains more than one rule, a `DOMException` with a `SYNTAX_ERR` is now thrown (Firefox bug 765599).
* Until now, when the same headers were repeatedly set with `XMLHttpRequest.setRequestHeader`, the last-specified value was used. This behavior has been changed to comply with the spec, so those values will be properly combined (Firefox bug 819051).
### SVG

* The paint-order attribute has been implemented (Firefox bug 828805).
* The `svg.smil.enabled` preference has been removed. SMIL is always on. (Firefox bug 835030)
### Networking

* We continue to update our CSP implementation to match the CSP 1.0 spec, which reached Candidate Recommendation:
    + Support for the spec-compliant `Content-Security-Policy` HTTP header (in addition to the experimental `X-Content-Security-Policy`) has been added (Firefox bug 783049).

    **Note:** the patch for this new header landed in Firefox 21, it is disabled on builds (Firefox bug 842657).
### Worker

* The functions `URL.createObjectURL()` and `URL.revokeObjectURL()` are now included in the set of functions available to workers.
Changes for add-on and Mozilla developers
-----------------------------------------

* FUEL applications cannot use the Livemarks service anymore (Firefox bug 834492). The Livemarks service is deprecated and phased out in favor of the new async interface.
* `resource:///modules/` and `resource://gre/modules/` are no longer identical (Firefox bug 755724). This change was made because of work on the metro version of Firefox. If you load modules using `resource:///modules/`, you should check if you now want to use `resource://gre/modules/` instead. Note that some modules also moved from Firefox to Toolkit (Firefox bug 840287 and Firefox bug 811548 moved `NewTabUtils.jsm` and the thumbnail modules, respectively).
* The Add-on SDK is now included in Firefox (Firefox bug 731779)
* History API saw numerous deprecated API being removed:
    + Replaced by `mozIAsyncFavicons`:
        - `nsIFaviconService::setFaviconUrlForPage`
        - `nsIFaviconService::setFaviconData`
        - `nsIFaviconService::getFaviconData`
        - `nsIFaviconService::getFaviconForPage`
        - `nsIFaviconService::setAndLoadFaviconForPage`
        - `nsIFaviconService::getFaviconImageForPage`
        - `nsIFaviconService::getFaviconDataAsDataURL`
    + Replaced by `mozIAsyncLivemarks`:
        - `nsILivemarkService::*`
        - `PlacesUtils.itemIsLivemark`
        - `PlacesUtils.nodeIsLivemarkContainer`
        - `PlacesUtils.nodeIsLivemarkItem`
    + Removed only third argument:
        - `PlacesUIUtils.showBookmarkDialog`
    + No more implemented by Places, use `mozIAsyncHistory` instead:
        - `nsIGlobalHistory2::addURI`
        - `nsIGlobalHistory2::isVisited`
        - `nsIGlobalHistory2::setPageTitle`
    + No more needed, use `onDeleteURI` or `onItemRemoved`:
        - `nsINavHistoryObserver::OnBeforeDeleteURI`
        - `nsINavBookmarkObserver::OnBeforeItemRemoved`
    + Never implemented properly:
        - `nsINavHistoryFullVisitResultNode`
    + Deprecated, use `mozIAsyncHistory::updatePlaces` instead:
        - `nsINavHistoryService::AddVisit`
* Added `nsIHttpChannel.redirectTo` to enable redirecting HTTP channels without fragile hacks.
See also
--------

* Firefox 21 Release Notes
* Add-on Compatibility for Firefox 21
### Older versions

* Firefox 20 for developers
* Firefox 19 for developers
* Firefox 18 for developers
* Firefox 17 for developers
* Firefox 16 for developers
* Firefox 15 for developers
* Firefox 14 for developers
* Firefox 13 for developers
* Firefox 12 for developers
* Firefox 11 for developers
* Firefox 10 for developers
* Firefox 9 for developers
* Firefox 8 for developers
* Firefox 7 for developers
* Firefox 6 for developers
* Firefox 5 for developers
* Firefox 4 for developers
* Firefox 3.6 for developers
* Firefox 3.5 for developers
* Firefox 3 for developers
* Firefox 2 for developers
* Firefox 1.5 for developers


Firefox 109 for developers - Mozilla

Firefox 109 for developers
==========================

This article provides information about the changes in Firefox 109 that will affect developers. Firefox 109 was released on January 17, 2023.

Changes for web developers
--------------------------

### HTML

* The range element supports the `list` attribute, which links via an id to a `<datalist>` to allow Firefox to display tick marks along the range.
### CSS

* The `<system-color>` CSS data type now supports the values `Mark`, `MarkText`, and `ButtonBorder` (Firefox bug 1638052).
### JavaScript

No notable changes.

### SVG

#### Removals

* `SVGGraphicsElement.getTransformToElement()` has been removed.
 This follows its removal from the SVG2 specification in 2015, and from other major browsers.
 (Firefox bug 1803790).
* The `SVGGraphicsElement.nearestViewportElement` and `SVGGraphicsElement.farthestViewportElement` attributes have been disabled by default in nightly and early beta builds (behind preference `svg.nearestAndFarthestViewportElement.enabled`).
 `SVGElement.viewportElement` can be used as an alternative to `SVGGraphicsElement.nearestViewportElement`.
 They have been removed from the SVG2 specification and are likely to be removed entirely from Firefox in a future release.
 (Firefox bug 1133174).
### HTTP

* The `'unsafe-hashes'` value for `Content-Security-Policy` source directives is now supported.
 For more information, see CSP unsafe-hashes (Firefox bug 1343950).
### APIs

#### DOM

* The `scrollend` events are now supported, which indicate that the user has completed scrolling in `Element` and `Document` objects.
 For more information, see Element: `scrollend` event and Document: `scrollend` event (Firefox bug 1797013, Firefox bug 1803435).
### WebDriver conformance (WebDriver BiDi, Marionette)

#### WebDriver BiDi

* The connection details for WebDriver BiDi are now written to `WebDriverBiDiServer.json` instead of `WebDriverBiDiActivePort`, which contains both the port (`ws_port`) and the host (`ws_host`). This file is located in the Firefox profile folder (Firefox bug 1792875).
* Added support for subscribing / unsubscribing to individual `contexts` when using `session.subscribe` and `session.unsubscribe` (Firefox bug 1723102).
* Added support for serializing `Node` objects (Firefox bug 1770731).
* Fixed the `columnNumber` for `exceptions` and `stackTraces` to be 0-based (Firefox bug 1796073).

#### Marionette

* Fixed a bug where `WebDriver:NewWindow` and `WebDriver:SwitchToWindow` were not focusing the new window properly (Firefox bug 1798655).
* Fixed a bug where `WebDriver:FindElement` (and similar commands) would fail if the Firefox window was occluded by other applications on Windows (Firefox bug 1802473).
Changes for add-on developers
-----------------------------

* Manifest V3 is now supported with the ability to sign and release Manifest V3 extensions on AMO. See the Manifest v3 signing available November 21 on Firefox Nightly blog post for more information. The following preview features are now fully available:
    + The `scripting` API, although this has been available to Manifest V2 extensions from Firefox 102.
    + The `action` API, and `"action"` manifest key and `_execute_action` special shortcut in the manifest `commands` key.
    + The `"host_permissions"` manifest key.
* The default Content Security Policy (CSP) for Manifest V3 extensions has been updated to include `upgrade-insecure-requests`. This means that, by default, all network requests are upgraded to use `https:`. Extensions that need to use `http:` can do so by overriding the default CSP using the `content_security_policy` manifest.json key (Firefox bug 1797086).
* The property `secretKeyLength` has been added to `webRequest.SecurityInfo`. This property provides the length in bits of the secret key in the security properties of a web request (Firefox bug 1778473).
* With the introduction of the extensions button, the default value of `default_area` in the `action` and `browser_action` manifest keys has changed from `"navbar"` to `"menupanel"` (Firefox bug 1799947).
* Support for `omnibox.onDeleteSuggestion` and the `deletable` property in `omnibox.SuggestResult`, enabling extensions to react to a user deleting an address bar search result (Firefox bug 1799947).
Older versions
--------------

* Firefox 108 for developers
* Firefox 107 for developers
* Firefox 106 for developers
* Firefox 105 for developers
* Firefox 104 for developers
* Firefox 103 for developers
* Firefox 102 for developers
* Firefox 101 for developers
* Firefox 100 for developers
* Firefox 99 for developers
* Firefox 98 for developers
* Firefox 97 for developers
* Firefox 96 for developers
* Firefox 95 for developers
* Firefox 94 for developers
* Firefox 93 for developers
* Firefox 92 for developers
* Firefox 91 for developers
* Firefox 90 for developers
* Firefox 89 for developers
* Firefox 88 for developers
* Firefox 87 for developers
* Firefox 86 for developers
* Firefox 85 for developers
* Firefox 84 for developers
* Firefox 83 for developers
* Firefox 82 for developers
* Firefox 81 for developers
* Firefox 80 for developers
* Firefox 79 for developers
* Firefox 78 for developers