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
|
---
title: 面向开发者的Firefox 69
slug: Mozilla/Firefox/Releases/69
translation_of: Mozilla/Firefox/Releases/69
---
<p>{{FirefoxSidebar}}</p>
<p class="summary">这篇文章将会围绕Firefox 69对于开发者产生的影响展开。</p>
<p class="summary">Firefox 69 发布于2019年9月3日。</p>
<h2 id="对于web开发者的变化">对于web开发者的变化</h2>
<h3 id="开发者工具">开发者工具</h3>
<h4 id="Debugger调试器">Debugger(调试器)</h4>
<ul>
<li><a href="/en-US/docs/Tools/Debugger/Set_event_listener_breakpoints">Event Listener Breakpoints(事件监听断点)</a> 让你诊断中的代码执行的页面响应浏览器事件。你可以选择特殊的类型,比如 <code>click(点击)</code> 或者 <code>keydown(按下键盘)</code>, 亦或所有类型的事件,诸如所有的鼠标输入事件。 ({{bug(1526082)}}).</li>
<li>调试其中的 <a href="https://developer.mozilla.org/en-US/docs/Tools/Debugger/UI_Tour#Source_list_pane">源列表窗格</a> 所显示的脚本可以通过 <em>Download file(下载文件)</em> 内容菜单选项来完成保存。 ({{bug(888161)}}).</li>
<li>在调试期的源列表窗格中,被加载的扩展会根据他们的名字被逐一罗列出来,而非是他们的UUID {bug(1486416)}}),使它更为容易地找你你要调试的扩展代码</li>
<li>通过延迟加载脚本,调试器的加载速率得到了明显地改善{{bug(1527488)}}).</li>
</ul>
<h4 id="Console控制台">Console(控制台)</h4>
<ul>
<li><a href="/en-US/docs/Tools/Browser_Console">浏览器控制台</a> 的消息来自于 <a href="/en-US/docs/Mozilla/Firefox/Privacy/Tracking_Protection">tracking protection errors(跟踪保护错误)</a>, <a href="/en-US/docs/Web/HTTP/CSP">CSP errors( ContentSecurityPolicy 内容安全策略错误 )</a>, and <a href="/en-US/docs/Web/HTTP/CORS/Errors">CORS errors( CrossOriginResourceShring 跨域资源共享错误 )</a> 他们会被自动分组以此可以减少来自重复的阻塞资源和存储访问的警告。 ({{bug(1522396)}}).</li>
<li>所有在控制台可见的日志都可以通过<strong>内容菜单列表(鼠标右击可见)</strong>被保存成一份文件或者复制到剪贴板后经由新的<em>消息可视化界面</em> (复制到文本编辑器查看)。({{bug(1517728)}}).</li>
<li>控制栏的高度现在调整到了在垂直方向上一行就可以完成。({{bug(972530)}}).</li>
<li>我们可以在控制台隐藏来自内容的消息以便更多的关注Firefox的用户界面日志({{bug(1523842)}}).</li>
</ul>
<h4 id="Network网络">Network(网络)</h4>
<ul>
<li>由于<a href="/en-US/docs/Web/HTTP/CSP">CSP</a> 或者 <a href="/en-US/docs/Web/Security/Mixed_content">Mixed Content</a> 所阻塞的资源现在可以在<strong>网络面板</strong>上得到显示,并且对其缘由有着细节展示。 ({{bug(1556451)}}).</li>
<li>在<strong>网络面板</strong>上,一个新的且可选择的<em>URL</em>栏能够为我们展示你资源所有的全部的URL ({{bug(1341155)}}).</li>
</ul>
<h4 id="Inspector查看器">Inspector(查看器)</h4>
<ul>
<li>当你的光标悬停在<a href="/en-US/docs/Tools/Page_Inspector">页面选择器</a>中的某个元素,现在信息栏将会显示这个元素是一个弹性容器还是一个弹性项目的事实。 ({{bug(1521188)}}).</li>
</ul>
<h4 id="Remote_debugging远程调试">Remote debugging(远程调试)</h4>
<ul>
<li>对于我们的移动端web开发者,我们已经将远程调试从旧的WebIDE迁移到了重新设计的 <a href="/en-US/docs/Tools/about:debugging">about:debugging</a>上, 这样会使得通过USB调试远程设备上的 <a href="https://hacks.mozilla.org/2019/06/geckoview-in-2019/">GeckoView</a> 的体验得到改善。 ({{bug(1462208)}}).</li>
</ul>
<h4 id="General日常">General(日常)</h4>
<ul>
<li>开发工具的面板布局已经为了迎合流行元素而做出了改动。{{bug(1558630)}}).</li>
</ul>
<h3 id="HTML">HTML</h3>
<ul>
<li>In order to align more closely to the specification, the text track associated with a {{HTMLElement("track")}} element no longer loads the WebVTT file containing the text cues if the element is created in its default <code>disabled</code> {{domxref("TextTrack.mode", "mode")}}. To access or manipulate the cues when the <code>mode</code> is <code>disabled</code>, change the <code>mode</code> to either <code>started</code> or <code>hidden</code>; this will trigger loading of the WebVTT data ({{bug(1550633)}}).</li>
</ul>
<h4 id="Removals"> Removals</h4>
<ul>
<li>The HTML {{HTMLElement("keygen")}} element has been removed from Firefox. It was deprecated some time ago, and its purpose has generally been supplanted by other technologies ({{bug(1315460)}}).</li>
</ul>
<h3 id="CSS">CSS</h3>
<ul>
<li>We implemented the <code>break-spaces</code> value of the {{cssxref("white-space")}} property ({{bug(1351432)}}).</li>
<li>The SVG geometry attributes (such as {{SVGAttr("width")}} and {{SVGAttr("height")}}) can now also be defined as CSS properties ({{bug(1383650)}}).</li>
<li>The {{cssxref("::cue")}} selector — used to style the captions ("cues") displayed by <a href="/en-US/docs/Web/API/WebVTT_API">WebVTT</a> — now enforces the limitations on which CSS properties may be used within cues, as per the specification ({{bug(1321488)}}).</li>
<li>We've restricted the properties that may apply to {{cssxref("::marker")}} as per the specification ({{bug(1552578)}})</li>
<li>The {{cssxref("overflow-block")}} and {{cssxref("overflow-inline")}} properties have been implemented ({{bug(1470695)}}).</li>
<li>We added the ability to test for support of a selector when using CSS Feature Queries ({{cssxref("@supports")}}), with the <code>selector()</code> method ({{bug(1513643)}}).</li>
<li>The {{cssxref("user-select")}} property — which specifies whether or not the user is able to select text in the affected element — has been unprefixed ({{bug(1492739)}}).</li>
<li>We implemented local-specific casing behavior for Lithuanian ({{bug(1322992)}}), <a href="/en-US/docs/Web/CSS/text-transform#lowercase_lithuanian">as seen in this example</a>.</li>
<li>We've implemented the {{cssxref("line-break")}} property of CSS Text ({{bug(1011369)}} and {{bug(1531715)}}).</li>
<li>The {{cssxref("contain")}} property — which allows developers to define that an element and its contents are mostly independent of the rest of the DOM tree — got implemented {{bug(1487493)}}.</li>
</ul>
<h3 id="SVG">SVG</h3>
<ul>
<li>We've added support for gzip-compressed SVG-in-OpenType ({{bug(1359240)}}).</li>
<li>The {{domxref("SVGGeometryElement.isPointInFill()")}} and {{domxref("SVGGeometryElement.isPointInStroke()")}} methods have been implemented ({{bug(1325319)}}).</li>
</ul>
<h3 id="JavaScript">JavaScript</h3>
<ul>
<li><a href="/en-US/docs/Web/JavaScript/Reference/Classes#Field_declarations">Public class fields</a> are enabled by default ({{bug(1555464)}}). See also <a href="/en-US/docs/Web/JavaScript/Reference/Classes/Class_fields">Class fields</a> for more information.</li>
<li>The promise rejection events <code><a href="/en-US/docs/Web/API/Window/unhandledrejection_event">unhandledrejection</a></code> and <code><a href="/en-US/docs/Web/API/Window/rejectionhandled_event">rejectionhandled</a></code> are now enabled by default ({{bug(1362272)}}). To learn more about how these work, see {{SectionOnPage("/en-US/docs/Web/JavaScript/Guide/Using_promises", "Promise rejection events")}}.</li>
</ul>
<h3 id="HTTP">HTTP</h3>
<ul>
<li>The HTTP headers {{HTTPHeader("Access-Control-Expose-Headers")}}, {{HTTPHeader("Access-Control-Allow-Methods")}}, and {{HTTPHeader("Access-Control-Allow-Headers")}} now accept a wildcard value "<code>*</code>" for requests without credentials ({{bug(1309358)}}). This change has also been uplifted to Firefox 68 ESR.</li>
</ul>
<h3 id="APIs">APIs</h3>
<h4 id="New_APIs">New APIs</h4>
<ul>
<li>The <a href="/en-US/docs/Web/API/Resize_Observer_API">Resize Observer API</a> is supported by default ({{bug(1543839)}}).</li>
<li>The Microtask API ({{domxref("WindowOrWorkerGlobalScope.queueMicrotask()")}}) has been implemented ({{bug(1480236)}}).</li>
</ul>
<h4 id="DOM">DOM</h4>
<ul>
<li>The {{domxref("DOMMatrix")}}, {{domxref("DOMPoint")}}, and related objects are now supported in workers ({{bug(1420580)}}).</li>
<li>The <code>pageX</code> and <code>pageY</code> properties have been moved from {{domxref("UIEvent")}} to {{domxref("MouseEvent")}}, for better spec compliance ({{bug(1178763)}}). These properties are no longer exposed to the {{domxref("CompositionEvent")}}, {{domxref("FocusEvent")}}, {{domxref("InputEvent")}}, {{domxref("KeyboardEvent")}}, and {{domxref("TouchEvent")}} interfaces, which all inherit from <code>UIEvent</code>.</li>
<li>The {{domxref("Blob.text()")}}, {{domxref("Blob.arrayBuffer()")}}, and {{domxref("Blob.stream()")}} methods are now implemented ({{bug(1557121)}}).</li>
<li>{{domxref("DOMMatrix.fromMatrix()")}} has been implemented ({{bug(1560462)}}).</li>
<li>We now support the six-parameter version of the {{domxref("DOMMatrix.scale()")}} method ({{bug(1397945)}}).</li>
<li>The arguments for {{domxref("DOMMatrix.translate()")}}, {{domxref("DOMMatrix.skewX()")}}, and {{domxref("DOMMatrix.skewY()")}} are now all optional, as per spec ({{bug(1397949)}}).</li>
<li>The {{domxref("navigator.userAgent")}}, {{domxref("navigator.platform")}}, and {{domxref("navigator.oscpu")}} properties no longer reveal whether a user is running 32-bit Firefox on a 64-bit OS ({{bug(1559747)}}). They now say <code>Linux x86_64</code> instead of <code>Linux i686 on x86_64</code>, and <code>Win64</code> instead of <code>WOW64</code>.</li>
<li>The remaining methods of {{domxref("HTMLDocument")}} have been moved to {{domxref("Document")}}. This should have no appreciable impact on your work in most cases. In particular, the {{domxref("document.close", "close()")}}, {{domxref("document.open", "open()")}}, and {{domxref("document.write", "write()")}} methods have been moved. So have the various editor related methods, including {{domxref("document.execCommand", "execCommand()")}} as well as various properties ({{bug(1549560)}}).</li>
<li>
<p>We have implemented {{domxref("AbstractRange")}} and {{domxref("StaticRange")}} ({{bug(1444847)}}).</p>
</li>
</ul>
<h4 id="Media_Web_Audio_and_WebRTC">Media, Web Audio, and WebRTC</h4>
<ul>
<li>For improved user security, and in-keeping with the latest versions of the <a href="/en-US/docs/Web/API/Media_Streams_API">Media Capture and Streams</a> specification, the {{domxref("navigator.mediaDevices")}} property is no longer present if the context is insecure. To use {{domxref("MediaDevices.getUserMedia", "getUserMedia()")}}, {{domxref("MediaDevices.getDisplayMedia", "getDisplayMedia()")}}, {{domxref("MediaDevices.enumerateDevices", "enumerateDevices()")}}, and so forth, be sure your content is loaded using {{Glossary("HTTPS")}} ({{bug(1528031)}}).</li>
<li>The Web Audio API's {{domxref("AudioParam.value")}} property now returns the actual value of the property at the current time, taking into account all scheduled or gradiated value changes. Previously, Firefox only returned the most recent explicitly-set value (as through using the <code>value</code> setter) ({{bug(893020)}}).</li>
<li>We've updated {{domxref("MediaStreamAudioSourceNode")}} to use the new, lexicographical, ordering for tracks. Previously, track ordering was up to the individual browser, and could even change arbitrarily. In addition, attempting to create a <code>MediaStreamAudioSourceNode</code> using a stream that has no audio tracks now throws an <code>InvalidStateError</code> exception ({{bug(1553215)}}).</li>
<li>The {{domxref("MediaTrackSettings.facingMode", "facingMode")}}, {{domxref("MediaTrackSettings.deviceId", "deviceId")}}, and {{domxref("MediaTrackSettings.groupId", "groupId")}} settings are now included as members of the {{domxref("MediaTrackSettings")}} object returned by calls to {{domxref("MediaStreamTrack.getSettings()")}} ({{bug(1537986)}}).</li>
</ul>
<h4 id="Removals_2">Removals</h4>
<ul>
<li>The {{domxref("DOMMatrix.scaleNonUniformSelf()")}} method has been removed ({{bug(1560119)}}).</li>
</ul>
<h3 id="WebDriver_conformance_Marionette">WebDriver conformance (Marionette)</h3>
<h4 id="Other">Other</h4>
<ul>
<li>
<p>Marionette now dynamically handles the opening and closing of modal dialogs and user prompts ({{bug(1477977)}}), which also means that multiple open prompts will be handled ({{bug(1487358)}}).</p>
</li>
<li>
<p>Tracking protection and DOM push features are now disabled by default to avoid the removal of parts of the DOM, and extra notifications ({{bug(1542244)}}).</p>
</li>
<li>
<p>Automatic unloading of background tabs if Firefox runs into a low memory condition is now disabled — this badly interacts with automation when switching between tabs ({{bug(1553748)}}).</p>
</li>
</ul>
<h2 id="Changes_for_add-on_developers">Changes for add-on developers</h2>
<h3 id="API_changes">API changes</h3>
<ul>
<li>The <a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/API/userScripts">UserScripts API</a> is now enabled by default.</li>
<li>The <code><a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/API/topSites/get">topSites.get()</a></code> method now has new options available — <code>includePinned</code> and <code>includeSearchShortcuts</code> ({{bug(1547669)}}).</li>
</ul>
<h3 id="Other_changes">Other changes</h3>
<ul>
<li>There are now <a href="https://github.com/mozilla/policy-templates/blob/master/README.md#extensionsettings">Group Policy options</a> to blacklist all extensions except the ones that have been whitelisted ({{bug(1522823)}}).</li>
</ul>
<h2 id="See_also">See also</h2>
<ul>
<li><a href="https://www.fxsitecompat.com/en-CA/versions/69/">Site compatibility for Firefox 69</a></li>
</ul>
<h2 id="Older_versions">Older versions</h2>
<p>{{Firefox_for_developers(68)}}</p>
|