files/en-us/mozilla/firefox/releases/140/index.md
This article provides information about the changes in Firefox 140 that affect developers. Firefox 140 was released on June 24, 2025.
No notable changes.
Range instances that are grouped in a Highlight, and then register them with a name using HighlightRegistry.
You can apply styles to a registered highlight using the CSS ::highlight pseudo-element. (Firefox bug 1964089).<h1> elements nested within sectioning elements have been removed, following the removal of the outline algorithm from the HTML specification. Previously, the <h1> headings nested within <article>, <aside>, <nav>, and <section> would appear smaller. Now, <h1> elements have a consistent font size, regardless of the nesting. (Firefox bug 1964922).No notable changes.
fetchpriority attribute for the HTML {{HTMLElement("img", "", "#fetchpriority")}} and {{HTMLElement("script", "", "#fetchpriority")}} elements. (Firefox bug 1847712).The Cookie Store API is now supported (Firefox bug 1958875).
This provides a modern, {{glossary("asynchronous")}} {{jsxref("Promise")}}-based method of managing cookies, which can be used in both the main thread and in service workers.
The API is supported with the exception that cookie objects returned by the get() and getAll() methods of the {{domxref("CookieStore")}} interface, and in the change event, omit all properties other than name and value (matching the information returned by the {{domxref("document.cookie")}}). The other cookie properties can still be set, and these will be used internally.
< and > characters with < and > (respectively) when serializing the HTML to a string. This prevents certain exploits where HTML is serialized and then injected back into the DOM.
(Firefox bug 1962084).pointerrawupdate event is now supported.
This event typically provides lower-latency access to pointer movement properties compared to the corresponding pointermove events, firing as soon as the pointer data is available.
It is intended for applications that require high-precision input handling, and that cannot achieve smooth interaction using coalesced pointermove events alone.
Because listening to this event may impact performance, you should avoid using it for other use cases.
(Firefox bug 1550462).DOMSubtreeModified, DOMNodeInserted, DOMNodeRemoved, DOMCharacterDataModified, DOMAttrModified) have been removed. (Firefox bug 1963043).acceptInsecureCerts argument to browser.createUserContext command. This argument allows clients to disable or enable certificate related security settings for a specific user context (aka Firefox container) and override the settings specified for a session. (Firefox bug 1959372)browsingContext event, browsingContext.navigationCommitted, which should be emitted as soon as a new document has been created for a navigation. (Firefox bug 1945184)browsingContext events which were unexpectedly emitted for webextension Browsing Contexts. (Firefox bug 1903272)webExtension.uninstall command to throw a NoSuchWebExtensionError when an empty string is provided as the extension ID. (Firefox bug 1956945)browsingContext.contextCreated and browsingContext.contextDestroyed events to return the clientWindow property in all the remaining cases (including Firefox for Android). This property corresponds to the ID of the window owning the Browsing Context. (Firefox bug 1953743)unspecified in {{WebExtAPIRef("cookies.SameSiteStatus")}}. In addition, unspecified is now the default value for sameSite in {{WebExtAPIRef("cookies.set()")}}. (Firefox bug 1550032)data_collection_permissions property to the gecko sub-key of the manifest key browser_specific_settings for Firefox for desktop. This property enables the Firefox built-in data collection consent feature. See the Extension Workshop article Firefox built-in consent for data collection and transmission. (Firefox bug 1954524)These features shipped in Firefox 140 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.
Notification.maxActions (Nightly): dom.webnotifications.actions.enabled
The Notification.maxActions read-only static property returns the browser limit on the number of actions that can be associated with a Notification, which you create using {{domxref("ServiceWorkerRegistration.showNotification()")}}.
This was released prematurely in Firefox version 138, and this change makes it available only in the Nightly build. (Firefox bug 1963263).
closedBy attribute for <dialog> (Nightly): dom.dialog.light-dismiss.enabled
The {{domxref("HTMLDialogElement/closedBy", "closedBy")}} attribute of the {{domxref("HTMLDialogElement")}} interface, and corresponding closedby attribute of the {{htmlelement("dialog")}} element, are supported.
Developers can use these to specify what mechanisms are able to close the dialogs, such as user interaction outside the dialog ("light dismiss") or programmatic closing.
(Firefox bug 1964077).
Atomics.waitAsync(): javascript.options.atomics_wait_async
The {{jsxref("Atomics.waitAsync()")}} static method waits asynchronously on a shared memory location and returns an object representing the result of the operation. It is non-blocking and usable on the main thread. (Firefox bug 1467846).
Prioritized Task Scheduling API (Nightly release).
The Prioritized Task Scheduling API provides a standardized way to prioritize all tasks belonging to an application, whether they are defined in a website developer's code, or in third-party libraries and frameworks.
This adds support for the TaskSignal.any() static method, which returns a signal that is triggered when any of the TaskSignal objects it is created from are triggered.
The API is now feature complete.
(Firefox bug 1964407).
CloseWatcher (Nightly - desktop only): dom.closewatcher.enabled.
The {{domxref("CloseWatcher")}} interface enables you to implement components that can be closed using device-native mechanisms, in the same way as built-in components. On Windows, for example, you can use this interface to make a custom sidebar close when users press the <kbd>Esc</kbd> key. (Firefox bug 1966459).