Get to know MDN better
This feature is not Baseline because it does not work in some of the most widely-used browsers.
The closedBy property of the HTMLDialogElement interface indicates the types of user actions that can be used to close the associated <dialog> element. It sets or returns the dialog's closedby attribute value.
A string; possible values are:
anyThe dialog can be dismissed with a light dismiss user action, a platform-specific user action, or a developer-specified mechanism.
closerequestThe dialog can be dismissed with a platform-specific user action or a developer-specified mechanism.
noneThe dialog can only be dismissed with a developer-specified mechanism.
If the closedby attribute is absent or invalid, it falls back to the Auto state. In the Auto state:
| HTML # dom-dialog-closedby |
Enable JavaScript to view this browser compatibility table.
This page was last modified on Jan 28, 2026 by MDN contributors.
Your blueprint for a better internet.
Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.
Portions of this content are ©1998–2026 by individual mozilla.org contributors. Content available under a Creative Commons license.