Google heeft versie 77 van zijn webbrowser Chrome uitgebracht. Google Chrome is beschikbaar voor Windows, Linux en macOS. Er zijn ook versies voor Android en iOS, maar die volgen een iets ander releaseschema. De belangrijkste veranderingen die in versie 77 zijn aangebracht, naast de gebruikelijke bug- en security fixes, zijn hieronder voor je op een rijtje gezet.
New Performance Metrics
Largest Contentful Paint
It has not always been easy for developers to measure how quickly the main content of a web page loads and is visible to users. The usefulness of existing metrics varies. Some metrics are only measurable in a lab, while others tell nothing about content that users care about. Consider the example below, taken from a DevTools performance audit. At the time of the first contentful paint, there's no content on screen that a user can interact with. Largest Contentful Paint attempts to provide more meaningful data by using the largest content element as a proxy for when the main content of the page is likely visible to users. You're probably asking questions like what does the new metric track? When is the metric reported? How do I improve it if it's slow? For answers to these and other questions, see "Largest Contentful Paint" on web.dev.
First Input Timing
The PerformanceEventTiming interface provides timing information about the latency of the first discrete user interaction, specifically one of key down, mouse down, click, or the combination of pointer down and pointer up. Pointer down may be the start of scrolling, which is not tracked. This is a subset of the EventTiming API, but will be exposed in advance because it provides key metrics to help measure and optimize responsiveness.
New Form Capabilities
Many websites use custom form controls to either add features that aren't available in standard controls or to tailor a form's design. A drawback of custom controls is that data must be stored in hidden<input>
elements. Two new features support custom form controls. Theformdata
event lets sites use JavaScript instead of hidden<input>
elements to add data to a form. With this feature, site builders add aformdata
event listener to a form element. The passed event includes aFormData
object containing the data being submitted, which can now be modified. Theformdata
event only lets sites interact with the submission process. Form-associated custom elements let site creators build custom elements that act like built-in form controls, providing capabilities such as enabling input validation or submitting data to the server. To learn more and to see example code, read More capable form controls on web.dev.
Origin Trials
This version of Chrome introduces the origin trials listed below. Origin trials allow you to try new features and give feedback on usability, practicality, and effectiveness to the web standards community. To register for any of the origin trials currently supported in Chrome, including the ones listed below, visit the Origin Trials dashboard. To learn more about origin trials themselves, visit the Origin Trials Guide for Web Developers.
A Contact Picker for the Web
The Contact Picker API is a new, on-demand picker that allows users to select entries from their contact list and share limited details of the selected entries with a website. It allows users to share only what they want, when they want, and makes it easier for users to reach and connect with their friends and family. See A Contact Picker for the Web for details.
Other features in this release
Enter Key Hint
Theenterkeyhint
content attribute is an enumerated attribute for<form>
elements that specifies what action label (or icon) to present as the enter key on virtual keyboards. This allows authors to customize the presentation of the enter key to make it more helpful for users. The attribute takes one ofenter
,done
,go
,next
,previous
,search
, orsend
.
Feature Policy Control over Document.domain
The document-domain policy governs access to document.domain. It is enabled by default, and, if disabled, attempting to setdocument.domain
will throw an error.
Layout Instability Monitoring
Adds theLayoutShift
interface to the Performance API, allowing developers to monitor changes to a DOM element's on-screen position.
Limit the "referer" Header's Length to 4kB
Strips thereferer
header down to an origin when it's size exceeds 4kB. Servers will often behave in unexpected ways when presented with an overly-longreferer
header. This is unfortunate, becausereferer
is one header whose length attackers generally retain control over when generatingno-cors
requests.
Limit registerProtocolHandler() url Argument to http/https
TheregisterProtocolHandler()
now only accepts URLs with http or https schemas. Because the intent of the API is to allow an endpoint to handle something like an SMS message, for example, it doesn't make much sense for handlers to be data URLs, blob URLs, and so on.
New Features for Intl.NumberFormat
This change improvesIntl.NumberFormat
by adding support for measurement units, currency and sign display policies, and scientific and compact notation.
Overscroll Behavior Logical Longhands
Adds CSSflow-relative
properties for controlling overscroll behavior through logical dimensions.flow-relative
properties are those that are interpreted relative to the flow of content. The new properties areoverscroll-behavior-inline
andoverscroll-behavior-block
.
PerformanceObserverInit Buffered Flag
Adds abuffered
flag toobserver.observe()
so thatPerformanceObserver
can receive entries created before the call is executed.
WebRTC
RTCPeerConnection.onicecandidateerror Adds theincecandidateerror
event which provides detailed information about WebRTC ICE candidate gathering failures, including the ones defined by STUN (RFC5389) and TURN (RFC5766). Diagnosing ICE connectivity issues without access to detailed gathering failures can be a challenge. Support for ICE candidate errors is targeted towards better connectivity troubleshooting and network diagnostics. RTCPeerConnection.restartIce() Adds a method for triggering an ICE restart which causes a WebRTC connection to try to reconnect. This feature is already available in Chrome by passing theiceRestart
argument tocreateOffer()
.restartIce()
is a version of this method that works regardless ofsignalingState
.
Service Workers
Preserve Request Priorities through Service Worker Preserves a request's original priority when it passes through a service worker. Previously, all requests going through a service worker would get "High" priority. This means render-blocking style sheets would have their priority clamped, while less important resources would get boosted. Service Workers Support Basic HTTP Authentication Displays HTTP authentication dialog boxes even if the request was from a service worker. This shows the native login dialog shown when an HTTP 401 response is received.
Stop Action for Media Sessions
Addsstop
as aMediaSessionAction
for calls toMediaSession.setActionHandler()
. An action is an event tied specifically to a common media function such as pause or play. Thestop
action handler is called when the site should stop the playback and clear the state if appropriate. Samples are available on GitHub.
Web Payments: Throw a TypeError on Invalid "basic-card" Data
ThePaymentRequest
constructor now throws aTypeError
when invalidsupportedNetworks
orsupportedTypes
are specified for basic card payment. See Deprecations and Removals for an additional Web Payments update item. For more about recent web payments updates, see W3C Payment API changes in Chrome 77.
Interoperability Improvements
Support Step Timing Functions jump-start|end|both|none
Adds support for a richer set of step animations. Firefox already supportsjump-*
step timing functions. The step timing functionsjump-both
,jump-none
,jump-start
andjump-end
were introduced to the spec for easing functions in 2018. Two of these,jump-start
andjump-end
are aliases forstart
andend
. The remaining two provide increased flexibility for step transitions by enabling step functions in which both or neither endpoint has a discontinuous step. Previously, one and only one of the two endpoints could have a step discontinuity. Adding support in Chromium improves cross-browser interoperability.
white-space: break-spaces
Adds thebreak-spaces
value for thewhite-space
property which specifies that any sequence of preserved white space that would otherwise overflow a line and hang (as per the CSS Text Module spec's Trimming and Positioning rules) must be broken. Withwhite-space: pre-wrap
it's possible to wrap and preserve white space sequences in the middle of a text line. However, if there is a sequence at the end of the line, it either collapses or hangs, maybe overflowing its box area. The new valueoverflow-wrap: break-spaces
allows authors to wrap and preserve these white space sequences. This can be also useful fortextarea
orcontenteditable
elements, so that white space sequences added by spacebar press events are handled properly and generate line breaks if needed. Finally, there is an ongoing effort to enhance interoperability of the line breaking CSS properties (white-space
,word-break
andoverflow-wrap
) and this new value was defined precisely to achieve that.
Deprecations, and Removals
Card Issuer Networks as Payment Method Names
Remotes support for callingPaymentRequest
with card issuer networks (e.g., "visa", "amex", "mastercard") in thesupportedMethods
field.
Deprecate Web MIDI Use on Insecure Origins
Web MIDI use is classified into two groups: non-privilege use, and privilege use with sysex permission. Until Chrome 77, only the latter use prompts users for permission. To reduce security concerns, permissions will always be requested regardless of sysex use. This means that using Web MIDI on insecure origins will no longer be allowed.
Deprecate WebVR 1.1 API
This API is now deprecated in Chrome, being replaced by the WebXR Device API, which is expected to ship in Chrome 78. The WebVR Origin Trial ended on July 24, 2018. WebVR was never enabled by default in Chrome, and was never ratified as a web standard. The WebXR Device API is the replacement API for WebVR. Removing WebVR from Chrome allows us to focus on the future of WebXR and remove the maintenance burden of WebVR, as well as reaffirm that Chrome is committed to WebXR as the future for building immersive web-based experiences. Removal is expected in Chrome 79.