Dialog open attribute
Definition and usage
open
whether the dialog should be open, or not.
This attribute reflects open attribute of <dialog>.
When set, it specifies that the dialog element is in an active state and the user can interact with it.
See also:
Manuel de référence HTML :Balise <dialog> HTML
Example
Example 1
Open the dialog window:
document.getElementById("myDialog").open = true;
Example 2
Check if the dialog window is open:
var x = document.getElementById("myDialog").open;
Syntax
Return the open attribute:
dialogObject.open
Set the open attribute:
dialogObject.open = true|false
attribute value
value | description |
---|---|
true|false |
Détermine si la fenêtre de dialogue doit être ouverte.
|
Détails techniques
Valeur de retour : | Valeur booléenne, renvoie true si la fenêtre de dialogue est ouverte, sinon renvoie false. |
---|
Support du navigateur
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Support | Non supporté | Non supporté | Support | Support |
Pages associées
Manuel de référence HTML :Attribut open du balise <dialog> HTML