MDN wants to learn about developers like you:


Firefox 12, based on Gecko , will ship in . This article provides information about the changes in this release that will affect developers. Nightly builds of what will become Firefox 12 are currently available on the channel.

Note: Items listed here are tentatively slated for Firefox 12; however, they may be held for a future release if testing shows they're not ready by the time Firefox 12 is due to ship. Please keep an eye on this page to stay up to date on the plans for Firefox 12.

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

Changes for Web developers


  • The title attribute now supports newline characters to allow multi-line tooltips.
  • If JavaScript is disabled, the <canvas> element was being rendered instead of showing the fallback content as per the specification. Now the fallback content is rendered instead.



  • Experimental support for ECMAScript 6 Map and Set objects has been implemented.
  • Support for sharp variables (a Netscape non-standard extension) has been dropped.


  • DOMParser now supports parsing of HTML document fragments.
  • XMLHttpRequest now supports timeouts using the timeout property and "timeout" event, as well as the ontimeout event handler on the XMLHttpRequestEventTarget interface.
  • XMLHttpRequest can now load from data: URIs.
  • When downloading large amounts of data, XMLHttpRequest progress event handlers are now called periodically with the responseType set to "moz-blob" and the response being a Blob containing all of the data received so far. This lets progress handlers begin processing data without having to wait for it all to arrive.
  • Gecko now supports multi-touch (instead of just single touches at a time) on Android.
  • While editing text using an IME, the input event is now sent whenever the contents of the element being edited have been changed; this happens after the compositionupdate event has been sent to indicate that the IME's text has been changed. You can use the input event handler, therefore, to monitor changes to the actual content of the element.
  • Network Information API: Experimental support for window.navigator.connection has been added (prefixed).
  • DOMError as defined in the DOM 4 specification has been implemented.
  • The Document.createNodeIterator() method has been updated to match the DOM4 specification. This makes the whatToShow and filter parameters optional and removes the non-standard fourth parameter, entityReferenceExpansion.
  • The Blob interface's slice() method was affected by a bug that prevented it from properly accepting start and end values outside the range of a signed 64-bit integer; this has been fixed.
  • The element.getBoundingClientRect() method now considers effect of CSS transforms when computing the element's bounding rectangle.




  • Previously, Gecko reported the close code CLOSE_NORMAL when a WebSocket channel was closed due to an unexpected error, or if it was closed due to an error condition that the specification doesn't cover. Now CLOSE_GOING_AWAY is reported instead.

Developer tools

  • The Web Console now caches error messages and log entries added using console.log() if the console isn't currently open, and displays them when the console is opened.
  • You can now reset the zoom level, panning, and rotation in the 3D view by pressing the "r" key.
  • You can now hide nodes in the 3D view by pressing the "x" key after selecting them.
  • The source editor has a several new editing features and keyboard shortcuts; see Using the Source Editor for details

Miscellaneous changes

  • The GEOSTD8 character set, which was never fully supported, is no longer supported at all.

Changes for Mozilla and add-on developers

JavaScript code modules


  • The resetUndo() method was added; this lets you clear the undo stack.


  • The definition of the values for the chromemargin attribute has changed slightly, to make it easier to make cross-platform XUL code look good on platforms with different default window border widths.



  • The PRUint64 data type was incorrectly essentially identical to PRint64 when used with XPConnect. This has been fixed.

Interface changes

  • The nsIScreen_MOZILLA_2_0_BRANCH interface has been merged into nsIScreen. The APIs defined in that interface (for controlling minimum screen brightness) had not previously been documented, but now they are.
  • The nsIScriptError2 interface has been merged into nsIScriptError.
  • nsIDownloadManager.addDownload() is now handled asynchronously rather than synchronously.
  • The imgIContainerObserver.frameChanged() method now receives as its first parameter an imgIRequest object identifying the corresponding request.
  • The nsIDOMWindowUtils.sendTouchEvent() method has been added to allow synthesizing touch events.
  • You can now scroll the specified content to the vertical center of the view by specifying SCROLL_CENTER_VERTICALLY as the scroll constant when calling nsISelectionController.scrollSelectionIntoView().
  • The new nsIMemoryMultiReporter.explicitNonHeap attribute has been added; this is a more efficient way to obtain the sum of all of the multi-reporter's measurements that have a path that starts with "explicit" and are of the kind KIND_NONHEAP.
  • The nsIDOMWindowUtils.paintingSuppressed attribute has been added; this boolean value indicates whether or not painting is currently suppressed on the window. This is used on mobile to prevent bouncy rendering that occurs when attempts to draw the page begin before enough content is available to do so smoothly.

See also


 此页面的贡献者: ethertank, ziyunfei
 最后编辑者: ethertank,