Firefox 55 for developers 编辑

Firefox 55 was released on August 8, 2017. This article lists key changes that are useful for web developers.

Changes for Web developers

Developer Tools

HTML

CSS

SVG

JavaScript

APIs

New APIs

  • The Collaborative Scheduling of Background Tasks API (also known as the Background Tasks API or the requestIdleCallback API) is now enabled by default after being available behind a preference since Firefox 53. This API lets you schedule tasks to be executed when the browser determines that there's free time available before the next repaint occurs, so that your code can make use of that time without causing visible performance lag (bug 1314959).
  • The WebVR 1.1 API is now turned on by default on Windows (and is available on macOS in Nightly). This API exposes virtual reality devices — for example head-mounted displays like the Oculus Rift or HTC Vive — to web apps, enabling developers to translate position and movement information from the display into movement around a 3D scene, and present content into such displays.
  • The Intersection Observer API — which provides a way to asynchronously observe changes in the intersection of a target element with an ancestor element or with a top-level document's viewport — has been added (bug 1321865).

DOM

DOM events

Selection API

Workers

Service Workers/Push

Web Audio API

  • A non-standard constructor (which accepted a string enum value indicating the purpose for which the context would be used) for AudioContext interface was causing errors to be thrown when the options parameter was provided. We have removed the non-standard constructor. However, please note that the options parameter is not yet supported in Firefox and is currently ignored (bug 1361475).

WebRTC

  • getUserMedia() now provides a stereo audio stream by default if the source device provides stereo sound; support to specifically request mono input will come in Firefox 56. This only works on desktop at this time; mobile Firefox does not currently support stereo audio input sources (bug 971528).
  • The getUserMedia() media capabilities, constraints, and settings autoGainControl and noiseSuppression now match the spec; formerly they were moz-prefixed (bug 1366415).
  • When called with an empty constraints set, getUserMedia() was incorrectly returning NotSupportedError instead of TypeError. This has been fixed (bug 1349480).
  • The following new WebRTC statistics are available: framesEncoded, pliCount, nackCount, and firCount (bug 1348657).
  • The RTCInboundRTPStreamStats dictionary field formerly called mozRtt has been renamed to roundTripTime to match the specification; in addition, its behavior has been adjusted to match the standard: it contains a double-precision floating point value which estimates the round-trip time based on the RTCP timestamps in the RTCP Receiver Report, measured in seconds (following the algorithm described in RFC 3550, section 6.4.1). (bug 1344970). However, please be aware that this property is moving to a different dictionary (RTCRemoteInboundRTPStreamStats) soon (bug 1380555).
  • The RTCRTPStreamStats dictionary now includes the fields firCount, pliCount, and nackCount. These return low-level information that can be used to determine how reliable the connection is (bug 1348657).
  • The RTCOutboundRTPStreamStats dictionary now includes the field framesEncoded, which reports the number of frames that have been successfully encoded for the stream; with this information, you can compute the frame rate (bug 1348657).
  • On Android, there's now a pref to turn on hardware video encoding to improve video call performance and save on battery. To be enabled by default in Firefox 56 (bug 1265755).

Encrypted Media Extensions API

  • Firefox currently allows Encrypted Media Extensions to be used in insecure contexts, despite this not being allowed in the specification. This will be changed in the near future, and starting in Firefox 55, deprecation warnings are ouptut to the web console when this is done. (bug 1361000).
  • Firefox currently doesn't require that at least one MediaKeySystemCapabilities object be included in the suggestedConfigurations parameter passed into Navigator.requestMediaKeySystemAccess(), which the specification does mandate. Starting in Firefox 55, a warning is output to the web console when any audio or video configuration is specified without specifying supported codecs. Soon, failure to include a valid configuration for one or more of audio and video will throw an exception bug 1368683).

WebGL

Security

Plugins

  • Flash content is now "click-to-activate" (bug 1317856). This was immediately put into effect for all users of Nightly, and 50% of beta users. For Firefox 55 release version, the plan is to activate this for 5% of users 2 weeks after release, 25% of users 4 weeks after release, and 100% of users 6 weeks after release (bug 1365714).
  • Flash and other plugins can no longer be loaded from any URL scheme except for http:// and https:// (bug 1335475).

Other

Removals from the web platform

HTML

CSS

APIs

SVG

  • The SVGZoomEvent and SVGZoomEvents interfaces have been removed from the SVG2 spec and Gecko, along with the onzoom <svg> attribute (bug 1314388).

Changes for add-on and Mozilla developers

WebExtensions

See also

Older versions

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

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

发布评论

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

词条统计

浏览:126 次

字数:36249

最后编辑:8年前

编辑次数:0 次

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