diff --git a/source b/source index 0ff221da5db..40f8062ec4d 100644 --- a/source +++ b/source @@ -53560,6 +53560,11 @@ interface HTMLButtonElement : HTMLElement { data-x="attr-button-command-close">close Close Closes the targeted dialog element. + + request-close + Request Close + Requests to close the targeted dialog element. show-modal @@ -62226,25 +62231,10 @@ interface HTMLDialogElement : HTMLElement { are:

    -
  1. If this does not have an open - attribute, then return.

  2. - -
  3. Assert: this's close - watcher is not null.

  4. - -
  5. Set dialog's enable close watcher for requestClose() to true.

  6. -
  7. If returnValue is not given, then set it to null.

  8. -
  9. Set this's request close return value to - returnValue.

  10. - -
  11. Request to close dialog's - close watcher with false.

  12. - -
  13. Set dialog's enable close watcher for requestClose() to false.

  14. +
  15. Request to close the dialog this + with returnValue.

@@ -62320,8 +62310,14 @@ interface HTMLDialogElement : HTMLElement {

Each dialog element has a request close return value, which is a string, initially null.

-

Each dialog element has an enable close watcher for requestClose() boolean, initially false.

+

Each dialog element has an enable close watcher for request close + boolean, initially false.

+ +

dialog's enable close watcher for request close is used + to force enable the dialog's close watcher while requesting to close it. A dialog whose computed + closed-by state is the None state + would otherwise have a disabled close watcher.

Each dialog element has an is modal boolean, initially false.

@@ -62468,22 +62464,21 @@ interface HTMLDialogElement : HTMLElement { value.

  • getEnabledState being to return - true if dialog's enable close watcher for requestClose() is true or dialog's - computed closed-by state is not dialog's enable close watcher for request close is true or + dialog's computed closed-by state is not None; otherwise false.

  • -

    The is valid invoker command steps for dialog elements, given - a command attribute command, are:

    +

    The is valid invoker command steps for dialog elements, given a command attribute command, are:

    1. If command is in the Close state or in the Show Modal state, then - return true.

    2. + data-x="attr-button-command-close-state">Close state, Request Close state, or the Show Modal state, then return true.

    3. Return false.

    @@ -62501,13 +62496,33 @@ interface HTMLDialogElement : HTMLElement { state and element has an open attribute:

      -
    1. Let value be invoker's

      Let value be null.

    2. + +
    3. If invoker has a value attribute, + then set value to invoker's value.

    4. Close the dialog element with value.

    +
  • +

    If command is in the Request Close state and + element has an open attribute:

    + +
      +
    1. Let value be null.

    2. + +
    3. If invoker has a value attribute, + then set value to invoker's value.

    4. + +
    5. Request to close the dialog + element with value.

    6. +
    +
  • +
  • If command is the Show Modal state and element does not have an open attribute, then @@ -62610,6 +62625,29 @@ interface HTMLDialogElement : HTMLElement {

  • +

    To request to close dialog element + subject, given null or a string returnValue:

    + +
      +
    1. If this does not have an open + attribute, then return.

    2. + +
    3. Assert: this's close + watcher is not null.

    4. + +
    5. Set dialog's enable close watcher for request close to + true.

    6. + +
    7. Set this's request close return value to + returnValue.

    8. + +
    9. Request to close dialog's + close watcher with false.

    10. + +
    11. Set dialog's enable close watcher for request close to + false.

    12. +
    +

    To queue a dialog toggle event task given a dialog element @@ -143435,6 +143473,7 @@ interface External { "show-popover"; "hide-popover"; "close"; + "request-close"; "show-modal"; a custom command keyword