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
|
---
title: Firefox 17 for developers
slug: Mozilla/Firefox/Releases/17
tags:
- Firefox
- Firefox 17
translation_of: Mozilla/Firefox/Releases/17
---
<div>{{FirefoxSidebar}}</div>
<p>Firefox 17 shipped on November 20, 2012. This article lists key changes that are useful for not only web developers, but also Firefox and Gecko developers as well as add-on developers.</p>
<h2 id="WEB开发者需要注意的变化">WEB开发者需要注意的变化</h2>
<h3 id="HTML">HTML</h3>
<ul>
<li>支持了{{HTMLElement("iframe")}}元素的{{htmlattrxref("sandbox", "iframe") }} 属性 ({{ bug("341604") }})</li>
</ul>
<h3 id="CSS">CSS</h3>
<ul>
<li>支持了定义在 <a href="http://dev.w3.org/csswg/css3-conditional/">CSS3 Conditional Rules specification</a>中的{{ cssxref("@supports") }} at-rule. (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=649740">bug 649740</a>)</li>
<li>支持了CSS4级选择器中的{{ cssxref(":dir", ":dir()") }}伪类,该伪类允许基于元素的方向性来选择元素. (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=562169">bug 562169</a>)</li>
<li>支持了CSS {{ cssxref("unicode-bidi") }} 属性中新添加的<code>isolate-override</code> 属性值. (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=774335">bug 774335</a>)</li>
<li>我们的带前缀版本的{{ cssxref("box-sizing") }}现在考虑到了{{ cssxref("min-height") }}和{{ cssxref("max-height") }}的影响.马上就要去掉前缀了. ({{bug("308801")}})</li>
</ul>
<h3 id="DOM">DOM</h3>
<ul>
<li>支持了定义在 <a href="http://dev.w3.org/csswg/css3-conditional/">CSS3 Conditional Rules specification</a> 中的{{ domxref("CSSSupportsRule") }} 接口. (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=649740">bug 649740</a>)</li>
<li>支持了 {{ domxref("WheelEvent") }} 对象和 <code>wheel</code>事件 ({{ bug("719320") }}).</li>
<li>在linux上又一次支持了DOM Meta 键 ({{bug("751749")}}).</li>
<li>On {{domxref("HTMLMediaElement")}}, a new method, <code>mozGetMetadata</code>, that returns a javascript object whose properties represent metadata from the playing media resource as {key: value} pairs ({{bug("763010")}}).</li>
<li>Support for {{domxref("Range.intersectsNode")}} has been added again; it has been removed in Gecko 1.9 ({{bug("579638")}}.</li>
<li>{{domxref("Range.compareBoundaryPoints()")}} now throws a {{domxref("DOMException")}} with the <code>NOT_SUPPORTED_ERR</code> value when the comparison method is invalid ({{bug("714279")}}) .</li>
<li>{{domxref("Event.initEvent()")}} has been adapted to the spec: it doesn't throw anymore if called after the dispatch of the event, it is only a no-op ({{bug(768310)}}).</li>
<li>The non-standard {{domxref("XMLHttpRequest", "XMLHttpRequest.onuploadrequest")}} property has been removed ({{bug(761278)}}).</li>
<li>The method {{domxref("XMLHttpRequest.getAllResponseHeaders()")}} now separates them with a CRLF (instead of a LF), as requested by the spec ({{bug(730925)}}).</li>
</ul>
<p> </p>
<h3 id="JavaScript">JavaScript</h3>
<ul>
<li>支持了Harmony中<a href="/zh-CN/docs/JavaScript/Reference/Global_Objects/String"><code>String</code></a>对象的<code>startsWith</code>, <code>endsWith</code>, 以及 <code>contains</code> 方法. (<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=772733">bug 772733</a>)</li>
<li>The String methods <a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String/link" title="JavaScript/Reference/Global_Objects/String/link">link</a> and <a href="https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/String/anchor" title="JavaScript/Reference/Global_Objects/String/anchor">anchor</a> now escape the <code>'<strong>"</strong>'</code> (quotation mark) ({{bug("352437")}}).</li>
<li>实验性的支持了strawman <a href="../../zh-cn/docs/JavaScript/Reference/Global_Objects/ParallelArray" title="/zh-cn/docs/JavaScript/Reference/Global_Objects/ParallelArray"><code>ParallelArray</code></a>对象. ({{ bug("778559") }})</li>
<li>支持了遍历 <code><a href="../../zh-cn/docs/JavaScript/Reference/Global_Objects/Map" title="/zh-cn/docs/JavaScript/Reference/Global_Objects/Map">Map</a></code>/<code><a href="../../zh-cn/docs/JavaScript/Reference/Global_Objects/Set" title="/zh-cn/docs/JavaScript/Reference/Global_Objects/Set">Set</a></code>. ({{ bug("725909") }})</li>
<li>在web页面上默认禁用<a href="../../zh-cn/docs/E4X" title="/zh-cn/docs/E4X">E4X</a>({{ bug("778851") }})</li>
<li><code>__exposedProps__</code> must now be set for Chrome JavaScript objects exposed to content. Attempts to access Chrome objects from content without <code>__exposedProps__</code> set will fail silently ({{bug("553102")}}).</li>
<li><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...of"><code>for..of</code></a> loops now work in terms of <code>.iterator()</code> and <code>.next()</code> ({{bug(725907)}}).</li>
</ul>
<h3 id="WebGL">WebGL</h3>
<p> </p>
<ul>
<li>The {{domxref("EXT_texture_filter_anisotropic")}} WebGL extension has been unprefixed. Using <code>"MOZ_EXT_texture_filter_anisotropic"</code> will present a warning from now on. The prefixed name is going to be removed in a future release ({{bug(776001)}}).</li>
</ul>
<p> </p>
<h3 id="SVG">SVG</h3>
<p><em>No change.</em></p>
<h3 id="MathML">MathML</h3>
<p> </p>
<ul>
<li>The parsing of the <code>align</code> attribute on {{MathMLElement("mtable")}} elements has been updated to treat optional spaces more correctly.</li>
</ul>
<p> </p>
<h3 id="XUL">XUL</h3>
<ul>
<li>XUL <a href="/zh-CN/docs/XUL/key" title="/zh-CN/docs/XUL/key">key</a> 元素支持了 "os" 修饰符,也就是Win键(Super键或者Hyper键) ({{bug("751749")}}).</li>
</ul>
<h3 id="网络">网络</h3>
<p> </p>
<ul>
<li>Removed the the non-standard feature <code>XMLHttpRequest.onuploadprogress</code> which was deprecaed in Firefox 14.</li>
</ul>
<p> </p>
<h3 id="开发者工具">开发者工具</h3>
<p> </p>
<ul>
<li>Change JSTerm's $ helper function from getElementById to querySelector() ({{bug("751749")}}).</li>
</ul>
<h3 id="User_Agent">User Agent</h3>
<p>The Gecko part of the user agent string changed. The build date (which hadn't been updated since 2010) was removed, and the Gecko version number was put in its place instead. So <code>Gecko/20100101</code> -> <code>Gecko/17.0</code>. This may affect you if you are doing user agent sniffing.</p>
<h2 id="附加组件和Mozilla开发者需要注意的变化">附加组件和Mozilla开发者需要注意的变化</h2>
<h3 id="接口变化">接口变化</h3>
<dl>
<dt>{{ interface("nsIInputStream") }}</dt>
<dd><code>available()</code> 方法返回一个64位的长度而不是32位的. ({{bug("215450")}})</dd>
<dt>{{ interface("nsIDOMWindowUtils") }}</dt>
<dd><code>sendMouseScrollEvent()方法被</code><code>sendWheelEvent()替换</code>. ({{bug("719320")}})</dd>
<dt>{{interface("nsIFilePicker")}}</dt>
<dd>The <code>open()</code> method, to open the file dialog asynchronously, has been added and the <code>show()</code> method has been deprecated ({{bug("731307")}}).</dd>
<dt>{{interface("nsIScriptSecurityManager")}}</dt>
<dd>The <code>checkLoadURIStr()</code> and <code>checkLoadURI()</code> methods have been removed ({{bug("327244")}}).</dd>
<dt>{{interface("nsIRefreshURI")}}</dt>
<dd>The <code>setupRefreshURIFromHeader()</code> method has a added <code>principal</code> parameter ({{bug("327244")}}).</dd>
</dl>
<h4 id="新增接口">新增接口</h4>
<p><em>None.</em></p>
<h4 id="移除接口">移除接口</h4>
<p><em>None removed.</em></p>
<h2 id="See_also">See also</h2>
<ul>
<li><a href="http://www.mozilla.org/en-US/firefox/17.0/releasenotes/">Firefox 17 Release Notes</a></li>
<li><a href="https://hacks.mozilla.org/2012/08/aurora-17-is-out/">Aurora 17 it out, bringing better security and support for new standards</a> (Mozilla Hacks)</li>
<li><a href="https://www.fxsitecompat.com/en-US/versions/17/">Site Compatibility for Firefox 17</a></li>
<li><a href="https://blog.mozilla.org/addons/2012/11/08/compatibility-for-firefox-17/">Add-on Compatibility for Firefox 17</a> (Add-ons Blog)</li>
</ul>
<h3 id="Older_versions">Older versions</h3>
<p>{{Firefox_for_developers('16')}}</p>
|