Наши волонтёры ещё не перевели данную статью на Русский. Присоединяйтесь к нам и помогите закончить эту работу!
To test the latest developer features of Firefox,
install Firefox Developer Edition Firefox 49 was released on September 20, 2016. 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
- JavaScript errors logged into the console now provide a [Learn more] link for additional debugging help (bug 1179876).
- CSS autocomplete: show more suggestions in autocomplete popup (bug 1260419).
- The Animation Inspector now exposes animation performance information in DevTools (bug 1254408).
- The Inspector's context menu has been reorganized to be cleaner and easier to use (bug 1211613).
- The Inspector now supports
#RRGGBBAA
and#RGBA
syntax for color values (bug 1271191). - The developer tools no longer display self-closing tags (such as
<br>
and<img>
as if they have a closing tag on HTML pages; the behavior is unchanged for XHTML pages (bug 820926). - Accessibility improvements!
- The toolbox does a better job of ensuring that keyboard focus is more visible (bug 1242851).
- Accessibility labels have been added to unlabeled controls (bug 1242715).
- Added proper tree view semantics and keyboard navigation to the Inspector's markup view (bug 1242694).
- The Network Monitor now shows a Cause column, which provides an indication of what caused each particular network request (bug 1134073).
- In the about:debugging Add-ons page, the Reload button is only enabled for temporary add-ons. It will be disabled for all other add-ons (bug 1273184).
- In the about:debugging Workers page, a warning message will be displayed in the Service Workers section if service workers are incompatible with the current browser configuration (bug 1266415).
- about:debugging now has a new Tabs page available, which provides a complete list of all the debuggable tabs open in the current Firefox instance (bug 1266128).
- The Disable Cache option in the Toolbox Advanced settings has been renamed to Disable HTTP Cache, to make it clearer that this affects the HTTP cache, and not Service Workers/the Cache API (bug(1253018)).
- The Storage Inspector now allows IndexedDB databases to be deleted via their own context menus (bug 1205123), and will display warning messages if the IndexedDB cannot be deleted for some reason (if there are still active connections, for example) (bug 1268460).
HTML
- Added support for the
<details>
and<summary>
elements (bug 1226455). - The
pattern
attribute of the<input>
element now uses the'u'
parameter in the underlying JavaScriptRegExp
(bug 1227906). - To match a spec change, an invalid value of the
kind
attribute of the<track>
element is now treated like"metadata"
instead of"subtitles"
(bug 1269712). - The
<iframe>
element'ssandbox
attribute now supports the'allow-popups-to-escape-sandbox'
and'allow-modals'
values (bug 1190641). - Support for microdata attributes and the Microdata API have been removed (bug 909633).
- The
referrerpolicy
attribute on the<a>
element now supports the'no-referrer-when-downgrade
' and'origin-when-cross-origin'
(bug 1178337). - The
form
content attribute of the<label>
element has been removed. TheHTMLLabelElement.form
property still exists, but now returns the form with which the label's control is associated, if there is a control (and if that control is associated with a form) (bug 1268852).
CSS
- Added
background-position-x
andbackground-position-y
, which allow separately specifying the horizontal and vertical offsets at which to draw a background image; these are components ofbackground-position
(bug 550426). - Added support for the
round
andspace
keywords tobackground-repeat
(bug 548372). - On
background-clip
, the keywordtext
is now activated by default (bug 1264905). - Added support for specifying colors with an alpha channel using 4- and 8-digit CSS hex color values (#RRGGBBAA and #RGBA) (bug 567283).
- The pseudo-class
:dir()
has been unprefixed (bug 859301). - In our experimental implementation (not yet activated by default) of
clip-path
, we can now interpolate between<basic-shape>
values (bug 1110460). - Added the
q
length unit (bug 1274526). - The property
text-align-last
has been unprefixed (bug 1039541). - Added support for
overflow-wrap
, replacingword-wrap
that is still supported as an alternative name (bug 955857). - Our experimental CSS Grids implementation has been improved:
- Implemented
<percentage>
for thegrid-gap
,grid-row-gap
, andgrid-column-gap
properties (bug 1266268). - Implemented grid layout support for
align
,justify-self
:baseline
andlast-baseline
(aka "baseline self-alignment") (bug 1221525). - Implemented grid item baseline content alignment (bug 1256429).
- Implemented
- Our experimental CSS Masks implementation has been improved:
- The
mask-origin
property now usesborder-box
instead ofpadding-box
as initial value, to match the spec (bug 1258286). - The
mask-repeat
property now supports thespace
andround
values (bug 1258626). - Fixed an issue preventing the
mask-position
attribute from being animated (bug 1273804).
- The
- The preference controlling
text-emphasis
has been removed, so support for this property can no longer be disabled (bug 1229609).
JavaScript
- The ES2015 (ES6)
getPrototypeOf()
andsetPrototypeOf()
Proxy
traps have been implemented (bug 888969). - The ES2015 (ES6)
RegExp.prototype[@@match]()
,RegExp.prototype[@@replace]()
,RegExp.prototype[@@search]()
, andRegExp.prototype[@@split]()
methods, andRegExp[@@species]
getter have been implemented (bug 887016). - The deprecated, non-standard
flags
argument ofString.prototype.
match
/search
/replace
has been removed (bug 1108382). - The behavior of the
Date.parse()
method when parsing 2-digit years has been changed to be more interoperable with the Google Chrome browser (bug 1265136).
Interfaces/APIs/DOM
DOM & HTML DOM
- The method
DOMTokenList.supports()
has been added (bug 1257849). - The
DOMTokenList.replace()
method has been added (bug 1224186). - Leading
'?'
characters are now ignored in the parameter of theURLSearchParams()
constructor (bug 1268361). - The value returned by
URL.origin
,HTMLAnchorElement.origin
, andHTMLAreaElement.origin
for URL using theblob:
scheme is no longer incorrectlynull
but is instead the origin of the URL formed by removing the leadingblob:
(bug 1270451). - In prerendering mode, the
Document.visibilityState
property now returns'prerender'
(bug 1069772). - The
Window.isSecureContext
property has been implemented (bug 1162772). - The DOM4
ChildNode.before()
,ChildNode.after()
,ChildNode.replaceWith()
,ParentNode.append()
andParentNode.prepend()
methods have been implemented (bug 911477). - The
TouchList.identifiedTouch()
method has been removed (bug 1188539). - By default, the
scrollbars
Window
feature is enabled when callingWindow.open()
. In the past, while it was strongly recommended to enable it, it wasn't the default (bug 1257887). - Added the experimental and non-standard
HTMLMediaElement.seekToNextFrame()
method, which allows seeking frame-by-frame through video content (bug 1235301). While you're encouraged to experiment with this method to help us understand how useful it is, do not use it in production code! - The
HTMLLabelElement.form
property now returns the form with which the label's control is associated, if there is a control (and if that control is associated with a form). Previously, labels were directly associated with forms using this property (bug 1268852). - Support for the third parameter of
EventTarget.addEventListener()
, either aBoolean
or anEventListenerOptions
has been added (bug 1266164 and bug 1266066). - The audio volume related values for
KeyboardEvent.key
have been renamed."VolumeDown"
is now"AudioVolumeDown"
,"VolumeUp"
is now"AudioVolumeUp"
, and"VolumeMute"
is now"AudioVolumeMute".
This brings Firefox into alignment with the latest draft of the UI Events specification (bug 1272578). See "Code values" in KeyboardEvent.code for a full list of available key codes. - The keys previously referred to as
"MozHomeScreen"
,"MozCameraFocusAdjust"
, and"MozPhoneCall"
now have official names in the UI Events specification:"GoHome"
,"CameraFocus"
, and"Call"
. Firefox 49 has been updated to use the new names (bug 1272599). See "Code values" in KeyboardEvent.code for a full list of available key codes. - The key values
"Separator"
and"MediaSkip"
have been removed, as they were deprecated and unused (bug 1232919). - Key values and the corresponding key codes
"Hyper"
and"Super"
have been added to represent these legacy modifier keys (bug 1232919). - Two key values for multimedia numeric keypad keys have been added:
"Key11"
and"Key12"
(bug 1232919). - The following new key values have been added for audio control keys:
"AudioBassBoostToggle"
,"AudioTrebleDown"
, and"AudioTrebleUp"
(bug 123919). - Key values have been added for these microphone control keys:
"
MicrophoneToggle"
,"
MicrophoneVolumeDown"
,"
MicrophoneVolumeUp"
, and"
MicrophoneVolumeMute"
(bug 123919). - New key values have been added to support speech recognition devices: "
SpeechCorrectionList"
and"
SpeechInputToggle"
(bug 1232919). - New key values have been added to support special buttons on phones:
"
AppSwitch"
,"
Call"
,"
CameraFocus"
,"
EndCall"
,"
GoBack"
,"
GoHome"
,"
HeadsetHook"
,"
LastNumberRedial"
,"
Notification"
,"
MannerMode"
, and"
VoiceDial"
(bug 1232919). - These new application key values have been added:
"
LaunchContacts"
and"
LaunchPhone"
(bug 1232919). - New key values have been added to support television devices:
"
TV3DMode"
,"
TVAntennaCable"
,"
TVAudioDescription"
,"
TVAudioDescriptionMixDown"
,"
TVAudioDescriptionMixUp"
,"
TVContentsMenu"
,"
TVDataService"
,"
TVInput"
,"
TVInputComponent1"
,"
TVInputComponent2"
,"
TVInputComposite1"
,"
TVInputComposite2"
,"
TVInputHDMI1"
,"
TVInputHDMI2"
,"
TVInputHDMI3"
,"
TVInputHDMI4"
,"
TVInputVGA1"
,"
TVMediaContext"
,"
TVNetwork"
,"
TVNumberEntry"
,"
TVRadioService"
,"
TVSatellite"
,"
TVSatelliteBS"
,"
TVSatelliteCS"
,"
TVSatelliteToggle"
,"
TVTerrestrialAnalog"
,"
TVTerrestrialDigital"
,"
TVTimer"
, and"
DVR"
(bug 1232919). - The key value
"
MediaSelect"
has been replaced with the standard"
LaunchMediaPlayer"
key value (bug 1272592). - Additional media player key values have been added as well. These are
"
MediaAudioTrack"
,"
MediaSkipBackward"
,"
MediaSkipForward"
,"
MediaStepBackward"
,"
MediaStepForward"
,"
MediaTopMenu"
,"
NavigateIn"
,"
NavigateNext"
,"
NavigateOut"
, and"
NavigatePrevious"
(bug 1232919).
Canvas
- The
CanvasRenderingContext2D.filter
property, which provides support for adding filters to a canvas, is now activated by default and no longer needs to be enabled using a preference (bug 1173545).
WebGL
- The
EXT_color_buffer_float
WebGL 2 extension has been implemented (bug 1129332). - The
webglcontextcreationerror
event, which is sent when a WebGL context creation attempt fails, has been implemented (bug 1271478). Use this to help understand what went wrong, both for debugging and for production error handling.
IndexedDB
- You can now rename IndexedDB indexes; the
IDBIndex.name
property is no longer read-only (bug 1118028). - You can also now rename
IDBObjectStore
s; theIDBObjectStore.name
property is no longer read-only (bug 1118028).
Service Workers and related
- The Fetch API's
Response
object now implements theredirected
property, which indicates whether or not the response is for a request which was redirected. Please review the security related notes in the documentation before using this property (bug 1243792). - In the Permissions API, Firefox no longer supports the 'push'
PermissionDescriptor
dictionary type (referred to in the spec asPushPermissionDescriptor
); this is because Firefox relies on a quota system for controlling theuserVisibleOnly
status instead, and was throwing an error when it encountered aPushPermissionDescriptor
instance (bug 1266821). With this dictionary removed, Firefox now simply ignores it.
Media Streams
- In the past, it was possible for a call to
MediaDevices.getUserMedia()
which requests both audio and video to succeed in cases where the user has only one of the two types of hardware available. This has been fixed (bug 802326). - In prior versions of Firefox, it was possible for a call to
MediaDevices.getUserMedia()
which requests both audio and video to succeed even though the user denied access to one but not both of the matching devices. This has been fixed (bug 802326). This involves minor user interface changes as well, to remove the options to choose "No audio" or "No video" when the user is prompted for permissions. - The
MediaStream.getTrackById()
method has been implemented (bug 1208390).
WebRTC
- The
RTCPeerConnection.addTrack()
method has been updated to allow tracks which are not components of the specified streams to be added to the connection. Instead, the streams are used to group tracks on the receiving end of the connection (bug 1271669).
New APIs
- The
PerformanceObserver
API is now activated by default on Nightly. It is not available by default in other versions of Firefox 49 (bug 1271487).
Others
XMLHttpRequest.getResponseHeader()
andXMLHttpRequest.getAllResponseHeaders()
return empty headers in case the preferencenetwork.http.keep_empty_response_headers_as_empty_string
is set totrue
(bug 669259).- The Firefox OS-only Data Store API has been removed (bug 1261009).
- The Fullscreen API event handlers
Document.onfullscreenchange
andDocument.onfullscreenerror
have been removed fromElement
as they were never fired there; the prefixed versions of these event handlers have been kept there for compatibility purposes, however (bug 1270386). Note that this is not yet activated by default, but is behind thefull-screen-api.unprefix.enabled
preference (bug 1268749). - The obsolete
Document.mozFullScreen
property has been unprefixed toDocument.fullscreen
bug 1269157}. Note that this is not yet activated by default by behind thefull-screen-api.unprefix.enabled
preference (bug 1268749). - The read-only properties
Document.fullscreenElement
andDocument.fullscreenEnabled
no longer throw an exception if an attempt is made to change their values; instead, the new value is silently ignored and the setter function is a no-op (bug 1269798). - Any kind of data can now be retrieved from the clipboard using
DataTransfer.getData()
: previously, only data of certain MIME types were supported bug 860857. - Our implementation of the Frame Timing API, consisting of the two interfaces
PerformanceCompositeTiming
andPerformanceRenderTiming
, has been removed as the spec has been completely rewritten (bug 1271846). - To match the spec, the
VTTCue.positionAlign
property now returns aPositionAlign
enum instead of anAlign
enum (bug 1276129). - The speech synthesis part of Web Speech API is now activated by default (bug 1268633).
- The Performance Timeline API is now available by default in Nightly (though not in Aurora, Beta or Release).
- The
install
event, and theWindow.oninstall
event handler, are now supported for Web Manifests (bug 1265279). - When using the
AudioContext.createPeriodicWave()
method of the Web Audio API, you can now specify whether the resulting periodic wave should be normalized by including a dictionary object as the third parameter, which includes a single parameter —{disableNormalization: true}
(bug 1265405). - In the WebVTT API,
VTTCue.positionAlign
now correctly returns aPositionAlignSetting
enum as per spec; previously it returned anAlignSetting
enum (bug 1276129). - The Speech Synthesis part of the Web Speech API is now enabled by default across all desktop browsers (bug 1268633).
- The
Animation()
constructor of the Web Animations API now accepts a null timeline (bug 1096776).
MathML
No change.
SVG
- Removed support for the deprecated
<altGlyph>
,<altGlyphDef>
and<altGlyphItem>
elements (bug 1260032).
Audio/Video
No change.
HTTP
- The
Cache-Control: immutable
directive has been implemented (bug 1267474). See also this blog post for more information.
Networking
- The Proxy Auto-Configuration (PAC) implementation has been updated. Now
weekdayRange
,dateRange
, andtimeRange
support "reversed ranges", for example,weekdayRange("SAT", "MON")
will evaluatetrue
if the current day is Saturday, Sunday, or Monday (bug 1251332).
Security
- The
Window.isSecureContext
property, indicating whether a context is capable of using features that require secure contexts, has been implemented (bug 1162772).
Compatibility
In order to improve compatibility with existing content, Firefox now accepts some webkit prefixed properties and attributes.
- The following properties now also work prefixed with -webkit:
-webkit-align-items
-webkit-align-content
-webkit-align-self
-webkit-animation
-webkit-animation-delay
-webkit-animation-direction
-webkit-animation-duration
-webkit-animation-fill-mode
-webkit-animation-iteration-count
-webkit-animation-name
-webkit-animation-play-state
-webkit-animation-timing-function
-webkit-backface-visibility
-webkit-background-clip
-webkit-background-origin
-webkit-background-size
-webkit-border-bottom-left-radius
-webkit-border-bottom-right-radius
-webkit-border-image
-webkit-border-top-left-radius
-webkit-border-top-right-radius
-webkit-border-radius
-webkit-box-shadow
-webkit-filter
-webkit-flex
-webkit-flex-basis
-webkit-flex-direction
-webkit-flex-flow
-webkit-flex-grow
-webkit-flex-shrink
-webkit-flex-wrap
-webkit-justify-content
-webkit-order
-webkit-perspective
-webkit-perspective-origin
-webkit-text-size-adjust
-webkit-transform
-webkit-transform-origin
-webkit-transform-style
-webkit-transition
-webkit-transition-delay
-webkit-transition-duration
-webkit-transition-property
-webkit-transition-timing-function
-webkit-user-select
- The following properties map to the equivalent prefixed property
- For
<image>
values:- The following functions map to their unprefixed equivalents:
-webkit-linear-gradient()
,-webkit-radial-gradient()
,-webkit-repeating-linear-gradient()
, and-webkit-repeating-radial-gradient()
. - The outdated
-webkit-gradient
is supported (and translated to a regular gradient)
- The following functions map to their unprefixed equivalents:
- The following
display
values are translated:-webkit-box
to-moz-box
-webkit-flex
toflex
-webkit-inline-box
toinline-flex
-webkit-inline-flex
to-moz-inline-flex
- The following properties are supported (and don't map to any unprefixed equivalent):
- The
WebKitCSSMatrix
interface is an alias ofDOMMatrix
- The following media query features have been implemented:
-webkit-min-device-pixel-ratio
as an alias ofmin-resolution
with the same value (indppx)
, though this feature is disabled by default (behind about:config preflayout.css.prefixes.device-pixel-ratio-webkit
)-webkit-max-device-pixel-ratio
as an alias ofmax-resolution
of the same value (indppx
); this feature is also disabled by default, behind the same about:config pref.-webkit-transform-3d
always matching, indicating 3d transform support.
Changes for add-on and Mozilla developers
WebExtensions
- Support for the
history
has been added. This provides access to the browser history, with methods available for searching the history, getting information about previously-visited pages, and adding and removing history entries. - Added the
tabs.removeCSS()
method to the tabs API. This method lets you remove CSS which was previously injected by callingtabs.insertCSS()
.
Interfaces
- In
EventTarget.addEventListener()
, the valuemozSystemGroup
, active only in code running in XBL or in Firefox's chrome, is aBoolean
which indicates if the listener is added to the system group. (bug 1274520)
Other
No change.
See also
Older versions
- 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
- Firefox 24 for developers
- Firefox 23 for developers
- Firefox 22 for developers
- Firefox 21 for developers
- Firefox 20 for developers
Метки документа и участники
Метки:
Внесли вклад в эту страницу:
fscholz,
Sebastianz,
Sheppy,
Dholbert,
chrisdavidmills,
teoli,
JaredWein,
claudepache,
yisibl,
Longsonr,
Jeremie,
Zefling,
arai,
h4writer
Обновлялась последний раз:
fscholz,