

Here’s what you need to know:
- The CloseWatcher API enables a consistent experience when handling close requests.
- Easily implement an accordion pattern using the
element. - Permission policy violation reports are now available.
- And there’s plenty more.
I’m Adriana Jara. Let’s dive in and see what’s new for developers in Chrome 120.
CloseWatcher API.
An important feature of modal or popup components is that they are easy to close,with a consistent mechanism for doing so. Those mechanisms are called close requests, they are typically the ESC key on desktop platforms, and the back gesture or button on Android.
Web developers had no good way to handle close requests for their own components. This is especially problematic on Android devices, where providing the simple closing behavior for the back gesture is quite complex.
Chrome 120 brings the solution with CloseWatcher, a new API for directly listening and responding to close requests. It also includes upgrades to and popover=”” to use the new close request framework, so that they respond to the Android back button.
Checkout the CloseWatcher API demo to give it a try.
Multiple
Here is an example with a group that shares the name cookies:
Chocolate chip
Yum yum chocolate chip.
Snickerdoodle
Yum yum snickerdoodle.
Maicenitas
Yum yum maicenitas.
Sugar cookies
Yum yum sugar cookies.
Permission policy violation reports
Permissions policy violation reports are now available, these reports integrate the Permissions policy API that allows developers to control the browser features available to a page, its iframes, and subresources, by declaring a set of policies for the browser to enforce with the Reporting API. The Reporting API provides a generic reporting mechanism for web applications to use to make reports available based on several platform features.
This Permissions Policy API and Reporting API integration allows web developers to configure endpoints, to which permissions policy violation reports will be sent, allowing site owners to see when disallowed features are being requested for their pages in the field.
Controlling browser features with Permissions Policy includes more implementation details.
And more!
- The relaxed CSS nesting implementation allows nested style rules to begin with an element, rather than being wrapped with is() or requiring an ampersand in front.
- With the enterpictureinpicture action in the Media Session API, websites can register an action handler which can be used to open a Picture-in-Picture or Document Picture-in-Picture window.

