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 asignaunicode-bidi
(en-US) con el valorisolate-override
(error 1249497). - Asignar el atributo
src
del elemento<track>
ahora funciona correctamente (error 1281418). - El atributo
referrerpolicy
en los elementos<area>
,<a>
,<img>
,<iframe>
y<link>
ahora está disponible por defecto (error 1223838, error 1264165).
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). - El selector pseudo-clase no estándar
:-moz-full-screen-ancestor
fue removido (error 1199529). 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).- Se removió el prefijo de los tres valores
isolate
,isolate-override
, yplaintext
de la propiedadunicode-bidi
(en-US) (error 1141895). - 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).
- Las pseudo-clases
:in-range
y:out-of-range
cambiaron su comportamiento para no coincidir elementos input deshabilitados o de solo lectura (error 1264157). - Se removió el prefijo de la pseudo-clase
:any-link
(error 843579). - El valor
space
paraborder-image-repeat
fue implementado (error 720531).
JavaScript
- La propiedad del ES2015
Symbol.hasInstance
ha sido implementada (error 1054906). - El método de ES2017
Object.getOwnPropertyDescriptors()
ha sido implementado (error 1245024). - 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).
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.
- 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().
HTTP
- El protocolo experimental (y obsoleto) SPDY 3.1 ahora está deshabilitado por defecto error 1287132.
- Se añadió soporte para
X-Content-Type-Options
(error 471020). - Los prefijos de cookies
__Host-
and__Secure-
han sido implementados. VerSet-Cookie
y error 1283368. - El encabezado
Referrer-Policy
ha sido implementado error 1264164.
Seguridad
- El atributo
ping
del elemento<a>
ahora se apega alconnect-src
CSP 1.1 policy directive (error 1100181). - Agregado soporte para la directiva
sandbox
CSP (error 671389). - Ahora es posible indicar una política content security policy for workers (error 959388).
- 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 su lugar, retornafalse
como es esperado (error 1234813).
Redes
- Cuando un error es encontrado durante una
XMLHttpRequest
asíncrona, el métodoXMLHttpRequest.getAllResponseHeaders()
(en-US) ahora retorna un string vacio (error 1286744). - En lugar de retornar un
NetworkError
, ahora el asynchronousXMLHttpRequest
asíncrono que falla por CORS u otras restricciones de red, ahora lanza unerror (en-US)
que puede ser capturado como cualquier otro error (error 709991). XMLHttpRequest.getResponseHeader()
(en-US) yXMLHttpRequest.getAllResponseHeaders()
(en-US) ahora también retornan encabezados vacíos por defecto. Esto puede ser controlado mediante la preferencianetwork.http.keep_empty_response_headers_as_empty_string
(error 918721).- La opción
only-if-cached
fue agregada aRequest.cache
(error 1272436).
DOM
- Ahora la opción
once
paraEventTarget.addEventListener()
es soportada (error 1287706). - La interfaz
NodeList
are now iterable and the methodsforEach()
,values()
(en-US),NodeList.entries()
(en-US) andNodeList.keys()
(en-US) are now available (error 1290636). - The interface
DOMTokenList
(en-US) are now iterable and the methodsforEach()
(en-US),values()
(en-US),DOMTokenList.entries()
(en-US) andDOMTokenList.keys()
(en-US) are now available (error 1290636). - The methods
Document.createElement()
andDocument.createElementNS()
now have an optionaloptions
parameter for creating custom elements (error 1276579).
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). - The
defer
keyword for thepreserveAspectRatio (en-US)
attribute on SVG <image> (en-US) elements has been removed to follow the latest SVG2 specification (error 1280425).
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, theDataTransferItem
(en-US) andDataTransferItemList
(en-US) interfaces are now supported as well (error 906420). This is enabled by default. - The old, obsolete Firefox specific drag and drop API events
dragdrop
anddraggesture
are no longer supported. Be sure to update any code still using them to use the HTML drag and drop API (error 1162050.
Pointer Lock API
- The Pointer Lock API is now unprefixed (error 991899).
- Before Firefox 50,
requestPointerLock()
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).
IndexedDB
- Ahora se envía un evento
close
al objetoIDBDatabase
cuando la base de datos respectiva es cerrada de forma inesperada (error 1151017).
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).
WebGL
- The
EXT_shader_texture_lod
(en-US) WebGL extension has been implemented (error 1111689). - The texImage methods have been updated for WebGL 2 to implement PBOs (
PIXEL_UNPACK_BUFFER
) (error 1280499).
WebRTC
- Adding a track to a
MediaStream
(en-US) now generates theaddtrack
event as described in the specification. The event is of typeMediaStreamTrackEvent
(en-US) and is fired on the stream to which the track was added. You can use eitherMediaStream.addEventListener('addtrack', ...)
or theMediaStream.onaddtrack
(en-US) property to handle"addtrack"
events. - The
MediaStreamTrack
interface now supports theended (en-US)
event and theMediaStreamTrack.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
methodsgetConstraints()
(en-US) andgetSettings()
(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 withRTCDataChannel.id
(en-US) in Firefox 24, but was supported for backward compatibility. Please be sure to update your code to use theid
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), andPannerNode.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()
andWindow.setTimeout()
no longer occurs if a Web Audio APIAudioContext
(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).
Audio/Video
- The
AlignSetting
enum (representing possible values forVTTCue.align
) incorrectly previously included the value"middle"
instead of"center"
. This has been corrected (error 1276130). - 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 aPromise
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).
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 thenavigator.getBattery()
(en-US) method instead to get a batteryPromise
, which will resolve when theBatteryManager
is available for use; theBatteryManager
is passed into the fulfillment handler for the promise (error 12593355).
Archivos y directorios
- A subset of the File and Directory Entries API has been implemented, to improve compatibility with sites that were previously only compatible with Google Chrome (error 1265767).
- 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
FileSystemEntry
(en-US) (properties only; the methods have not been implemented)FileSystemFileEntry
(en-US) (except forcreateWriter()
(en-US))FileSystemDirectoryEntry
(en-US) (except forremoveRecursively()
(en-US))FileSystemDirectoryReader
(en-US)
HTMLInputElement.webkitdirectory
(en-US) as well as thewebkitdirectory
attribute of the<input>
element have been implemented; this lets you configure a file input to accept directories instead of files (error 1258489).HTMLInputElement.webkitEntries
(en-US) has been implemented; this returns an array ofFileSystemEntry
(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 containingFileSystemDirectoryEntry
(en-US) that was among the items in the list returned byHTMLInputElement.webkitGetEntries()
.- See File and Directory Entries API support in Firefox 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).
- The asynchronous API interfaces have been implemented, with the caveat that only reading of files is supported; for example, the
- We've implemented
DataTransferItem.webkitGetAsEntry()
(en-US) as part of the File and Directory Entries API; this lets you obtain aFileSystemEntry
(en-US) representing a dropped file (error 1289255). This is enabled by default. - The
HTMLInputElement.directory
property, part of the Directory Upload API proposal, has been renamed toallowdirs
(error 1288681). This property is hidden behind a preference.
Ver también
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