Firefox 71 for Developers 编辑
This article provides information about the changes in Firefox 71 that will affect developers. Firefox 71 was released on December 3, 2019.
Changes for web developers
Developer tools
- The Console's multi-line mode is now available by default.
- Console configuration options are now combined in a new toolbar settings menu (bug 1523868).
- Inline variable preview has been enabled (bug 1576679).
- Logging on events is now available (bug 1110276), as is the ability to filter by event type.
- The new debugger paused overlay can now be disabled using the
devtools.debugger.features.overlay
pref (bug 1579768). - We've got new keyboard shortcuts for opening the debugger: Ctrl + Shift + Z on Linux/Windows and Cmd + Opt + Z on macOS (bug 1583042).
- Pausing on a DOM Mutation Breakpoints now mentions the DOM node that has the breakpoint and, if available, the child node that was added/removed (bug 1576145).
- Locations in pretty printed sources are now correct after pretty-printing and when jumping to the source from the Inspector's events listener tooltip (bug 1500222).
- The Web sockets inspector is now enabled by default (bug 1573805).
- You can now do a full text search of request/response bodies, headers, and cookies.
- You can now enter patterns to block specific URLs from loading.
- The Timings tab now exposes timing data sent in the
Server-Timing
header (bug 1403051).
- Color swatches are now shown next to CSS variable definitions that have color values (bug 1456167).
:visited
styles are now shown in the CSS rules view (bug 713106).
CSS
- Added the subgrid value from CSS Grid Level 2 to
grid-template-columns
andgrid-template-rows
(bug 1580894) - Added support for the
column-span
property to Multiple-column Layout (bug 1426010) - Added support for the
path()
value ofclip-path
(bug 1488530) - Mapped the
height
andwidth
HTML attributes on the<img>
element to an internalaspect-ratio
property (bug 1585637). See the guide to this feature on MDN.
Removals
- CSS Radial Gradients no longer accept negative radii (bug 1583736); also see the site compat note.
JavaScript
- The
Promise.allSettled()
method is now supported (bug 1549176). This method lets you easily wait until every promise in a set of promises has either resolved or rejected before running further code.
Removals
- The non-standard Array generic methods have been removed in Firefox 71 (bug 1222547). They were first introduced in Firefox 1.5 (JavaScript 1.6) and deprecated from Firefox 68 onwards. If your use case is to use array generics on array-like objects, you can convert your object to a proper array using
Array.from()
and then use standard array methods.
MathML
- MathML elements now implement a MathML DOM and their class is
MathMLElement
. With a proper MathML DOM, you can now usemathmlEl.style
, or global event handlers, for example. Prior to this change, MathML elements only implemented theElement
class (bug 1571487).
APIs
New APIs
The Media Session API is now partially implemented. This API provides a standard mechanism for your content to share with the underlying operating system information about the state of media it's playing. This includes metadata such as artist, album, and track name, as well as potentially album artwork (bug 1580602).
The API also provides a way to receive notifications when the device's media controls (such as play, pause, and seek buttons) are activated by the user. To that end, the MediaSession
interface is now partially implemented, with support for setting and fetching the currently-playing media's metadata. and for the setActionHandler()
method. To access the MediaSession
API, use the navigator.mediaSession
property.
DOM
- The
StaticRange()
constructor is now supported (bug 1575980). - The MathML
MathMLElement
interface has been implemented (bug 1571487).
Media, Web Audio, and WebRTC
- The
MediaRecorder
interface now implements theaudioBitsPerSecond
andvideoBitsPerSecond
properties (bug 1514158).
Canvas and WebGL
- The
OVR_multiview2
andOES_fbo_render_mipmap
WebGL extensions are now exposed by default (bug 1584277, bug 1583878).
Removals
The following non-standard DataTransfer
members have been removed (bug 1345192):
DataTransfer.mozItemCount
DataTransfer.mozClearDataAt()
DataTransfer.mozGetDataAt()
DataTransfer.mozSetDataAt()
DataTransfer.mozTypesAt()
WebDriver conformance (Marionette)
- Both the
WebDriver:TakeScreenshot
andWebDriver:TakeElementScreenshot
commands have been updated to respect the unhandled prompt behavior setting (bug 1584927). - The command
Marionette:Quit
has been updated to also allow quitting or restarting of other Gecko-driven applications besides Firefox (bug 1298921). - For GeckoView-based browsers on Android, the returned
browserName
in the session capabilities will now always befirefox
(bug 1587364).
Changes for add-on developers
API changes
downloads.download
now identifies and reports as errors the following HTTP response codes:- 404 returning
SERVER_BAD_CONTENT
- 403 returning
SERVER_FORBIDDEN
- 402 and Proxy 407 returning
SERVER_UNAUTHORIZED
- Anything else above 400 returning
SERVER_FAILED
(bug 1576333)
- 404 returning
downloads.download
now includes the optionaloptions
parameter propertyallowHttpErrors
. When set totrue
, thisboolean
flag enables a download to continue after encountering an HTTP error. When set tofalse
, a download is canceled when an HTTP error is encountered. Default value:false
. (bug 1578955)
Removals
- The
proxy.register()
andproxy.unregister()
functions have been removed (bug 1443259).proxy.onRequest
should now be used to handle the proxying of requests.
See also
- Hacks release post: Firefox 71: A year-end arrival
- Site compatibility for Firefox 71
Older versions
- Firefox 70 for developers
- Firefox 69 for developers
- Firefox 68 for developers
- Firefox 67 for developers
- Firefox 66 for developers
- Firefox 65 for developers
- Firefox 64 for developers
- Firefox 63 for developers
- Firefox 62 for developers
- Firefox 61 for developers
- Firefox 60 for developers
- Firefox 59 for developers
- Firefox 58 for developers
- Firefox 57 for developers
- Firefox 56 for developers
- Firefox 55 for developers
- Firefox 54 for developers
- Firefox 53 for developers
- Firefox 52 for developers
- Firefox 51 for developers
- Firefox 50 for developers
- Firefox 49 for developers
- Firefox 48 for developers
- Firefox 47 for developers
- Firefox 46 for developers
- Firefox 45 for developers
- Firefox 44 for developers
- Firefox 43 for developers
- Firefox 42 for developers
- Firefox 41 for developers
- Firefox 40 for developers
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论