Firefox 61 for developers 编辑
This article provides information about the changes in Firefox 61 that will affect developers. Firefox 61 was released on June 26, 2018.
Changes for web developers
Developer tools
- The new-look Console UI has been enabled by default for the Browser Console & Browser Toolbox (bug 1362023/bug 1347127). The old UI has been removed.
- In the Network Monitor, clicking Open in New Tab in a
POST
request's context menu correctly resends the request with the expectedPOST
parameters (bug 1407515). - CSS variables now autocomplete with color swatches, allowing you to see exactly what color value is stored in each variable (bug 1451211).
- In addition, hovering over a CSS variable name brings up a tooltip showing what color value is stored in that variable (bug 1431949).
- The main toolbox's toolbar has been redesigned. Highlights are better responsiveness for narrow and wide viewports with a new overflow dropdown, cleaned up meatball menu, and sortable tabs to let you move up your most used panels (bug 1226272).
- The Network Monitor's toolbar now includes a dropdown menu providing easier access to the 'Copy All As HAR' and 'Save All As HAR' commands, as well as an 'Import...' option (bug 1403530).
- The Network Monitor's details pane now includes a Cache tab, which displays information about previously cached resources (bug 859051).
- The Network Monitor's main toolbar got redesigned to be more responsive on smaller viewports and visually aligned with the Console.
- The Network Monitor's main toolbar now includes a Throttling dropdown which was only available in the Responsive Design Mode before. It allows you to throttle your network speed to emulate various different network speed conditions (bug 1349559).
- The Browser Console now hides CSS errors by default for readability and performance reasons (bug 1452143).
- The Browser Console now includes a command to restart the browser. Use Ctrl + Alt + R (Windows, Linux) or Cmd + Alt + R (Mac) to restart the browser with the same tabs open as before the restart.
- DevTools' web extension APIs
devtools.network.onRequestFinished
(bug 1311171) anddevtools.network.getHAR
(bug 1311177) got implemented (enabling extensions like har-export-trigger). - The Firebug theme got removed since the transition of Firebug users into DevTools is complete (bug 1378108).
HTML
No changes.
CSS
- CSS parsing has been parallelized (bug 1346988).
- Support for
font-variation-settings
andfont-optical-sizing
has been enabled by default (bug 1447163). - The
grid-gap
,grid-row-gap
, andgrid-column-gap
properties have been renamed togap
,row-gap
, andcolumn-gap
, as they are no longer grid-specific (bug 1398482). See Box alignment; Gaps between boxes for additional details. The old names have been kept as aliases for web compatibility purposes. - The
flex-basis
content
value is now supported (bug 1105111). - Percentage values of
column-gap
are now supported in CSS multi-column layout (bug 1398537). - The CSS
:host
pseudo-class is now supported; this selects a custom element from inside its shadow DOM (bug 992245). overflow
now accepts two-value syntax (bug 1453148).- Flex items that are sized according to their content are now sized using
max-content
, notfit-content
(bug 1282821). See thewidth
value definitions for more details of these values. font-weight
,font-stretch
andfont-style
now support additional values as defined by CSS Fonts level 4 (bug 1436048):font-weight
now accepts a floating-point value between 1 and 1000 inclusive.font-stretch
now accepts percentage values.font-style
now accepts an angle after theoblique
keyword.
- The
@font-face
descriptor equivalents of the three properties mentioned in the above entry also support the new syntax listed above, and additionally now support a two-value syntax allowing us to specify a range of descriptor values supported by a font-face (bug 1436061, bug 1436048).
SVG
- The
ping
,rel
,referrerPolicy
,relList
,hreflang
,type
andtext
properties have been added to the<a>
element (SVGAElement
) to be consistent with the HTML<a>
element (bug 1451823). - The
<textPath>
element (SVGTextPathElement
) now supports the SVG2path
andside
attributes (bug 1446617 and bug 1446650). - The
SVGGeometryElement
interface is now supported for more elements and not just for the<path>
element (bug 1325320).
JavaScript
- The
String.prototype.trimStart()
andString.prototype.trimEnd()
methods have been implemented (see bug 1434007).trimLeft
andtrimRight
remain as aliases for web compatibility reasons.
APIs
New APIs
- The
PerformanceServerTiming
API has been implemented. It surfaces server-side metrics sent via theServer-Timing
header (bug 1423495).
DOM
- The
anchors
,applets
,embeds
,forms
,head
,images
,links
,plugins
, andscripts
properties have been moved from theHTMLDocument
interface ontoDocument
(bug 1415588). DOMTokenList.replace()
now returns a boolean value to indicate whether the replacement occurred successfully, rather than void (bug 1444909).- The Fetch API's
Request.credentials
property now defaults to"same-origin"
per the latest revision of the specification (bug 1394399). - The
Request.destination
property has been implemented (bug 1402892). - The
MutationObserver
option dictionary,MutationObserverInit
, no longer hasfalse
as the default value of all of its Boolean properties. Now, onlychildList
andsubtree
have default values (offalse
still). The other properties have no default values (bug 973638). - The Payment Request API method
PaymentRequest.show()
now supports using aPromise
to let the client side code provide updated payment details prior to activating the payment interface (bug 1441709).
DOM events
No changes.
Service workers
The "Forget" button, available in Firefox's customization options, now clears service workers and their caches (bug 1252998).
Web Audio, Media and WebRTC
- The
AudioContext()
constructor now accepts an optionaloptions
parameter of typeAudioContextOptions
. This lets you configure the preferred latency and/or sample rate for the new context. - Firefox now throws the correct exceptions when instantiation of an
AudioBuffer
fails.
WebVR
- The WebVR API has been enabled by default on macOS (bug 1244242).
Canvas and WebGL
No changes.
CSSOM
- The
CSSStyleRule.selectorText
property is now fully implemented and no longer read-only (bug 37468). - The
MediaList
interface implementation is now a little closer to the specification. It is not all the way there yet; for example, stringifier attributes haven't been implemented yet (bug 1455807).
HTTP
- The cookie directive
SameSite
has been implemented. See Set-Cookie and HTTP cookies (bug 795346).
Networking
- Firefox 61 and later no longer support using the FTP protocol (that is, URLs with the
"ftp://"
scheme) to load subresources from within HTML content. FTP is still supported as a top-level URL entered directly into the URL bar or loaded as a standalone document (bug 1404744).
Security
No changes.
Plugins
No changes.
Other
No changes.
Removals from the web platform
Developer tools
Cmd/Ctrl + Shift + O no longer shows/hides the DevTools options panel — use F1 instead (bug 1409456).
HTML
No changes.
CSS
@-moz-document
has been disabled in content pages (bug 1422245).
APIs
- The
File
interface's propertylastModifiedDate
has been removed (bug 1458883). - The
Node.getUserData()
andNode.setUserData()
methods have been removed from the platform completely (bug 749981). - The
Element.createShadowRoot()
method has been removed. UseElement.attachShadow()
instead (bug 1453789). - The
MediaStream
overload of theURL.createObjectURL()
method has been removed (bug 1454889).
SVG
- The deprecated (and never properly implemented)
SVGViewElement
.viewTarget
property has been removed (bug 1455763). - The following deprecated properties have been removed from
SVGSVGElement
(bug 1133172):pixelUnitToMillimeterX
pixelUnitToMillimeterY
screenPixelToMillimeterX
screenPixelToMillimeterY
- The non-standard
SVGNumber()
constructor has been removed (bug 1455940).
Other
No changes.
Changes for add-on and Mozilla developers
WebExtensions
- Autocomplete popups are now themeable (bug 1417883).
tabs.onUpdated
now has a filter template (bug 1329507).- The default document colors can now be overridden, using
browserSettings.overrideDocumentColors
(bug 1417810). - tabs.query has been optimized with the implementation of some useful search/filter option parameters (bug 1445316).
- You can now use
permissions.request
from anabout:addons
preferences page (bug 1382953). - You can now force web pages to use system fonts instead of the fonts they specify using the
browserSettings.useDocumentFonts
property (bug 1400805). - You can now cause browser search autocomplete suggestions to automatically open in a new tab rather than the current tab using the
browserSettings.openUrlbarResultsInNewTabs
property (bug 1432645). - You can control whether the user can close a tab using double-click with the
browserSettings.closeTabsByDoubleClick
property (bug 1435142). - The
toolbar
,toolbar_text
,toolbar_field
,toolbar_field_text
, andtoolbar_field_border
theme manifest properties now also apply to the findbar (bug 1418605). - In
sidebarAction.getPanel()
,sidebarAction.getTitle()
,sidebarAction.setPanel()
,sidebarAction.setTitle()
, andsidebarAction.setIcon()
, you can now specify awindowId
so that the features will be set/got only for a specific window (bug 1390464). tabs.hide()
andtabs.show()
are now enabled by default (bug 1455040).- The first time an extension hides a tab, the browser will tell the user that the tab is being hidden, show them how they can access the hidden tab, and give them the option of disabling the extension instead (bug 1438363).
See also
Older versions
- 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
- Firefox 38 for developers
- Firefox 37 for developers
- Firefox 36 for developers
- Firefox 35 for developers
- Firefox 34 for developers
- Firefox 33 for developers
- Firefox 32 for developers
- Firefox 31 for developers
- Firefox 30 for developers
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论