Firefox 118 for Developers 版本說明

本文件提供了 Firefox 118 中影響開發者的變更資訊。Firefox 118 於 2023 年 9 月 26 日釋出。

Web 開發人員的變更

HTML

  • 現已支援 <search> 元素。<search> 元素是一個分組元素,用於包含搜尋或過濾操作所使用的所有元素(Firefox bug 1824121)。

CSS

  • 現已支援 font-synthesis-position 屬性以及 font-synthesis 簡寫屬性的 position 值。在使用 font-variant-position 時,這些屬性允許停用沒有相應字形的下標和上標字型(Firefox bug 1849010)。
  • 現已支援多個 CSS 數學函式:abs()sign()round()mod()rem()pow()sqrt()hypot()log()exp()(Firefox bug 1814589)。
  • CSS 屬性 font-size-adjust 中的新關鍵字 from-font 允許從第一個可用字型中選擇所需的 <font-metric>(Firefox bug 1708240)。
  • CSS 屬性 transform-box 現在支援 content-boxstroke-box 值。對於參考框,content-box 值使用內容框,而 stroke-box 值使用包含 SVG 形狀的描邊邊界框(Firefox bug 1819464)。
  • CSS 屬性 font-size-adjust 支援關鍵字 from-font,允許從第一個可用字型中選擇所需的 <font-metric>(Firefox bug 1708240)。

JavaScript

無顯著變化。

HTTP

  • HTTP Permissions-Policy 標頭的 publickey-credentials-get 指令現已支援,可用於在跨域 iframe 中啟用 Web Authentication API 介面以檢索公鑰憑證(Firefox bug 1460986)。

MathML

  • <semantics><maction> 元素現在預設只渲染第一個子元素。mathml.legacy_maction_and_semantics_implementations.disabled 首選項已移除(Firefox bug 1788223)。
  • mathvariant 屬性除了 normal 之外的所有值現在都已棄用。此外,該屬性的使用現在僅限於 <mi> 元素(Firefox bug 1845461)。

API

  • 在 Windows 上,⊞ Windows Logo 鍵,在 macOS 上,Command 鍵返回給 KeyboardEvent.key 的值現在是 "Meta" 而不是 "OS"KeyboardEvent.code 返回 MetaLeft/MetaRight 而不是 OSLeft/OSRight(Firefox bug 1232918)。
  • RTCRtpTransceiver.currentDirectionRTCRtpTransceiver.direction 屬性現在支援 "stopped" 值,用於指示收發器是否已停止。現在應使用此值而不是已棄用的 RTCRtpTransceiver.stopped 屬性(Firefox bug 1568296)。
  • RTCPeerConnection.getTransceivers() 返回的陣列現在會省略已停止的收發器。類似地,RTCPeerConnection.getReceivers()RTCPeerConnection.getSenders() 會省略與已停止收發器關聯的接收器和傳送器(Firefox bug 1568296)。
  • TextMetrics.emHeightDescentTextMetrics.emHeightAscent 屬性現已支援(Firefox bug 1841692)。

WebDriver 一致性 (WebDriver BiDi, Marionette)

通用

  • 修復了 Android 上的一個內部競態條件,該條件導致 WebDriver BiDi 和 Marionette 返回的使用者提示文字為空(Firefox bug 1848167)。
  • 在連線了高解析度顯示器的環境中,Marionette 中的 WebDriver:PerformActions 命令和 WebDriver BiDi 中的 browsingContext.performActions 命令未能正確滾動 wheel 輸入源(Firefox bug 1849229)。

WebDriver BiDi

  • 添加了 browsingContext.activate 命令,允許使用者將給定的後臺標籤頁置於前臺(Firefox bug 1841004)。
  • 添加了 browsingContext.handleUserPrompt 命令,允許使用者接受或取消開啟的 alertconfirmprompt 型別的使用者提示(Firefox bug 1824197)。
  • 添加了 browsingContext.userPromptOpened 事件,該事件在 alertconfirmprompt 型別的使用者提示開啟時發出(Firefox bug 1824224)。
  • 在返回給客戶端的 JSON 載荷中添加了一個 type 欄位,用於識別 event 訊息或命令的成功狀態(可以是 successerror)(Firefox bug 1844009)。

Marionette

  • 添加了對所有 Web Authentication 擴充套件命令的支援,這些命令允許使用者透過公鑰憑證進行身份驗證(Firefox bug 1846574)。

附加元件開發人員的變更

移除

  • Manifest V3 擴充套件中,actionoptions_uipage_actionsidebar_action 清單鍵的支援 browser_style 已移除(Firefox bug 1830711)。有關從 Manifest V3 擴充套件中的 browser_style 進行遷移的資訊,請參閱瀏覽器樣式 Manifest v3 遷移