files/en-us/mozilla/firefox/releases/21/index.md
Firefox 21 was released on May 14, 2013. This article lists key changes that are useful not only for web developers, but also Firefox and Gecko developers as well as add-on developers.
scoped 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. (Firefox bug 508725).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) (Firefox bug 816298).auto value of {{cssxref("hyphens", "-moz-hyphens")}} incorrectly applied hyphenation rules when the language was not explicitly declared. This is fixed by (Firefox bug 702121).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")}} (Firefox bug 835883).-moz-windows-glass has been added on Windows 7 and earlier Windows system (Firefox bug 816803).MozRTCPeerConnection) is now enabled by default (Firefox bug 796463). It can be disabled again if necessary by setting media.peerconnection.enabled to false.origin property has been added to the {{domxref("window.location")}} (Firefox bug 828261).valueAsDate and valueAsNumber methods have been added for <input type="time"> (Firefox bug 781570).min and max attributes now apply to <input type="time"> too (Firefox bug 781572).window.crypto.getRandomValues has been implemented (Firefox bug 440046).NodeIterator.expandEntityReferences() and TreeWalker.expandEntityReferences() have been removed (Firefox bug 672190).CSSKeyframesRule.insertRule() has been removed to {{domxref("CSSKeyframesRule.appendRule()")}} to match a spec change (Firefox bug 841896).SYNTAX_ERR is now thrown (Firefox bug 765599).XMLHttpRequest.setRequestHeader, the last-specified value was used. This behavior has been changed to comply with the spec, so those values will be properly combined (Firefox bug 819051).svg.smil.enabled preference has been removed. SMIL is always on. (Firefox bug 835030)Content-Security-Policy HTTP header (in addition to the experimental X-Content-Security-Policy) has been added (Firefox bug 783049).
[!NOTE] The patch for this new header landed in Firefox 21, it is disabled on builds (Firefox bug 842657).
FUEL applications cannot use the Livemarks service anymore (Firefox bug 834492). The Livemarks service is deprecated and phased out in favor of the new async interface.
resource:///modules/ and resource://gre/modules/ are no longer identical (Firefox bug 755724). This change was made because of work on the metro version of Firefox. If you load modules using resource:///modules/, you should check if you now want to use resource://gre/modules/ instead. Note that some modules also moved from Firefox to Toolkit (Firefox bug 840287 and Firefox bug 811548 moved NewTabUtils.jsm and the thumbnail modules, respectively).
The Add-on SDK is now included in Firefox (Firefox bug 731779)
History API saw numerous deprecated API being removed:
Replaced by mozIAsyncFavicons:
nsIFaviconService::setFaviconUrlForPagensIFaviconService::setFaviconDatansIFaviconService::getFaviconDatansIFaviconService::getFaviconForPagensIFaviconService::setAndLoadFaviconForPagensIFaviconService::getFaviconImageForPagensIFaviconService::getFaviconDataAsDataURLReplaced by mozIAsyncLivemarks:
nsILivemarkService::*PlacesUtils.itemIsLivemarkPlacesUtils.nodeIsLivemarkContainerPlacesUtils.nodeIsLivemarkItemRemoved only third argument:
PlacesUIUtils.showBookmarkDialogNo more implemented by Places, use mozIAsyncHistory instead:
nsIGlobalHistory2::addURInsIGlobalHistory2::isVisitednsIGlobalHistory2::setPageTitleNo more needed, use onDeleteURI or onItemRemoved:
nsINavHistoryObserver::OnBeforeDeleteURInsINavBookmarkObserver::OnBeforeItemRemovedNever implemented properly:
nsINavHistoryFullVisitResultNodeDeprecated, use mozIAsyncHistory::updatePlaces instead:
nsINavHistoryService::AddVisitAdded nsIHttpChannel.redirectTo to enable redirecting HTTP channels without fragile hacks.