Firefox 70 for developers 编辑
This article provides information about the changes in Firefox 70 that will affect developers. Firefox 70 was released on October 22, 2019.
Changes for web developers
Developer tools
Debugger updates
- In the Debugger you can now set breakpoints for DOM Mutation, so execution will pause when a node or its attibutes are changed or when a node is removed from the DOM (bug 1576219).
- The Debugger now shows an overlay on the page when it is paused, with basic stepping buttons to let you step and continue (bug 1574646).
- The Debugger now shows sources that already got discarded by the engine (usually scripts that execute once during page load), so you can properly set breakpoints to debug when they execute next (bug 1572280).
- The Debugger's scopes panel grouping has been simplified, consolidating additional scopes previously shown above the top level function (e.g. blocks created by
let
,with
, orif
/else
) (bug 1448166) - The Debugger now retains the currently selected and expanded variables in the scopes panel while stepping (bug 1405402).
- The Debugger now handles stepping over async functions correctly, making asynchronous function debugging easier (bug 1570178).
- When debugging in Container sessions (useful for testing different logins), the sources in the debugger are now shown correctly (bug 1375036).
debugger
statements can be now disabled in the Debugger by setting a breakpoint on them and switching the breakpoints to "Never pause here" (bug 925269).- WebExtensions developers can inspect
browser.storage.local
from the Extension Storage item under the Storage tab (bug 1585499).
Other updates
- An icon will be displayed next to inactive CSS properties in the Rules view of the Page Inspector, which you can hover over to get information on why it is inactive (bug 1306054).
- In the CSS Rules view, the color picker on foreground colors now tells you whether its contrast with the background color meets accessibility conformance criteria (bug 1478156).
- The Accessibility inspector's Check for issues dropdown now includes keyboard accessibility checks (bug 1564968).
HTML
- Firefox can now suggest securely-generated passwords to the user in the following situations:
- An
<input>
element has theautocomplete="new-password"
attribute value. - The user opens the context menu on any password input element, even if it is not intended for new passwords.
- An
CSS
- Opacity values like for
opacity
orstop-opacity
can now be percentages (bug 1562086). grid-auto-columns
andgrid-auto-rows
now accept multiple track-size values (bug 1339672).- A number of text-related CSS properties have been enabled by default (bug 1573631):
text-decoration-thickness
.text-underline-offset
.text-decoration-skip-ink
. The default value isauto
, which means that by default underlines and overlines are now interrupted where they would otherwise cross over a glyph.
- The
display
property now accepts two keyword values representing the inner and outer display type (bug 1038294, bug 1105868 and bug 1557825). - The
font-size
property now accepts the new keyword valuexxx-large
. (bug 1553545). - The
:visited
pseudo-class no longer matches<link>
elements, for logic and performance reasons (bug 1572246; see Intent to ship: Make <link> elements always unvisited and [selectors] :link and <link> for more reasoning as to why). - We now support an
auto
value for thequotes
property (bug 1421938). - Stylesheets contained in
<style>
elements are now cached for reuse, to improve performance (bug 1480146). Note that this currently doesn't include stylesheets that contain@import
rules. - The
<ratio>
type now accepts<number>/<number>
or a single<number>
as a value. (bug 1565562).
Removals
- We have retired support for 3-valued <position> (excluding background)(bug 1559276). See site compat note.
- The
none
value is now invalid incounter()
/counters()
— a change which makes the Level 3 spec match CSS 2.1 bug 1576821).
SVG
- Cut, copy, and paste events are now dispatched to SVG graphics elements (bug 1569474).
MathML
- The deprecated
mode
attribute on<math>
elements has been removed (bug 1573438). - Non-zero unitless length values, such as
5
for500%
, are no longer supported. - Length values ending with a dot, such as
2.
or34.px
, are also unsupported now.
JavaScript
- Numeric separators are now supported (bug 1435818).
- The
Intl.RelativeTimeFormat.formatToParts()
method has been implemented (bug 1473229). - The
BigInt.prototype.toLocaleString()
method has been updated to work with thelocales
andoptions
parameters per the ECMAScript 402 Intl API. Also,Intl.NumberFormat.format()
andIntl.NumberFormat.formatToParts()
now acceptBigInt
values (bug 1543677). - Per the latest ECMAScript specification, a leading zero is now never allowed for BigInt literals, making
08n
and09n
invalid similar to the existing error when legacy octal numbers like07n
are used. Always use a leading zero with the letter "o" (lowercase or uppercase) for octalBigInt
numbers (i.e.0o755n
instead of0755n
). See bug 1568619. - The Unicode extension key "nu" is now supported for the
Intl.RelativeTimeFormat
constructor and theIntl.RelativeTimeFormat.resolvedOptions()
method now also returnsnumberingSystem
(bug 1521819).
APIs
DOM
- The
back()
,forward()
, andgo()
methods are now asynchronous. Add a listener to the
event to get notification that navigation has completed bug 1563587.popstate
- We've added support
DOMMatrix
,DOMPoint
, etc. in web workers (bug 1420580). - A few more members have been moved from
HTMLDocument
toDocument
, includingDocument.all
,Document.clear
,Document.captureEvents
, andDocument.clearEvents
(bug 1558570, bug 1558571). - Notification permission can no longer be requested from inside a cross-origin
<iframe>
(bug 1560741).
Media, Web Audio, and WebRTC
- The
RTCPeerConnection.restartIce()
method has been added. This is one of the four changes needed to implement the new "perfect negotiation" mechanism; the rest will come in future Firefox updates (bug 1551316). - The
RTCPeerConnection.setRemoteDescription()
method can now be called with no parameters. This is another "perfect negotiation" update (bug 1568292). MediaTrackSupportedConstraints.groupId
is now supported, and returnstrue
since theMediaTrackConstraints.groupId
property is now supported (bug 1561254).- Several new Web Audio API features have been implemented/updated:
AudioContext.getOutputTimestamp()
implemented (bug 1324545).AudioContext.baseLatency
andAudioContext.outputLatency
implemented (bug 1324552).MediaElementAudioSourceNode.mediaElement
andMediaStreamAudioSourceNode.mediaStream
implemented (bug 1350973).- The
ChannelMergerNode()
constructor now throws errors if you try to setchannelCount
andchannelCountMode
to invalid values (bug 1456263).
Canvas and WebGL
- We now support
CanvasRenderingContext2D.getTransform()
, and the newer variant ofCanvasRenderingContext2D.setTransform()
that accepts a matrix object as a parameter rather than multiple parameters representing the individual components of the matrix (bug 928150).
HTTP
- The default referrer policy for third-party tracking resources is now
strict-origin-when-cross-origin
when Enhanced Tracking Protection is turned on (bug 1569996). - The size of the
Referer
request header is now limited to 4 KB (4,096 bytes). If an overly long referer exceeds the defined limit, only the origin part will be sent (bug 1557346). - The HTTP cache is now partitioned per the top-level document's origin (bug 1536058).
Removals
- The
X-Frame-Options
allow-from uri
directive has been removed. Use theContent-Security-Policy
header with theframe-ancestors
directive instead (bug 1301529).
WebDriver conformance (Marionette)
- Updated the
WebDriver:TakeScreenshot
command to be Fission compatible. It means that content from cross-origin iframes is now included in a page's screenshot. Or when using it from chrome scope that the active tab's content is visible now inside the browser window. (bug 1559592). WebDriver:TakeScreenshot
no longer accepts a list of DOM elements as used for highlighting (bug 1575511).WebDriver:ExecuteScript
andWebDriver:ExecuteAsyncScript
no longer setswindow.onunload
in ways that are web-exposed (bug 1568991).
Changes for add-on developers
API changes
- Added a new parameter to the
topSites.get()
method that causes the method to return the list of pages that appear when the user opens a new tab (bug 1568617). - The
privacy.network
property'sWebRTCIPHandlingPolicy
sub-property's permitted values have been amended (in bug 1452713) to match the behavior seen in Chrome as follows:disable_non_proxied_udp
previously prevented the use of WebRTC if no proxy was configured. Now a proxy is always used if one is configured, but otherwise a non-proxied connection is permitted.proxy_only
can be used to provide the old behavior; this has the effect of only allowing ICE negotiation over TURN on TCP using a proxy; no other connections are allowed.
Manifest changes
Removals
The following theme key properties, which provided aliases for theme keys used in chromium-based browsers, were removed:
images
propertyheaderURL
, themes should now usetheme_frame
.colors
properties:accentcolor
, themes should now useframe
.textcolor
, themes should now usetab_background_text
.
See also
- Hacks release post: Firefox 70 — a bountiful release for all
- Site compatibility for Firefox 70
Older versions
- 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
- Firefox 39 for developers
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论