Path: blob/main/files/en-us/mozilla/firefox/releases/20/index.md
6581 views
------{{FirefoxSidebar}}
Firefox 20 was released on April, 2nd 2013. This article provides information about the changes in this release that will affect developers.
Changes for Web developers
HTML
Support for the {{htmlattrxref("download", "a")}} attribute on the {{HTMLElement("a")}} and {{HTMLElement("area")}} element has been added (Firefox bug 676619).
The value
autofor the global attributedirhas been implemented (Firefox bug 548206).The global attribute contextmenu now works on Firefox for Android (Firefox bug 736321).
JavaScript
Support for the
WeakMap.prototype.clear()method, recently added to the Harmony (ECMAScript 2015) draft proposal has been added (Firefox bug 814562).Support for the
Math.imul()method, a C-style 32-bit multiplication function. Though proposed for Harmony (ECMAScript 2015) it has not yet accepted and still is non-standard (Firefox bug 808148).Web apps using draggable text with Kinetic 3.x are working, even when using the Cairo canvas backend (Firefox bug 835064).
The
for each...instatement has been deprecated and should not be used. Consider using the newfor...ofstatement (Webkit bug 804834).Support for the {{jsxref("Map.prototype.keys()")}}, {{jsxref("Map.prototype.values()")}}, and {{jsxref("Map.prototype.entries()")}} has been added (Firefox bug 817368).
CSS
CSS Flexbox is now available by default in pre-release builds only (excluding beta versions). It can be enabled in release and beta version by setting the
layout.css.flexbox.enabledabout:config preference totrue.The
mask-typeproperty from the CSS Masking specification has been added (Firefox bug 793617).Experimental support for the {{cssxref(":scope")}} pseudo-class has been added. Enabled by default in Aurora and Nightly, it can be enabled in release and beta version by setting the
layout.css.scope-pseudo.enabledabout:config preference totrue(Firefox bug 648722).
DOM/APIs
{{domxref("HTMLMediaElement")}} supports now
playbackRate(both read and write), with pitch correction. Pitch correction can be controlled using the propertymozPreservesPitch(Firefox bug 495040).CSSOM: Support for the new {{domxref("CSSGroupingRule")}} and {{domxref("CSSConditionRule")}} has been added (Firefox bug 814907).
CSSOM: On {{domxref("CSSRule")}} the constant CSSRule.MOZ_KEYFRAME_RULE and CSSRule.MOZ_KEYFRAMES_RULE have been unprefixed to CSSRule.KEYFRAME_RULE and CSSRule.KEYFRAMES_RULE. The prefixed version are temporarily kept for helping Web author to transition their code Firefox bug 816431).
CSSOM: It is now possible to set the value of
conditionTextfor {{domxref("CSSMediaRule")}} (Firefox bug 815021).The {{domxref("DOMParser")}}
parseFromStreamandparseFromBuffermethods are no longer available from web content (Firefox bug 816410).The
XMLSerializerserializeToStreammethod is no longer available from web content (Firefox bug 816410).{{domxref("TextDecoder")}} and {{domxref("TextEncoder")}} interfaces are now available in Workers (Firefox bug 795542).
Support for the
CSS.supports()method has been added, behind thelayout.css.supports-rule.enabledpref (off by default) (Firefox bug 779917).Support for UndoManager has been added (Firefox bug 617532).
The CSSOM {{domxref("Document.caretPositionFromPoint()")}} method, which returns a {{domxref("CaretPosition")}} has been implemented.
The index argument of the {{domxref("tableRow.insertCell")}} and {{domxref("table.insertRow")}} methods has been made optional as per HTML specification.
{{domxref("Navigator.getUserMedia")}}, still prefixed as
Navigator.mozGetUserMediais now activated by default.The third, optional,
transferargument of {{domxref("Window.postMessage")}} is now supported. It allows to transfer a sequence of {{domxref("Transferable")}} objects to the destination (Firefox bug 822094).The non-standard {{domxref("Window.sizeToContent()")}} method now clamps the minimal size: the window cannot be forced anymore to small sizes preventing the user to interact with (Firefox bug 764240).
Blend modes, such as
overlay,color-burn,hue, etc. have been added to the Canvas {{domxref("CanvasRenderingContext2D.globalCompositeOperation")}} property (Firefox bug 748433).The prefixed version of
window.indexedDB—window.mozIndexedDB— was reintroduced to Gecko, so that bad cross-browser prefixing code (such asvar indexedDB = window.indexedDB || window.webkitIndexedDB …) doesn't break in Firefox. A better approach iswindow.indexedDB = window.indexedDB || window.webkitIndexedDB …(see Firefox bug 770844.)
SVG
The implementation of the
contentScriptTypeandcontentStyleTypeproperties has been removed fromSVGSVGElementalong with the removal from SVG2 (Firefox bug 819731).
MathML
To help MathML authors debugging "invalid-markup" errors in their documents, MathML parsing errors (such as having too many / too few child elements) and warnings about deprecated attributes or wrong attribute values are now reported to the Error Console.
The
scriptminsizeattribute now accepts unitless values and percent values. They are interpreted as multiples of the default value ("8pt").Unitless values are now also allowed for the
mathsizeandfontsizeattributes; they multiply the default value.
Changes for add-on and Mozilla developers
ECMAScript for XML (E4X) is now fully disabled for all chrome and content scripts. It was previously disabled for content in Firefox 17 and has been removed entirely for Firefox 21. Use DOMParser/DOMSerializer or a non-native JXON algorithm instead.
The
nsIDOMParserJSinterface no longer exists (Firefox bug 816410). SeensIDOMParserfor alternatives.Content Preferences: The
nsIContentPrefServiceinterface is now deprecated and the asynchronousnsIContentPrefService2storage API has been implemented.The
nsIProfileandnsIProfileChangeStatusinterfaces have been removed, along with other code supporting the pre-Firefox profile management system. You probably weren't using these interfaces, but if you were, you should stop doing so. This prevents defunct parts of the profile management system from vetoing the shutdown process.The
nsIEventSourceinterface no longer exists (Firefox bug 819639).
See also
Older versions
{{Firefox_for_developers('19')}}