Firefox 40 for developers 编辑
To test the latest developer features of Firefox,
install Firefox Developer Edition Firefox 40 was released on August 11, 2015. This article lists key changes that are useful not only for web developers, but also Firefox and Gecko developers as well as add-on developers.
install Firefox Developer Edition Firefox 40 was released on August 11, 2015. This article lists key changes that are useful not only for web developers, but also Firefox and Gecko developers as well as add-on developers.
Changes for Web developers
Developer Tools
Highlights:
- Improvements to the Animations view
- Get help from MDN for CSS property syntax
- Edit filters in the Page Inspector
- Web Console now shows messages from workers
- Filter requests by URL in the Network Monitor
- Many new context menu options in the Network Monitor
- Show when network resources are fetched from the browser cache
- Filter rules in the Page Inspector
More:
- Break at debugger; statements in unnamed eval sources
- Copy URL/Open in New Tab context menu items for Debugger source list pane
- console.dirxml support in the Web Console
- Style Editor: "Open Link In New Tab" item added to stylesheet list
- Inspector selector search now includes class/id results even without css prefix
- Tooltips in box-model view saying which CSS rule caused the value
- Switch between color unit format in the Inspector using Shift+click
- Implement "Scroll Into View" menu item for the Inspector
- Linkify url/id/resource attributes in the Inspector
- IP address tooltip in the Network Monitor
Everything: all devtools bugs fixed between Firefox 39 and Firefox 40.
CSS
- Prefixed rules (
-moz-
) fortext-decoration-color
,text-decoration-line
, andtext-decoration-style
have been removed (bug 1097922). - The property
text-align
now supports thematch-parent
value (bug 645642). - In Quirks Mode,
empty-cells
now defaults toshow
, like in standard mode (bug 1020400). - The
-moz-orient
non-standard property, used to style<meter>
and<progress>
element has been adapted for vertical writing-modes: the valueauto
has been dropped and the valuesinline
andblock
added, withinline
being the new default value (bug 1028716). - The property
font-size-adjust
has been fixed so that0
is treated as a multiplier (leading to a0
height for the font, hence hiding it) instead of thenone
value (leading to no adjustment, or a1.0
value) (bug 1144885). - Fix text-overflow doesn't work in vertical writing mode (bug 1117227).
HTML
No change.
JavaScript
- Unreachable code after
return
statement (including unreachable expression after semicolon-less return statements) will now show a warning in the console (bug 1005110, bug 1151931). Symbol.match
has been added (bug 1054755).- Passing an object which has a property named
Symbol.match
with a truthy value toString.prototype.startsWith
,String.prototype.endsWith
, andString.prototype.contains
now throws aTypeError
(bug 1054755). RegExp
function returns pattern itself if called withoutnew
and pattern object has a property namedSymbol.match
with a truthy value, and the pattern object'sconstructor
property equals toRegExp
function. (bug 1147817).- Support for the non-standard JS1.7 destructuring for-in has been dropped (bug 1083498).
- Non-standard initializer expressions in for...in loops are now ignored and will present a warning in the console. (bug 748550 and bug 1164741).
\u{xxxxxx}
Unicode code point escapes have been added (bug 320500).String.prototype.contains
has been replaced withString.prototype.includes
,String.prototype.contains
is kept as an alias (bug 1102219).- If the
DataView
constructor is called as a function without thenew
operator, aTypeError
is now thrown as per the ES2015 specification. - An issue regressed in Firefox 21, where proxyfied arrays without the
get
trap were not working properly, has been fixed. If theget
trap in aProxy
was not defined,Array.length
returned0
and theset
trap didn't get called. A workaround was to add theget
trap even if was not necessary in your code. This issue has been fixed now (bug 895223). WeakMap.prototype
andWeakSet.prototype
have been updated to be just ordinary objects, per ES2015 specification (bug 1055473).
Interfaces/APIs/DOM
New APIs
- The Push API has been experimentally implemented (bug 1038811). Controlled by the
services.push.enabled
pref, it is disabled by default.
Web Animations API
Improvement in our experimental Web Animations implementation, mostly to match latest spec changes:
AnimationPlayer.currentTime
now can also be set (bug 1072037).Animatable.getAnimationPlayers()
, available onElement
has been renamed toElement.getAnimations()
(bug 1145246).Animation
andAnimationEffect
have been merged into the newly createdKeyframeEffectReadOnly
(bug 1153734).AnimationPlayer
has been renamed toAnimation
(bug 1154615).AnimationTimeline
is now an abstract class, withDocumentTimeline
its only implementation (bug 1152171).
CSSOM
- The CSS Font Loading API is now enabled by default in Nightly and Developer Edition releases (bug 1088437). It is still deactivated by default in Beta and Release browsers.
- The
CSSCharsetRule
interface has been removed and such objects are no longer available in CSSOM (bug 1148694). This matches the spec (recently adapted) and Chrome behavior.
WebRTC
- WebRTC: the
negotiationneeded
event is now also sent for initial negotiations, not only for re-negotiations (bug 1149838).
DOM & HTML DOM
- When unable to parse the
srcset
, theHTMLImageElement.currentSrc
method doesn't returnnull
anymore but""
, as requested by the latest specification (bug 1139560). - Like for images, Firefox now throttles
Window.requestAnimationFrame()
for non-visible<iframe>
(bug 1145439). Navigator.taintEnabled
is no longer available for Web workers (bug 1154878).
Web Audio API
New extensions to the Web Audio API:
- The
AudioContext.state
andAudioContext.onstatechange
properties as well as the methodsAudioContext.suspend()
,AudioContext.resume()
, andAudioContext.close()
have been added (bug 1094764). AudioBufferSourceNode
now implements theAudioBufferSourceNode.detune
k-rate attribute (bug 1153783).
Web Workers
- Slight improvement in our Service Worker API: the
update()
method has been moved fromServiceWorkerGlobalScope
toServiceWorkerRegistration
(bug 1131350). ServiceWorkerRegistration
is now available in Web workers (bug 1131327).DataStore
is now available in Web workers (bug 916196).
IndexedDB
IDBTransaction
are now non-durable by default (bug 1112702). This favors performance over reliability and matches what other browsers are doing. For more information, read our durability definition.
Dev Tools
- The property
Console.timeStamp
has been added (bug 922221).
MathML
No change.
SVG
No change.
Audio/Video
No change.
Networking
No change.
Security
- Using an asterisk (
*
) in a CSP does not include the schemesdata:
,blob:
or:filesystem
anymore when matching source expressions. So those schemes now need to be explicitly defined within the related header to match the CSP (bug 1086999).
Changes for add-on and Mozilla developers
XUL
- It is no longer possible to create transparent top-level windows bug 1162649.
JavaScript code modules
- Dict.jsm has been removed bug 1123309. Use
Map
instead.
XPCOM
- The
nsIClassInfo.implementationLanguage
attribute has been removed, along with thensClassInfo::GetImplementationLanguage()
function. - The following XPCOM interfaces have been removed; you should use the standard HTML interfaces instead:
nsIDOMHTMLBRElement
nsIDOMDivElement
nsIDOMHTMLHeadingElement
nsIDOMHTMLTableCaptionElement
nsIDOMHTMLTableElement
nsIDOMHTMLTitleElement
Other
- Places Keywords API has been deprecated and will be removed soon (bug 1140395).
- The automated testing system now supports skipping individual test functions. See Conditional test functions in [Page not yet written].
See also
Older versions
- 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
- Firefox 24 for developers
- Firefox 23 for developers
- Firefox 22 for developers
- Firefox 21 for developers
- Firefox 20 for developers
- Firefox 19 for developers
- Firefox 18 for developers
- Firefox 17 for developers
- Firefox 16 for developers
- Firefox 15 for developers
- Firefox 14 for developers
- Firefox 13 for developers
- Firefox 12 for developers
- Firefox 11 for developers
- Firefox 10 for developers
- Firefox 9 for developers
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论