files/en-us/mozilla/firefox/releases/138/index.md
This article provides information about the changes in Firefox 138 that affect developers. Firefox 138 was released on April 29, 2025.
importmap value of the type attribute of the <script> element now supports the integrity key. This allows the ES module URLs referenced in the import maps to be matched against their integrity metadata. As a result, these modules are now compatible with CSP directives that require Subresource Integrity (SRI). (Firefox bug 1945540).No notable changes
instanceof for the same purpose. (Firefox bug 1952249).import declaration now supports importing JSON modules using the with attribute.Clear-Site-Data header can be used with the cache (and *) directive to clear the browser network cache. This gives websites more control over data stored for their users, allowing them to, for example, mitigate the risk of privacy leaks by clearing the cache during logout. (Firefox bug 1930500).degradationPreference property in the parameter object passed to the setParameters() method of the RTCRtpSender interface.
It can also be read from the object returned by the getParameters() method.
(Firefox bug 1329847).--remote-enable-system-access, was added to enable sensitive features, such as interacting with Browsing Contexts in the parent process (e.g., Browser UI) or using privileged APIs in content processes. This will be used for WebDriver BiDi features in the next releases, and can already be used with Marionette (see the Marionette section below) (Firefox bug 1944565).webExtension.install command now installs web extensions temporarily by default, allowing it to be used with unsigned extensions - either as an XPI file or as an unpacked folder. A new Firefox-specific parameter, moz:permanent, has been added to force installation as a regular extension instead (Firefox bug 1947678).browsingContext.setViewport command now supports a userContexts parameter, which must be an array of user context (Firefox container) ids. When provided, the viewport configuration will be applied to all Browsing Contexts belonging to those user contexts, as well as any future contexts created within them. This parameter cannot be used together with the existing context parameter (Firefox bug 1940952).browsingContext.Info type now includes a clientWindow property corresponding to the ID of the window owning the Browsing Context. It is typically returned by browsingContext.getTree or included in the payload of events such as browsingContext.contextCreated (Firefox bug 1920952).chrome (parent process) context with Marionette now requires using the --remote-enable-system-access command-line flag when starting Firefox (Firefox bug 1710425).page_action as a {{WebExtAPIRef("menus.ContextType")}} in the {{WebExtAPIRef("menus")}} API for Manifest V3 extensions. This provides Manifest V3 extensions the same ability as Manifest V2 extensions to add menu items to page_action. (Firefox bug 1951166)contextualIdentities permission is now not recognized on Firefox for Android. Previously, it enabled a broken version of the "containers" feature. (Firefox bug 1659500)groupId to {{WebExtAPIRef("tabs.Tab")}}. (Firefox bug 1959713)groupId to {{WebExtAPIRef("tabs.query")}}. (Firefox bug 1959715)groupId to {{WebExtAPIRef("tabs.onUpdated")}}. (Firefox bug 1959716json resource type is now supported in both {{WebExtAPIRef("webRequest.ResourceType")}} and {{WebExtAPIRef("declarativeNetRequest.ResourceType")}} in Firefox, with import attributes enabled by default. Previously, it was reported as script. (Firefox bug 1858078 and Firefox bug 1950836)These features are newly shipped in Firefox 138 and are considered experimental.
They may be disabled by default or enabled by default but available only in the Nightly build.
For features disabled by default, 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.
UA styles for <h1> nested into sectioning elements: layout.css.h1-in-section-ua-styles.enabled.
The <h1> heading doesn't decrease in font size now when nested within sectioning elements <article>, <aside>, <nav>, and <section>. The UA styles for <h1> nested within sectioning elements are no longer relevant since the outline algorithm has been removed from the HTML specification. (Firefox bug 1883896).
As part of a staged rollout of this removal 5% of users of Firefox 138 and 50% of users of Firefox Beta 138 will have the value of layout.css.h1-in-section-ua-styles.enabled set to false (Intent to unship: UA styles for h1 in article, aside, nav, section).
[!NOTE] The preference for this feature works in reverse: it's set to
falsein the Nightly build, which removes the UA styling for headings nested in sectioning elements. It's set totruein all other channels, which retains the existing UA styling for the nested headings.
::details-content CSS pseudo-element: layout.css.details-content.enabled.
The CSS {{cssxref("::details-content")}} pseudo-element enables you to style the content of the {{htmlElement("details")}} element (Firefox bug 1901037).
Allow pseudo-elements after element-backed pseudo-elements
Work has begun on allowing pseudo-elements such as {{cssxref("::first-letter")}} and {{cssxref("::before")}} to be appended to element-backed pseudo-elements such as {{cssxref("::details-content")}} and {{cssxref("::file-selector-button")}}. (Firefox bug 1953557).
[!NOTE] This feature depends on support for the element-backed pseudo-element being targeted, for example: {{cssxref("::details-content")}}, which is behind the
layout.css.details-content.enabledpreference.
MutationEvent on path to removal: dom.mutation_events.enabled
{{domxref("MutationEvent")}} and its associated events (DOMSubtreeModified, DOMNodeInserted, DOMNodeRemoved, DOMCharacterDataModified, DOMAttrModified) are now disabled on Firefox Nightly by default. (Firefox bug 1951772).
Notification.actions (Nightly): dom.webnotifications.actions.enabled
The {{domxref("Notification.actions")}} property can get the actions associated with a Notification, as set using {{domxref("ServiceWorkerRegistration.showNotification()")}}. (Firefox bug 1225110).
PerformanceEventTiming.interactionId: dom.performance.event_timing.enable_interactionid
{{domxref("PerformanceEventTiming.interactionId")}} can be used to measure latency timing for events triggered by a particular user interaction. (Firefox bug 1934683).
HTML Sanitizer API: dom.security.sanitizer.enabled
The HTML Sanitizer API allow developers to take untrusted strings of HTML and sanitize them for safe insertion into a document's DOM. (Firefox bug 1950605, Firefox bug 1952250).