diff --git a/source b/source index b8a0cef9a14..97d55018446 100644 --- a/source +++ b/source @@ -59996,7 +59996,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, + result, and false.

  • Return.

  • @@ -61720,26 +61721,19 @@ interface HTMLDialogElement : HTMLElement { -
    -

    Removing the open attribute will usually hide the - dialog. However, doing so has a number of strange additional consequences: - -

    +
  • 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, null, and true.

  • +

    The tabindex attribute must not be specified on dialog elements.

    @@ -62021,11 +62015,12 @@ interface HTMLDialogElement : HTMLElement {
    1. If returnValue is not given, then set it to null.

    2. -
    3. Close the dialog this with returnValue.

    4. +
    5. 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:

    1. If subject does not have an open @@ -62046,6 +62041,14 @@ interface HTMLDialogElement : HTMLElement {

    2. Remove subject's open attribute.

    3. +
    4. Run close the dialog given subject, result, and + false.

    5. +
    + +

    To close the dialog given a dialog element subject, a + string or null result, and a boolean asyncFocus:

    + +
    1. If the is modal flag of subject is true, then request an element to be removed from the top layer given subject.

    2. @@ -62066,11 +62069,21 @@ interface HTMLDialogElement : HTMLElement {
    3. Set subject's previously focused element to null.

    4. -
    5. If subject's node document's focused area of the - document's DOM anchor is a shadow-including inclusive - descendant of element, or wasModal is true, then run the - focusing steps for element; the viewport should not be scrolled by - doing this step.

    6. +
    7. +

      If subject's node document's focused area of the + document's DOM anchor is a shadow-including inclusive + descendant of element, or wasModal is true, then:

      + +
        +
      1. If asyncFocus is true, then queue an element task on the + user interaction task source given the subject element to run the + focusing steps for element; the viewport should not be scrolled by + doing this step.

      2. + +
      3. Otherwise, run run the focusing steps for element; the + viewport should not be scrolled by doing this step.

      4. +
      +
    @@ -62108,11 +62121,7 @@ interface HTMLDialogElement : HTMLElement {
  • 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.)

  • + data-x="attr-hidden">hidden attribute.

  • Showing a dialog is different from opening one. Opening a dialog consists of creating and showing that dialog (similar to how window.open() both