Firefox 68 for developers

您正在阅读此内容的英文版本,因为该语系尚未翻译。 帮助我们翻译此文章吧!

本篇文章将提供关于在Firefox 68版本中,会影响到开发人员的更新的信息。Firefox 68版本发布于2019年7月9日。

面向开发者的变更

开发者工具

浏览器/网页控制台

  • 现在网页控制台会展现更多关于CSS警告的信息, 其中包括使用该规则的DOM元素的节点列表 (bug 1093953)。
  • 您可以在网页控制台中使用常规的表达式来过滤内容(bug 1441079)。
  • 现在浏览器控制台允许您通过设置勾选或不勾选名为“显示内容消息”的复选框来显示或隐藏来自内容进程的消息(bug 1260877)。

JavaScript 调试器

  • 您现在可以在调试器中通过点击 Shift + Ctrl + F (Windows or Linux) 或 Shift + Cmd + F (macOS)在当前项目的所有文件进行 搜索 (bug 1320325)。

网络监视器

页面查看器

存储查看器

其它

  • 访问性查看器 现在包含了一个新的 “检查问题(Check for issues)” 的特性, 其中包括很多可以高亮显示您的网页的访问性问题的检查工具。第一个可用的检查是对比 (contrast), 用于突出颜色对比问题。
  • about:debugging 页面的控制内部拓展可视性(系统附加组件和隐藏拓展)的偏好已由 devtools.aboutdebugging.showSystemAddons 变为 devtools.aboutdebugging.showHiddenAddons (bug 1544372).
  • 响应设计模式(Responsive design mode)已被重新设计— 设备设置 对话框 (device selection menu > Edit List...) 现在使用起来更加直观简单 (bug 1487857)。

移除

HTML

  • 如果文本轨迹包含媒体元素,那么<track> 元素 — 由 HTMLTrackElement 展现— 现在会收到除了TextTrack 它本身外,cuechange 事件(bug 1548731)。
  • 尽管有不同的表现,<link> 元素已重新支持 disabled 属性。 当 disabled 被设定在一个连同rel="stylesheet"<link> 元素 , 引用的样式表不会在页面加载时被加载, 当 disabled 属性被改变为 false 或移除时,该样表会被加载 (bug 1281135)。

 移除

CSS

Removals

SVG

No changes.

JavaScript

APIs

CSS Object Model (CSSOM)

  • The legacy rules property and addRule() and removeRule() methods have been added to the CSSStyleSheet interface. These were introduced by Internet Explorer 9 and have never managed to quite be stamped out, so they have been added to improve compatibility with the small percentage of sites that still use them (bug 1545823).

DOM

DOM events

  • Firefox for Android no longer incorrectly sends a resize event until after the first frame is painted; this improves web compatibility with sites that don't expect this event to occur (bug 1528052).
  • The dispatching of events for non-primary mouse buttons has been made to more closely follow the specification; the click event is no longer sent when non-primary buttons are clicked, instead using auxclick. In addition, dblclick no longer fires for non-primary buttons (bug 1379466).
  • The proprietary MouseEvent.mozPressure property has been deprecated, and will now trigger a warning in the console (bug 1165211).

Media, Web Audio, and WebRTC

  • Due to changes in the Google Play store's policies, starting with Firefox 68 for Android, the OpenH264 codec used to handle AVC/H.264 video in WebRTC connections can no longer be downloaded and installed. Therefore, fresh installs of Firefox on Android devices no longer support AVC in WebRTC calls. If you upgrade from earlier versions of Firefox and already have the codec downloaded, it will continue to work. This does not affect other platforms. For more details, see this article on SUMO or bug 1548679.
  • WebRTC has been updated to recognize that a null candidate passed into the icecandidate event handler, indicating the receipt of a candidate, instead indicates that there are no further candidates coming; when this happens the ICE gathering (iceGatheringState) state reaches complete (bug 1318167).
  • The RTCRtpReceiver methods getContributingSources() and getSynchronizationSources() now support video tracks; previously they only worked on audio (bug 1534466).
  • The Web Audio API MediaStreamTrackAudioSourceNode interface is now supported, as is the method AudioContext.createMediaStreamTrackSource() (bug 1324548).
  • RTCDataChannel.negotiated is now implemented (bug 1529695).
  • The MediaStreamAudioSourceNode() constructor has been updated to match the current specification's definition that the "first audio track" in the stream is the track whose ID comes first in lexicographical order (bug 1324548).
  • getUserMedia() may no longer be used from a non-secure context; attempting to do so now throws a NotAllowedError exception. Secure contexts are those loaded using HTTPS, those located using the file:/// scheme, and those loaded from localhost. For now, if you must, you can re-enable the ability to perform insecure calls to getUserMedia() by setting the preference media.getusermedia.insecure.enabled to true (bug 1335740).

    Note: In the future, Firefox will also remove the navigator.mediaDevices property on insecure contexts, preventing all access to the MediaDevices APIs. This is already the case in Nightly builds.

Removals

HTTP

  • The HTTP Clear-Site-Data header no longer supports the executionContexts directive. This was removed due to problems with interactions between interconnections among different kinds of data at different points in the navigation process and the way the specification is designed. It has been proposed that this directive be removed from the specification for this reason, among others (bug 1548034).

Removals

  • The Content-Security-Policy directive require-sri-for is no longer supported due to concerns about its standardization status. It was previously available only behind a preference, which was off by default (bug 1386214).

Security

WebDriver conformance (Marionette)

Bug fixes

  • If WebDriver:SwitchToWindow changes the selection to a different window it now waits for its focus and activate events before returning (bug 1335085).
  • Fixed the TypeError: this.tabModal is null failure, which sometimes appeared when interacting with modal dialogs or user prompts (bug 1538782)

Other

  • Disabled the feature to force unloading background tabs on low memory conditions, to prevent top-level browser contexts from magically disappearing (bug 1553748).
  • Disabled priviledged content processes that caused HTTP authentication dialogs not to appear when navigating to a website after opening a new tab (bug 1558763).

Plugins

No changes.

Changes for add-on developers

API changes

  • The The proxy.register() and proxy.unregister() functions have been deprecated and will be removed from Firefox 71 (bug 1545811).
  • A boolean flag, incognito, has been added to the proxy.RequestDetails. object. When true, it indicates that this was a private browsing request (bug 1545163).
  • The webRequest.RequestFilter parameters can include an incognito parameter. If provided, requests that do not match the incognito state (true or false) will be filtered out (bug 1548177).
  • A string value, cookieStoreId, representing the cookie store ID of the current context, has been added to the proxy.RequestDetails. object (bug 1545420).
  • When an add-on attempts to add a bookmark folder to the root folder, the resulting error message is now much more intuitive (bug 1512171).
  • The promise returned by browser.tabs.duplicate() now resolves immediately, before the tabs are completely loaded (bug 1394376).
  • Support has been added for chrome.storage.managed, allowing web extension settings to be implemented via enterprise policy (bug 1230802).
  • There is now a Group Policy option to blacklist all extensions except the ones that have been whitelisted (bug 1522823).

显著变更

无变更。

还可以看看

更早的版本