CloseWatcher can be used to listen to a set of signals that might correspond to closing an in-app dialog, picker, or overlay. On desktop this is typically the Esc key; on mobile it can be a system-provided back button.


An important common feature of various "modal" or "popup" components in web apps is that they are designed to be easy to close, with a uniform interaction mechanism for doing so. Typically, this is the Esc key on desktop platforms, and the back button on some mobile platforms (notably Android). Currently, web developers have no good way to handle these close signals for their own components. This is especially problematic on Android devices, where the back button is the traditional close signal.



Specification link

Specification being incubated in a Community Group

Status in Chromium


In developer trial (Behind a flag) (tracking bug)

Consensus & Standardization

After a feature ships in Chrome, the values listed here are not guaranteed to be up to date.

  • No signal
  • No signal
  • Positive


Intent to Prototype url

Intent to Prototype thread

Last updated on 2022-01-23