diff --git a/source b/source index 25a6b07eaae..e841dd6d762 100644 --- a/source +++ b/source @@ -62234,15 +62234,6 @@ interface HTMLDialogElement : HTMLElement {
  • Add an open attribute to this, whose value is the empty string.

  • -
  • Assert: this's node document's open - dialogs list does not contain - this.

  • - -
  • Add this to this's node document's open - dialogs list.

  • - -
  • Set the dialog close watcher with this.

  • -
  • Set this's previously focused element to the focused element.

  • @@ -62388,20 +62379,28 @@ interface HTMLDialogElement : HTMLElement { +

    The dialog HTML element insertion steps, given + insertedNode, are:

    + +
      +
    1. +

      If insertedNode has an open attribute:

      + +
        +
      1. Run the dialog setup steps given insertedNode.

      2. +
      +
    2. +
    +

    The dialog HTML element removing steps, given removedNode and oldParent, are:

    1. -

      If removedNode's close watcher is not - null, then:

      +

      If removedNode has an open attribute:

        -
      1. Destroy removedNode's close watcher.

      2. - -
      3. Set removedNode's close watcher to - null.

      4. +
      5. Run the dialog cleanup steps given removedNode.

    2. @@ -62410,9 +62409,25 @@ interface HTMLDialogElement : HTMLElement { the top layer immediately given removedNode.

    3. Set is modal of removedNode to false.

    4. +
    + +

    The following attribute change + steps, given element, localName, oldValue, + value, and namespace are used for dialog elements:

    -
  • Remove removedNode from - removedNode's node document's open dialogs list.

  • +
      +
    1. If namespace is not null, then return.

    2. + +
    3. If localName is not open, then + return.

    4. + +
    5. If value is null, oldValue is not null, and element is + connected, then run the dialog cleanup steps given + element.

    6. + +
    7. If value is not null, oldValue is null, and element is + connected, then run the dialog setup steps given + element.

    To show a modal dialog given a dialog element subject:

    @@ -62458,13 +62473,6 @@ interface HTMLDialogElement : HTMLElement {
  • Set is modal of subject to true.

  • -
  • Assert: subject's node document's open - dialogs list does not contain - subject.

  • - -
  • Add subject to subject's node document's open - dialogs list.

  • -
  • Let subject's node document be blocked by the modal dialog subject.

    @@ -62481,8 +62489,6 @@ interface HTMLDialogElement : HTMLElement { already contain subject, then add an element to the top layer given subject.

  • -
  • Set the dialog close watcher with subject.

  • -
  • Set subject's previously focused element to the focused element.

  • @@ -62509,6 +62515,9 @@ interface HTMLDialogElement : HTMLElement { element dialog:

      +
    1. If dialog's close watcher is not + null, then return.

    2. +
    3. Set dialog's close watcher to the result of establishing a close watcher given @@ -62626,9 +62635,6 @@ interface HTMLDialogElement : HTMLElement {

    4. Set is modal of subject to false.

    5. -
    6. Remove subject from subject's - node document's open dialogs list.

    7. -
    8. If result is not null, then set the returnValue attribute to result.

    9. @@ -62654,19 +62660,6 @@ interface HTMLDialogElement : HTMLElement {
    10. Queue an element task on the user interaction task source given the subject element to fire an event named close at subject.

    11. - -
    12. -

      If subject's close watcher is not null, - then:

      - -
        -
      1. Destroy subject's close watcher.

      2. - -
      3. Set subject's close watcher to - null.

      4. -
      -
    @@ -62772,6 +62765,43 @@ interface HTMLDialogElement : HTMLElement {
  • Set topDocument's autofocus processed flag to true.

  • +

    The dialog setup steps, given a dialog element subject, are + as follows:

    + +
      +
    1. Assert: subject's node document's open dialogs + list does not contain subject.

    2. + +
    3. Add subject to subject's node document's open + dialogs list.

    4. + +
    5. Set the dialog close watcher with subject.

    6. +
    + +

    The dialog cleanup steps, given a dialog element subject, + are as follows:

    + +
      +
    1. Assert: subject's node document's open dialogs + list contains element.

    2. + +
    3. Remove subject from subject's + node document's open dialogs list.

    4. + +
    5. +

      If subject's close watcher is not null, + then:

      + +
        +
      1. Destroy subject's close watcher.

      2. + +
      3. Set subject's close watcher to + null.

      4. +
      +
    6. +
    +

    Dialog light dismiss

    "Light dismiss" means that clicking outside of a dialog element whose