Firefox 21 release notes for developers
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.
Changes for Web developers
>HTML
- The
scopedattribute has been added to the<style>element. It allows to include styles that are isolated from the rest of the document. Such styles can be selected using the:scopeCSS pseudo-element introduced in Firefox 20. (Firefox bug 508725). - The new HTML
<main>element has been implemented (Firefox bug 820508).
JavaScript
- ECMAScript for XML (E4X), an ancient JavaScript extension, has been removed. Implemented only in Gecko, it never got significant traction (Firefox bug 788293).
- parseInt no longer treats strings with leading "0" as octal (Firefox bug 786135).
CSS
- The
nonevalue of-moz-user-selecthas now the same behavior than the-moz-nonevalue, aligning Gecko on WebKit (Chrome, Safari), Presto (Opera) and Trident (Internet Explorer) (Firefox bug 816298). - On XHTML content, the
autovalue of-moz-hyphensincorrectly applied hyphenation rules when the language was not explicitly declared. This is fixed by (Firefox bug 702121). - An
autovalue has been added to the CSS-moz-orientproperty. Theautovalue is equivalent tohorizontalwhen applied to<meter>and<progress>(Firefox bug 835883). - The media query
-moz-windows-glasshas been added on Windows 7 and earlier Windows system (Firefox bug 816803).
DOM
- Support for
RTCPeerConnection(asMozRTCPeerConnection) is now enabled by default (Firefox bug 796463). It can be disabled again if necessary by settingmedia.peerconnection.enabledto false. - The
originproperty has been added to thewindow.location(Firefox bug 828261). - The
valueAsDateandvalueAsNumbermethods have been added for<input type="time">(Firefox bug 781570). - The
minandmaxattributes now apply to<input type="time">too (Firefox bug 781572). - Some new keyCodes for volume control are supported (Firefox bug 674739).
- Some new keyCodes for ancient keyboard layout such as AS/400 are now supported on Windows and Linux (Firefox bug 833719).
- Various keyCode values for OEM specific keys on Windows are now supported again (Firefox bug 833719).
- The function
window.crypto.getRandomValueshas been implemented (Firefox bug 440046). - The non-standard methods
NodeIterator.expandEntityReferences()andTreeWalker.expandEntityReferences()have been removed (Firefox bug 672190). - CSSOM: the method
CSSKeyframesRule.insertRule()has been removed toCSSKeyframesRule.appendRule()to match a spec change (Firefox bug 841896). - CSSOM If the given parameter given to
CSSStyleSheet.insertRulecontains more than one rule, aDOMExceptionwith aSYNTAX_ERRis now thrown (Firefox bug 765599). - Until now, when the same headers were repeatedly set with
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
- The paint-order attribute has been implemented (Firefox bug 828805).
- The
svg.smil.enabledpreference has been removed. SMIL is always on. (Firefox bug 835030)
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-PolicyHTTP header (in addition to the experimentalX-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).
- Support for the spec-compliant
Worker
- The functions
URL.createObjectURL()andURL.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 (Firefox bug 834492). The Livemarks service is deprecated and phased out in favor of the new async interface.
-
resource:///modules/andresource://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 usingresource:///modules/, you should check if you now want to useresource://gre/modules/instead. Note that some modules also moved from Firefox to Toolkit (Firefox bug 840287 and Firefox bug 811548 movedNewTabUtils.jsmand 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::getFaviconDataAsDataURL
-
Replaced by
mozIAsyncLivemarks:nsILivemarkService::*PlacesUtils.itemIsLivemarkPlacesUtils.nodeIsLivemarkContainerPlacesUtils.nodeIsLivemarkItem
-
Removed only third argument:
PlacesUIUtils.showBookmarkDialog
-
No more implemented by Places, use
mozIAsyncHistoryinstead:nsIGlobalHistory2::addURInsIGlobalHistory2::isVisitednsIGlobalHistory2::setPageTitle
-
No more needed, use
onDeleteURIoronItemRemoved:nsINavHistoryObserver::OnBeforeDeleteURInsINavBookmarkObserver::OnBeforeItemRemoved
-
Never implemented properly:
nsINavHistoryFullVisitResultNode
-
Deprecated, use
mozIAsyncHistory::updatePlacesinstead:nsINavHistoryService::AddVisit
-
-
Added
nsIHttpChannel.redirectToto enable redirecting HTTP channels without fragile hacks.