files/en-us/mozilla/firefox/releases/10/index.md
Firefox 10 shipped on January 31, 2012. This article provides information about the new features and key bugs fixed in this release, as well as links to more detailed documentation for both web developers and add-on developers.
[!NOTE] Firefox 10 is the first release of this browser with two digits. This may lead to problem with some UA-sniffing scripts. Be sure to check them, and those contained in 3rd-party software you embed in your pages, like libraries. For more information about this, look at the Firefox goes 2-digit article on hack.mozilla.org.
href attribute to create a link to the top of the page. This used to work, then went away for a while, and now it's back, for compatibility with the HTML5 specification. For example: <a href="#top">Return to top of page</a>.WeakMap.set() now returns undefined, instead of itself."use strict;").event.stopImmediatePropagation has been implemented.mouseenter and mouseleave have been implemented.document.xmlStandalone has been removed as it has been deprecated in the DOM4 specification.text.isElementContentWhiteSpace has been removed as it has been deprecated in the DOM4 specification.text.replaceWholeText has been removed as it has been deprecated in the DOM4 specification.node1.isSameNode(node2), you can use the === operator, like this: node1 === node2.document.mozHidden, document.mozVisibilityState are available and the event mozvisibilitychanged is sent when the state is modified.:-moz-full-screen-ancestor property has been added. This lets you match against elements that are ancestors of an element in full screen mode.navigator.mozBattery has been added (can be enabled setting the preference dom.battery.enabled to true and will be enabled by default starting with Firefox 11).createPattern() method now throws an exception if a zero-sized source canvas is specified.putImageData(), the call is now silently ignored instead of throwing an exception, in keeping with the specification.OES_standard_derivatives extension.XMLHttpRequest.responseType and XMLHttpRequest.response are now available from inside Workers.Worker() constructor now accepts data URLs.Great progress has been made to update IndexedDB to the latest draft specification. This effort will continue in Firefox 11.
IDBIndex.count() and IDBObjectStore.count() methods have been added.IDBCursor.advance() method has been added.IDBObjectStore.createIndex() or IDBDatabase.createObjectStore(), Gecko will not fire an exception anymore, but ignore it.IDBTransaction.abort() is called, all pending IDBRequest have their errorCode set to ABORT_ERROR.IDBObjectStore.delete() and IDBCursor.delete() now set the result attribute of the returned IDBRequest to undefined.IDBDatabase.setVersion() has been removed as it was removed from the latest spec. The version of the database is given through the IDBFactory.open() method which has been updated and the onupgradeneeded callback allows the schema of the database to be upgraded. The version itself has been changed from a DOMString to an unsigned long long. The IDBVersionChangeRequest interface has been removed and replaced by the new IDBOpenDBRequest interface.version parameter is not provided and the database does not exist, then it will be created with a version of 1.IDBFactory.deleteDatabase() method has been added.image/svg+xml, the DOMParser now creates a SVGDocument when given a string with SVG.NameList interface is no longer implemented; it previously had an implementation with no way to actually get access to one.responseType "moz-json" introduced in Firefox 9 has been updated to the latest draft of the specification and has been unprefixed. See note in Firefox bug 707142.-moz-isolation and -moz-plaintext. The -moz-isolation value isolates, from a directionality point of view, the element from its environment, letting it have a different directionality. An element with unicode-bidi:-moz-isolation behaves like a {{ HTMLElement("bdi") }} element. The -moz-plaintext indicates the browser to use the Unicode browser heuristic to determine directionality and not the CSS {{ cssxref("direction") }} property.to syntax and the magic corner algorithm. This allows to give a precise color on the corner of a gradient-filled box.text-overflow property is set to overflow on only one has been corrected.Accept-Charset header is no longer sent in HTTP requests.
In its absence, servers should respond by sending UTF-8.For an overview of likely issues that may arise when updating your add-ons to support Firefox 10, see Updating add-ons for Firefox 10.
[!NOTE] The old
PRBooldata type has been retired! Anywhere in the documentation that refers to it now uses the standard C++booltype instead. Documentation will be updated in the future, but for now, just keep this in mind.
<em:strictCompatibility> has been added to the install manifest. It allows add-ons authors to opt in to checking the maximum version of their extension. If set to true the add-on will be disabled if the application version is greater than <em:maxVersion>. Firefox 10 defaults to add-ons being compatible, regardless of their specified maximum version. This flag overrides that preference. You should set this if your add-on does things that are likely to be broken by Firefox updates, but not if your add-on has a binary component, since such add-ons always get strictly checked (remember that binary components must always be recompiled for each major Firefox release).strictCompatibility flag in their manifests, you can set the extensions.strictCompatibility preference to true.chrome.manifest file now have the manifest file registered automatically. See the section Adding user interface with a chrome.manifest for details.Components.utils, granting access to assorted debugging-related information.mozISpellCheckingEngine and nsIEditorSpellCheck interfaces have been updated to allow restartless add-ons to add dictionaries to the spell checker.nsIBrowserHistory.lastPageVisited attribute has been removed.nsIDocumentViewer interface has been merged into nsIContentViewer.nsIURIFixup interface has a new flag, FIXUP_FLAG_USE_UTF8, which lets you tell it to use UTF-8 instead of the platform character set, when doing conversions.NPNVdocumentOrigin has been added; this returns the document origin, and is more secure than {{ domxref("window.location") }}.--disable-rdf build option, which actually made it impossible to successfully build, has been removed. Work is ongoing on being able to actually remove RDF support entirely, but at present XUL still requires it to function. See Firefox bug 559505 for progress on removing the last vestiges of RDF being required.--disable-smil build option has been removed.