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)

HTTP

APIs

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).

Older versions