files/en-us/mozilla/firefox/releases/7/index.md
Firefox 7 shipped on September 27, 2011. This article provides information about the changes that affect developers — both of web content and of Firefox add-ons.
profile property has been removed, this property has been deprecated since Gecko 2.0.x and y properties have been removed.add() method before parameter is now optional.background attribute is no longer resolved as a URI; this is in compliance with the current HTML specification.label attribute now reflects the value of the element's text content if the attribute isn't specified.setTransform(), bezierCurveTo(), or arcTo() no longer throws an exception; these calls are now correctly silently ignored.isPointInPath() method now correctly considers the transformation matrix when comparing the specified point to the current path.strokeRect() with a zero width and height now correctly does nothing.drawImage() with a zero width or height {{ HTMLElement("canvas") }} now throws INVALID_STATE_ERR.drawImage() with non-finite coordinates no longer throws an exception.toDataURL() method now accepts a second argument to control JPEG quality.globalCompositeOperation operations clear and over has been removed.source-over compositing operations.mozFillRule attribute on the context.mozDash, mozDashOffset, mozCurrentTransform and mozCurrentTransformInverse attributes has been added.mozDrawText(), mozMeasureText(), mozPathText() and mozTextAlongPath() has been removed.href attribute is now supported. Developers are encouraged to move to the latter syntax.voffset attribute on {{ MathMLElement("mpadded") }} elements has been added and behavior of lspace attribute has been fixed.medium line thickness of fraction bars in {{ MathMLElement("mfrac") }} elements has been corrected to match the default thickness.getAsBinary(), getAsDataURL(), and getAsText() have been removed as well as the non-standard properties fileName and fileSize (Firefox bug 661876).Content-Disposition HTTP header if the data was set using a {{ domxref("Blob") }}. This fixes errors that were happening with some servers.readAsArrayBuffer() method is now implemented.Document.createEntityReference has been removed. It was never properly implemented and is not implemented in most other browsers.document.normalizeDocument has been removed. Use {{ domxref("Node.normalize") }} instead.undefined if the index is out of bounds, previously it returned null.Node.getFeature has been removed.HTMLInsElement and HTMLDelElement interfaces have been removed, since the {{ HTMLElement("ins") }} and {{ HTMLElement("del") }} elements actually use the {{ domxref("HTMLModElement") }} interface.Function.arity property has been removed; use Function.length instead.network.websocket.max-connections preference is used to determine the maximum number of WebSocket connections that can be open at a time. The default value is 200.console.log while the web console isn't open is still logged, although they aren't displayed when the web console is opened.text/xsl, XSLT stylesheets can now use the official internet media (MIME) type application/xslt+xml (in the stylesheet processing instruction or the HTTP Link header field).These changes affect add-on developers as well as developers working on or with Mozilla code itself. Add-on developers should see Updating extensions for Firefox 7 for additional information.
[!NOTE] Firefox 7 requires that binary components be recompiled, as do all major releases of Firefox.
openFileOutputStream() opens a file output stream, the non-safe variant, for writing.AddonManager.addStartupChange(), AddonManager.removeStartupChange(), and AddonManager.getStartupChanges().<tree> elements can now persist the state of disclosure triangles if the nodes referenced by datasources all have unique IDs specified by "id" attributes.<panel> elements can now be configured to let the user drag them by clicking anywhere on their background by using the new backdrag attribute.Components.utils.schedulePreciseGC() method lets you schedule a thorough garbage collection cycle to occur at some point in the future when no JavaScript code is executing; a callback is executed once collection is complete.Components.utils.unload() method lets you unload JavaScript code modules previously loaded by calling Components.utils.load().Support has been added for multi-reporters; that is, memory reporters that gather data on request and call a callback for each generated result. See nsIMemoryMultiReporter and nsIMemoryMultiReporterCallback for the relevant interfaces, as well as the nsIMemoryReporterManager.registerMultiReporter() and nsIMemoryReporterManager.unregisterMultiReporter() methods.
DownloadLastDir.jsm.-Zc:wchar_t- when building on Windows.nsISocketTransport now offers a new connection flag: DISABLE_IPV6; this causes a socket to only attempt to connect to IPv4 addresses, ignoring any available IPv6 addresses. In addition, nsIDNSService now offers a new resolve flag: RESOLVE_DISABLE_IPV6; this causes domain name resolution to only consider IPv4 hosts, ignoring any available IPv6 addresses. These changes are used to implement the "happy eyeballs" strategy for improving response time when attempting to connect on hosts that support both IPv4 and IPv6 (especially those that have broken IPv6 connectivity).inIDOMUtils has two new methods, inIDOMUtils.getChildrenForNode() which returns a list of child nodes of a node and inIDOMUtils.getUsedFontFaces() which returns a list of font faces used in a range.nsIMarkupDocumentViewer_MOZILLA_2_0_BRANCH interface has been merged into the nsIMarkupDocumentViewer interface.nsIDOMWindow2 interface has been merged into the nsIDOMWindow interface.nsIDOMWindow_2_0_BRANCH interface has been merged into the nsIDOMWindowInternal interface.nsINavHistoryObserver methods with URI parameters now require a GUID as well.nsISHistory_2_0_BRANCH interface has been merged into the nsISHistory interface.nsITelemetry has a new method, nsITelemetry.getHistogramById() which returns a histogram by its ID, and a new attribute, canRecord which when set to false disables recording of telemetry statistics. Telemetry statistics are no longer recorded when in Private Browsing Mode. (see Firefox bug 661574 and Firefox bug 661573) Telemetry histograms defined with nsITelemetry.newHistogram() will not be reported in the telemetry ping.nsIMemoryReporter interface has been substantially changed; if you use it, you will need to make some adjustments to your code.nsIXMLHttpRequest, headers set by nsIXMLHttpRequest.setRequestHeader() are sent with the request when following a redirect. Previously these headers would not be sent.nsIDocShell has a new allowWindowControl attribute. If true, the docshell's content is allowed to control the window (that is, to move or resize the window).nsIThreadInternal2 interface has been merged into the nsIThreadInternal interface.nsIDOMFontFace
nsIDOMFontFaceList
nsIDOMFontFace.The following interfaces were implementation details that are no longer needed:
nsIDOM3AttrnsIDOM3NodensIDOM3TypeInfonsIDOM3TextnsIDOMDocumentStylensIDOMNSDocumentnsIDOMNSFeatureFactorynsIDOMNSHTMLDocumentnsIDOMNSHTMLFormElementnsIDOMNSHTMLHRElementnsIDOMNSHTMLTextAreaElementThe following interfaces were removed as part of the removal of the ActiveX embedding API:
DITestScriptHelperDWebBrowserEventsDWebBrowserEvents2IDispatchIMozControlBridgeIMozPluginHostCtrlIWebBrowserIWebBrowser2IWebBrowserAppIXMLDocumentIXMLElementIXMLElementCollectionIXMLErrornsIActiveXSecurityPolicynsIDispatchSupportnsIMozAxPluginnsIScriptEventHandlernsIScriptEventManagerplaces.xul) has been cleaned up. This may break extensions and themes.::-moz-page, ::-moz-page-sequence and ::-moz-scrolled-page-sequence.