Firefox 66 for developers 编辑

This article provides information about the changes in Firefox 66 that will affect developers. Firefox 66 was released on March 19, 2019.

Changes for web developers

Developer tools

HTML

  • UTF-8-encoded HTML (and plain text) files loaded from file: URLs are now supported without <meta charset="utf-8"> or the UTF-8 BOM, making it easier to work on such files locally before uploading them to a server. You still need to make sure that the server sends charset=utf-8 in the Content-Type HTTP header for such files, otherwise the detection mechanism used for local files would break incremental loading in the network case (bug 1071816).

Removals

CSS

SVG

No additions.

Removals

JavaScript

No changes.

APIs

New APIs/changes

  • Autoplaying audio will be blocked by default soon after 66 becomes the release version of Firefox (bug 1487844, see bug 1535667 for rollout details). The feature will be rolled out gradually to users until everyone has it.

DOM

DOM events

  • The InputEvent.inputType property has been implemented (bug 1447239).
  • The Window.event and Event.returnValue properties — originally proprietary IE features, then also supported across other browsers for compatibility purposes — have been re-introduced in Firefox 66, after first being added in versions 63 and 64 respectively but then removed again due to compatibility issues. 
  • From 66 onwards, when the KeyboardEvent.keyCode property of the keypress event object is 0, the value will be the same as KeyboardEvent.charCode. Conversely, when charCode is 0, it will be the same as keyCode. This mirroring behavior matches other browsers and is expected to solve most associated compatibility issues, however user agent sniffing might cause further issues in some JavaScript libraries. Note that in spec terms, we've switched from the split model to the conflated model (see How to determine keyCode for keypress events in the UI Event spec).

Media, Web Audio, and WebRTC

  • The new AV1 video codec is now enabled by default on both macOS and Windows (for Intel processors). Linux support will come in Firefox 67 (bug 1521181, bug 1452146, and bug 1534814).
  • The MediaDevices method getDisplayMedia(), available as navigator.mediaDevices.getDisplayMedia(), has been added and synchronized with the specification. This method lets you capture a screen or part of a screen as a MediaStream for manipulation or sharing (bug 1321221).
  • As a step toward eventually deprecating the Firefox-specific getUserMedia()-based method for capturing screen and window contents, the non-standard mediaSource constraint now treats the values screen and window identically. Both now present a list of both screens and windows for the user to choose from (bug 1474376).
  • qpSum has been added to local outbound RTCRTPStreamStats objects. This measures the total of the Quantization Parameter values for every frame sent or received on the video track. The higher this number, the more compressed the stream probably is (bug 1347070).
  • In a step along the road toward implementing support for Feature Policy in a future Firefox update, getUserMedia() can no longer be used in situations in which there is no proper origin for the content, such as when called from a sandboxed <iframe> or from a data URL entered into the address bar by the user. For more specifics and details, see Security in MediaDevices.getUserMedia() (bug 1371741).

Removals

Networking

Security

No changes.

Plugins

No changes.

WebDriver conformance (Marionette)

API changes

  • WebDriver:NewWindow has been added to support opening of a new browsing context, which can be one of either window or tab (bug 1504756).
  • WebDriver:SwitchToFrame now raises a no such element error if the specified element isn't part of the current browsing context (bug 1517196).
  • WebDriver:ExecuteScript and WebDriver:ExecuteAsyncScript no longer support the non-spec compliant scriptTimeout parameter. Instead, use WebDriver:SetTimeout or the timeouts capability to define this value (bug 1510929).
    • In addition, indefinite script timeouts are now supported (bug 1128997).
  • WebDriver:SetWindowRect no longer returns the window state in its response (bug 1517587).

Bug fixes

Changes for add-on developers

API changes

  • Extension menu items of the "bookmark" type will also appear in the Bookmarks sidebar (Ctrl + B) and Library window (Ctrl + Shift + B) (bug 1419195).

Manifest changes

No changes.

See also

Older versions

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据

词条统计

浏览:115 次

字数:21355

最后编辑:7 年前

编辑次数:0 次

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文