A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://developer.cdn.mozilla.net/en-US/docs/Web/API/HTMLDialogElement/closedBy below:

HTMLDialogElement: closedBy property - Web APIs

HTMLDialogElement: closedBy property

Limited availability

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.

Value

A string; possible values are:

any

The dialog can be dismissed with a light dismiss user action, a platform-specific user action, or a developer-specified mechanism.

closerequest

The dialog can be dismissed with a platform-specific user action or a developer-specified mechanism.

none

The dialog can only be dismissed with a developer-specified mechanism.

Examples Basic closedBy usage
<dialog open closedby="any">
  <h2>My dialog</h2>
  <p>
    Closable using the Esc key, or by clicking outside the dialog. "Light
    dismiss" behavior.
  </p>
</dialog>
const dialogElem = document.querySelector("dialog");

// Logs "any" to the console
console.log(dialogElem.closedBy);
Specifications Browser compatibility See also

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4