diff --git a/source b/source index dffcc9efcd2..031351cd938 100644 --- a/source +++ b/source @@ -59316,7 +59316,8 @@ fur
Otherwise, if submitter has a value, then set result to that value.
Close the dialog subject with result.
Close the dialog with attribute changes given subject and + result.
Return.
Removing the open
attribute will usually hide the
- dialog. However, doing so has a number of strange additional consequences:
-
-
The close
event will not be fired.
The following attribute change
+ steps, given element, localName, oldValue,
+ value, and namespace are used for dialog
elements:
The close()
method, and any close requests, will no longer be able to close the dialog.
If namespace is not null, then return.
If the dialog was shown using its showModal()
- method, the Document
will still be blocked.
If localName is not open
, then
+ return.
For these reasons, it is generally better to never remove the open
attribute manually. Instead, use the close()
method to close the dialog, or the hidden
attribute to hide it.
If value is null, then close the dialog given + element and null.
The tabindex
attribute must not be specified on
dialog
elements.
If returnValue is not given, then set it to null.
Close the dialog this with returnValue.
Close the dialog with attribute changes given this and + returnValue.
When a dialog
element subject is to be closed, with null or a string result, run these steps:
To close the dialog with attribute changes given a dialog
element
+ subject and a string or null result:
If subject does not have an open
@@ -61270,6 +61265,13 @@ interface HTMLDialogElement : HTMLElement {
Remove subject's open
attribute.
Run close the dialog given subject and result.
To close the dialog given a dialog
element subject and a
+ string or null result:
If the is modal flag of subject is true, then request an element to be removed from the top layer given subject.
Hiding a dialog is different from closing one. Closing a dialog gives it a return value,
fires an event, unblocks the page for other dialogs, and so on. Whereas hiding a dialog is a
purely visual property, and is something you can already do with the hidden
attribute or by removing the open
attribute. (See also the note above about removing the open
attribute, and how hiding the dialog in that way is
- generally not desired.)
Showing a dialog is different from opening one. Opening a dialog consists of creating
and showing that dialog (similar to how window.open()
both