Firefox 21 for developers

  • Revision slug: Firefox_21_for_developers
  • Revision title: Firefox 21 for developers
  • Revision id: 351615
  • Created:
  • Creator: teoli
  • Is current revision? No
  • Comment

Revision Content

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

{{ ReleaseChannelInfo("21", "21", "Mai 2013", "Nightly") }}

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. Implement only in Gecko, it never got significant traction ({{bug("788293")}}).

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")}}).

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")}}.

Changes for add-on and Mozilla developers

  • 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>
    As Firefox 21 didn't reached its feature freeze yet, new features will be added to it in the near future.</div>
</div>
<p>{{ ReleaseChannelInfo("21", "21", "Mai 2013", "Nightly") }}</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. Implement only in Gecko, it never got significant traction ({{bug("788293")}}).</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>
</ul>
<h3 id="SVG">SVG</h3>
<ul>
  <li>The {{cssxref("paint-order")}} property has been implemented ({{bug("828805")}}).</li>
</ul>
<h3>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")}}.</span></span></li>
    </ul>
  </li>
</ul>
<h2 id="Changes_for_add-on_and_Mozilla_developers">Changes for add-on and Mozilla developers</h2>
<ul>
  <li>History API saw numerous deprecated API being removed:
    <ul>
      <li>
        <p>Replaced by <code>mozIAsyncFavicons</code>:</p>
        <ul>
          <li>
            <p><code>nsIFaviconService::setFaviconUrlForPage</code></p>
          </li>
          <li>
            <p><code>nsIFaviconService::setFaviconData</code></p>
          </li>
          <li>
            <p><code>nsIFaviconService::getFaviconData</code></p>
          </li>
          <li>
            <p><code>nsIFaviconService::getFaviconForPage</code></p>
          </li>
          <li>
            <p><code>nsIFaviconService::setAndLoadFaviconForPage</code></p>
          </li>
          <li>
            <p><code>nsIFaviconService::getFaviconImageForPage</code></p>
          </li>
          <li>
            <p><code>nsIFaviconService::getFaviconDataAsDataURL</code></p>
          </li>
        </ul>
      </li>
      <li>
        <p>Replaced by <code>mozIAsyncLivemarks</code>:</p>
        <ul>
          <li>
            <p><code>nsILivemarkService::*</code></p>
          </li>
          <li>
            <p><code>PlacesUtils.itemIsLivemark</code></p>
          </li>
          <li>
            <p><code>PlacesUtils.nodeIsLivemarkContainer</code></p>
          </li>
          <li>
            <p><code>PlacesUtils.nodeIsLivemarkItem</code></p>
          </li>
        </ul>
      </li>
      <li>
        <p>Removed only third argument:</p>
        <ul>
          <li>
            <p><code>PlacesUIUtils.showBookmarkDialog</code></p>
          </li>
        </ul>
      </li>
      <li>
        <p>No more implemented by Places, use <code>mozIAsyncHistory</code> instead:</p>
        <ul>
          <li>
            <p><code>nsIGlobalHistory2::addURI</code></p>
          </li>
          <li>
            <p><code>nsIGlobalHistory2::isVisited</code></p>
          </li>
          <li>
            <p><code>nsIGlobalHistory2::setPageTitle</code></p>
          </li>
        </ul>
      </li>
      <li>
        <p>No more needed, use <code>onDeleteURI</code> or <code>onItemRemoved</code>:</p>
        <ul>
          <li>
            <p><code>nsINavHistoryObserver::OnBeforeDeleteURI</code></p>
          </li>
          <li>
            <p><code>nsINavBookmarkObserver::OnBeforeItemRemoved</code></p>
          </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.0a1/nightlynotes/">Firefox&nbsp;21 Aurora Release Notes</a> (not yet available)</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