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
- Added filtering of network requests by column values and other properties (bug 1041895, bug 1354508, bug 1354507) and by using regular expressions (bug 1354495).
- Made it possible to show and hide columns within the Network Monitor (bug 862855).
- Added remote IP (bug 1344523), protocol (bug 1345489), scheme (bug 1356867), cookies and set cookies columns (bug 1356869) to Network Monitor.
- The
SourceMap
HTTP header is now supported (prior versions supported the deprecatedX-SourceMap
header, see bug 1346936).
HTML
- Elements on which
contenteditable
has been set totrue
now use<div>
elements to separate different lines of text, to give Firefox parity with other modern browsers (bug 1297414). See Differences in markup generation for more details. - Enable
dom.forms.datetime
by default on Nightly (bug 1366188).
CSS
- Exposed the
transform-box
property by default (bug 1208550). - Implemented the frames() timing function (bug 1248340).
- Implemented the
text-justify
property (bug 1343512, bug 276079). - [css-grid]
fit-content
unexpectedly reserves space for full clamp size inrepeat()()
(bug 1359060). - The
float
/clear
logical values —inline-start
andinline-end
— which were previously implemented but preffed off in release channels, are now available in all channels by default (bug 1253919). - The
layout.css.variables.enabled
preference has been removed completely meaning that the CSS variables feature is enabled all the time and can no longer be disabled (bug 1312328). - Implemented the proprietary
-moz-context-properties
property (bug 1058040). - Zero (0) angle value without degree unit is not correctly interpreted in
linear-gradient()
(bug 1363292). - The
::cue
pseudo-element is now supported; it matches on text cues presented within a media element (bug 1318542).
SVG
- The
<radialGradient>
fr
attribute has been implemented (bug 1240275).
JavaScript
- The
SharedArrayBuffer
andAtomics
objects are now enabled by default. See A Taste of JavaScript’s New Parallel Primitives for an introduction to JavaScript Shared Memory and Atomics. - The rest operator (
...
) is now supported in object destructuring and the spread operator (...
) now works in object literals (Stage 3 ECMAScript proposal: Object Rest/Spread Properties, bug 1339395). - Async generator methods are now supported (bug 1353693).
- The
String.prototype.toLocaleLowerCase()
andString.prototype.toLocaleUpperCase()
methods now support an optionallocale
parameter to specify a language tag for locale-specific case mappings (bug 1318403). - The
Intl.Collator
object now supports thecaseFirst
option (bug 866473). - The Intl API now uses the browser's default locale instead of the operating system's default locale when no locale setting is provided (bug 1346674).
- Template call sites objects are now canonicalized per realm, based upon their list of raw strings (bug 1108941).
TypedArray
constructors (likeInt8Array
,Float32Array
, etc.) have been updated to ES2017. They now use theToIndex
operation and allow constructors without arguments, which return zero-length typed arrays (bug 1317383).
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
- The
Window
propertiesscrollX
andscrollY
(as well as their aliasespageXOffset
andpageYOffset
) have been updated to be subpixel precise. Instead of returning an integer, these now return a floating-point value which more accurately describes the scroll position on subpixel-precise displays (bug 1151421). If need be, you can useMath.round()
to convert them into integers. MediaQueryList
(and other related features) have been updated to match the latest spec. See bug 1354441, and also seeMediaQueryList
andMediaQueryListEvent
.- Methods of the
DOMTokenList
that modify the list value now automatically trim whitespace and remove duplicate tokens (bug 869788, also see Trimming of whitespace and removal of duplicates). - The
HTMLInputElement
'smaxLength
property can now be dynamically altered with JavaScript after the equivalent HTML has been created (bug 1352799). - The
URL()
constructor can no longer accept aDOMString
as its base (2nd parameter) — it only accepts aUSVString
. It can still use an existingURL
object for the base, which stringifies itself to the object'shref
attribute (bug 1368950).
DOM events
- The event types supported by the
Document.createEvent()
method have been updated as per the latest DOM spec (bug 1251198). - The
MessageEvent.origin
property value is now of typeUSVString
, notDOMString
, and theMessageEvent.source
property now takes aMessageEventSource
value (which can be aWindowProxy
,MessagePort
, orServiceWorker
object) (bug 1311324). - The pinch-to-zoom gesture has now been mapped to the
wheel
event plus the + Ctrl key. This mapping was implemented to allow developers to implement simple zooming functionality using the pinch-to-zoom gesture on mobile screens/trackpads (mousewheel + Ctrl commonly zooms) (bug 1052253).
Selection API
- The Selection API has been updated so that it has parity with other browsers in terms of how editing hosts are given focus when the selection moves inside them (bug 1318312). See Behavior of Selection API in terms of editing host focus changes for more details.
- The
Selection
API has been updated to match some recent spec changes (bug 1359371):- The
collapse()
andextend()
methods'offset
parameter is now optional. - The
collapse()
method'snode
parameter is now nullable. - The
containsNode()
method'spartialContainment
parameter is now optional. - The
deleteFromDocument()
method has been added.
- The
- Also in the
Selection
API,Selection.empty()
andSelection.setPosition()
have been added as aliases ofSelection.removeAllRanges()
andSelection.collapse()
, for web compat and WebKit/Blink parity reasons (bug 1359387). - The
StorageManager.persist()
andStorageManager.persisted()
methods of the Storage API have been implemented and exposed toWindow
contexts (bug 1286717).
Workers
- Workers and shared workers can now be created with an identifying
name
property. See theWorker()
andSharedWorker()
constructors, and theDedicatedWorkerGlobalScope
andSharedWorkerGlobalScope
interfaces. (bug 1364297). setTimeout()
andsetInterval()
are now subject to minimum interval throttling for tracking scripts in background tabs — see Throttling of tracking timeout scripts (bug 1355311).
Service Workers/Push
- Messages sent to service worker contexts (e.g. as the event object of
onmessage
are now represented byMessageEvent
objects, for consistency with other web messaging features. They used to be represented byServiceWorkerMessageEvent
objects, which have now been deprecated (bug 1311324). - The
PushManager.subscribe()
method now acceptsArrayBuffer
s and Base64-encoded strings asapplicationServerKey
values (bug 1337348).
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 theoptions
parameter was provided. We have removed the non-standard constructor. However, please note that theoptions
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 settingsautoGainControl
andnoiseSuppression
now match the spec; formerly they weremoz
-prefixed (bug 1366415). - When called with an empty constraints set,
getUserMedia()
was incorrectly returningNotSupportedError
instead ofTypeError
. This has been fixed (bug 1349480). - The following new WebRTC statistics are available:
framesEncoded
,pliCount
,nackCount
, andfirCount
(bug 1348657). - The
RTCInboundRTPStreamStats
dictionary field formerly calledmozRtt
has been renamed toroundTripTime
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 fieldsfirCount
,pliCount
, andnackCount
. These return low-level information that can be used to determine how reliable the connection is (bug 1348657). - The
RTCOutboundRTPStreamStats
dictionary now includes the fieldframesEncoded
, 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 thesuggestedConfigurations
parameter passed intoNavigator.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
- The
WEBGL_compressed_texture_s3tc_srgb
extension is now available to WebGL and WebGL2 contexts (bug 1325113).
Security
- The
Geolocation
API is now available only to secure contexts (bug 1072859). - The
Storage API
is now available only to secure contexts (bug 1268804). - The loading of mixed content is now allowed on localhost (bug 903966).
- Loading of remote JAR files has been disabled again (bug 1329336). See Security and the jar protocol for the full story.
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://
andhttps://
(bug 1335475).
Other
- Firefox on Linux can now be made to run in headless mode using the
-headless
flag (see bug 1356681).
Removals from the web platform
HTML
- The
xml:base
attribute can no longer be used to set the base URL for paths appearing in thestyle
attribute, for example —<div xml:base="https://example.com/" style="background:url(picture.jpg)"></div>
(bug 1350521). See also xml:base for style attribute has been disabled. The
<style>
element'sscoped
attribute has been hidden behind a pref (layout.css.scoped-style.enabled
) in content documents in Firefox 55+, as no other browsers support it.Support for the obscure
MSThemeCompatible
value of the<meta>
element'shttp-equiv
attribute has been removed from Gecko. No other modern browsers support it, and it was causing compatibility problems (bug 966240).
CSS
- The proprietary
:-moz-bound-element
pseudo-class has been removed (bug 1350147). - The proprietary
-moz-anchor-decoration
value oftext-decoration-line
has been removed (bug 1355734).
APIs
- The
UIEvent.isChar
property has never been supported by any browser but Firefox, and it has never been fully-implemented except on macOS. For that reason, it was removed in Firefox 55 to align with other browsers. - The proprietary Firefox OS Device Storage API has been removed from the platform (bug 1299500).
- The
aShowDialog
parameter of the non-standardWindow.find()
method (which could be specified to open up a "Find" dialog in the browser) has been removed (bug 1348409). - The
HTMLFormElement.requestAutoComplete()
method has been removed (seeHTMLFormElement
) (bug 1270740). - The non-standard, Mozilla-specific, WebRTC offer options
mozDontOfferDataChannel
andmozBundleOnly
have been removed from theRTCOfferOptions
dictionary and are no longer supported byRTCPeerConnection.createOffer()
(bug 1196974). - Support for the proprietary Firefox OS Audio Channels API has been removed from
HTMLMediaElement
andAudioContext
(bug 1358061).
SVG
- The
SVGZoomEvent
andSVGZoomEvents
interfaces have been removed from the SVG2 spec and Gecko, along with theonzoom <svg>
attribute (bug 1314388).
Changes for add-on and Mozilla developers
WebExtensions
- contextMenus.create()'s command property enables you to open browser action popups, page action popups, and sidebars from the context menu.
- proxy API
- chrome_settings_overrides key enables you to override the browser's homepage.
- browser_style property enables you to have browser-like styling for browser action popups, sidebars, and options pages.
- permissions API
See also
Older versions
- 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
- Firefox 29 for developers
- Firefox 28 for developers
- Firefox 27 for developers
- Firefox 26 for developers
- Firefox 25 for developers
- Firefox 24 for developers
发布评论