• Skip to main content
  • Select language
  • Skip to search
MDN Web Docs
  • Technologies
    • HTML
    • CSS
    • JavaScript
    • Graphics
    • HTTP
    • APIs / DOM
    • WebExtensions
    • MathML
  • References & Guides
    • Learn web development
    • Tutorials
    • References
    • Developer Guides
    • Accessibility
    • Game development
    • ...more docs
Firefox
  1. MDN
  2. Mozilla
  3. Firefox
  4. Firefox developer release notes
  5. Firefox 21 for developers

Firefox 21 for developers

In This Article
  1. Changes for Web developers
    1. HTML
    2. JavaScript
    3. CSS
    4. DOM
    5. SVG
    6. Networking
    7. Worker
  2. Changes for add-on and Mozilla developers
  3. See also
    1. Older versions

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 scoped attribute 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 :scope CSS pseudo-element introduced in Firefox 20. (bug 508725).
  • The new HTML <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 -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 -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 -moz-orient property. The auto value is equivalent to horizontal when applied to <meter> and <progress> (bug 835883).
  • The media query -moz-windows-glass has been added on Windows 7 and earlier Windows system (bug 816803).

DOM

  • Support for RTCPeerConnection (as MozRTCPeerConnection) is now enabled by default (bug 796463). It can be disabled again if necessary by setting media.peerconnection.enabled to false.
  • The origin property has been added to the 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).
  • The methods NodeIterator.expandEntityReferences() and TreeWalker.expandEntityReferences(), no more in the latest DOM spec, has been removed (bug 672190).
  • CSSOM: the method CSSKeyframesRule.insertRule has been removed to CSSKeyframesRule.appendRule to match a spec change (bug 841896).
  • CSSOM If the given parameter given to CSSStyleSheet.insertRule contains more than one rule, a DOMException with a SYNTAX_ERR is now thrown (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 (bug 819051).

SVG

  • The paint-order attribute has been implemented (bug 828805).
  • The svg.smil.enabled preference has been removed. SMIL is always on. (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-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 URL.createObjectURL and 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.
  • resource:///modules/ and resource://gre/modules/ are no longer identical (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 (bug 840287 and bug 811548 moved NewTabUtils.jsm and the thumbnail modules, respectively).
  • The Add-on SDK is now included in Firefox (bug 731779)
  • 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
  • Added nsIHttpChannel.redirectTo() to enable redirecting HTTP channels without fragile hacks.

See also

  • Firefox 21 Release Notes
  • Site Compatibility for Firefox 21
  • Add-on Compatibility for Firefox 21

Older versions

  • Firefox 20 for developers
  • Firefox 19 for developers
  • Firefox 18 for developers
  • Firefox 17 for developers
  • Firefox 16 for developers
  • Firefox 15 for developers
  • Firefox 14 for developers
  • Firefox 13 for developers
  • Firefox 12 for developers
  • Firefox 11 for developers
  • Firefox 10 for developers
  • Firefox 9 for developers
  • Firefox 8 for developers
  • Firefox 7 for developers
  • Firefox 6 for developers
  • Firefox 5 for developers
  • Firefox 4 for developers
  • Firefox 3.6 for developers
  • Firefox 3.5 for developers
  • Firefox 3 for developers
  • Firefox 2 for developers
  • Firefox 1.5 for developers

Document Tags and Contributors

Tags: 
  • Firefox
  • Mozilla
 Contributors to this page: Sebastianz, Sheppy, kohei.yoshino, teoli, yyss, Canuckistani, kmaglione, ethertank, GijsKruitbosch, myakura, evilpie, Jesse, Masayuki
 Last updated by: Sebastianz, Feb 7, 2017, 12:58:23 PM
  1. Add-ons
    1. Firefox developer release notes
    2. Add-ons
    3. Add-on guidelines
    4. Add-on Manager
    5. Extensions
    6. OpenSearch plug-ins
    7. Plugins
    8. Themes
  2. Firefox internals
    1. Firefox developer release notes
    2. Mozilla project
    3. Gecko
    4. JavaScript code modules
    5. JS-ctypes
    6. MathML project
    7. MFBT
    8. Mozilla projects
    9. Preference system
    10. WebIDL bindings
    11. XPCOM
    12. XUL
  3. Building and contributing
    1. Build instructions
    2. Configuring build options
    3. How the build system works
    4. Mozilla source code
    5. Localization
    6. Mercurial
    7. Quality assurance
    8. Using Mozilla code in other projects