Back to Content

Firefox 52 release notes for developers

files/en-us/mozilla/firefox/releases/52/index.md

latest23.3 KB
Original Source

Firefox 52 was released on March 7, 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

Developer Tools

All devtools bugs fixed between Firefox 51 and Firefox 52.

HTML

CSS

New features

  • Added {{cssxref(":focus-within")}} pseudo-class (Firefox bug 1176997).

  • Added support for display:flex/grid and columnset layout inside {{HTMLElement("button")}} elements (Firefox bug 984869).

  • Implemented interpolation between numeric color and currentColor (Firefox bug 1299741).

  • Implemented flexbox layout for {{cssxref("justify-content")}}: space-evenly and {{cssxref("align-content")}}: space-evenly (Firefox bug 1235922).

  • Added support for subpixel antialiasing in CSS {{cssxref("mask")}} / {{cssxref("clip-path")}} (Firefox bug 1305259).

  • Implemented CSS Text 3 segment break transformation rules (Firefox bug 1081858).

  • Basic shape clipping (as applied via the {{cssxref("clip-path")}} property) can now be applied to SVG content (Firefox bug 1246741).

  • Implemented Flexbox layout for {{cssxref("align-self")}} and {{cssxref("justify-self")}} (Firefox bug 1221524).

  • The {{cssxref("touch-action")}} property is now enabled by default on all platforms. (For the full story, see intent to ship mail #1 and intent to ship mail #2.)

  • Flexbox {{cssxref("align-content")}} handling & single-line-sizing should depend on {{cssxref("flex-wrap")}}, not number of lines (Firefox bug 1090031).

  • CSS Animations can now be used to animate non-interpolated properties (see Firefox bug 1064937).

  • Changed baseline|last-baseline to [ first | last ]? baseline (Firefox bug 1313254).

  • The used value for left/right is start for the block-axis (Firefox bug 1221565).

  • Stretching flexible tracks with an indefinite containing block length now respects the min/max size(Firefox bug 1309407).

  • The initial values of {{cssxref("mask-position")}} and {{cssxref("mask-repeat")}} have been changed to 0% 0% and repeat, respectively (Firefox bug 1308963).

  • There have been a number of changes to CSS {{cssxref("<color>")}} values (see Firefox bug 1295456):

    • rgba() and hsla() have now been redefined as aliases of rgb() and hsl(); both accept the same parameter syntax.
    • rgb() and hsl() now accept an optional alpha value, e.g., rgb(255, 0, 0, 0.5).
    • Color functions now accept space-separated parameters rather than commas, e.g., rgb(255 0 0 / 0.5).
    • Alpha values can now be specified as percentages as well as numbers, e.g., rgb(255 0 0 / 50%).
    • The hue component in hsl() colors can now be specified as an angle, as well as a number, e.g., hsl(120deg, 60%, 70%).
  • Firefox's implementation of child-indexed pseudo-classes (such as {{cssxref(":nth-child")}}, {{cssxref(":first-child")}}, and so forth) has been updated to match the CSS selectors level 4 specification: these pseudo-classes now match the appropriate sibling elements rather than the children of their parent element. This allows these pseudo-classes to be used when there is no parent, or the parent is not an {{domxref("Element")}} (Firefox bug 1300374.

CSS Grids

Changes and removals

JavaScript

New features

Changes and removals

  • Array destructuring now throws a {{jsxref("SyntaxError")}} when using destructuring rest with trailing comma (Firefox bug 1041341).
  • Duplicate __proto__ properties are now allowed in object destructuring (Firefox bug 1204024).
  • {{jsxref("Array.prototype.toLocaleString()")}} has been re-implemented to support the Intl API parameters locales and options (Firefox bug 1130636).
  • {{jsxref("TypedArray")}} constructors now accept iterables to create new typed arrays (Firefox bug 1232266).
  • {{jsxref("TypedArray.from()")}}, {{jsxref("TypedArray.of()")}}, {{jsxref("TypedArray.prototype.filter()")}}, {{jsxref("TypedArray.prototype.map()")}}, {{jsxref("TypedArray.prototype.slice()")}}, {{jsxref("TypedArray.prototype.subarray()")}} now require that their this values are valid Typed Array constructors (Firefox bug 1122396).
  • The non-standard {{jsxref("ArrayBuffer.slice()")}} method (not {{jsxref("ArrayBuffer.prototype.slice()")}}) is deprecated and now presents a warning when used (Firefox bug 1316913).
  • Unicode code point escapes can now also be used as identifiers (e.g., let \u{61} = 123, see Firefox bug 1314037).
  • To conform with ES2015, \u2e2f and now throw when used as identifier, for details see Firefox bug 917436 and Firefox bug 1197230.

WebAssembly

DOM

  • The Selection API has fully shipped, including the new {{domxref("Node/selectstart_event", "selectstart")}} and {{domxref("Document/selectionchange_event", "selectionchange")}} events (Firefox bug 1309612).
  • The property {{domxref("Event.composed")}} is now supported; this Boolean value indicates whether or not the event can bubble through the shadow root into the standard DOM (Firefox bug 1292063).
  • Only HTML elements, plus the {{SVGElement("svg")}} and {{MathMLElement("math")}} elements, can be put into full-screen mode by calling {{domxref("Element.requestFullscreen()")}} (Firefox bug 1305928).
  • Touch events have been re-enabled on Windows desktop platforms — see Firefox bug 1244402. (They were disabled in Firefox 24 because they broke a number of major sites; see Firefox bug 888304.)
  • The {{domxref("Element/focusin_event", "focusin")}} and {{domxref("Element/focusout_event", "focusout")}} events are now implemented (Firefox bug 687787).
  • The {{domxref("WorkerGlobalScope.isSecureContext")}} property has been implemented (see Firefox bug 1269052).
  • The Web App Manifest install event has been renamed {{domxref("Window.appinstalled_event", "appinstalled")}} to avoid confusion with the service worker install event (see {{domxref("ServiceWorkerGlobalScope.install_event", "oninstall")}}). See Firefox bug 1309099 for more details about this update.
  • The {{domxref("DataTransfer.types")}} property of the Drag and drop API now returns a frozen array of strings rather than a {{domxref("DOMStringList")}} (see Firefox bug 1298243).
  • The loadstart and loadend events are now fired on {{htmlelement("img")}} elements (see Firefox bug 1264769).
  • The {{domxref("Notification.requireInteraction")}} of the Notifications API has been implemented (see Firefox bug 862395.)
  • The {{domxref("Window.open()")}} method now has a noopener window feature available (see Firefox bug 1267339), which mirrors the functionality of the rel="noopener" Link type.
  • The {{domxref("CustomElementRegistry.get()")}} method of the Web Components API has been implemented (see Firefox bug 1275838).
  • Pointer Event {{domxref("PointerEvent.width","width")}} and {{domxref("PointerEvent.height","height")}} properties now default to a value of 1 (see Firefox bug 1304315).
  • The File and Directory Entries API has been updated to include changes in the latest spec (see Firefox bug 1284987 for the exact details).
  • The {{domxref("Event.cancelBubble", "cancelBubble")}} property, which was defined on {{domxref("UIEvent")}}, is now defined on the {{domxref("Event")}} interface instead. See Firefox bug 1298970 for more details.

Changes and removals

  • The Firefox OS APIs that deal with managing phone calls (Contacts, MobileConnection, Icc, etc.) have been removed (Firefox bug 1311206).
  • The Firefox OS Identity interface has been removed (Firefox bug 1309030).
  • The Firefox OS Voicemail API (MozVoicemail, MozVoicemailEvent, MozVoicemailStatus, Navigator.mozVoicemail) has been removed (Firefox bug 1309723).
  • The Firefox OS Cell Broadcast API (MozCellBroadcast, MozCellBroadcastEvent, MozCellBroadcastMessage, Navigator.mozCellBroadcast) has been removed (Firefox bug 1306772).
  • The Firefox OS TV broadcast-related APIs have been removed (Firefox bug 1306778).
  • The Firefox OS FM Radio API (FMRadio, Navigator.mozFMRadio) has been removed (Firefox bug 1306779).

Service Workers and Fetch

  • The Headers.getAll() method has been removed, and {{domxref("Headers.get()")}} now retrieves all values of the specified header, not just the first one (see Firefox bug 1278275). This is in accordance with the latest Fetch API spec updates.

Web Audio API

  • The {{domxref("ConstantSourceNode")}} interface has been added; it represents an audio source which always outputs a stream of samples which all have the same value. See Controlling multiple parameters with ConstantSourceNode for an example showing how this can be used to simplify some complex audio flows.

WebRTC

  • When an ICE connection is temporarily disrupted, the {{domxref("RTCPeerConnection.iceConnectionState")}} property now gets set to "disconnected"; this indicates a transitory failure that may resolve itself shortly, with the connection returning to the "connected" state afterward (Firefox bug 852665).
  • The MediaDevices {{domxref("MediaDevices.devicechange_event", "devicechange")}} event and its corresponding handler, which were implemented but disabled by default on Mac only in Firefox 51, have been implemented on Windows and Linux and are now enabled by default on all platforms.
  • The {{domxref("MediaStream.active")}} property is now supported. This read-only Boolean property indicates whether or not at least one track on the stream is currently playing.
  • Prior to Firefox 52, the {{domxref("MediaStreamTrack.stop()")}} method could only stop local tracks (that is, tracks obtained through {{domxref("MediaDevices.getUserMedia", "getUserMedia()")}}). Now a variety of tracks can be stopped, including those on a {{domxref("MediaStream")}} associated with a WebRTC connection, Web Audio API stream, or {{domxref("CanvasCaptureMediaStreamTrack", "CanvasCaptureMediaStream")}}.
  • Previously, changing a {{domxref("TextTrack")}}'s {{domxref("TextTrack.mode", "mode")}} repeatedly during a single pass through the Firefox event loop would result in multiple {{domxref("HTMLElement/change_event", "change")}} events being delivered to the {{domxref("TextTrackList")}} specified by the parent media element's {{domxref("HTMLMediaElement.textTracks", "textTracks")}} property. Now these changes are consolidated into one event (Firefox bug 882674).

Audio/Video/Media

  • The {{domxref("MediaError")}} objects specified in {{domxref("HTMLMediaElement.error")}} when an error occurs handling an {{HTMLElement("audio")}} or {{HTMLElement("video")}} element now include a {{domxref("MediaError.message", "message")}} property, which provides a specific description of the error which occurred. This string offers details particular to this exact error occurrence, offering insight into why things went wrong (Firefox bug 1299072). This field has been included in Firefox nightly builds since Firefox 51, but is now available in all builds, up to and including release.

Other APIs

  • The method {{domxref("FileSystemFileEntry.createWriter()")}}, which was added (but always returned an error) in Firefox 50 has been removed (Firefox bug 1315185.
  • The proprietary Firefox OS Apps installation/management APIs have been removed from the platform (see Firefox bug 1261019).
  • The proprietary Firefox OS Web Telephony API has been removed from the platform (see Firefox bug 1309719).
  • The proprietary Firefox OS Web Bluetooth API has been removed from the platform (see Firefox bug 1310020).
  • The Battery Status API is now available only to chrome/privileged code (see Firefox bug 1313580).
  • ImageBitmapRenderingContext.transferImageBitmap() has been renamed to {{domxref("ImageBitmapRenderingContext.transferFromImageBitmap()")}} (see Firefox bug 1304767).
  • The mozDash and mozDashOffset members have been removed from {{domxref("CanvasRenderingContext2D")}} (see Firefox bug 931389).

HTTP

SVG

  • SVG documents are now represented using the {{domxref("XMLDocument")}} interface instead of SVGDocument. This is a change made in the SVG 2 specification.

Security

  • When login pages (i.e., those containing an <input type="password"> field) are created so that they would be submitted insecurely, Firefox displays an in-context warning message below the password field to warn users (Firefox bug 1319119). Autofill is also disabled on insecure login forms (Firefox bug 1217152).
  • Support for SHA-1 SSL certificates has been removed; navigating to a secure page that uses a SHA-1 certificate will now result in an Untrusted Connection error (Firefox bug 1330043).

Plugins

All NPAPI plugin support except Flash has been dropped. Flash usage is also set to be phased out in the future.

Changes for add-on and Mozilla developers

WebExtensions

New APIs:

Interfaces

  • nsIDroppedLinkHandler.dropLinks method and nsIDroppedLinkItem interface have been added to handle dropping multiple items (Firefox bug 92737).

XUL

  • tabbrowser.loadTabs(uris, params) method overload has been added (Firefox bug 92737).
  • browser.droppedLinkHandler function signature has been changed (Firefox bug 92737).