Firefox 21 for developers

  • Revision slug: Mozilla/Firefox/Releases/21
  • Revision title: Firefox 21 for developers
  • Revision id: 378933
  • Created:
  • Creator: myakura
  • Is current revision? No
  • Comment alreday moved to Beta.

Revision Content

This page is not complete
Firefox 21 hasn't reached its feature freeze yet. New features will be added to it in the near future.

{{ ReleaseChannelInfo("21", "21", "May 2013", "Beta") }}

Want to help document Firefox 21? See the list of bugs that need to be written about and pitch in!

Changes for Web developers

HTML

  • The {{htmlattrxref("scoped", "style")}} attribute has been added to the {{HTMLElement("style")}} element. It allows to include styles that are isolated from the rest of the document. Such styles can be selected using the {{cssxref(":scope")}} CSS pseudo-element introduced in Firefox 20. ({{bug("508725")}}).
  • The new HTML {{HTMLElement("main")}} element has been implemented ({{bug("820508")}}).

JavaScript

  • E4X, an ancient JavaScript extension, has been removed. Implemented only in Gecko, it never got significant traction ({{bug("788293")}}).
  • parseInt no longer treats strings with leading "0" as octal ({{bug("786135")}}).

CSS

  • The none value of {{cssxref("user-select", "-moz-user-select")}} has now the same behavior than the -moz-none value, aligning Gecko on WebKit (Chrome, Safari), Presto (Opera) and Trident (Internet Explorer) ({{bug("816298")}}).
  • On XHTML content, the auto value of {{cssxref("hyphens", "-moz-hyphens")}} incorrectly applied hyphenation rules when the language was not explicitly declared. This is fixed by ({{bug("702121")}}).
  • An auto value has been added to the CSS {{cssxref("-moz-orient")}} property. The auto value is equivalent to horizontal when applied to {{HTMLElement("meter")}} and {{HTMLElement("progress")}} ({{bug("835883")}}).

DOM

  • The origin property has been added to the {{domxref("window.location")}} ({{bug("828261")}}).
  • The valueAsDate and valueAsNumber methods have been added for <input type="time"> ({{bug("781570")}}).
  • The min and max attributes now apply to <input type="time"> too ({{bug("781572")}}).
  • Some new keyCodes for volume control are supported ({{bug("674739")}}).
  • Some new keyCodes for ancient keyboard layout such as AS/400 are now supported on Windows and Linux ({{bug("833719")}}).
  • Various keyCode values for OEM sepecific keys on Windows are now supported again ({{bug("833719")}}).
  • The function window.crypto.getRandomValues has been implemented ({{bug("440046")}}).

SVG

  • The {{cssxref("paint-order")}} property has been implemented ({{bug("828805")}}).

Networking

  • We continue to update our CSP implementation to match the CSP 1.0 spec, which reached Candidate Recommendation:
    • Support for the spec-compliant Content-Security-Policy HTTP header (in addition to the experimental X-Content-Security-Policy) has been added ({{bug("783049")}}). Note: the patch for this new header landed in Firefox 21, it is disabled on builds ({{bug("842657")}}).

Worker

  • The functions {{domxref("window.URL.createObjectURL", "URL.createObjectURL")}} and {{domxref("window.URL.revokeObjectURL", "URL.revokeObjectURL")}} are now included in the set of functions available to workers.

Changes for add-on and Mozilla developers

  • FUEL applications cannot use the Livemarks service anymore ({{bug("834492")}}). The Livemarks service is deprecated and phased out in favor of the new async interface.
  • History API saw numerous deprecated API being removed:
    • Replaced by mozIAsyncFavicons:
      • nsIFaviconService::setFaviconUrlForPage
      • nsIFaviconService::setFaviconData
      • nsIFaviconService::getFaviconData
      • nsIFaviconService::getFaviconForPage
      • nsIFaviconService::setAndLoadFaviconForPage
      • nsIFaviconService::getFaviconImageForPage
      • nsIFaviconService::getFaviconDataAsDataURL
    • Replaced by mozIAsyncLivemarks:
      • nsILivemarkService::*
      • PlacesUtils.itemIsLivemark
      • PlacesUtils.nodeIsLivemarkContainer
      • PlacesUtils.nodeIsLivemarkItem
    • Removed only third argument:
      • PlacesUIUtils.showBookmarkDialog
    • No more implemented by Places, use mozIAsyncHistory instead:
      • nsIGlobalHistory2::addURI
      • nsIGlobalHistory2::isVisited
      • nsIGlobalHistory2::setPageTitle
    • No more needed, use onDeleteURI or onItemRemoved:
      • nsINavHistoryObserver::OnBeforeDeleteURI
      • nsINavBookmarkObserver::OnBeforeItemRemoved
    • Never implemented properly:
      • nsINavHistoryFullVisitResultNode
    • Deprecated, use mozIAsyncHistory::updatePlaces instead:
      • nsINavHistoryService::AddVisit

See also

Older versions

{{Firefox_for_developers('20')}}

Revision Source

<div class="overheadIndicator draft draftHeader">
  <strong>This page is not complete</strong>
  <div>
    Firefox 21 hasn't reached its feature freeze yet. New features will be added to it in the near future.</div>
</div>
<p>{{ ReleaseChannelInfo("21", "21", "May 2013", "Beta") }}</p>
<p>Want to help document Firefox 21? See the <a class="external" href="http://beta.elchi3.de/doctracker/#list=fx&amp;version=21.0">list of bugs that need to be written about</a> and pitch in!</p>
<h2 id="Changes_for_Web_developers">Changes for Web developers</h2>
<h3 id="HTML">HTML</h3>
<ul>
  <li>The {{htmlattrxref("scoped", "style")}} attribute has been added to the {{HTMLElement("style")}} element. It allows to include styles that are isolated from the rest of the document. Such styles can be selected using the {{cssxref(":scope")}} CSS pseudo-element introduced in Firefox 20. ({{bug("508725")}}).</li>
  <li>The new HTML {{HTMLElement("main")}} element has been implemented ({{bug("820508")}}).</li>
</ul>
<h3 id="JavaScript">JavaScript</h3>
<ul>
  <li><a href="/en-US/docs/E4X" title="/en-US/docs/E4X">E4X</a>, an ancient JavaScript extension, has been removed. Implemented only in Gecko, it never got significant traction ({{bug("788293")}}).</li>
  <li><a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/parseInt" title="/en-US/docs/">parseInt</a> no longer treats strings with leading "0" as octal ({{bug("786135")}}).</li>
</ul>
<h3 id="CSS">CSS</h3>
<ul>
  <li>The <code>none</code> value of {{cssxref("user-select", "-moz-user-select")}} has now the same behavior than the <code>-moz-none</code> value, aligning Gecko on WebKit (Chrome, Safari), Presto (Opera) and Trident (Internet Explorer) ({{bug("816298")}}).</li>
  <li>On XHTML content, the <code>auto</code> value of {{cssxref("hyphens", "-moz-hyphens")}} incorrectly applied hyphenation rules when the language was not explicitly declared. This is fixed by ({{bug("702121")}}).</li>
  <li>An <code>auto</code> value has been added to the CSS {{cssxref("-moz-orient")}} property. The <code>auto</code> value is equivalent to <code>horizontal</code> when applied to {{HTMLElement("meter")}} and {{HTMLElement("progress")}} ({{bug("835883")}}).</li>
</ul>
<h3 id="DOM">DOM</h3>
<ul>
  <li>The <code>origin</code> property has been added to the {{domxref("window.location")}} ({{bug("828261")}}).</li>
  <li>The <code>valueAsDate</code> and <code>valueAsNumber</code> methods have been added for <code>&lt;input type="time"&gt;</code> ({{bug("781570")}}).</li>
  <li>The <code>min</code> and <code>max</code> attributes now apply to <code>&lt;input type="time"&gt;</code> too ({{bug("781572")}}).</li>
  <li>Some new keyCodes for volume control are supported ({{bug("674739")}}).</li>
  <li>Some new keyCodes for ancient keyboard layout such as AS/400 are now supported on Windows and Linux ({{bug("833719")}}).</li>
  <li>Various keyCode values for OEM sepecific keys on Windows are now supported again ({{bug("833719")}}).</li>
  <li>The function <a href="/en-US/docs/DOM/window.crypto.getRandomValues" title="/en-US/docs/DOM/window.crypto.getRandomValues"><code>window.crypto.getRandomValues</code></a> has been implemented ({{bug("440046")}}).</li>
</ul>
<h3 id="SVG">SVG</h3>
<ul>
  <li>The {{cssxref("paint-order")}} property has been implemented ({{bug("828805")}}).</li>
</ul>
<h3 id="Networking">Networking</h3>
<ul>
  <li>We continue to update our CSP implementation to match the CSP 1.0 spec, which reached Candidate Recommendation:
    <ul>
      <li>Support for the spec-compliant <span id="summary_alias_container"><span id="short_desc_nonedit_display"><code>Content-Security-Policy</code> HTTP header (in addition to the experimental </span></span><span id="summary_alias_container"><span id="short_desc_nonedit_display"><code>X-Content-Security-Policy</code>) has been added ({{bug("783049")}}). <strong>Note</strong>: the patch for this new header landed in Firefox 21, it is disabled on builds</span></span> ({{bug("842657")}}).</li>
    </ul>
  </li>
</ul>
<h3 id="Worker">Worker</h3>
<ul>
  <li>The functions {{domxref("window.URL.createObjectURL", "URL.createObjectURL")}} and {{domxref("window.URL.revokeObjectURL", "URL.revokeObjectURL")}} are now included in the set of <a href="/en-US/docs/DOM/Worker/Functions_available_to_workers" title="/en-US/docs/DOM/Worker/Functions_available_to_workers">functions available to workers</a>.</li>
</ul>
<h2 id="Changes_for_add-on_and_Mozilla_developers">Changes for add-on and Mozilla developers</h2>
<ul>
  <li>FUEL applications cannot use the Livemarks service anymore ({{bug("834492")}}). The Livemarks service is deprecated and phased out in favor of the new async interface.</li>
  <li>History API saw numerous deprecated API being removed:
    <ul>
      <li>Replaced by <code>mozIAsyncFavicons</code>:
        <ul>
          <li><code>nsIFaviconService::setFaviconUrlForPage</code></li>
          <li><code>nsIFaviconService::setFaviconData</code></li>
          <li><code>nsIFaviconService::getFaviconData</code></li>
          <li><code>nsIFaviconService::getFaviconForPage</code></li>
          <li><code>nsIFaviconService::setAndLoadFaviconForPage</code></li>
          <li><code>nsIFaviconService::getFaviconImageForPage</code></li>
          <li><code>nsIFaviconService::getFaviconDataAsDataURL</code></li>
        </ul>
      </li>
      <li>Replaced by <code>mozIAsyncLivemarks</code>:
        <ul>
          <li><code>nsILivemarkService::*</code></li>
          <li><code>PlacesUtils.itemIsLivemark</code></li>
          <li><code>PlacesUtils.nodeIsLivemarkContainer</code></li>
          <li><code>PlacesUtils.nodeIsLivemarkItem</code></li>
        </ul>
      </li>
      <li>Removed only third argument:
        <ul>
          <li><code>PlacesUIUtils.showBookmarkDialog</code></li>
        </ul>
      </li>
      <li>No more implemented by Places, use <code>mozIAsyncHistory</code> instead:
        <ul>
          <li><code>nsIGlobalHistory2::addURI</code></li>
          <li><code>nsIGlobalHistory2::isVisited</code></li>
          <li><code>nsIGlobalHistory2::setPageTitle</code></li>
        </ul>
      </li>
      <li>No more needed, use <code>onDeleteURI</code> or <code>onItemRemoved</code>:
        <ul>
          <li><code>nsINavHistoryObserver::OnBeforeDeleteURI</code></li>
          <li><code>nsINavBookmarkObserver::OnBeforeItemRemoved</code></li>
        </ul>
      </li>
      <li>Never implemented properly:
        <ul>
          <li><code>nsINavHistoryFullVisitResultNode</code></li>
        </ul>
      </li>
      <li>Deprecated, use<code> mozIAsyncHistory::updatePlaces</code> instead:
        <ul>
          <li><code>nsINavHistoryService::AddVisit</code></li>
        </ul>
      </li>
    </ul>
  </li>
</ul>
<h2 id="See_also">See also</h2>
<ul>
  <li><a href="http://www.mozilla.org/en-US/firefox/21.0a2/auroranotes/">Firefox&nbsp;21 Aurora Release Notes</a></li>
  <li><a href="/en-US/docs/Site_Compatibility_for_Firefox_21">Site Compatibility for Firefox 21</a></li>
</ul>
<h3 id="Older_versions">Older versions</h3>
<p>{{Firefox_for_developers('20')}}</p>
Revert to this revision