Firefox 19 release notes for developers
Firefox 19 was released on February 19, 2013. 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.
Firefox 19 was released on February 19, 2013. 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
JavaScript
MapandSetobjects have changed from having asize()method to asizeproperty (Firefox bug 807001)MapandSetobjects also have a clear() method now. (Firefox bug 805003)
CSS
- Support for the viewport-relative <length> units,
vh,vw,vmin, andvmax, has landed (Firefox bug 503720) - CSS Flexbox has been unprefixed, but remains disabled by default (Firefox bug 801098).
- The
-moz-initialvalue has been unprefixed (Firefox bug 806068).-moz-initialwill be kept for a while as an alias; however, authors are strongly encouraged to switch over toinitial. - The CSS text-transform property now supports the
full-widthkeyword, which allows a more seamless inclusion of Latin characters in text using ideographic fixed-width characters, like Chinese or Japanese (Firefox bug 774560). - The CSS page-break-inside has been implemented (Firefox bug 685012).
- The CSS calc() function can now be used on
<color-stop>(on <gradient>). - The CSS @page at-rule is now supported (Firefox bug 115199). Note that the pseudo-classes :first, :right, and :left are not yet implemented.
- The
:-moz-placeholderpseudo-class is replaced by the::-moz-placeholderpseudo-element (Firefox bug 737786). - Declarations qualified with
!importantappearing in @keyframes are now ignored, per spec (Firefox bug 784466).
DOM/APIs
- The Element.getElementsByTagName, Element.getElementsByTagNameNS and Element.getElementsByClassName methods now return a live HTMLCollection (Firefox bug 799464).
- The File
mozLastModifiedDateproperty has been implemented. (Firefox bug 793955) - The File lastModifiedDate property returns the current date, when the date of the last modification is unknown. (Firefox bug 793459)
- The CanvasRenderingContext2D
isPointInStrokemethod has been implemented (Firefox bug 803124). - The HTMLCanvasElement
toBlobmethod has been implemented (Firefox bug 648610). - The
Node.isSupportedand the document.implementation.hasFeature() methods have been changed to always returntrue(Firefox bug 801425). - When calling
document.createElement(null),nullwill now be stringified and works likedocument.createElement("null"). - The TextDecoder and TextEncoder interfaces have been updated to match the latest spec (Firefox bug 801487).
XForms
Support for XForms has been removed in Firefox 19.
Changes for add-on and Mozilla developers
[!NOTE] A key change in Firefox 19 is that
nsresultis now strongly typed. This will help make it easier to detect bugs that are caused by mishandling of return values, but may cause existing code to break if it's making incorrect assumptions in this regard.
getBrowserSelection()now returns the selected text in a text input field. As a result,gContextMenu.isTextSelectedwill betruewhen the user selects text in a text input field that is not a password field. (Firefox bug 565717)- Dict.jsm:
Dict()now takes a JSON String.Dict.toJSON()was added, and it returns a JSON String. (Firefox bug 727967)
Interface changes
nsIImgLoadingContent- : The parameter (aObserver) of
addObserver()method changes fromimgIDecoderObservertoimgINotificationObserver. Thenotify()method ofimgINotificationObserveris not scriptable, so you need to usecreateScriptedObserver()fromimgITools. nsIChannel- : The property
contentLengthchanged fromlongtoint64_t.