Firefox 20 for developers

  • Revision slug: Mozilla/Firefox/Releases/20
  • Revision title: Firefox 20 for developers
  • Revision id: 450183
  • Created:
  • Creator: teoli
  • Is current revision? No
  • Comment

Revision Content

Firefox 20 was released on . 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 ({{bug("676619")}}).
  • The value auto for the global attribute dir has been implemented ({{bug("548206")}}).

JavaScript

  • Support for the Weakmap.prototype.clear() method, recently added to the Harmony (EcmaScript 6) draft proposal has been added ({{bug("814562")}}).
  • Support for the Math.imul() method, a C-style 32-bit multiplication function. Though proposed for Harmony (EcmaScript 6) it has not yet accepted and still is non-standard ({{bug("808148")}}).
  • Web apps using draggable text with Kinetic 3.x are working, even when using the Cairo canvas backend. ({{bug("835064")}})
  • The for each...in statement has been deprecated and should not be used. Consider using the new for...of statement ({{Bug("804834")}}).

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("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.enabled about:config preference to true ({{bug("648722")}}).

DOM

  • {{domxref("HTMLMediaElement")}} supports now playbackRate (both read and write), with pitch correction. Pitch correction can be controlled using the property mozPreservesPitch ({{bug('495040')}}).
  • CSSOM: Support for the new {{domxref("CSSGroupingRule")}} and {{domxref("CSSConditionRule")}} has been added ({{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 {{bug("816431")}}).
  • CSSOM: It is now possible to set the value of conditionText for {{domxref("CSSMediaRule")}} ({{bug("815021")}}).
  • The {{domxref("DOMParser")}} parseFromStream and parseFromBuffer methods are no longer available from web content ({{bug('816410')}}).
  • The XMLSerializer serializeToStream method is no longer available from web content ({{bug('816410')}}).
  • TextDecoder and TextEncoder interfaces are now available in Workers ({{bug('795542')}}).
  • Support for the CSS.supports() method has been added, behind the layout.css.supports-rule.enabled pref (off by default) ({{bug("779917")}}).
  • Support for UndoManager has been added ({{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.mozGetUserMedia is now activated by default.

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('816410')}}. See nsIDOMParser for alternatives.
  • Content Preferences: The {{Interface("nsIContentPrefService")}} interface is now deprecated and the asynchronous {{Interface("nsIContentPrefService2")}} storage API has been implemented.

See also

Older versions

{{Firefox_for_developers('19')}}

Revision Source

<p>Firefox&nbsp;20 was released on <time datetime="2013-04-02">April&nbsp;2, 2013</time>. This article provides information about the changes in this release that will affect developers.</p>
<h2 id="Changes_for_Web_developers">Changes for Web developers</h2>
<h3 id="HTML">HTML</h3>
<ul>
  <li>Support for the {{htmlattrxref("download", "a")}} attribute on the {{HTMLElement("a")}} and {{HTMLElement("area")}} element has been added ({{bug("676619")}}).</li>
  <li>The value <code>auto </code>for the <a href="/en-US/docs/HTML/Global_attributes" title="HTML/Global_attributes">global attribute</a> <a href="/en-US/docs/HTML/Global_attributes#attr-dir" title="HTML/Global_attributes"><code>dir</code></a> has been implemented ({{bug("548206")}}).</li>
</ul>
<h3 id="JavaScript">JavaScript</h3>
<ul>
  <li>Support for the <code><a href="/en-US/docs/JavaScript/Reference/Global_Objects/WeakMap" title="JavaScript/Reference/Global_Objects/WeakMap">Weakmap</a>.prototype.clear()</code> method, recently added to the Harmony (EcmaScript 6) draft proposal has been added ({{bug("814562")}}).</li>
  <li>Support for the <a href="/en-US/docs/JavaScript/Reference/Global_Objects/Math/imul" title="JavaScript/Reference/Global_Objects/Math/imul"><code>Math.imul()</code></a> method, a C-style 32-bit multiplication function. Though proposed for Harmony (EcmaScript 6) it has not yet accepted and still is non-standard ({{bug("808148")}}).</li>
  <li>Web apps using draggable text with Kinetic 3.x are working, even when using the Cairo canvas backend. ({{bug("835064")}})</li>
  <li>The <a href="/en-US/docs/JavaScript/Reference/Statements/for_each...in" title="JavaScript/Reference/Statements/for_each...in">for each...in</a> statement has been deprecated and should not be used. Consider using the new <a href="/en-US/docs/JavaScript/Reference/Statements/for...of" title="JavaScript/Reference/Statements/for...of">for...of</a> statement ({{Bug("804834")}}).</li>
</ul>
<h3 id="CSS">CSS</h3>
<ul>
  <li><a href="/en-US/docs/CSS/Using_CSS_flexible_boxes" title="CSS/Using_CSS_flexible_boxes">CSS Flexbox</a> 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 <code>layout.css.flexbox.enabled</code> about:config preference to <code>true</code>.</li>
  <li>The <code>mask-type</code> property from the <a href="https://dvcs.w3.org/hg/FXTF/raw-file/tip/masking/index.html" title="https://dvcs.w3.org/hg/FXTF/raw-file/tip/masking/index.html">CSS Masking specification</a> has been added ({{bug("793617")}}).</li>
  <li>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 <code>layout.css.scope-pseudo.enabled</code> about:config preference to <code>true</code> ({{bug("648722")}}).</li>
</ul>
<h3 id="DOM">DOM</h3>
<ul>
  <li>{{domxref("HTMLMediaElement")}} supports now <code>playbackRate</code> (both read and write), with pitch correction. Pitch correction can be controlled using the property <code>mozPreservesPitch</code> ({{bug('495040')}}).</li>
  <li>CSSOM: Support for the new {{domxref("CSSGroupingRule")}} and {{domxref("CSSConditionRule")}} has been added ({{bug("814907")}}).</li>
  <li>CSSOM: On {{domxref("CSSRule")}} the constant <span id="summary_alias_container"><span id="short_desc_nonedit_display">CSSRule.MOZ_KEYFRAME_RULE</span></span> and <span id="summary_alias_container"><span id="short_desc_nonedit_display">CSSRule.MOZ_KEYFRAMES_RULE</span></span> have been unprefixed to <span id="summary_alias_container"><span id="short_desc_nonedit_display">CSSRule.KEYFRAME_RULE</span></span> and <span id="summary_alias_container"><span id="short_desc_nonedit_display">CSSRule.KEYFRAMES_RULE</span></span>. The prefixed version are temporarily kept for helping Web author to transition their code {{bug("816431")}}).</li>
  <li>CSSOM: It is now possible to set the value of <code>conditionText</code> for {{domxref("CSSMediaRule")}} ({{bug("815021")}}).</li>
  <li>The {{domxref("DOMParser")}} <code>parseFromStream</code> and <code>parseFromBuffer</code> methods are no longer available from web content ({{bug('816410')}}).</li>
  <li>The <code><a href="/en-US/docs/XMLSerializer">XMLSerializer</a></code> <code>serializeToStream</code> method is no longer available from web content ({{bug('816410')}}).</li>
  <li><code>TextDecoder</code> and <code>TextEncoder</code> interfaces are now available in Workers ({{bug('795542')}}).</li>
  <li>Support for the <code>CSS.supports()</code> method has been added, behind the <code><code>layout.css.supports-rule.enabled</code></code> pref (off by default) ({{bug("779917")}}).</li>
  <li>Support for UndoManager has been added ({{bug("617532")}}).</li>
  <li>The CSSOM {{domxref("document.caretPositionFromPoint")}} method, which returns a {{domxref("CaretPosition")}} has been implemented.</li>
  <li>The index argument of the {{domxref("tableRow.insertCell")}} and {{domxref("table.insertRow")}} methods has been made optional as per HTML specification.</li>
  <li>{{domxref("Navigator.getUserMedia")}}, still prefixed as <code>Navigator.mozGetUserMedia</code> is now activated by default.</li>
</ul>
<h3 id="MathML">MathML</h3>
<ul>
  <li>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 <a href="/en-US/docs/Error_Console" title="Error_Console">Error Console</a>.</li>
  <li>The <code>scriptminsize</code> attribute now accepts unitless values and percent values. They are interpreted as multiples of the default value ("8pt").</li>
  <li>Unitless values are now also allowed for the <code>mathsize</code> and <code>fontsize</code> attributes; they multiply the default value.</li>
</ul>
<h2 id="Changes_for_add-on_and_Mozilla_developers">Changes for add-on and Mozilla developers</h2>
<ul>
  <li><a href="/en-US/docs/E4X" title="E4X">ECMAScript for XML (E4X)</a> 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.</li>
  <li>The nsIDOMParserJS interface no longer exists {{bug('816410')}}. See <a href="/en-US/docs/nsIDOMParser" title="nsIDOMParser">nsIDOMParser</a> for alternatives.</li>
  <li>Content Preferences: The {{Interface("nsIContentPrefService")}} interface is now deprecated and the asynchronous {{Interface("nsIContentPrefService2")}} storage API has been implemented.</li>
</ul>
<h2 id="See_also">See also</h2>
<ul>
  <li><a href="http://www.mozilla.org/en-US/firefox/20.0/releasenotes/">Firefox&nbsp;20 Release Notes</a></li>
  <li><a href="/en-US/docs/Site_Compatibility_for_Firefox_20">Site Compatibility for Firefox 20</a></li>
  <li><a href="https://blog.mozilla.org/addons/2013/03/20/compatibility-for-firefox-20/">Add-on Compatibility for Firefox 20</a></li>
</ul>
<h3 id="Older_versions">Older versions</h3>
<div>
  {{Firefox_for_developers('19')}}</div>
Revert to this revision