• Skip to main content
  • Select language
  • Skip to search
MDN Web Docs
  • Technologies
    • HTML
    • CSS
    • JavaScript
    • Graphics
    • HTTP
    • APIs / DOM
    • WebExtensions
    • MathML
  • References & Guides
    • Learn web development
    • Tutorials
    • References
    • Developer Guides
    • Accessibility
    • Game development
    • ...more docs
Firefox
  1. MDN
  2. Mozilla
  3. Firefox
  4. Firefox developer release notes
  5. Firefox 51 for developers

Firefox 51 for developers

In This Article
  1. Changes for Web developers
    1. HTML
    2. CSS
    3. JavaScript
    4. Developer Tools
    5. WebGL
    6. IndexedDB v2
    7. Canvas
    8. SVG
    9. Web Workers
    10. Networking
    11. XHR
    12. WebRTC
    13. Audio/video
    14. DOM
    15. Events
    16. Security
    17. Removals
  2. Changes for add-on and Mozilla developers
    1. WebExtensions
    2. Other
  3. See also
  4. Older versions

To test the latest developer features of Firefox,
install Firefox Developer Edition
Firefox 51 was released on January 24, 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

HTML

  • <hr> elements can now be used as separators in <menu> elements (bug 870388).
  • The <input> and <textarea> elements' selectionStart and selectionEnd attributes now correctly return the current position of the text input cursor when there's no selection, instead of returning 0 (bug 1287655).

CSS

  • Implemented :indeterminate for <input type="radio"> (bug 885359).
  • Implemented :placeholder-shown for <input type="text"> (bug 1069015).
  • The ::placeholder pseudo-element is now unprefixed (bug 1069012).
  • Fixed the :valid CSS pseudo-class which didn't match valid <form> elements (bug 1285425).
  • The plaintext value of unicode-bidi now also works with vertical writing modes (bug 1302734).
  • The fill-box and stroke-box values of clip-path are now properly supported; previously, they were aliases of border-box (bug 1289011).
  • Clamp flex line's height (clamping stretched flex items), in single-line auto-height flex container w/ max-height (spec change) (bug 1000957).
  • Firefox's implementation of child-indexed pseudo-classes (such as :nth-child(), :first-child, and so forth) has been updated to match the CSS4 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 Element (bug 1300374.

JavaScript

  • The ES2015 Symbol.toStringTag property has been implemented (bug 1114580).
  • The ES2015 TypedArray.prototype.toString() and TypedArray.prototype.toLocaleString() methods have been implemented (bug 1121938).
  • The DateTimeFormat.prototype.formatToParts() method is now available (bug 1289340).
  • const and let are now fully ES2015-compliant (bug 950547).
  • Using const in for...of loops now has a fresh binding for each iteration and no longer throws a SyntaxError (bug 1101653).
  • The deprecated for each...in loop now presents a warning in the console (bug 1293205). Please migrate your code to use the standardized for...of loop.
  • Generator functions can't have a label anymore and "let" as a label name is disallowed now (bug 1288459).
  • Deprecated legacy generator functions will now throw when used in method definitions (bug 1199296).
  • The next() method of the iterator protocol will now throw a TypeError if the returned value is not an object (bug 1016936).
  • Child-indexed pseudo-class selectors should match without a parent (bug 1300374).

Developer Tools

  • Network Monitor now shows a "Blocked" state for network requests.
  • All devtools bugs fixed between Firefox 50 and Firefox 51.

WebGL

  • WebGL 2 is now enabled by default. See webglsamples.org/WebGL2Samples for a few demos.
    • WebGL 2 provides the WebGL2RenderingContext interface that brings OpenGL ES 3.0 to the <canvas> element.
    • New features include:
      • 3D textures,
      • Sampler objects,
      • Uniform Buffer objects,
      • Sync objects,
      • Query objects,
      • Tranform Feedback objects,
      • Promoted extensions that are now core to WebGL 2: Vertex Array objects, instancing, multiple render targets, fragment depth.
  • The WEBGL_compressed_texture_es3 extension (implemented in Firefox 46) has been renamed to WEBGL_compressed_texture_etc (bug 1316778) and is no longer included by default in WebGL 2 contexts (bug 1306174).
  • The EXT_disjoint_timer_query extension has been updated to use WebGLQuery objects instead of WebGLTimerQuery objects (bug 1308057).
  • The OES_vertex_array_object extension now uses the WebGL 2 WebGLVertexArrayObject object instead of its own WebGLVertexArrayObjectOES object (bug 1318523).
  • You can now use ImageBitmap objects as a sources for texture images in methods like WebGLRenderingContext.texImage2D(), WebGLRenderingContext.texSubImage2D(), WebGL2RenderingContext.texImage3D(), or WebGL2RenderingContext.texSubImage3D() (bug 1324924).

IndexedDB v2

  • IndexedDB version 2 implementation is now complete:
    • Supports for the new IDBObjectStore.getKey() method has been added (bug 1271506).
    • Supports for IDBCursor.continuePrimaryKey() method has been added (bug 1271505).
    • Binary keys are now supported (bug 1271500).
    • See also "What’s new in IndexedDB 2.0?" – Mozilla hacks

Canvas

  • The non-standard CanvasRenderingContext2D.mozFillRule() method has been removed; the fill rule can be defined using a parameter of the standard CanvasRenderingContext2D.fill() method (bug 826619).
  • The CanvasRenderingContext2D.imageSmoothingEnabled has been unprefixed (bug 768072)

SVG

  • Added tabindex attribute (bug 778654).
  • Added href attribute, which renders xlink:href obsolete (bug 1245751).
  • You can now use custom data attributes on SVG elements through the SVGElement.dataset property and the data-* set of SVG attributes (bug 921834).
  • CSS Animations used in an SVG image which is presented in an <img> element now work again; this was an old regression (bug 1190881).

Web Workers

  • The non-standard and obsolete WorkerGlobalScope.onclose event handler and Worker use of the close event have been removed from Firefox.

Networking

  • Scripts served with an image/*, video/*, audio/* or text/csv MIME type are now blocked and are not loaded or executed. This happen when they are declared using <script>, or loaded via Worker.importScripts(), Worker(), SharedWorker() (bug 1229267 and bug 1288361).
  • Support for SHA-1 certificates from publicly-trusted certificate authorities has been removed (bug 1302140). See also Phasing Out SHA-1 on the Public Web for more information.
  • New WoSign and StartCom certificates will no longer be accepted (bug 1309707), see Distrusting New WoSign and StartCom Certificates for more information.
  • The PAC FindProxyForURL(url, host) function now strips paths and queries from https:// URLs to avoid information leakage (see bug 1255474, Sniffing HTTPS URLS with malicious PAC files, or CVE-2017-5384).

XHR

  • The XMLHttpRequest.responseXML property no longer returns a partial Document with a <parsererror> node placed at the top when a parse error occurs attempting to interpret the received data. Instead, it correctly returns null (bug 289714).
  • To match the latest specification an XMLHttpRequest without an Accept header set with setRequestHeader() is now sent with such a header, with its value set to */* (bug 918752).
  • Fixed XMLHttpRequest.open() so that, when omitted, the username and password parameters now default to null, per the specification (bug 933759).

WebRTC

  • The RTCPeerConnection.removeStream() method has been removed. It was deprecated back in Firefox 22, and has been throwing a NotSupportedError for a long time. You need to use RTCPeerConnection.removeTrack() instead, for each track on the stream.
  • WebRTC now supports the VP9 codec by default. When added in Firefox 46, VP9 was disabled by default, but when enabled was the preferred codec; however, it has been moved to be the second choice (after VP8) due to its current level of CPU usage.
  • The method HTMLMediaElement.captureStream(), which returns a MediaStream containing the content of the specified <video> or <audio>. It's worth noting that this is prefixed still as mozCaptureStream(), and that it doesn't yet exactly match the spec.

Audio/video

  • Added FLAC support (FLAC codec) in both FLAC and Ogg containers (bug 1195723). Supported FLAC MIME types are: audio/flac and audio/x-flac. For FLAC in Ogg, supported MIME types are: audio/ogg; codecs=flac, and video/ogg; codecs=flac.
  • Added support for FLAC in MP4 (both with and without MSE) (bug 1303888).
  • Throttling in background tabs of timers created by Window.setInterval() and Window.setTimeout() was changed in Firefox 50 to no longer occur if a Web Audio API AudioContext is actively playing sound. However, this didn't resolve all scenarios in which timing-sensitive audio playback (such as music players generating individual notes using timers) could fail to work properly. For that reason, Firefox 51 no longer throttles background tabs which have an AudioContext, even if it's not currently playing sound.

DOM

  • The DOMImplementation.hasFeature() now returns true in all cases (bug 984778).
  • The HTMLInputElement and HTMLTextAreaElement properties selectionStart and selectionEnd now correctly return the current position of the text input cursor when there's no selection, instead of returning 0 (bug 1287655).
  • The HTMLImageElement interface and the corresponding <img> element now support the onerror event handler, sending error events to the element whenever errors occur attempting to load or interpret images.
  • You can now change a Web Animation's effect by setting the value of its effect property. Previously, this property was read-only (bug 1049975).
  • The Permissions API method Permissions.revoke() has been put behind a preference (dom.permissions.revoke.enable) and disabled by default since its design and even its very existence is under discussion in the Web Application Security Working Group.
  • The Storage API's navigator.storage property and StorageManager.estimate() method have been implemented along with the needed supporting code. Storage unit persistence features are not yet implemented. See bug 1267941.
  • For privacy reasons, both BatteryManager.chargingTime and BatteryManager.dischargingTime now round the returned value to the closest 15 minutes (bug 1292655).

Events

  • Firefox now supports the onanimationstart, onanimationiteration, and onanimationstart event handlers, in addition to supporting the corresponding events using addEventListener() (bug 911987).
  • Firefox now supports the ontransitionend event handler (bug 911987).

Security

  • When login pages (i.e those containing an <input type="password"> field) are created so that they would be submitted insecurely, Firefox displays a crossed out lock icon in the address bar to warn users (bug 1319119). See Insecure passwords for more details.

Removals

  • The non-standard Simple Push API, mainly intended for use with Firefox OS and now superseded by the W3C Push API, has been completely removed from Gecko (bug 1296579).
  • The non-standard Alarms API, mainly intended for use with Firefox OS, has been completely removed from Gecko (bug 1300884).
  • Support for prefixes in the Page Visibility API has been removed (bug 812701).

Changes for add-on and Mozilla developers

WebExtensions

  • New APIs:
    • idle.queryState() (bug 1299846)
    • idle.onStateChanged (bug 1299775)
    • management.getSelf() (bug 1283116)
    • management.uninstallSelf() (bug 1220136)
    • runtime.getBrowserInfo() (bug 1268399)
    • runtime.reload() and runtime.onUpdateAvailable() (bug 1279012)
  • You can now embed a WebExtension in a legacy add-on type (bug 1252215).
  • Clipboard access is now supported (bug 1197451)
  • The arguments passed to the callback of tabs.executeScript() have been fixed (bug 1290157)
  • localStorage is now cleared when a WebExtension is uninstalled (bug 1213990)
  • A changed Content-Type header in Web Extensions is now taken into account (bug 1304331)

Other

  • The multiprocessCompatible property of install.rdf must now be explicitly set to false to prevent multiprocess from being enabled in Firefox when the add-on is installed.
  • The Mozilla-specific Social API has been substantially changed (largely to remove APIs no longer used), as follows:
    • The MozSocial interface and the navigator.mozSocial property which supports it have been removed.
    • The Social Bookmarks API has been removed.
    • The Social chat functionality has been removed.
    • The Social Status API has been removed.
    • All of the social widgets, except for the Share panel, have been removed. This includes the social sidebar, flyover panels, and so forth.
    • All supporting user interface features and functionality for the removed APIs have been removed as well.
    • Social service provider manifest properties supporting the removed functionality are no longer supported.
  • If an add-on uses mimeTypes.rdf to provide a file extension to MIME type mapping, it must now register an entry in the "ext-to-type-mapping" category (bug 306471).
  • The Browser API now includes a detail object on the event object of the mozbrowserlocationchange event that contains canGoForward/canGoBack properties, allowing retrieval of the mozBrowser's back/forward status synchronously (bug 1279635).

See also

  • Site Compatibility for Firefox 51

Older versions

  • 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
  • Firefox 23 for developers
  • Firefox 22 for developers
  • Firefox 21 for developers
  • Firefox 20 for developers

Document Tags and Contributors

Tags: 
  • Firefox
  • Mozilla
  • Release Notes
 Contributors to this page: Sheppy, chrisdavidmills, claudepache, Sebastianz, P.A., fscholz, TylerH, yisibl, teoli, MykMelez, wbamberg, isonic, evilpie, jyavenard
 Last updated by: Sheppy, Jun 8, 2017, 2:12:29 PM
  1. Add-ons
    1. Firefox developer release notes
    2. Add-ons
    3. Add-on guidelines
    4. Add-on Manager
    5. Extensions
    6. OpenSearch plug-ins
    7. Plugins
    8. Themes
  2. Firefox internals
    1. Firefox developer release notes
    2. Mozilla project
    3. Gecko
    4. JavaScript code modules
    5. JS-ctypes
    6. MathML project
    7. MFBT
    8. Mozilla projects
    9. Preference system
    10. WebIDL bindings
    11. XPCOM
    12. XUL
  3. Building and contributing
    1. Build instructions
    2. Configuring build options
    3. How the build system works
    4. Mozilla source code
    5. Localization
    6. Mercurial
    7. Quality assurance
    8. Using Mozilla code in other projects