Dialog open property

HTML DOM Dialog open property Dialog object

Open the conversation window:

document.getElementById("myDialog").open = true;

Try it out . . .

Definitions and usages

The open property is used to set or return whether the conversation window is open.

This property reflects the .lt;dialog> open property.

If this property is specified and the conversation window is available, the user can interact with it.

Note: The element is new to HTML5.


Browser support

HTML DOM Dialog open property HTML DOM Dialog open property HTML DOM Dialog open property HTML DOM Dialog open property HTML DOM Dialog open property

Note: Currently only Chrome Canary, Safari 6 supports the open property.

Note: Even if Chrome Canary supports the element, you must open the chrome://flags in the Chrome address bar and turn on the Enable The World Web Platform features tag. After you turn it on, you'll need to restart Chrome.

Grammar

Returns the open property:

dialogObject .open

Set the open property:

dialogObject .open=true|false

The property value

Value Describe
true|false Specify whether the conversation window is open or not
  • true - The conversation window is open
  • false - default. The conversation window is closed.

Technical details

Return value: Boolean value, if the conversation window is open to return TRUE, otherwise return FALSE.


More instances

To see if the conversation window opens:

var x = document.getElementById("myDialog").open;
x The output is:
true

Try it out . . .


Related articles

HTML Reference Manual: HTML slt;dialog> open property


HTML DOM Dialog open property Dialog object