Firefox 151 release notes for developers (Stable)
This article provides information about the changes in Firefox 151 that affect developers. Firefox 151 was released on May 19, 2026.
Changes for web developers
>HTML
- The
shadowrootslotassignmentattribute is now supported on<template>elements, allowing declarative definition of slot assignment behavior for shadow roots. The attribute is reflected in JavaScript byShadowRoot.slotAssignmentorHTMLTemplateElement.shadowRootSlotAssignment(Firefox bug 2031295, Firefox bug 2023824).
CSS
-
The
@containerCSS at-rule supportsstyle()queries. This allows you to check if a container has a valid CSS declaration, a CSS property, or a custom property, and apply styles to its children accordingly. (Firefox bug 2016929, (Firefox bug 2019254), (Firefox bug 2024601), Firefox bug 2030645). -
The
position-anchorCSS property now supports thenormal(default) value. This allows the matching of theposition-areaproperty, so if theposition-areaproperty updates theposition-anchorproperty will also. (Firefox bug 2030351).
JavaScript
No notable changes.
APIs
- The
Sanitizer.replaceElementWithChildren()method now returnsfalseif the element to be replaced is<svg>in the SVG namespace or<math>in the MathML namespace (joining<html>, which was disallowed in Firefox 150). (Firefox bug 2032359). - The Document Picture-in-Picture API is now supported on desktop platforms. This makes it possible to open an always-on-top window that can be populated with arbitrary HTML content. It can be used to display any content that a user might want to view separate from the launching page (or even the browser), such as a set of streams showing the participants of a video conference call, a stock ticker, or a countdown timer. (Firefox bug 2006594).
- The
CanvasRenderingContext2D.langproperty is supported for setting the language of the canvas drawing context. While a DOM canvas can inherit this context from thelangattribute of its associated<canvas>element, this is useful for setting the context for an offscreen canvas, which may be rendered before being associated with a<canvas>. (Firefox bug 1943070). - The
options.keyboardLockproperty can now be passed as an option toElement.requestFullscreen(), allowing websites to request keyboard lock when the element is displayed in fullscreen mode. This stops the Esc key from causing the element to leave fullscreen (a long-press is required instead), and some formerly-reserved browser hotkeys can now be intercepted and their default action prevented. (Firefox bug 2032302). - The
CanvasRenderingContext2D.langproperty is now supported, allowing the rendering language of an offscreen canvas to be explicitly specified and changed after the rendering context is created. (Firefox bug 1943070). - The
maxStorageBuffersInFragmentStage,maxStorageBuffersInVertexStage,maxStorageTexturesInFragmentStage, andmaxStorageTexturesInVertexStageproperties are now supported onGPUSupportedLimits, defining the maximum number of storage buffers and textures allowed in the fragment and vertex shader stages. (Firefox bug 2006720). - The
CSSContainerRule.conditionsproperty is now supported, mirroring@containerat-rule support for multiple comma-separated container conditions. Theconditionproperty reflects a corresponding@containeras an array of objects, where each object represents a single container condition. (Firefox bug 2022827). - The Web Serial API is supported on desktop platforms, allowing the control of microcontrollers that support serial communications. This lets you, for example, program microcontrollers and development boards, such as ESP devices, BBCmicro:bit, and Raspberry Pi Picos, 3D printers and CNC machines, and other supported devices. Use of the API will require that website users install a synthetically generated site permission add-on — this is the same approach used to safely manage access to WebMIDI. (Firefox bug 2029625).
WebDriver conformance (WebDriver BiDi, Marionette)
General
- Added support for
altitudeAngleandazimuthAngleto pointer actions of subtypetouch. These properties allow simulating touch interactions with precise angular orientation data, specifying the angle at which a pointer contacts a surface and its rotational direction. (Firefox bug 2022644). - Fixed a bug where
UnknownErrorDOM exceptions originating from content pages were incorrectly treated as internal WebDriver errors. (Firefox bug 2032387).
WebDriver BiDi
- Implemented the
browser.setClientWindowStatecommand. This command allows clients to change the OS-level window state of a browser window, such as maximized, minimized, fullscreen, or normal. It also allows repositioning and resizing the window. (Firefox bug 1855028). - Added support for worker realms (for dedicated, shared and service workers) in the
script.getRealmscommand. The command now returns realm information for worker scripts in addition to window contexts. (Firefox bug 2016097). - Included the top-most stack frame in
log.entryAddedevents for all Console API messages. (Firefox bug 1941813). - Improved the
textfield of thelog.entryAddedevent to better align with Firefox DevTools behavior and Google Chrome WebDriver BiDi implementation. (Firefox bug 2005054). - Fixed network event cookies to include all properties, not just
nameandvalue. (Firefox bug 1887118). - Fixed the
network.getDatacommand timing out for redirects. (Firefox bug 2009916). - Fixed the
browsingContext.reloadcommand not resetting the location of a navigated iframe. (Firefox bug 2023917). - Removed the empty
proxycapability from thesession.newcommand response when no proxy is specified. (Firefox bug 1916463).
Marionette
- Enabled browser window repositioning on Linux Wayland in headless mode. (Firefox bug 2023978).
Changes for add-on developers
- The
webRequest.onErrorOccurredevent now falls back toNS_ERROR_NET_ON_RECEIVING_FROMinstead of a string starting withNS_ERROR_NET_ON_orNS_ERROR_NET_UNKNOWN_. This change is part of performance and reliability improvements to theonErrorOccurredevent. (Firefox bug 1881986) tabs.group()andtabs.ungroup()now correctly add and remove a split view when a call includes one of the split view's tabs. Previously, a call would fail or separate the split view. (Firefox bug 2029099)tabs.move()now correctly moves a split view to the right when a call includes one of the split view's tabs. Previously, a call moved a split view only to the left or to the end of the tab list. (Firefox bug 2027855)
Experimental web features
These features are shipping in Firefox 151 but are disabled by default.
To experiment with them, search for the appropriate preference on the about:config page and set it to true.
You can find more such features on the Experimental features page.
-
@container style()range syntax queries:layout.css.attr.enabledThe
@containerCSS at-rulestyle()queries now supports the range syntax. This allows you to check if a container has a valid CSS custom property and compare its value with comparison operators like>,<,>=, and<=and apply styles to its children accordingly. (Firefox bug 2024601). -
field-sizingproperty:layout.css.field-sizing.enabledThe
field-sizingCSS property lets you control the sizing behavior of form control elements. This property has two values:contentallows elements to adjust in size to fit their content, andfixedsets a fixed size on elements. (Firefox bug 1977176). -
Disable MathML
hrefon non-<a>elements:mathml.href_link_on_non_anchor_element.disabledWhen enabled, the
hrefglobal attribute no longer creates a hyperlink on MathML elements other than<a>, matching the MathML Core specification. (Firefox bug 2026848). -
Fix for nested scrollable areas:
layout.css.fake-webkit-scrollbar.enabledThis implementation has been added in order to fix an issue where scrollable content was unreachable. If a scrollbar is set to
display: none;orwidth: 0;then the scrollbars of nested scrollable areas would be stacked on top of each other meaning that some of the content may well be unreachable. (Firefox bug 1977511). -
<timeline-range-name>values:layout.css.scroll-driven-animations.enabledThe
animation-range-start,animation-range-endCSS properties andanimation-rangeshorthand property now support<timeline-range-name>values. These<timeline-range-name>values allow you to precisely state which segment that a scroll driven animation will take place within. (Firefox bug 1804775). -
GeometryUtils methods:
convertPointFromNode(),convertRectFromNode(), andconvertQuadFromNode():layout.css.convertFromNode.enabledThe GeometryUtils methods:
convertPointFromNode(),convertRectFromNode(), andconvertQuadFromNode()are no longer enabled by default in Firefox Nightly. (Firefox bug 2026051). -
GeometryUtils methods:
getBoxQuads():layout.css.getBoxQuads.enabledThe GeometryUtils methods:
getBoxQuads()is no longer enabled by default in Firefox Nightly. (Firefox bug 2026051).