本文介绍了一些在Firefox 56中的一些改进,这些改进会对开发者们产生影响。Firefox 56是当前Firefox的Beta版,预计在2017年9月26日正式发布。
开发者工具
- 在CSS格检查器中显示以负号开始的行号(bug 1369942).
HTML
- 在打标签的窗体控件中采用
labels
属性,比如HTMLInputElement.labels
(bug 556743). - 实现了
<link rel="preload">
; 更详细的内容,可以参见 Preloading content with rel="preload" (bug 1222633). 需要注意的是,当前的Firefox只支持对可缓存的资源进行预加载。
CSS
- 实现了Mozilla自有的属性
<color>
值为-moz-win-accentcolor
以及-moz-win-accentcolortext
(可以参见 bug 1344910), 以及专用的媒体查询语句-moz-windows-accent-color-in-titlebar
(参见bug 1379938).
SVG
无修改.
JavaScript
- The Intl API has been enabled on Firefox for Android (bug 1344625).
APIs
New APIs
No changes.
DOM
- On Mac,
Document.hidden
is now true when the window is behind another non-translucent application bug 1236512. - The
Gamepad.displayId
property has been implemented (bug 1375816). - The
PerformanceTiming.secureConnectionStart
property has been implemented (bug 772589). - Firefox used to accept
iso-2022-jp-2
sequences silently when aniso-2022-jp
TextDecoder()
was instantiated, however this has now been removed to simplify the API, as no other browsers support it and no pages seem to use it. (bug 715833). - The 4ms clamping behaviour of
setTimeout()
andsetInterval()
has been updated to be more in line with other browsers, as described in Timeouts throttled to >=4ms (bug 1378586). - The Page Visibility API's
Document.onvisibilitychange
handler has been added (bug 1333912). - The
Window.showModalDialog()
method has been removed (bug 981796).
DOM events
GlobalEventHandlers.onwheel
is now available onHTMLElement
— it wasn't before (bug 1370550).
WebRTC
- Firefox now supports the
RTCPeerConnection
properties which let you examine the current and pending configurations of the local and remote ends of the connection, to help manage changes in configuration:currentLocalDescription
,pendingLocalDescription
,currentRemoteDescription
, andpendingRemoteDescription
.
Canvas and WebGL
- The
CanvasRenderingContext2D.drawImage()
method has been updated so that smoothing occurs when downscaling even ifimageSmoothingEnabled
isfalse
. This is not mandatory as per spec, but follows Chrome's behaviour. See bug 1360415. - An
SVGImageElement
can now be used as aCanvasImageSource
, e.g. as the image source in adrawImage()
call (bug 1382027).
Security
No changes.
Plugins
No changes.
Other
- Gecko now encodes URLs internally as punycode, to avoid URL encoding problems (see bug 945240, also see discussion in bug 942074).
- Firefox on Windows and Mac OS X can now be made to run in headless mode using the
-headless
flag (see bug 1355150 and bug 1355147).
Removals from the web platform
HTML
- The
<isindex>
element has been removed from the HTML parser, and from form submission (bug 1266495). - The
<applet>
element has been removed (bug 1279218).
APIs
No changes.
SVG
No changes.
Changes for add-on and Mozilla developers
WebExtensions
No changes.
See also
Older versions
- Firefox 55 for developers
- Firefox 54 for developers
- Firefox 53 for developers
- Firefox 52 for developers
- Firefox 51 for developers
- Firefox 50 for developers
- Firefox 49 for developers
- Firefox 48 for developers
- Firefox 47 for developers
- Firefox 46 for developers
- Firefox 45 for developers
- Firefox 44 for developers
- Firefox 43 for developers
- Firefox 42 for developers
- Firefox 41 for developers
- Firefox 40 for developers
- Firefox 39 for developers
- Firefox 38 for developers
- Firefox 37 for developers
- Firefox 36 for developers
- Firefox 35 for developers
- Firefox 34 for developers
- Firefox 33 for developers
- Firefox 32 for developers
- Firefox 31 for developers
- Firefox 30 for developers
- Firefox 29 for developers
- Firefox 28 for developers
- Firefox 27 for developers
- Firefox 26 for developers
- Firefox 25 for developers