Firefox 51 for developers 编辑

To test the latest developer features of Firefox,
install Firefox Developer Edition
Firefox 51 was released on January 24, 2017. This article lists key changes that are useful not only for web developers, but also Firefox and Gecko developers as well as add-on developers.

Changes for Web developers

HTML

  • <hr> elements can now be used as separators in <menu> elements (bug 870388).
  • The <input> and <textarea> elements' selectionStart and selectionEnd attributes now correctly return the current position of the text input cursor when there's no selection, instead of returning 0 (bug 1287655).

CSS

JavaScript

Developer Tools

WebGL

IndexedDB v2

Canvas

SVG

Web Workers

Networking

XHR

WebRTC

  • The RTCPeerConnection.removeStream() method has been removed. It was deprecated back in Firefox 22, and has been throwing a NotSupportedError for a long time. You need to use RTCPeerConnection.removeTrack() instead, for each track on the stream.
  • WebRTC now supports the VP9 codec by default. When added in Firefox 46, VP9 was disabled by default, but when enabled was the preferred codec; however, it has been moved to be the second choice (after VP8) due to its current level of CPU usage.
  • The method HTMLMediaElement.captureStream(), which returns a MediaStream containing the content of the specified <video> or <audio>. It's worth noting that this is prefixed still as mozCaptureStream(), and that it doesn't yet exactly match the spec.

Audio/video

  • Added FLAC support (FLAC codec) in both FLAC and Ogg containers (bug 1195723). Supported FLAC MIME types are: audio/flac and audio/x-flac. For FLAC in Ogg, supported MIME types are: audio/ogg; codecs=flac, and video/ogg; codecs=flac.
  • Added support for FLAC in MP4 (both with and without MSE) (bug 1303888).
  • Throttling in background tabs of timers created by Window.setInterval() and Window.setTimeout() was changed in Firefox 50 to no longer occur if a Web Audio API AudioContext is actively playing sound. However, this didn't resolve all scenarios in which timing-sensitive audio playback (such as music players generating individual notes using timers) could fail to work properly. For that reason, Firefox 51 no longer throttles background tabs which have an AudioContext, even if it's not currently playing sound.

DOM

Events

Security

Removals

Changes for add-on and Mozilla developers

WebExtensions

Other

  • The multiprocessCompatible property of install.rdf must now be explicitly set to false to prevent multiprocess from being enabled in Firefox when the add-on is installed.
  • The Mozilla-specific Social API has been substantially changed (largely to remove APIs no longer used), as follows:
    • The MozSocial interface and the navigator.mozSocial property which supports it have been removed.
    • The Social Bookmarks API has been removed.
    • The Social chat functionality has been removed.
    • The Social Status API has been removed.
    • All of the social widgets, except for the Share panel, have been removed. This includes the social sidebar, flyover panels, and so forth.
    • All supporting user interface features and functionality for the removed APIs have been removed as well.
    • Social service provider manifest properties supporting the removed functionality are no longer supported.
  • If an add-on usesmimeTypes.rdf to provide a file extension to MIME type mapping, it must now register an entry in the "ext-to-type-mapping" category (bug 306471).
  • The Browser API now includes a detail object on the event object of the mozbrowserlocationchange event that contains canGoForward/canGoBack properties, allowing retrieval of the mozBrowser's back/forward status synchronously (bug 1279635).

See also

Older versions

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

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

发布评论

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

词条统计

浏览:68 次

字数:37159

最后编辑:6年前

编辑次数:0 次

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