Firefox 50 para desarrolladores
===============================

Firefox 50 was released on November 15, 2016. 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.

Cambios para desarrolladores Web
--------------------------------

### HTML

* El estilo por defecto `<bdo>` ahora asigna `unicode-bidi` (en-US) con el valor `isolate-override` (Error 1249497 en Firefox).
* Asignar el atributo `src` del elemento `<track>` ahora funciona correctamente (Error 1281418 en Firefox).
* El atributo `referrerpolicy` en los elementos `<area>`, `<a>`, `<img>`, `<iframe>` y `<link>` ahora está disponible por defecto (Error 1223838 en Firefox, Error 1264165 en Firefox).
### CSS

* Esquinas con estilos punteados y rayados (`dashed, dotted`) Border-radiused ahora son mostradas con el estilo especificado en lugar de estilo sólido (Error 382721 en Firefox).
* El selector pseudo-clase no estándar `:-moz-full-screen-ancestor` fue removido (Error 1199529 en Firefox).
* `box-sizing``: padding-box` fue removido, dado que ya no forma parte de la especificación y Firefox era el unico entre los principales navegadores que lo implementaba (Error 1166728 en Firefox).
* Se removió el prefijo de los tres valores `isolate`, `isolate-override`, y `plaintext` de la propiedad `unicode-bidi` (en-US) (Error 1141895 en Firefox).
* En modo de compatibilidad, la etiqueta de un elemento de lista ahora hereda el tamaño de la lista, como en el modo estandar (Error 648331 en Firefox).
* Las pseudo-clases `:in-range` y `:out-of-range` cambiaron su comportamiento para no coincidir elementos input deshabilitados o de solo lectura (Error 1264157 en Firefox).
* Se removió el prefijo de la pseudo-clase `:any-link`(Error 843579 en Firefox).
* El valor `space` para `border-image-repeat` fue implementado (Error 720531 en Firefox).
### JavaScript

* La propiedad del ES2015 `Symbol.hasInstance` ha sido implementada (Error 1054906 en Firefox).
* El método de ES2017 `Object.getOwnPropertyDescriptors()` ha sido implementado (Error 1245024 en Firefox).
* El comportamiento de \W in `RegExp` con los flags unicode e ignoreCase cambió para estar de acuerdo con el borrador mas reciente de la especificación. Ahora no coincide con K, S, k, s, and KELVIN SIGN (U+212A), y LATIN SMALL LETTER LONG S (U+017F) (Error 1281739 en Firefox).
### Herramientas de desarrollador

* La consola Web ahora entiende los source maps.
* El inspector de almacenamiento ahora permite borrar elementos individuales desde los objetos de almacenamiento de IndexedDB.
* La herramienta de memoria está habilitada por defecto. (en-US)
* La panel de "Modelo de caja" fue movido al panel lateral Computado.
* La consola Web ahora muestra las trazas de pila para las peticiones de red XHR o Fetch().
* Todos los bugs corregidos entre Firefox 49 y Firefox 50.
### HTTP

* El protocolo experimental (y obsoleto) SPDY 3.1 ahora está deshabilitado por defecto Error 1287132 en Firefox.
* Se añadió soporte para `X-Content-Type-Options` (Error 471020 en Firefox).
* Los prefijos de cookies **`__Host-`** and **`__Secure-`** han sido implementados. Ver `Set-Cookie` y Error 1283368 en Firefox.
* El encabezado `Referrer-Policy` ha sido implementado Error 1264164 en Firefox.
### Seguridad

* El atributo `ping` del elemento `<a>` ahora se apega al `connect-src` (en-US) CSP 1.1 policy directive (en-US) (Error 1100181 en Firefox).
* Agregado soporte para la directiva `sandbox` (en-US) CSP (en-US) (Error 671389 en Firefox).
* Ahora es posible indicar una política content security policy for workers (Error 959388 en Firefox).
* El método `Navigator.sendBeacon()` (en-US) ya no lanza una excepción si los datos de la baliza (Beacon Data) no pudieron ser enviados devido a una política de restricción consentimiento method Content Security Policy (en-US); en su lugar, retorna `false` como es esperado (Error 1234813 en Firefox).
### Redes

* Cuando un error es encontrado durante una `XMLHttpRequest` asíncrona, el método `XMLHttpRequest.getAllResponseHeaders()` (en-US) ahora retorna un string vacio (Error 1286744 en Firefox).
* En lugar de retornar un `NetworkError`, ahora el asynchronous `XMLHttpRequest` asíncrono que falla por CORS u otras restricciones de red, ahora lanza un `error` (en-US) que puede ser capturado como cualquier otro error (Error 709991 en Firefox).
* `XMLHttpRequest.getResponseHeader()` (en-US) y `XMLHttpRequest.getAllResponseHeaders()` (en-US) ahora también retornan encabezados vacíos por defecto. Esto puede ser controlado mediante la preferencia `network.http.keep_empty_response_headers_as_empty_string` (Error 918721 en Firefox).
* La opción `only-if-cached` fue agregada a `Request.cache` (en-US) (Error 1272436 en Firefox).
### DOM

* Ahora la opción `once` para `EventTarget.addEventListener()` es soportada (Error 1287706 en Firefox).
* La interfaz `NodeList` are now iterable and the methods `forEach()`, `values()` (en-US), `NodeList.entries()` (en-US) and `NodeList.keys()` (en-US) are now available (Error 1290636 en Firefox).
* The interface `DOMTokenList` (en-US) are now iterable and the methods `forEach()` (en-US), `values()` (en-US), `DOMTokenList.entries()` (en-US) and `DOMTokenList.keys()` (en-US) are now available (Error 1290636 en Firefox).
* The methods `Document.createElement()` and `Document.createElementNS()` now have an optional `options` parameter for creating custom elements (en-US) (Error 1276579 en Firefox).
### SVG

* The `allowReorder` attribute has been dropped and the behavior it was setting is now the default for SVG `<switch>` (en-US) elements (Error 1279690 en Firefox).
* The `defer` keyword for the `preserveAspectRatio (en-US)` attribute on SVG `<image>` (en-US) elements has been removed to follow the latest SVG2 specification (Error 1280425 en Firefox).
### Drag and Drop API

* The `DataTransfer.items` (en-US) property has been implemented, allowing access to multiple items being dragged and dropped using the HTML Drag and Drop API. To allow this, the `DataTransferItem` (en-US) and `DataTransferItemList` (en-US) interfaces are now supported as well (Error 906420 en Firefox). This is enabled by default.
* The old, obsolete Firefox specific drag and drop API events `dragdrop` and `draggesture` are no longer supported. Be sure to update any code still using them to use the HTML drag and drop API (Error 1162050 en Firefox.
### Pointer Lock API

* The Pointer Lock API is now unprefixed (Error 991899 en Firefox).
* Before Firefox 50, `requestPointerLock()` (en-US) asked for permission using a doorhanger, and pointer lock would not be enabled until the user granted permission. From Firefox 50, pointer lock is like the fullscreen API: it's granted immediately, but a notification is displayed explaining to the user how to exit (Error 1273351 en Firefox).
### IndexedDB

* Ahora se envía un evento `close` al objeto `IDBDatabase` cuando la base de datos respectiva es cerrada de forma inesperada (Error 1151017 en Firefox).
### Service Workers

* The `WindowClient.navigate()` (en-US) method has been implemented. This method lets you open a specified URL into a client window which is being controlled by the service worker (Error 1218148 en Firefox).
### WebGL

* The `EXT_shader_texture_lod` (en-US) WebGL extension has been implemented (Error 1111689 en Firefox).
* The texImage methods have been updated for WebGL 2 (en-US) to implement PBOs (`PIXEL_UNPACK_BUFFER`) (Error 1280499 en Firefox).
### WebRTC

* Adding a track to a `MediaStream` (en-US) now generates the `addtrack` event as described in the specification. The event is of type `MediaStreamTrackEvent` (en-US) and is fired on the stream to which the track was added. You can use either `MediaStream.addEventListener('addtrack', ...)` or the `MediaStream.onaddtrack` (en-US) property to handle `"addtrack"` events.
* The `MediaStreamTrack` interface now supports the `ended` (en-US) event and the `MediaStreamTrack.onended` (en-US) event handler.
* Firefox now supports the `MediaStreamTrack.readyState` (en-US) property, which indicates whether the track is live or permanently ended.
* The `MediaStreamTrack` methods `getConstraints()` (en-US) and `getSettings()` (en-US) have been implemented; these let you get the most recently applied set of customized property constraints and the actual values of all of the track's constrainable properties, respectively. The accompanying data types have been documented as well.
* The `RTCDataChannel.stream` (en-US) property has been removed. This was replaced with `RTCDataChannel.id` (en-US) in Firefox 24 (en-US), but was supported for backward compatibility. Please be sure to update your code to use the `id` property if you haven't done so yet.
### Web Audio API

* The `PannerNode` (en-US) interface now supports the 3D Cartesian space properties for the position (`PannerNode.positionX` (en-US), `PannerNode.positionY` (en-US), and `PannerNode.positionZ` (en-US)) and directionality (`PannerNode.orientationX` (en-US), `PannerNode.orientationY` (en-US), `PannerNode.orientationZ` (en-US)) of an audio source.
* The interface `IIRFilterNode` (en-US), which implements a general infinite impulse response (IIR) filter, has been implemented.
* Throttling in background tabs of timers created by `Window.setInterval()` and `Window.setTimeout()` no longer occurs if a Web Audio API `AudioContext` (en-US) is actively playing sound. This should help prevent issues with timing-sensitive audio playback (such as music players generating individual notes using timers) in the background (Error 1181073 en Firefox).
### Audio/Video

* The `AlignSetting` enum (representing possible values for `VTTCue.align` (en-US)) incorrectly previously included the value `"middle"` instead of `"center"`. This has been corrected (Error 1276130 en Firefox).
* The non-standard and experimental method `HTMLMediaElement.seekToNextFrame()` (en-US) now seeks to the next frame in the media asynchronously, rather than synchronously, and returns a `Promise` which resolves once the seek is complete.
* The implementation of `HTMLTrackElement` (en-US) has been corrected to allow `<track>` elements to load resources even if not in a document (Error 871747 en Firefox).
### API de batería

* The `navigator.battery` (en-US) property, which has been deprecated since Firefox 43, is now obsolete and has been removed. Use the `navigator.getBattery()` method instead to get a battery `Promise`, which will resolve when the `BatteryManager` is available for use; the `BatteryManager` is passed into the fulfillment handler for the promise (Error 12593355 en Firefox).
### Archivos y directorios

* A subset of the File and Directory Entries API (en-US) has been implemented, to improve compatibility with sites that were previously only compatible with Google Chrome (Error 1265767 en Firefox).
    + The asynchronous API interfaces have been implemented, with the caveat that only reading of files is supported; for example, the `FileSystemFileEntry.createWriter()` (en-US) method is a no-op.
    + These interfaces have been implemented:
        - `FileSystem` (en-US)
        - `FileSystemEntry` (en-US) (properties only; the methods have not been implemented)
        - `FileSystemFileEntry` (en-US) (except for `createWriter()` (en-US))
        - `FileSystemDirectoryEntry` (en-US) (except for `removeRecursively()` (en-US))
        - `FileSystemDirectoryReader` (en-US)
    + `HTMLInputElement.webkitdirectory` (en-US) as well as the `webkitdirectory` attribute of the `<input>` element have been implemented; this lets you configure a file input to accept directories instead of files (Error 1258489 en Firefox).
    + `HTMLInputElement.webkitEntries` (en-US) has been implemented; this returns an array of `FileSystemEntry` (en-US)-based objects representing the selected items.
    + `File.webkitRelativePath` has been implemented; this contains the path of the file relative to the root of the containing `FileSystemDirectoryEntry` (en-US) that was among the items in the list returned by `HTMLInputElement.webkitGetEntries()`.
    + See File and Directory Entries API support in Firefox (en-US) for details about what we do and do not support in this API.
    + These APIs are now enabled by default; some were previously available but only behind a preference (Error 1288683 en Firefox).
* We've implemented `DataTransferItem.webkitGetAsEntry()` (en-US) as part of the File and Directory Entries API (en-US); this lets you obtain a `FileSystemEntry` (en-US) representing a dropped file (Error 1289255 en Firefox). This is enabled by default.
* The `HTMLInputElement.directory` property, part of the Directory Upload API proposal, has been renamed to `allowdirs` (Error 1288681 en Firefox). This property is hidden behind a preference.
Versiones anteriores
--------------------

* Firefox 49 for developers (en-US)
* Firefox 48 for developers (en-US)
* Firefox 47 for developers (en-US)
* Firefox 46 for developers (en-US)
* Firefox 45 for developers (en-US)
* Firefox 44 for developers (en-US)
* Firefox 43 for developers (en-US)
* Firefox 42 for developers (en-US)
* Firefox 41 for developers (en-US)
* Firefox 40 for developers (en-US)
* Firefox 39 for developers (en-US)
* Firefox 38 for developers (en-US)
* Firefox 37 for developers (en-US)
* Firefox 36 for developers (en-US)
* Firefox 35 for developers (en-US)
* Firefox 34 for developers (en-US)
* Firefox 33 for developers (en-US)
* Firefox 32 for developers (en-US)
* Firefox 31 for developers (en-US)
* Firefox 30 for developers
* Firefox 29 for developers (en-US)
* Firefox 28 for developers (en-US)
* Firefox 27 for developers (en-US)
* Firefox 26 for developers (en-US)
* Firefox 25 for developers (en-US)
* Firefox 24 for developers (en-US)
* Firefox 23 for developers (en-US)
* Firefox 22 for developers (en-US)
* Firefox 21 for developers (en-US)
* Firefox 20 for developers (en-US)
* Firefox 19 for developers (en-US)