Web features explorer

CloseWatcher

Limited availability
Tags: api

The CloseWatcher API listens and responds to close requests on in-page components, such as modals, popovers, and sidebars.

Learning resources on MDN

Browser support