files/en-us/mozilla/firefox/releases/51/index.md
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.
selectionStart and selectionEnd attributes now correctly return the current position of the text input cursor when there's no selection, instead of returning 0 (Firefox bug 1287655).<input type="text"> (Firefox bug 1069015).plaintext value of {{cssxref("unicode-bidi")}} now also works with vertical writing modes (Firefox bug 1302734).fill-box and stroke-box values of {{cssxref("clip-path")}} are now properly supported; previously, they were aliases of border-box (Firefox bug 1289011).for...of loops now has a fresh binding for each iteration and no longer throws a {{jsxref("SyntaxError")}} (Firefox bug 1101653).for each...in loop now presents a warning in the console (Firefox bug 1293205). Please migrate your code to use the standardized for...of loop.let as a label name is disallowed now (Firefox bug 1288459).next() method of the iterator protocol will now throw a {{jsxref("TypeError")}} if the returned value is not an object (Firefox bug 1016936).WebGL 2 is now enabled by default. See webglsamples.org/WebGL2Samples for a few demos.
The WEBGL_compressed_texture_es3 extension (implemented in Firefox 46) has been renamed to {{domxref("WEBGL_compressed_texture_etc")}} (Firefox bug 1316778) and is no longer included by default in WebGL 2 contexts (Firefox bug 1306174).
The {{domxref("EXT_disjoint_timer_query")}} extension has been updated to use {{domxref("WebGLQuery")}} objects instead of WebGLTimerQuery objects (Firefox bug 1308057).
The {{domxref("OES_vertex_array_object")}} extension now uses the WebGL 2 {{domxref("WebGLVertexArrayObject")}} object instead of its own WebGLVertexArrayObjectOES object (Firefox bug 1318523).
You can now use {{domxref("ImageBitmap")}} objects as a sources for texture images in methods like {{domxref("WebGLRenderingContext.texImage2D()")}}, {{domxref("WebGLRenderingContext.texSubImage2D()")}}, {{domxref("WebGL2RenderingContext.texImage3D()")}}, or {{domxref("WebGL2RenderingContext.texSubImage3D()")}} (Firefox bug 1324924).
CanvasRenderingContext2D.mozFillRule() method has been removed; the fill rule can be defined using a parameter of the standard {{domxref("CanvasRenderingContext2D.fill()")}} method (Firefox bug 826619).onclose event handler and {{domxref("Worker")}} use of the close event have been removed from Firefox.image/*, video/*, audio/* or text/csv MIME type are now blocked and are not loaded or executed. This happen when they are declared using {{HTMLElement("script")}}, or loaded via {{domxref("WorkerGlobalScope.importScripts()")}}, {{domxref("Worker.Worker","Worker()")}}, {{domxref("SharedWorker.SharedWorker", "SharedWorker()")}} (Firefox bug 1229267 and Firefox bug 1288361).FindProxyForURL(url, host) function now strips paths and queries from https:// URLs to avoid information leakage (see Firefox bug 1255474 and CVE-2017-5384).null (Firefox bug 289714).*/* (Firefox bug 918752).username and password parameters now default to null, per the specification (Firefox bug 933759).NotSupportedError {{domxref("DOMException")}} for a long time. You need to use {{domxref("RTCPeerConnection.removeTrack()")}} instead, for each track on the stream.mozCaptureStream(), and that it doesn't yet exactly match the spec.audio/flac and audio/x-flac. For FLAC in Ogg, supported MIME types are: audio/ogg; codecs=flac, and video/ogg; codecs=flac.true in all cases (Firefox bug 984778).selectionStart and selectionEnd now correctly return the current position of the text input cursor when there's no selection, instead of returning 0 (Firefox bug 1287655).onerror event handler, sending {{domxref("HTMLElement/error_event", "error")}} events to the element whenever errors occur attempting to load or interpret images.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.<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 (Firefox bug 1319119).New APIs:
You can now embed a WebExtension in a legacy add-on type (Firefox bug 1252215).
Clipboard access is now supported (Firefox bug 1197451)
The arguments passed to the callback of {{WebExtAPIRef("tabs.executeScript()")}} have been fixed (Firefox bug 1290157)
localStorage is now cleared when a WebExtension is uninstalled (Firefox bug 1213990)
A changed {{HTTPHeader("Content-Type")}} header in Web Extensions is now taken into account (Firefox bug 1304331)
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:
MozSocial interface and the Navigator.mozSocial property which supports it have been removed.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 (Firefox 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 (Firefox bug 1279635).