1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
|
---
title: Firefox 11 技術文件
slug: Mozilla/Firefox/Releases/11
translation_of: Mozilla/Firefox/Releases/11
---
<div>{{FirefoxSidebar}}</div><p>Firefox 11 shipped on March 13, 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.</p>
<h2 id="Changes_for_Web_developers">Changes for Web developers</h2>
<h3 id="HTML">HTML</h3>
<ul>
<li>The attributes <code>muted</code> and <code>loop</code> on {{HTMLElement("audio")}} and {{HTMLElement("video")}} elements have been implemented.</li>
</ul>
<h3 id="DOM">DOM</h3>
<ul>
<li>The {{domxref("element.outerHTML")}} property is now supported on HTML elements.</li>
<li><a href="/en-US/docs/HTML_in_XMLHttpRequest" title="en-US/docs/HTML_in_XMLHttpRequest"><code>XMLHttpRequest</code> supports HTML parsing</a>.</li>
<li>Removed support for using the {{domxref("XMLHttpRequest")}} <code>responseType</code> and <code>withCredentials</code> attributes when performing synchronous requests. Attempting to do so throws an <code>NS_ERROR_DOM_INVALID_ACCESS_ERR</code> exception. This change has been proposed to the W3C for standardization.</li>
<li>The new {{domxref("window.navigator.mozVibrate()")}} method lets you vibrate the device where supported; this is implemented as <code>mozVibrate()</code> on Gecko.</li>
<li>{{domxref("window.navigator.mozApps")}} returns an <a href="/en-US/docs/DOM/Apps" title="Apps"><code>Apps</code></a> object you can use to install and manage <a href="/en-US/docs/Apps" title="en-US/docs/Apps">open web applications</a>.</li>
<li><code>MozBeforePaint</code> events are no longer fired. {{domxref("window.requestAnimationFrame", "mozRequestAnimationFrame()")}} consumers who used these should pass a callback function instead.</li>
<li>Support for canceling animation frame requests has been added; {{domxref("window.requestAnimationFrame", "window.mozRequestAnimationFrame()")}} now returns a request ID value, which you can pass to {{domxref("window.cancelAnimationFrame", "window.mozCancelAnimationFrame()")}} to cancel the request.</li>
<li>Several {{domxref("Event")}} constructors (<code>Event</code>, HTML events, <code>UIEvent</code>, and <code>MouseEvent</code>) introduced in DOM4 specifications are now supported.</li>
<li>The {{domxref("window.navigator.mozBattery", "Battery API")}} is now enabled by default.</li>
<li>Support for the <a href="/en-US/docs/DOM/HTMLMediaElement" title="en-US/docs/DOM/HTMLMediaElement"><code>defaultMuted</code></a>, <code><a href="/en-US/docs/DOM/HTMLMediaElement" title="en-US/docs/DOM/HTMLMediaElement">loop</a></code> and <a href="/en-US/docs/DOM/HTMLMediaElement" title="en-US/docs/DOM/HTMLMediaElement"><code>muted</code></a> properties on <a href="/en-US/docs/DOM/HTMLMediaElement" title="en-US/docs/DOM/HTMLMediaElement"><code>HTMLMediaElement</code></a> has been added.</li>
<li>Calling {{domxref("document.mozCancelFullScreen()")}} now restores the previously full-screen element if some other element was in full-screen mode when the current element's {{domxref("element.mozRequestFullScreen()")}} method was called.</li>
<li>The {{domxref("window.requestAnimationFrame", "window.mozRequestAnimationFrame()")}} method no longer supports a no-argument form. This form was not used much and is unlikely to become part of the standard.</li>
<li>SVG-as-an-image can now be drawn into a canvas without <a href="/en-US/docs/CORS_Enabled_Image#What_is_a_.22tainted.22_canvas.3F" title="en-US/docs/CORS_Enabled_Image#What_is_a_.22tainted.22_canvas.3F">tainting the canvas</a>.</li>
<li>The non-standard <code>countryCode</code> property of the <code>GeoPositionAddress</code> interface has been removed; see {{interface("nsIDOMGeoPositionAddress")}}.</li>
<li><a href="/en-US/docs/Server-sent_events" title="Server-sent events">Server-sent events</a> now support <a href="/en-US/docs/HTTP_access_control" title="HTTP access control (CORS)">CORS</a>.</li>
<li>In the past, when the user followed a link, the values set on the {{domxref("window.navigator")}} object were retained by the new page. Now a new <code>navigator</code> object is created for the new page. This makes Firefox behave like all other browsers.</li>
</ul>
<h3 id="CSS">CSS</h3>
<ul>
<li>the <a href="/en-US/docs/CSS/text-size-adjust" title="text-size-adjust"><code>text-size-adjust</code></a> property is now supported</li>
<li><a href="/en-US/docs/CSS/CSS3" title="CSS3">CSS3</a> <a href="/en-US/docs/CSS/CSS3#Conditional_Rules" title="CSS3 Conditional Rules">Conditional Rules</a> are now better supported: nested statements can now be added to <a href="/en-US/docs/CSS/@media" title="@media">@media</a>, <a href="/en-US/docs/CSS/@document" title="@document">@-moz-document</a>. (See <a href="/en-US/docs/CSS/Syntax" title="Syntax">CSS Syntax</a> and <a href="/en-US/docs/CSS/At-rule" title="At-rule">CSS at-rules</a>).</li>
</ul>
<h3 id="JavaScript">JavaScript</h3>
<p><em>No change.</em></p>
<h3 id="SVG">SVG</h3>
<ul>
<li>The {{domxref("SVGSVGElement")}} DOM interface now support the <code>getElementById</code> method.</li>
</ul>
<h3 id="WebSocket">WebSocket</h3>
<ul>
<li><a href="/en-US/docs/WebSockets" title="en-US/docs/WebSockets">WebSocket</a> API now supports binary messages (see {{bug("676439")}}).</li>
<li>Both the protocol and the API has been updated to the latest draft of the specification and the API has been unprefixed (see {{bug("666349")}} and {{bug("695635")}}).</li>
<li>Previously, messages sent and received using WebSockets in Firefox were limited to 16 MB in size; they may now be up to 2 GB (although memory capacity limitations may prevent them from being that large, Firefox supports it).</li>
</ul>
<h3 id="IndexedDB">IndexedDB</h3>
<ul>
<li>The support for <a href="/en-US/docs/IndexedDB/IDBFactory#cmp%28%29" title="https://developer.mozilla.org/en-US/docs/IndexedDB/IDBFactory#cmp%28%29">IDBFactory.cmp()</a> has been added.</li>
<li>An <a href="/en-US/docs/IndexedDB/Basic_Concepts_Behind_IndexedDB#section_6" title="https://developer.mozilla.org/en-US/docs/IndexedDB/Basic_Concepts_Behind_IndexedDB#section_6">IndexedDB key</a> can also be of one of the following types: Date, Arrays and Float (and not only String and Integer).</li>
</ul>
<h3 id="Network">Network</h3>
<ul>
<li>The change in Firefox 8 that removed support for double quote characters as delimiters for {{rfc(2231)}} and {{rfc(5987)}} has been reverted, as this broke some sites, including Outlook Web Access.</li>
<li>The user agent string in HTTP headers now includes an identifier that <a href="/en-US/docs/Gecko_user_agent_string_reference#Mobile_and_Tablet_indicators" title="en-US/docs/Gecko_user_agent_string_reference#Mobile_and_Tablet_indicators">lets the server know if the Firefox accessing it is a phone or a tablet</a>.</li>
</ul>
<h3 id="Developer_tools">Developer tools</h3>
<ul>
<li>The <a href="/en-US/docs/Tools/Page_Inspector" title="Page Inspector">Page Inspector</a> now offers a <a href="/en-US/docs/Tools/Page_Inspector/3D_view" title="3D view">3D view</a> if your system supports <a href="/en-US/docs/WebGL" title="WebGL">WebGL</a>.</li>
<li>The new <a href="/en-US/docs/Tools/Style_Editor" title="Style Editor">Style Editor</a> provides a free-form way to edit and compose CSS style sheets in real-time.</li>
<li>The <a href="/en-US/docs/View_source" title="https://developer.mozilla.org/en-US/docs/View_source">View Source feature</a> now uses the new HTML5 parser instead of the old HTML parser.</li>
</ul>
<h2 id="Changes_for_Mozilla_and_add-on_developers">Changes for Mozilla and add-on developers</h2>
<h3 id="JavaScript_code_modules">JavaScript code modules</h3>
<h4 id="NetUtil.jsm">NetUtil.jsm</h4>
<ul>
<li><a href="/en-US/docs/JavaScript_code_modules/NetUtil.jsm#readInputStreamToString()" title="en-US/docs/JavaScript_code_modules/NetUtil.jsm#readInputStreamToString()"><code>readInputStreamToString()</code></a> has a new, optional, parameter to configure the character set interpretation while reading the input stream.</li>
</ul>
<h4 id="New_JavaScript_code_modules">New JavaScript code modules</h4>
<dl>
<dt>
<a href="/en-US/docs/JavaScript_code_modules/source-editor.jsm" title="source-editor.jsm"><code>source-editor.jsm</code></a></dt>
<dd>
Provides a convenient, easy-to-use source code editor that you can use in your add-ons. This is the same editor used by <a href="/en-US/docs/Tools/Scratchpad" title="Scratchpad">Scratchpad</a> and other developer tools integrated into Firefox.</dd>
</dl>
<h3 id="Interface_changes">Interface changes</h3>
<ul>
<li>The {{interface("mozIAsyncHistory")}} interface has a new method {{ifmethod("mozIAsyncHistory","isURIVisited")}} to check if a URI has been visited.</li>
<li>A new interface {{interface("mozIVisitStatusCallback")}} has been added to provide callback handling functionality for {{ifmethod("mozIAsyncHistory","isURIVisited")}}.</li>
<li>The {{interface("nsIMacDockSupport")}} interface now supports adding a text badge to the application's icon in the Dock using its new <code>badgeText</code> attribute.</li>
<li>In the {{interface("nsINavHistoryResultObserver")}} interface, you now need to implement {{ifmethod("nsINavHistoryResultObserver", "containerStateChanged")}} instead of the obsolete <code>containerOpened()</code> and <code>containerClosed()</code> methods.</li>
</ul>
<h4 id="Removed_interfaces">Removed interfaces</h4>
<p>The following interfaces were implementation details that are no longer needed:</p>
<ul>
<li>{{interface("nsICharsetResolver")}}</li>
<li>{{interface("nsIDOMNSElement")}}, see <a class="link-https" href="https://bugzilla.mozilla.org/show_bug.cgi?id=707576" title="https://bugzilla.mozilla.org/show_bug.cgi?id=707576">bug707576</a>, use {{interface("nsIDOMElement")}} instead.</li>
</ul>
<h3 id="Theme-related_changes">Theme-related changes</h3>
<ul>
<li>The <code>omni.jar</code> file is now called <a href="/en-US/docs/Mozilla/About_omni.ja_(formerly_omni.jar)" title="en-US/docs/Mozilla/About_omni.ja_%28formerly_omni.jar%29"><code>omni.ja</code></a>.</li>
</ul>
<h3 id="Preference_changes">Preference changes</h3>
<dl>
<dt>
{{Pref("ui.tooltipDelay")}}</dt>
<dd>
Specifies the delay, in milliseconds, between the mouse cursor beginning to hover and the display of a tooltip.</dd>
</dl>
<h3 id="Build_system_changes">Build system changes</h3>
<ul>
<li>The <code>--enable-tracejit</code> build option has been removed.</li>
</ul>
<h3 id="Other_changes">Other changes</h3>
<ul>
<li>Add-ons that have not been updated in a long time are no longer assumed to be compatible by default; this is currently add-ons that indicate a <code>maxVersion</code> of 4.0.</li>
</ul>
<h2 id="See_also">See also</h2>
<div>
{{Firefox_for_developers('10')}}</div>
|