There were scripting errors on this page. While those are being addressed by site editors, you can view partial content below.

Firefox 20 was released on . This article provides information about the changes in this release that will affect developers.

Changes for Web developers

HTML

JavaScript

  • Support for the Weakmap.prototype.clear() method, recently added to the Harmony (EcmaScript 2015) draft proposal has been added ({{ bug }}).
  • 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 ({{ bug }}).
  • Web apps using draggable text with Kinetic 3.x are working, even when using the Cairo canvas backend ({{ bug }}).
  • The for each…in statement has been deprecated and should not be used. Consider using the new for…of statement ({{ Bug }}).
  • Support for the Map.prototype.keys(), Map.prototype.values(), and Map.prototype.entries() has been added ({{ bug }}).

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.enabled about:config preference to true.
  • The mask-type property from the CSS Masking specification has been added ({{ bug }}).
  • Experimental support for the :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.enabled about:config preference to true ({{ bug }}).

DOM/APIs

  • HTMLMediaElement supports now playbackRate (both read and write), with pitch correction. Pitch correction can be controlled using the property mozPreservesPitch ({{ bug }}).
  • CSSOM: Support for the new CSSGroupingRule and CSSConditionRule has been added ({{ bug }}).
  • CSSOM: On 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 {{ bug }}).
  • CSSOM: It is now possible to set the value of conditionText for CSSMediaRule ({{ bug }}).
  • The DOMParser parseFromStream and parseFromBuffer methods are no longer available from web content ({{ bug }}).
  • The XMLSerializer serializeToStream method is no longer available from web content ({{ bug }}).
  • TextDecoder and TextEncoder interfaces are now available in Workers ({{ bug }}).
  • Support for the CSS.supports() method has been added, behind the layout.css.supports-rule.enabled pref (off by default) ({{ bug }}).
  • Support for UndoManager has been added ({{ bug }}).
  • The CSSOM document.caretPositionFromPoint method, which returns a CaretPosition has been implemented.
  • The index argument of the tableRow.insertCell and table.insertRow methods has been made optional as per HTML specification.
  • Navigator.getUserMedia, still prefixed as Navigator.mozGetUserMedia is now activated by default.
  • The third, optional, transfer argument of Window.postMessage is now supported. It allows to transfer a sequence of Transferable objects to the destination ({{ bug }}).
  • The non-standard Window.sizeToContent() method now clamps the minimal size: the window cannot be forced anymore to small sizes preventing the user to interact with ({{ bug }}).
  • Blend modes, such as overlay, color-burn, hue, etc. have been added to the Canvas CanvasRenderingContext2D.globalCompositeOperation property ({{ bug }}).
  • The prefixed version of window.indexedDBwindow.mozIndexedDB — was reintroduced to Gecko, so that bad cross-browser prefixing code (such as var indexedDB = window.indexedDB || window.webkitIndexedDB ...) doesn't break in Firefox. A better approach is window.indexedDB = window.indexedDB || window.webkitIndexedDB ... (see {{ bug }}.)

SVG

  • The implementation of the contentScriptType and contentStyleType properties has been removed from SVGSVGElement along with the removal from SVG2 ({{ bug }}).

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 scriptminsize attribute 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 mathsize and fontsize attributes; 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 nsIDOMParserJS interface no longer exists {{ bug }}. See nsIDOMParser for alternatives.
  • Content Preferences: The nsIContentPrefService interface is now deprecated and the asynchronous nsIContentPrefService2 storage API has been implemented.
  • The nsIProfile and nsIProfileChangeStatus interfaces 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 nsIEventSource interface no longer exists {{ bug }}.

See also

Older versions

Document Tags and Contributors

Last updated by: wbamberg,