Firefox 96 for developers
=========================

This article provides information about the changes in Firefox 96 that affect developers. Firefox 96 was released on January 11, 2022.

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

### HTML

No notable changes

### CSS

* The `hwb()` function for use as a CSS color value has been implemented. The `hwb()` functional notation expresses a given color according to its hue, whiteness, and blackness. An optional alpha component represents the color's transparency. (Firefox bug 1352755).
* Firefox now provides support for the `color-scheme` property. This allows an element to indicate which color schemes it can comfortably be rendered in. Common options include "light" and "dark", or "day mode" and "night mode". (Firefox bug 1576289).
* The `counter-reset` property now supports the `reversed()` function for creating *reversed* CSS counters, which are intended for numbering elements in descending order.
 This can be used with the `list-item` counter to automatically number ordered lists in reverse order, starting from the number of elements in the list
 (`list-item` is a counter that is automatically applied for ordered lists, such as those created using `<ol>`).
 Firefox uses this feature internally to support the `<ol>` `reversed` attribute.
 (Firefox bug 1706346).
### JavaScript

No notable changes.

### HTTP

No notable changes.

### APIs

* `navigator.canShare()` is now supported on Android, allowing code to check whether `navigator.share()` will succeed for particular targets.
 The feature is behind a preference on desktop operating systems.
 (Firefox bug 1666203).
* The Web Locks API is enabled by default, allowing web apps running in multiple tabs or workers to coordinate the use of resources. (Firefox bug 1740044).

#### Canvas

* Image encoder support has been added for the WebP image format.
 This allows canvas elements to export their content as webp data when using the methods: `HTMLCanvasElement.toDataURL()`, `HTMLCanvasElement.toBlob()`, and `OffscreenCanvas.toBlob`.
 (Firefox bug 1511670).

#### DOM

* The `IntersectionObserver()` constructor now sets the default `rootMargin` if an empty string is passed in the associated parameter option, instead of throwing an exception (Firefox bug 1738791).

#### Media, WebRTC, and Web Audio

* A number of deprecated non-standard statistics fields have been removed from the WebRTC Statistics API, including: `bitrateMean`, `bitrateStdDev`, `framerateMean`, `framerateStdDev`, and `droppedFrames`.
 (Firefox bug 1367562).
### WebDriver conformance (Marionette)

* Added the command `WebDriver:GetElementShadowRoot` to retrieve the shadow root (open or closed) hosted by a given element (Firefox bug 1700073).
* Fixed a bug in `WebDriver:ExecuteScript` and `WebDriver:ExecuteAsyncScript` that caused a `cyclic object value` error when trying to return the `ShadowRoot` of an element (Firefox bug 1489490).
* `WebDriver:Print` has been enhanced to support page ranges when printing documents as PDF (Firefox bug 1678347).
Changes for add-on developers
-----------------------------

* Added `runtime.getFrameId` that gets the frame ID of any window global or frame element from a content script (Firefox bug 1733104).
Older versions
--------------

* 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
* 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