aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/mozilla/firefox/releases/44/index.html
blob: d18ac693ac2a97e3333e6e93f7dc41dc4ee68bec (plain)
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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
---
title: Firefox 44 for developers
slug: Mozilla/Firefox/Releases/44
translation_of: Mozilla/Firefox/Releases/44
---
<div>{{FirefoxSidebar}}</div><p><a style="float: right; margin-bottom: 20px; padding: 10px; text-align: center; border-radius: 4px; display: inline-block; background-color: #81BC2E; white-space: nowrap; color: white; text-shadow: 0px 1px 0px rgba(0, 0, 0, 0.25); box-shadow: 0px 1px 0px 0px rgba(0, 0, 0, 0.2), 0px -1px 0px 0px rgba(0, 0, 0, 0.3) inset;" href="https://www.mozilla.org/firefox/developer/">为了测试火狐最新的开发人员特性,请安装火狐开发人员版(Firefox Developer Edition )</a>Firefox 44 于2016年1月26号发布。这个页面列出了对开发人员有用的关键变化。</p>

<h2 id="对于Web开发人员的变化">对于Web开发人员的变化</h2>

<h3 id="开发者工具">开发者工具</h3>

<p>{{page('/en-US/docs/Tools/Release_notes', 'Firefox_44')}}</p>

<h3 id="HTML">HTML</h3>

<ul>
 <li><code><a href="/en-US/docs/Web/HTTP/Link_prefetching_FAQ">&lt;link rel="prefetch"&gt;</a></code> 现在服从 {{htmlattrxref("crossorigin", "link")}} 属性 ({{bug(1214819)}}).</li>
</ul>

<h3 id="CSS">CSS</h3>

<ul>
 <li><code>position:</code> <code>fixed;</code> 现在会创建一个新的层叠上下文 ({{bug(1179288)}}).</li>
 <li>默认支持 {{cssxref('unicode-range')}} ({{bug(1119062)}}).</li>
 <li>Our experimental implementation of CSS Writing Modes has been updated to reflect the latest specification:
  <ul>
   <li>The value <code>sideways</code> of the {{cssxref("text-orientation")}} property has been implemented and <code>sideways-right</code> has been made an alias of it ({{bug(1193488)}}).</li>
   <li>The value <code>sideways-rl</code> and <code>sideways-lr</code> of the {{cssxref("writing-mode")}} property ({{bug(1193488)}} and {{bug(1193519)}}).</li>
  </ul>
 </li>
 <li>The non-standard properties {{cssxref("-moz-math-display")}} and {{cssxref("-moz-window-shadow")}} are no more available from Web content ({{bug(1207002)}}, {{bug(1211040)}}, and {{bug(1212607)}}).</li>
 <li>The {{cssxref("font-style")}} property now distinguishes between <code>oblique</code> and <code>italic</code> when both variants are available ({{bug(543715)}}).</li>
 <li>Though not supported, the properties {{cssxref("marks")}}, {{cssxref("orphans")}}, {{cssxref("page")}}, {{cssxref("size")}}, and {{cssxref("widows")}}, were parsed and {{cssxref("@supports")}} was incorrectly reporting them as supported; this has been fixed and the properties are not parsed anymore, nor marked as supported ({{bug(1215702)}}).</li>
 <li>The internal value <code>-moz-mac-unified-toolbar</code> has been removed from the possible values for the {{cssxref("-moz-appearance")}} property ({{bug(1206468)}}).</li>
</ul>

<h3 id="JavaScript">JavaScript</h3>

<h4 id="New_APIs">New APIs</h4>

<ul>
 <li>{{jsxref("Symbol.toPrimitive")}}{{jsxref("Symbol.prototype.@@toPrimitive", "Symbol.prototype[@@toPrimitive]")}}, and {{jsxref("Date.prototype.@@toPrimitive", "Date.prototype[@@toPrimitive]")}} have been implemented ({{bug(1054756)}}).</li>
</ul>

<h4 id="Changes">Changes</h4>

<ul>
 <li>The <code><a href="/en-US/docs/Web/JavaScript/Reference/Statements/let">let</a></code> and <code><a href="/en-US/docs/Web/JavaScript/Reference/Statements/const">const</a></code> bindings in the global level have been made compliant with ES2015 semantics. See {{bug(589199)}} and the blog post <a href="https://blog.mozilla.org/addons/2015/10/14/breaking-changes-let-const-firefox-nightly-44/">"Breaking changes in let and const in Firefox Nightly 44"</a>. In addition, <code>let</code> is now available to default Web JavaScript (strict and non-strict) and does not require a version opt-in anymore ({{bug(932517)}}).</li>
 <li>If <a href="/en-US/docs/Web/JavaScript/Typed_arrays">typed arrays'</a> (like {{jsxref("Int8Array", "Int8Array")}}) and {{jsxref("ArrayBuffer", "ArrayBuffer")}}) constructors are called as a function without the {{jsxref("Operators/new", "new")}} operator, a {{jsxref("TypeError")}} is now thrown as per the ES6 specification ({{bug(980945)}}, {{bug(1214936)}}).</li>
 <li>The {{jsxref("RegExp")}} sticky flag now follows the ES2015 standard for<a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/sticky#Anchored_sticky_flag"> anchored sticky regular expressions</a> ({{bug(773687)}}).</li>
 <li>The <a href="/en-US/docs/Mozilla/Projects/SpiderMonkey/Introduction_to_the_JavaScript_shell">JavaScript shell</a> (SpiderMonkey's REPL) now defaults to the default, Web-compatible JS version (and not JS1.7+ anymore) ({{bug(1192329)}}).</li>
</ul>

<h4 id="Removals">Removals</h4>

<ul>
 <li>Support for the non-standard <a href="/en-US/docs/Web/JavaScript/Reference/Statements/let#let_blocks"><code>let</code> blocks</a> has been dropped ({{bug(1167029)}}.</li>
 <li>The non-standard and deprecated property {{jsxref("Object.noSuchMethod", "Object.prototype.__noSuchMethod__")}} has been removed ({{bug(683218)}}).</li>
</ul>

<h3 id="InterfacesAPIsDOM">Interfaces/APIs/DOM</h3>

<h4 id="DOM_HTML_DOM">DOM &amp; HTML DOM</h4>

<ul>
 <li>For compatibility with specific existing sites, the property {{domxref("Document.charset")}} has been implemented as an alias of {{domxref("Document.characterSet")}} ({{bug(647621)}}).</li>
 <li>Support for the <code><a href="https://developer.mozilla.org/en-US/docs/Adding_search_engines_from_web_pages#Installing_Sherlock_plugins">window.sidebar.addSearchEngine()</a></code> method, which allowed Web pages to invoke an installation of a Sherlock plugin, has been dropped and now it just logs a warning in the Web Console ({{bug(862148)}}).</li>
 <li>To fight unwanted pop-ups, prompts requested in {{domxref("Window.onbeforeunload")}} of pages that have not been interacted with are no more displayed ({{bug(636905)}}).</li>
 <li>The deprecated method {{domxref("MessageEvent.initMessageEvent()")}} has been reimplemented for backward compatibility ({{bug(949376)}}).</li>
 <li>The obsolete property <code>DocumentType.internalSubset</code> has been removed ({{bug(801545)}}).</li>
 <li>For compatibility with existing sites, the properties {{domxref("Window.orientation")}} and {{domxref("Window.onorientationchange")}}, as well as the {{event("orientationchange")}} event have been implemented ({{bug(920734)}}).</li>
 <li>An {{HTMLElement("iframe")}} with explicit fullscreen request should not exit fullscreen implicitly ({{bug(1187801)}}).</li>
 <li>The events {{event("mouseover")}}, {{event("mouseout")}}, {{event("mouseenter")}}, {{event("mouseleave")}}{{event("pointermove")}}{{event("pointerover")}}, {{event("pointerout")}}, {{event("pointerenter")}} and {{event("pointerleave")}} are now triggered for disabled form elements ({{bug(218093)}}).</li>
 <li>The method {{domxref("Element.webkitMatchesSelector()")}} has been added ({{bug(1216193)}}) to improve interoperability.</li>
 <li>To match the spec, the method {{domxref("Document.createAttribute()")}} now converts the input to lower case ({{bug(1176313)}}).</li>
 <li>The non-standard <code>dialog</code> feature for {{domxref("Window.open()")}} is no longer available to Web content. It is still available to extensions and other code with chrome privileges ({{bug(1095236)}}.</li>
</ul>

<h4 id="Canvas">Canvas</h4>

<ul>
 <li>A new experimental {{domxref("OffscreenCanvas")}} API that allows rendering contexts (such as <a href="/en-US/docs/Web/API/WebGL_API">WebGL</a>) to run in <a href="/en-US/docs/Web/API/Web_Workers_API">Web Workers</a> has been implemented. To use this experimental API set <code>gfx.offscreencanvas.enabled</code> to <code>true</code> in about:config ({{bug(709490)}}). This API includes:

  <ul>
   <li>The {{domxref("OffscreenCanvas")}} interface,</li>
   <li>{{domxref("HTMLCanvasElement.transferControlToOffscreen()")}}, and</li>
   <li>{{domxref("WebGLRenderingContext.commit()")}}.</li>
   <li>Several WebGL interfaces are now also available in a worker context when this API is enabled.</li>
  </ul>
 </li>
</ul>

<h4 id="WebGL">WebGL</h4>

<ul>
 <li>Uniform Buffer Objects have been implemented ({{bug(1048747)}}).</li>
</ul>

<h4 id="IndexedDB">IndexedDB</h4>

<ul>
 <li>The {{domxref("IDBIndex.getAll()")}} and {{domxref("IDBIndex.getAllKeys()")}} are now available by default ({{bug(1196841)}}).</li>
</ul>

<h4 id="Service_Workers">Service Workers</h4>

<ul>
 <li>The {{domxref("ServiceWorkerMessageEvent")}} and {{domxref("ExtendableMessageEvent")}} interfaces have been implemented ({{bug(1143717)}} and {{bug(1207068)}}).</li>
 <li>{{domxref("Headers")}} objects now support a pair iterator, meaning that the methods {{domxref("Headers.entries()")}}, {{domxref("Headers.keys()")}}, and {{domxref("Headers.values()")}} are now available; {{jsxref("Symbol.iterator")}} now also returns the default iterator for them ({{bug(1108181)}}).</li>
 <li>The {{domxref('XMLHttpRequest')}} API has been disabled on Service Workers ({{bug(931243)}}).</li>
 <li>The interface {{domxref("FetchEvent")}} now extends {{domxref("ExtendableEvent")}}, giving it access to the {{domxref("ExtendableEvent.waitUntil()")}} method. ({{bug(1214772)}}).</li>
 <li>Following a recent change in the specification, {{domxref("FetchEvent.client")}} has been removed ({{bug(1218135)}}).</li>
 <li>To match the latest specification, the {{domxref("ServiceWorkerContainer.onreloadpage")}} has been removed ({{bug(1218139)}}).</li>
 <li>The event handlers {{domxref("ServiceWorkerGlobalScope.onbeforeevicted")}} and {{domxref("ServiceWorkerGlobalScope.onevicted")}} have been removed as they weren't following the spec. They will be reintroduced in the future, but their removal will allow feature detection to work as expected ({{bug(1218142)}}).</li>
 <li>In the {{domxref("FetchEvent.FetchEvent", "FetchEvent()")}} constructor, if the <code>isReload</code> member is not present in the options dictionary, it now defaults to <code>false</code> ({{bug(1216401)}}).</li>
 <li>The {{domxref("Client.frameType")}} property is now implemented on the right interface; it was on {{domxref("WindowClient")}} before ({{bug(1218146)}}).</li>
 <li>When <a href="/en-US/docs/Web/HTML/Using_the_application_cache">AppCache</a> is used to provide offline support for a page, a warning message is now displayed in the console advising developers to use <a href="/en-US/docs/Web/API/Service_Worker_API/Using_Service_Workers">Service workers</a> instead ({{bug("1204581")}}.)</li>
 <li>Service workers have been enabled by default in Gecko.</li>
</ul>

<h4 id="WebRTC">WebRTC</h4>

<ul>
 <li>WebRTC interfaces have been <em>unprefixed</em> ({{bug(1155923)}}). In particular:

  <ul>
   <li><code>mozRTCPeerConnection</code> is now {{domxref("RTCPeerConnection")}}.</li>
   <li><code>mozRTCIceCandidate</code> is now {{domxref("RTCIceCandidate")}}.</li>
   <li><code>mozRTCSessionDescription</code> is now {{domxref("RTCSessionDescription")}}.</li>
  </ul>
 </li>
 <li>The {{domxref("RTCDataChannel.bufferedAmountLowThreshold")}} and {{domxref("RTCDataChannel.onbufferedamountlow")}} properties, as well as the {{event("bufferedamountlow")}} event, have been implemented ({{bug(1178091)}}).</li>
 <li>The attribute {{domxref("RTCPeerConnection.canTrickleIceCandidates")}} has been added, the non-standard method {{domxref("RTCPeerConnection.updateIce()")}} removed ({{bug(1209744)}}).</li>
 <li>The {{domxref("MediaStream")}} interface now supports the {{domxref("MediaStream.addTrack()")}} and {{domxref("MediaStream.removeTrack()")}} methods ({{bug(1103188)}}).</li>
 <li>The constructor {{domxref("MediaStream.MediaStream", "MediaStream()")}} has been implemented ({{bug(1070216)}}).</li>
 <li>Support for the non-standard constraint style option list for {{domxref("RTCOfferOptions")}} has been removed; see <a href="https://www.fxsitecompat.com/en-USdocs/2015/constraint-like-rtcofferoptions-are-no-longer-supported/">this post on the site compatibility blog</a> for details.</li>
</ul>

<h4 id="New_APIs_2">New APIs</h4>

<ul>
 <li>An experimental implementation of the Canvas API in Workers has landed: {{domxref("OfflineCanvas")}} and {{domxref("HTMLCanvasElement.transferControlToOffscreen()")}} are available behind the <code>gfx.offscreencanvas.enabled</code> preference, currently disabled by default ({{bug(709490)}}).</li>
 <li>The Text2Speech API, part of Web Speech API, has now an OS X backend. But this is disabled by default ({{bug(1003452)}}).</li>
</ul>

<h4 id="Miscellaneous">Miscellaneous</h4>

<ul>
 <li>{{domxref("URLSearchParams")}} objects now support a pair iterator, meaning that the methods {{domxref("URLSearchParams.entries()")}}, {{domxref("URLSearchParams.keys()")}}, and {{domxref("URLSearchParams.values()")}} are now available; {{jsxref("Symbol.iterator")}} now also returns the default iterator for them ({{bug(1085284)}}).</li>
 <li>{{domxref("FormData")}} objects now support a pair iterator, meaning that the methods {{domxref("FormData.entries()")}}, {{domxref("FormData.keys")}}, and {{domxref("FormData.values()")}} are now available; {{jsxref("Symbol.iterator")}} now also returns the default iterator for them ({{bug(1127703)}}).</li>
 <li>When {{domxref("XMLHttpRequest.send()")}} is used with an HTML document, it now uses <code>text/html</code> instead of <code>application/xml</code> ({{bug(918771)}}).</li>
 <li>Speech synthesis (text-to-speech) has been implemented in Firefox Desktop for Mac and Linux, hidden behind the <code>media.webspeech.synth.enabled</code> flag in <code>about:config</code> ({{bug("1003452")}}, {{bug("1003464")}}.) See <a href="/en-US/docs/Web/API/Web_Speech_API">Web Speech API</a> for more information.</li>
 <li>Elements inside a {{HTMLElement("frame")}} or an {{HTMLElement('object')}} can't be set full-screen anymore ({{bug(1212299)}}).</li>
</ul>

<h3 id="MathML">MathML</h3>

<p><em>No change.</em></p>

<h3 id="SVG">SVG</h3>

<p><em>No change.</em></p>

<h3 id="AudioVideo">Audio/Video</h3>

<p><em>No change.</em></p>

<h2 id="HTTP">HTTP</h2>

<ul>
 <li>Support for the <a href="https://en.wikipedia.org/wiki/Brotli">Brotli</a> algorithm has been added and both <code><a href="/en-US/docs/Web/HTTP/Content_negotiation#The_Accept-Encoding_header">Accept-Encoding</a></code> and <code><a href="/en-US/docs/Web/HTTP/Headers/Content-Encoding">Content-Encoding </a></code>headers now support the <code>br</code> value ({{bug(366559)}} and {{bug(1211916)}}).</li>
 <li>Incorrect support of HTTP/2 headers containing line breaks (<code>'/n'</code>) have been removed as the spec doesn't allow it, unlike HTTP/1 ({{bug(1197847)}}).</li>
</ul>

<h2 id="Networking">Networking</h2>

<p><em>No change.</em></p>

<h2 id="Security">Security</h2>

<ul>
 <li>RC4 is now also disabled by default on Beta and Release versions of the browser ({{bug(1201025)}}) and the whitelist is now empty by default ({{bug(1215796)}}).</li>
</ul>

<h2 id="Changes_for_add-on_and_Mozilla_developers">Changes for add-on and Mozilla developers</h2>

<h3 id="Interfaces">Interfaces</h3>

<p><em>No change</em></p>

<h3 id="XUL">XUL</h3>

<p><em>No change.</em></p>

<h3 id="JavaScript_code_modules">JavaScript code modules</h3>

<ul>
 <li>Added <code>LIKE</code> support to {JSM("Sqlite.jsm")}} ({{bug(1188760)}}).</li>
 <li>Added <a href="/en-US/docs/Mozilla/Add-ons/Firefox_for_Android/API/Snackbars.jsm">Snackbars.jsm</a> module to <a href="/en-US/docs/Mozilla/Firefox_for_Android" title="/en/docs/Mozilla/Firefox_for_Android">Firefox for Android</a> ({{bug(1215026)}})</li>
</ul>

<h3 id="XPCOM">XPCOM</h3>

<ul>
 <li>The {{interface("nsIDOMWindow")}} interface is now empty. Its contents were either no longer used, had moved elsewhere, or were only used from C++. The items available from C++ code now reside in the <code>{{source("dom/base/nsPIDOMWindow.h", "nsPIDOMWindow")}}</code> interface ({{bug(1216401)}}).</li>
</ul>

<h3 id="Other">Other</h3>

<ul>
 <li>Due to breaking changes in Firefox 44 (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1202902">bug 1202902</a>), add-ons packed with <a href="/en-US/docs/Mozilla/Add-ons/SDK/Tools/cfx">cfx</a> will not work any longer. To make your add-on compatible again, please use <a href="/en-US/docs/Mozilla/Add-ons/SDK/Tools/jpm">jpm</a>. You can find steps to migrate from <em>cfx</em> to <em>jpm</em> <a href="/en-US/docs/Mozilla/Add-ons/SDK/Tools/cfx_to_jpm">here</a>.</li>
</ul>

<h2 id="See_also">See also</h2>

<ul>
 <li><a href="https://www.fxsitecompat.com/en-US/versions/44/">Site compatibility for Firefox 44</a></li>
</ul>

<h2 id="Older_versions">Older versions</h2>

<p>{{Firefox_for_developers(43)}}</p>