Google heeft versie 76 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 76 zijn aangebracht, naast de gebruikelijke bug- en security fixes, zijn hieronder voor je op een rijtje gezet.
Dark modeMany operating systems now support inverted color schemes with a system setting referred to as ‘dark theme' or ‘dark mode', depending on the system. The
Payments APIprefers-color-scheme
media query allows a website or web app to adopt the preferred display mode of the user. What is left out of this is the explanation? For that, read the article titled Hello Darkness, My Old Friend.Over the last few versions of Chrome we've rolled out a number of improvements to the payments APIs. These APIs provide a way to interact with proprietary payment systems without needing to build your own user interactions. Changes in Chrome 75 included replacing
Install Progressive Web Apps on the desktop with easehasEnrolledInstrument()
withcanMakePayment()
and removal oflanguageCode
from the billing address. With thedetailsPromise
option Chrome 75 givesPaymentRequest.show()
a means of performing a quick server call before showing payment details to the buyer. Chrome 76 brings three changes to the payment realm. Now implemented are features that allow a merchant website or web app to respond when a user changes payment instruments. Additionally, thePaymentRequestEvent
has a new method calledchangePaymentMethod()
and thePaymentRequest
object now supports an event handler calledpaymentmethodchange
. You can use both to notify a merchant when the user changes payment instruments. The former returns a promise that resolves with a newPaymentRequest
instance. Additionally, Chrome now makes it easier to use the payments APIs for self-signed certificates on the local development environment. To do this, launch Chrome from a command line with the—ignore-certificate-errors
flag. For detailed information about these features, read Web Payments Updates.On desktop, there is typically no indication to a user that a Progressive Web App is installable, and if it is, the install flow is hidden within the three dot menu. In Chrome 76, we're making it easier for users to install Progressive Web Apps on the desktop by adding an install button to the omnibox. If a site meets the Progressive Web App installability criteria, Chrome shows an install icon in the omnibox. There is no extra work required from developers. Clicking the button prompts the user to install the PWA.
Control the Add to Home Screen mini-infobarIn Chrome 76, we're giving you control over the add to home screen mini-infobar. Chrome shows the mini-infobar the first time a user visits a site that meets the Progressive Web App installability criteria. Developers want to prevent the mini-infobar from appearing, and provide their own install promotion instead. To do this, listen for the
Updating WebAPKs more frequentlybeforeinstallprompt
event, and callpreventDefault()
on it. Then, update your UI to notify the user by adding an install button or other element. Depending on your app, there are several different patterns you can use to promote installation of your PWA. The add to home screen mini-infobar is still a temporary measure. We are experimenting with new UI patterns for giving Progressive Web App users the ability to install, and do this in a way that reduces clutter in the browsing experience.When a PWA is installed on Android, Chrome automatically requests and installs a WebAPK. Chrome periodically checks to see if the manifest has changed, and if a new WebAPK is required. Starting in Chrome 76, Chrome will check the manifest more frequently: checking every day, instead of every three days. If any of the key properties have changed, Chrome will request and install a new WebAPK.
Other features in this release
Animation.updatePlaybackRateAdds
Async clipboard: read and write imagesAnimation.updatePlaybackRate()
, which lets you seamlessly transition the playback rate of an animation such that there is no visible jump in the animation. Current time is preserved at the instance the new playback rate takes effect.Implements programmatic copying and pasting of images for the Async Clipboard API. This change also updates
Escape key is not a user activationnavigator.clipboard.read()
andnavigator.clipboard.write()
to comply with the specification. Programmatic copying and pasting of images is Chromium's top starred bug.The escape key is no longer treated as a user activation. Browsers prevent calls to abusable APIs (like popup, fullscreen, vibrate, etc.) unless the user activates the page through direct interactions. Not all interactions trigger user activation. For example, clicking on a link or typing in a textbox does, but swiping fingers on a screen or hovering with the mouse cursor does not. Since users never intend to interact with the page through the escape key, it should not trigger user activation.
Fetch MetadataIntroduces a new HTTP request header that sends additional metadata about a request's provenance (is it cross-site, is it triggered from
form.requestSubmit()<img>
, etc.) to the server to allow it to make security decisions which might mitigate some kinds of attacks based on timing the server's response (XSS leaks and others). For example, it is unlikely that a bank's "Transfer all money" endpoint would be referenced from an<img>
tag, and likewise unlikely that evil.com is going to be making any legitimate requests whatsoever. Ideally, the server could reject these requests a priori rather than deliver them to the application backend.Adds the
ImageCapture support for focusDistance constraintform.requestSubmit()
function, which requests form submission. It includes interactive constraint validation, dispatches asubmit
event, and takes a reference to the submitter button.The Image Capture API provides a means to set the focusMode to manual which is not useful if you cannot set the focus distance. This change provides an interface for getting focus range values and setting focus distance value.
Implement Animation.pendingAdds the pending attribute to the Web Animations API. A pending animation is one that is waiting on an asynchronous operation that affects the play state. Adding support for this attribute does not affect the rendering or timing of animations, but simply exposes the signal.
IndexedDB transaction explicit commit API callAdds a
JavaScriptcommit()
function toIDBTransaction
objects, which explicitly marks a transaction as not accepting further requests. Currently, IndexedDB only commits a transaction after all associated requests have had their completion event handlers executed, and no new requests have been queued by the event handlers. Developers can use the explicitcommit()
function to shave a few event loop cycles off of the latency of their transactions. The primary benefit of explicit commit is that it increases the throughput of read and write requests made on an object store. This is a clear performance benefit in terms of the rate at which operations can be processed. Additionally, the increase in speed is advantageous because it adds stability to IndexedDB by reducing the probability that a disruptive event occurs within the lifetime of a transaction.DateTimeFormat dateStyle and timeStyle Adds
Media capabilities in workersdateStyle
andtimeStyle
options to functions onIntl.DateTimeFormat
, specificallyformatToParts()
andresolveOptions()
. These options provide a compact way to request the appropriate, locale-specific date and time of given length styles. Locale sensitive BigInt.prototype.toLocaleString and allow Intl.NumberFormat format/formatToParts to take BigInt. ChangesBigInt.prototype.toLocaleString()
to locale-sensitive number formatting and changesIntl.NumberFormat.prototype.format()
andformatToParts()
to acceptBigInt
as input.Enables the Media Capabilities API in all types of workers to help website and web apps pick the best media to stream from a worker. The information can then be used to create the
Promise.allSettledMediaStream
from a worker.Adds Promise.allSettled(), which returns a promise that is fulfilled with an array of promise state snapshots, but only after all the original promises have settled, in other words after it has either resolved or rejected.
Simpler reading methods for Blob interfaceAdds three new methods to the Blob interface to perform read operations:
WebRTCtext()
,arrayBuffer()
, andstream()
.RTCSctpTransport Exposes information about the SCTP transport that is used to carry WebRTC data channels such as
white-space: break-spacesmax-message-size
andmax
channels. RTCRtpSender.setStreams Allows changing the association between the track associated with anRTCRtpSender
and streams. Stream association causes tracks in the same stream to be synchronized. This is useful, for example, if during a call a user switches from a front-facing camera to a back-facing camera and the application usesRTCRtpSender.replaceTrack()
. On the receiving end the new track must be associated with the existing stream and synchronized with its auto track. RTCRtpTransceiver.setCodecPreferences() Adds thesetCodecPreferences()
method, which overrides the default codec preferences used by the user agent. This allows applications to disable the negotiation of specific codecs. It also allows an application to cause a remote peer to prefer the codec that appears first in the list for sending.The
Removalswhite-space:break-spaces
value allows authors to specify that any sequence of preserved white space that would otherwise overflow a line and hang (as per the CSS Text Module specification's Trimming and Positioning rules) must be broken.
Remove feature policy: lazyloadThe lazyload feature policy was intended to allow developers to selectively control the lazyload attribute on the
Remove outputs from MediaStreamAudioDestinationNode<iframe>
and<img>
tags to provide more control over loading delay for embedded contents and images on a per origin basis. The policy is removed in favor of a newer feature policy for loading, namelyloading-frame-default-eager
which is more aligned with how theloading
attribute will be used. The removal applies to both the Feature-Policy header and the<iframe> allow
attribute.According to the specification, the
Remove insecure usage of DeviceMotionEventMediaStreamAudioDestinationNode
in the Web Audio API should have no outputs. Chrome's implementation has a single output which has been removed.Chromium has been showing deprecation warnings since 2015 whenever the API is used in a non-secure browsing context. Chrome now restricts the API to secure browsing contexts. This change brings Chromium's implementation in line with the privacy and security recommendations in the specification, and is aligned with the effort to deprecate powerful features on insecure origins.
Remove insecure usage of DeviceOrientationEventChromium has been showing deprecation warnings since 2015 whenever the API is used in a non-secure browsing context. Chrome now restricts the API to secure browsing contexts. This change brings Chromium’s implementation in line with the privacy and security recommendations in the specification, and is aligned with the effort to deprecate powerful features on insecure origins.