From e1f311166f7a892d752f5f1c0231994206aaeed6 Mon Sep 17 00:00:00 2001 From: Keith Cirkel Date: Thu, 5 Oct 2023 09:17:32 +0100 Subject: [PATCH 01/73] Add commandfor & command attributes to HTMLButtonElement This adds the commandfor & command attributes and a "command" event using the CommandEvent interface. Button activation checks if the button has a "commandfor" target and if so performs invoker command behaviour depending on command and the target element. This introduces 1 new IDLs: - CommandEvent: A new event that has `action` and `source`. And extends the HTMLButtonElement IDL to introduce `command` and `commandfor` Things NOT covered in this commit that are included in the proposal (https://github.com/whatwg/html/issues/9625): - Default per element behaviours for anything beyond popover & dialog, this will be dealt with in subsequent individual commits. - `interestaction` and `interesttarget`. --- source | 503 +++++++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 452 insertions(+), 51 deletions(-) diff --git a/source b/source index f17c3694ad9..9622bca1fd5 100644 --- a/source +++ b/source @@ -13324,6 +13324,7 @@ https://software.hixie.ch/utilities/js/live-dom-viewer/?%3C%21DOCTYPE%20HTML%3E%
  • onchange
  • onclick
  • onclose
  • +
  • oncommand
  • oncontextlost
  • oncontextmenu
  • oncontextrestored
  • @@ -53389,6 +53390,8 @@ You cannot submit this form when the field is incorrect. specified.
    Content attributes:
    Global attributes
    +
    command
    +
    commandfor
    disabled
    form
    formaction
    @@ -53411,6 +53414,8 @@ You cannot submit this form when the field is incorrect. interface HTMLButtonElement : HTMLElement { [HTMLConstructor] constructor(); + [CEReactions] attribute DOMString? command; + [CEReactions] attribute Element? commandForElement; [CEReactions] attribute boolean disabled; readonly attribute HTMLFormElement? form; [CEReactions] attribute USVString formAction; @@ -53475,13 +53480,63 @@ interface HTMLButtonElement : HTMLElement { data-x="attr-button-type-submit-state">Submit Button state, the element is specifically a submit button.

    -
    -

    Constraint validation: If the type attribute is in the Reset Button state or the Button state, the element is barred from constraint validation.

    +

    If specified, the commandfor attribute value must be the ID of an element in the same tree as the button with the commandfor attribute.

    + +

    The command + attribute is an enumerated attribute with the following keywords and states:

    + + + + + + + + + + +
    Keyword + State + Brief description +
    toggle-popover + Toggle popover + Shows or hides the targeted popover element. +
    show-popover + Show popover + Shows the targeted popover element. +
    hide-popover + Hide popover + Hides the targeted popover element. +
    close + Close + Closes the targeted dialog element. +
    show-modal + Show modal + Opens the targeted dialog element as modal. +
    + +

    The attribute's missing value default and invalid value default are both the unknown state.

    + +

    A valid custom command is a string whose first two code points are the U+002D + HYPHEN-MINUS character.

    + +
    +

    A button element element's activation behavior given event is:

    @@ -53492,6 +53547,11 @@ interface HTMLButtonElement : HTMLElement {
  • If element's node document is not fully active, then return.

  • +
  • If element has a form owner and element's commandfor or command attributes are present, + and the element's type attribute is not in + the button state, then return.

  • +
  • If element has a form owner then switch on element's type attribute's state, then:

    @@ -53514,20 +53574,160 @@ interface HTMLButtonElement : HTMLElement {
  • Run the popover target attribute activation behavior given element and event's target.

  • + +
  • Let invokee be the result of running element's get the commandfor associated + element.

  • + +
  • +

    If invokee is not null, then:

    + +
      +
    1. If element has a form owner and element's type attribute is not in the button state, then return.

    2. + +
    3. Let command be element's command attribute.

    4. + +
    5. Let isCustom be true if the command attribute is in the + unknown state, and command's + value is a valid custom command, and false otherwise.

    6. + +
    7. If the command attribute is in the unknown state and isCustom is false, + then return.

    8. + +
    9. Let isPopover be true if invokee's popover attribute is not in the no popover state, and false otherwise.

    10. + +
    11. +

      If isPopover is false and isCustom is false, then:

      + +
        +
      1. Assert: invokee's + namespace is the HTML namespace.

      2. + +
      3. If this standard does not define is valid invoker command steps for + invokee's local name, then + return.

        + +
      4. Otherwise, if the result of running invokee's corresponding is valid + invoker command steps given command is not true, then return.

      5. +
      +
    12. + +
    13. Let continue be the result of firing an + event named command at invokee, using + CommandEvent, with its command + attribute initialized to command's value, its source attribute initialized to element, + and its cancelable and composed attributes initialized to true.

    14. + +
    15. If continue is false, then return.

    16. + +
    17. If isCustom is true, then return.

    18. + +
    19. Let shouldShowPopover be false.

    20. + +
    21. Let shouldHidePopover be false.

    22. + +
    23. +

      If command is in the hidepopover state, then:

      + +
        +
      1. If invokee's popover visibility state is showing, then set shouldHidePopover to + true.

      2. + +
      3. Otherwise return.

      4. +
      +
    24. + +
    25. +

      If command is in the showpopover state, then:

      + +
        +
      1. If invokee's popover visibility state is hidden, then set shouldShowPopover to + true.

      2. + +
      3. Otherwise return.

      4. +
      +
    26. + +
    27. +

      If shouldShowPopover is true and the result of running + check popover validity given invokee, false, false, and null is true, + then:

      + +
        +
      1. Assert: shouldHidePopover is false.

      2. + +
      3. Assert: isPopover is true.

      4. + +
      5. Run the show popover given invokee, false, and + element.

      6. +
      +
    28. + +
    29. +

      Otherwise, if shouldHidePopover is true and the result of running + check popover validity given invokee, true, false, and null is true, + then:

      + +
        +
      1. Assert: shouldShowPopover is false.

      2. + +
      3. Assert: isPopover is true.

      4. + +
      5. Run the hide popover algorithm given invokee, true, true, and + false.

      6. +
      +
    30. + +
    31. +

      Otherwise, if this standard defines invoker command steps for + invokee's local name, then:

      + +
        +
      1. Assert: shouldShowPopover is false and + shouldHidePopover is false.

      2. + +
      3. Run the corresponding invoker command steps given invokee, + element and command.

      4. +
      +
    32. +
    +
  • + +
  • Otherwise, run the popover target attribute activation behavior given + element.

  • + +>>>>>>> ece6a7a9 (Add commandfor & command attributes to HTMLButtonElement) +

    An HTML element can have specific + is valid invoker command steps and invoker command steps defined for the + element's local name.

    +

    The form attribute is used to explicitly associate the button element with its form owner. The name attribute represents the element's name. The disabled attribute is used to make the control non-interactive and - to prevent its value from being submitted. The formaction, - formenctype, disabled attribute is used to make the control non-interactive + and to prevent its value from being submitted. The formaction, formenctype, formmethod, formnovalidate, and formtarget attributes are attributes for form - submission.

    + data-x="attr-fs-formtarget">formtarget attributes are + attributes for form submission.

    The formnovalidate attribute can be used to make submit buttons that do not trigger the constraint validation.

    @@ -53549,10 +53749,16 @@ interface HTMLButtonElement : HTMLElement {

    A button (and its value) is only included in the form submission if the button itself was used to initiate the form submission.

    -
    -
    +

    The commandForElement IDL attribute must + reflect the content attribute of the same name.

    + +

    The command IDL attribute must reflect the + content attribute of the same name.

    +

    The value IDL attribute must reflect the content attribute of the same name.

    @@ -53584,8 +53790,52 @@ interface HTMLButtonElement : HTMLElement {
    +
    +

    The following buttons use commandfor to open and close a popover box when activated:

    +
    <button type=button
    +        commandfor="the-popover"
    +        command="toggle-popover">
    + Show menu
    +</button>
    +<div popover
    +     id="the-popover">
    + <button commandfor="the-popover"
    +         command="hide-popover">
    +  Hide menu
    + </button>
    +</div>
    +    
    +
    +
    +

    The following buttons use commandfor with a custom command on an element, demonstrating how + one could utilise custom commands for unspecified behavior:

    + +
    <button type=button
    +        commandfor="the-image"
    +        command="--rotate-left">
    + Rotate Left
    +</button>
    +<button type=button
    +        commandfor="the-image"
    +        command="--rotate-right">
    + Rotate Right
    +</button>
    +<img id="the-image"
    +     src="photo.jpg">
    +<script>
    +  const image = document.getElementById("the-image");
    +  image.addEventListener("command", (event) => {
    +   if ( event.command == "--rotate-left" ) {
    +    event.target.style.rotate = "-90deg"
    +   } else if ( event.command == "--rotate-right" ) {
    +    event.target.style.rotate = "90deg"
    +   }
    +  });
    +</script>
    +    
    +

    The select element

    @@ -61861,49 +62111,56 @@ interface HTMLDialogElement : HTMLElement { data-x="dom-dialog-showModal">showModal() method steps are:

      -
    1. If this has an open attribute and the - is modal flag of this is true, then return.

    2. +
    3. Show this as modal.

    4. +
    -
  • If this has an open attribute, then - throw an "InvalidStateError" DOMException.

  • +

    When a dialog element subject is to be shown as modal, run these steps:

    -
  • If this's node document is not fully active, then +

      +
    1. If subject has an open attribute and + the is modal flag of subject is true, then return.

    2. + +
    3. If subject has an open attribute, then throw an "InvalidStateError" DOMException.

    4. -
    5. If this is not connected, then throw an +

    6. If subject's node document is not fully active, + then throw an "InvalidStateError" DOMException.

    7. + +
    8. If subject is not connected, then throw an "InvalidStateError" DOMException.

    9. -
    10. If this is in the popover showing - state, then throw an "InvalidStateError" - DOMException.

    11. +
    12. If subject is in the popover showing state, then throw an + "InvalidStateError" DOMException.

    13. If the result of firing an event named beforetoggle, using ToggleEvent, with the cancelable attribute initialized to true, the oldState attribute initialized to "closed", and the newState - attribute initialized to "open" at this is false, then + attribute initialized to "open" at subject is false, then return.

    14. -
    15. If this has an open attribute, +

    16. If subject has an open attribute, then return.

    17. -
    18. If this is not connected, then return.

    19. +
    20. If subject is not connected, then return.

    21. -
    22. If this is in the popover showing - state, then return.

    23. +
    24. If subject is in the popover showing state, then return.

    25. Queue a dialog toggle event task given subject, "closed", and "open".

    26. -
    27. Add an open attribute to this, whose +

    28. Add an open attribute to subject, whose value is the empty string.

    29. -
    30. Set the is modal flag of this to true.

    31. +
    32. Set the is modal flag of subject to true.

    33. -

      Let this's node document be blocked by the modal dialog this.

      +

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

      This will cause the focused area of the document to become inert (unless that currently focused area is a @@ -61913,41 +62170,41 @@ interface HTMLDialogElement : HTMLElement { focus.

    34. -
    35. If this's node document's top layer does not - already contain this, then add an element - to the top layer given this.

    36. +
    37. If subject's node document's top layer does not + already contain subject, then add an element + to the top layer given subject.

    38. -

      Set this's close watcher to the +

      Set subject's close watcher to the result of establishing a close watcher given - this's relevant global object, with:

      + subject's relevant global object, with:

      • cancelAction given canPreventClose being to return the result of firing an event named cancel at this, with the cancel at subject, with the cancelable attribute initialized to canPreventClose.

      • closeAction being to close the - dialog given this and null.

      • + dialog given subject and null.

    39. -
    40. Set this's previously focused element to the +

    41. Set subject's previously focused element to the focused element.

    42. Let hideUntil be the result of running topmost popover ancestor - given this, null, and false.

    43. + given subject, null, and false.

      -
    44. If hideUntil is null, then set hideUntil to this's +

    45. If hideUntil is null, then set hideUntil to subject's node document.

    46. Run hide all popovers until given hideUntil, false, and true.

    47. -
    48. Run the dialog focusing steps given this.

    49. +
    50. Run the dialog focusing steps given subject.

    The dialog focusing steps, given a dialog element subject, @@ -61989,6 +62246,78 @@ interface HTMLDialogElement : HTMLElement {

  • Set topDocument's autofocus processed flag to true.

  • +

    The is valid invoker command steps, given a dialog element + subject and command, are:

    + +
      +
    1. If command is in the close state, then return true.

    2. + +
    3. If command is in the show modal state, then return true.

      +
    4. + +
    5. Return false.

    6. +
    + +

    The invoker command steps, given a dialog element + invokee, invoker, and command, are:

    + +
      +
    1. If invokee is in the popover showing state, then return.

    2. + +
    3. +

      If command is in the close state, then:

      + +
        +
      1. If invokee has an open attribute, then:

        + +
          +
        1. Let value be invoker's value

        2. + +
        3. Close the dialog invokee with value.

        4. +
        +
      +
    4. + +
    5. +

      If command is in the show modal state, then:

      + +
        +
      1. If invokee does not have an open + attribute, then show modal dialog invokee.

      2. +
      +
    6. +
    + +
    +

    The following buttons use commandfor to open and close a "confirm" dialog as modal when + activated:

    + +
    <button type=button
    +        commandfor="the-dialog"
    +        command="show-modal">
    + Delete
    +</button>
    +<dialog id="the-dialog">
    + <form action="/delete" method="POST">
    +  <button type="submit">
    +   Delete
    +  </button>
    +  <button commandfor="the-dialog"
    +          command="close">
    +   Cancel
    +  </button>
    + </form>
    +</dialog>
    +    
    +
    +

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

    @@ -62007,8 +62336,9 @@ interface HTMLDialogElement : HTMLElement {
  • If removedNode's node document's top layer contains removedNode, then remove an element from - the top layer immediately given removedNode.

  • + data-x="list contains">contains removedNode, then + remove an element from the top layer immediately given removedNode.

    +
  • Set the is modal flag of removedNode to false.

  • @@ -62022,8 +62352,9 @@ interface HTMLDialogElement : HTMLElement {
  • Close the dialog this with returnValue.

  • -

    When a dialog element subject is to be closed, with null or a string result, run these steps:

    +

    When a dialog element subject is to be closed, with null or a string result, run these + steps:

    1. If subject does not have an open @@ -62044,11 +62375,12 @@ interface HTMLDialogElement : HTMLElement {

    2. Remove subject's open attribute.

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

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

      +
    7. -
    8. Let wasModal be the value of subject's is - modal flag.

    9. +
    10. Let wasModal be the value of subject's + is modal flag.

    11. Set the is modal flag of subject to false.

    12. @@ -62072,13 +62404,13 @@ interface HTMLDialogElement : HTMLElement {
    -
  • Queue an element task on the user interaction task source given the - subject element to fire an event named +

  • Queue an element task on the user interaction task source given + the subject element to fire an event named close at subject.

  • -

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

    +

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

    1. Destroy subject's ToggleEventInit : EventInit { the oldState attribute. +

      The CommandEvent interface

      + +
      [Exposed=Window]
      +interface CommandEvent : Event {
      +  constructor(DOMString type, optional CommandEventInit eventInitDict = {});
      +  readonly attribute Element? source;
      +  readonly attribute DOMString action;
      +};
      +
      +dictionary CommandEventInit : EventInit {
      +  Element? source = null;
      +  DOMString action = "auto";
      +};
      + +
      +
      event.command
      + +
      +

      Returns what action the element can take.

      +
      + +
      event.source
      + +
      +

      Returns the Element that was interacted with in order to cause this event.

      +
      +
      + +

      The command attribute must return the value it as + initialized to.

      + +

      The source getter steps are to + return the result of retargeting source against this's currentTarget.

      Focus

      @@ -86550,7 +86921,6 @@ dictionary DragEventInit : MouseEventInit {
    -

    Loading web pages

    @@ -113383,6 +113753,7 @@ typedef OnBeforeUnloadEventHandlerNonNull? OnBeforeUnl onchange change onclick click onclose close + oncommand command oncontextlost contextlost oncontextmenu contextmenu oncontextrestored contextrestored @@ -113555,6 +113926,7 @@ typedef OnBeforeUnloadEventHandlerNonNull? OnBeforeUnl attribute EventHandler onchange; attribute EventHandler onclick; attribute EventHandler onclose; + attribute EventHandler oncommand; attribute EventHandler oncontextlost; attribute EventHandler oncontextmenu; attribute EventHandler oncontextrestored; @@ -142509,6 +142881,22 @@ interface External { script Integrity metadata used in Subresource Integrity checks SRI Text + + command + button + Indicates to the targeted element which action to take. + "toggle-popover"; + "show-popover"; + "hide-popover"; + "close"; + "show-modal"; + a valid custom command; + the empty string + + commandfor + button + Targets another element to be invoked. + ID* is HTML elements @@ -143226,6 +143614,12 @@ interface External { close event handler Event handler content attribute + + oncommand + HTML elements + command event handler + Event handler content attribute + oncontextlost HTML elements @@ -144233,6 +144627,13 @@ INSERT INTERFACES HERE CloseWatcher, dialog elements, MessagePort Fired at CloseWatcher objects or dialog elements when they are closed via a close request or via web developer code, or at MessagePort objects when disentangled + + command + CommandEvent + Elements + Fired at elements when they handle a user invocation, via a commandfor attribute. + connect MessageEvent From 672183fba35f57a374a1e5e3984c51487848c8d9 Mon Sep 17 00:00:00 2001 From: Keith Cirkel Date: Fri, 8 Nov 2024 11:06:35 +0000 Subject: [PATCH 02/73] fix indentation --- source | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source b/source index 9622bca1fd5..7da9098fcd3 100644 --- a/source +++ b/source @@ -53548,9 +53548,9 @@ interface HTMLButtonElement : HTMLElement { return.

  • If element has a form owner and element's commandfor or command attributes are present, - and the element's type attribute is not in - the button state, then return.

  • + data-x="">commandfor or command attributes are present, + and the element's type attribute is not in + the button state, then return.

  • If element has a form owner then switch on element's Date: Fri, 8 Nov 2024 11:07:09 +0000 Subject: [PATCH 03/73] s/and false otherwise/; otherwise false --- source | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source b/source index 7da9098fcd3..6381569a166 100644 --- a/source +++ b/source @@ -53592,7 +53592,7 @@ interface HTMLButtonElement : HTMLElement {

  • Let isCustom be true if the command attribute is in the unknown state, and command's - value is a valid custom command, and false otherwise.

  • + value is a valid custom command; otherwise false.

  • If the command attribute is in the unknown state and isCustom is false, @@ -53600,7 +53600,7 @@ interface HTMLButtonElement : HTMLElement {

  • Let isPopover be true if invokee's popover attribute is not in the no popover state, and false otherwise.

  • + data-x="attr-popover-none-state">no popover state; otherwise false.

  • If isPopover is false and isCustom is false, then:

    From a76843c7b78f3f03813299a29a6af9d15f7f245d Mon Sep 17 00:00:00 2001 From: Keith Cirkel Date: Fri, 8 Nov 2024 11:09:13 +0000 Subject: [PATCH 04/73] remove undeeded comma --- source | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source b/source index 6381569a166..204bb01cab0 100644 --- a/source +++ b/source @@ -53591,8 +53591,8 @@ interface HTMLButtonElement : HTMLElement { data-x="attr-button-command">command
    attribute.
  • Let isCustom be true if the command attribute is in the - unknown state, and command's - value is a valid custom command; otherwise false.

  • + unknown state and command's value + is a valid custom command; otherwise false.

  • If the command attribute is in the unknown state and isCustom is false, From f65b298bca4035296e8d02367fa2deff96e936dc Mon Sep 17 00:00:00 2001 From: Keith Cirkel Date: Fri, 8 Nov 2024 11:10:36 +0000 Subject: [PATCH 05/73] move state outside span --- source | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/source b/source index 204bb01cab0..261a5422bef 100644 --- a/source +++ b/source @@ -53595,12 +53595,12 @@ interface HTMLButtonElement : HTMLElement { is a valid custom command; otherwise false.

  • If the command attribute is in the unknown state and isCustom is false, + data-x="attr-button-command-unknown">unknown state and isCustom is false, then return.

  • Let isPopover be true if invokee's popover attribute is not in the no popover state; otherwise false.

  • + data-x="attr-popover-none-state">no popover state; otherwise false.

  • If isPopover is false and isCustom is false, then:

    @@ -53636,10 +53636,10 @@ interface HTMLButtonElement : HTMLElement {
  • If command is in the hidepopover state, then:

    + data-x="attr-button-command-hide-popover-state">hidepopover state, then:

      -
    1. If invokee's popover visibility state is

      If invokee's popover visibility state is showing, then set shouldHidePopover to true.

    2. @@ -53649,10 +53649,10 @@ interface HTMLButtonElement : HTMLElement {
    3. If command is in the showpopover state, then:

      + data-x="attr-button-command-show-popover-state">showpopover state, then:

        -
      1. If invokee's popover visibility state is

        If invokee's popover visibility state is hidden, then set shouldShowPopover to true.

      2. @@ -62251,10 +62251,10 @@ interface HTMLDialogElement : HTMLElement {
        1. If command is in the close state, then return true.

        2. + data-x="attr-button-command-close-state">close state, then return true.

        3. If command is in the show modal state, then return true.

          + data-x="attr-button-command-show-modal-state">show modal state, then return true.

        4. Return false.

        5. @@ -62265,11 +62265,11 @@ interface HTMLDialogElement : HTMLElement {
          1. If invokee is in the popover showing state, then return.

          2. + data-x="popover-showing-state">popover showing state, then return.

          3. If command is in the close state, then:

            + data-x="attr-button-command-close-state">close state, then:

            1. If invokee has an HTMLDialogElement : HTMLElement {

            2. If command is in the show modal state, then:

              + data-x="attr-button-command-show-modal-state">show modal state, then:

              1. If invokee does not have an open From 4e07504107fed8a204845d124f774910006a144a Mon Sep 17 00:00:00 2001 From: Keith Cirkel Date: Fri, 8 Nov 2024 11:18:51 +0000 Subject: [PATCH 06/73] fix casing in state names --- source | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/source b/source index 261a5422bef..03a703d28ec 100644 --- a/source +++ b/source @@ -53504,17 +53504,17 @@ interface HTMLButtonElement : HTMLElement { toggle-popover - Toggle popover + Toggle Popover Shows or hides the targeted popover element. show-popover - Show popover + Show Popover Shows the targeted popover element. hide-popover - Hide popover + Hide Popover Hides the targeted popover element. HTMLButtonElement : HTMLElement { show-modal - Show modal + Show Modal Opens the targeted dialog element as modal. @@ -62269,11 +62269,11 @@ interface HTMLDialogElement : HTMLElement {

              2. If command is in the close state, then:

                + data-x="attr-button-command-close-state">close state:

                1. If invokee has an open attribute, then:

                  + data-x="attr-dialog-open">open
                  attribute:

                  1. Let value be invoker's HTMLDialogElement : HTMLElement {

                  2. If command is in the show modal state, then:

                    + data-x="attr-button-command-show-modal-state">show modal state:

                    1. If invokee does not have an open From a128e7aeb7ab8500bb6d5f3b22f482364797f4ed Mon Sep 17 00:00:00 2001 From: Keith Cirkel Date: Fri, 8 Nov 2024 11:21:25 +0000 Subject: [PATCH 07/73] drop definitions for attributes mapping to idl definitions This was incorrect --- source | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/source b/source index 03a703d28ec..c2c5c401393 100644 --- a/source +++ b/source @@ -53751,13 +53751,11 @@ interface HTMLButtonElement : HTMLElement {

                      -

                      The commandForElement IDL attribute must +

                      The commandForElement IDL attribute must reflect the content attribute of the same name.

                      -

                      The command IDL attribute must reflect the - content attribute of the same name.

                      +

                      The command IDL attribute must reflect + the content attribute of the same name.

                      The value IDL attribute must reflect the content attribute of the same name.

                      From 719899d702f33750d83a88b3b0e88226418fb516 Mon Sep 17 00:00:00 2001 From: Keith Cirkel Date: Fri, 8 Nov 2024 11:22:38 +0000 Subject: [PATCH 08/73] use correct terms for popover show/hide (not open/close) --- source | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source b/source index c2c5c401393..38f503de851 100644 --- a/source +++ b/source @@ -53789,7 +53789,7 @@ interface HTMLButtonElement : HTMLElement {
                      -

                      The following buttons use commandfor to open and close a popover box when activated:

                      +

                      The following buttons use commandfor to show and hide a popover box when activated:

                      <button type=button
                               commandfor="the-popover"
                      
                      From 8afb669bfa2690bce3a690879c77c753dd805763 Mon Sep 17 00:00:00 2001
                      From: Keith Cirkel 
                      Date: Fri, 8 Nov 2024 11:26:04 +0000
                      Subject: [PATCH 09/73] more s/, then://
                      
                      ---
                       source | 8 ++++----
                       1 file changed, 4 insertions(+), 4 deletions(-)
                      
                      diff --git a/source b/source
                      index 38f503de851..1a1399f2ae5 100644
                      --- a/source
                      +++ b/source
                      @@ -53603,7 +53603,7 @@ interface HTMLButtonElement : HTMLElement {
                            data-x="attr-popover-none-state">no popover state; otherwise false.

                    2. -

                      If isPopover is false and isCustom is false, then:

                      +

                      If isPopover is false and isCustom is false:

                      1. Assert: invokee's @@ -53636,7 +53636,7 @@ interface HTMLButtonElement : HTMLElement {

                      2. If command is in the hidepopover state, then:

                        + data-x="attr-button-command-hide-popover-state">hidepopover state:

                        1. If invokee's popover visibility state is HTMLButtonElement : HTMLElement {

                        2. If command is in the showpopover state, then:

                          + data-x="attr-button-command-show-popover-state">showpopover state:

                          1. If invokee's popover visibility state is HTMLButtonElement : HTMLElement {

                          2. Otherwise, if this standard defines invoker command steps for - invokee's local name, then:

                            + invokee's local name:

                            1. Assert: shouldShowPopover is false and From c43b2fc76af339615ceb2a653df42735b955a356 Mon Sep 17 00:00:00 2001 From: Keith Cirkel Date: Fri, 8 Nov 2024 11:27:13 +0000 Subject: [PATCH 10/73] fix indentation --- source | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source b/source index 1a1399f2ae5..a7ff3b4bf09 100644 --- a/source +++ b/source @@ -79896,7 +79896,7 @@ dictionary CommandEventInit : EventInit {

                              The source getter steps are to - return the result of retargeting retargeting source against this's currentTarget.

                              From eec15ad70200beaad14a92bba256073bf3499081 Mon Sep 17 00:00:00 2001 From: Keith Cirkel Date: Fri, 8 Nov 2024 11:28:13 +0000 Subject: [PATCH 11/73] reintroduce accidentally removed line break --- source | 1 + 1 file changed, 1 insertion(+) diff --git a/source b/source index a7ff3b4bf09..6e7ee8cabd3 100644 --- a/source +++ b/source @@ -86919,6 +86919,7 @@ dictionary DragEventInit : MouseEventInit {
                            +

                            Loading web pages

                            From 219638478d35fb8facd15af66cb1720ab7c4d911 Mon Sep 17 00:00:00 2001 From: Keith Cirkel Date: Fri, 8 Nov 2024 11:40:38 +0000 Subject: [PATCH 12/73] fixup broken definition for popover visibility state --- source | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source b/source index 6e7ee8cabd3..f0f8b9e8120 100644 --- a/source +++ b/source @@ -53639,7 +53639,7 @@ interface HTMLButtonElement : HTMLElement { data-x="attr-button-command-hide-popover-state">hidepopover state:

                              -
                            1. If invokee's popover visibility state is

                              If invokee's popover visibility state is showing, then set shouldHidePopover to true.

                            2. @@ -53652,7 +53652,7 @@ interface HTMLButtonElement : HTMLElement { data-x="attr-button-command-show-popover-state">showpopover state:

                                -
                              1. If invokee's popover visibility state is

                                If invokee's popover visibility state is hidden, then set shouldShowPopover to true.

                              2. From 9c93cb253bcd18d88021d83e1e12380add2f46ad Mon Sep 17 00:00:00 2001 From: Keith Cirkel Date: Fri, 8 Nov 2024 11:41:09 +0000 Subject: [PATCH 13/73] make commandForElement properly reflect the commandfor attribute --- source | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source b/source index f0f8b9e8120..5b536590b00 100644 --- a/source +++ b/source @@ -53752,7 +53752,8 @@ interface HTMLButtonElement : HTMLElement {

                                The commandForElement IDL attribute must - reflect the content attribute of the same name.

                                + reflect the element's commandfor + content attribute.

                                The command IDL attribute must reflect the content attribute of the same name.

                                From 934d9501dd3970da87f9ee46feeab21ed508eb22 Mon Sep 17 00:00:00 2001 From: Keith Cirkel Date: Fri, 8 Nov 2024 11:41:27 +0000 Subject: [PATCH 14/73] reintroduce the command attribute definition --- source | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source b/source index 5b536590b00..994c4e3d02f 100644 --- a/source +++ b/source @@ -53755,8 +53755,9 @@ interface HTMLButtonElement : HTMLElement { reflect the element's commandfor content attribute.

                                -

                                The command IDL attribute must reflect - the content attribute of the same name.

                                +

                                The command IDL attribute must reflect the content + attribute of the same name.

                                The value IDL attribute must reflect the content attribute of the same name.

                                From bff3f1066663c1bd503d07ba7102553923bfbc76 Mon Sep 17 00:00:00 2001 From: Keith Cirkel Date: Fri, 8 Nov 2024 11:55:18 +0000 Subject: [PATCH 15/73] type and simplify the various invoker command steps --- source | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/source b/source index 994c4e3d02f..8c956c19c82 100644 --- a/source +++ b/source @@ -62247,29 +62247,26 @@ interface HTMLDialogElement : HTMLElement {

                              The is valid invoker command steps, given a dialog element - subject and command, are:

                              + subject and state command, are:

                                -
                              1. If command is in the close state, then return true.

                              2. - -
                              3. If command is in the show modal state, then return true.

                                -
                              4. +
                              5. If command is the close + state or the show modal state, then + return true.

                              6. Return false.

                              The invoker command steps, given a dialog element - invokee, invoker, and command, are:

                              + invokee, an element invoker and a state command, are:

                                -
                              1. If invokee is in the popover showing state, then return.

                              2. +
                              3. If invokee is the popover showing + state, then return.

                              4. -

                                If command is in the close state:

                                +

                                If command is the close + state:

                                1. If invokee has an HTMLDialogElement : HTMLElement {

                                2. -

                                  If command is in the If command is the show modal state:

                                    From 150eec82a4baa05817b579df9b3dd8225805d65a Mon Sep 17 00:00:00 2001 From: Keith Cirkel Date: Fri, 8 Nov 2024 12:02:15 +0000 Subject: [PATCH 16/73] reintroduce the commandfor attribute definition --- source | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source b/source index 8c956c19c82..bc7aa7ab976 100644 --- a/source +++ b/source @@ -53751,7 +53751,8 @@ interface HTMLButtonElement : HTMLElement {
                                    -

                                    The commandForElement IDL attribute must +

                                    The commandForElement IDL attribute must reflect the element's commandfor content attribute.

                                    From e5a111cc1ef34fdb400ffede283db672d97810d7 Mon Sep 17 00:00:00 2001 From: Keith Cirkel Date: Sat, 9 Nov 2024 17:47:11 +0000 Subject: [PATCH 17/73] drop attribute reflection and use bespoke algorithms for command mapping --- source | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/source b/source index bc7aa7ab976..4c8bb77a6da 100644 --- a/source +++ b/source @@ -53530,7 +53530,7 @@ interface HTMLButtonElement : HTMLElement {

                                    The attribute's missing value default and invalid value default are both the unknown state.

                                    + data-x="attr-button-command-unknown-state">unknown state.

                                    A valid custom command is a string whose first two code points are the U+002D HYPHEN-MINUS character.

                                    @@ -53591,12 +53591,12 @@ interface HTMLButtonElement : HTMLElement { data-x="attr-button-command">command
                                    attribute.
                                  1. Let isCustom be true if the command attribute is in the - unknown state and command's value - is a valid custom command; otherwise false.

                                  2. + unknown state and command's + value is a valid custom command; otherwise false.

                                  3. If the command attribute is in the unknown state and isCustom is false, - then return.

                                  4. + data-x="attr-button-command-unknown-state">unknown state and isCustom is + false, then return.

                                  5. Let isPopover be true if invokee's popover attribute is not in the HTMLButtonElement : HTMLElement { content attribute.

                                    The command IDL attribute must reflect the content - attribute of the same name.

                                    + data-x="dom-button-command">command IDL attribute, on getting, must return + the string "toggle-popover" if the content attribute is set to the Toggle Popover state, "show-popover" if the content attribute is set to the Show Popover state, "hide-popover" if the content attribute is set to the Hide Popover state, "close" if the content attribute is set to the close state, "show-modal" if the content attribute is set to the show-modal state, the + command attribute if the content attribute is set to + the unknown state and the attribute is a + valid custom command; and null otherwise. On setting, must set the command content attribute to the given new value.

                                    The value IDL attribute must reflect the content attribute of the same name.

                                    From f0f3902932805b6cced12d232128d7bfad3e6fab Mon Sep 17 00:00:00 2001 From: Keith Cirkel Date: Sat, 9 Nov 2024 18:13:07 +0000 Subject: [PATCH 18/73] attempt to re-define submit button behavior with command/commandfor --- source | 51 +++++++++++++++++++++++---------------------------- 1 file changed, 23 insertions(+), 28 deletions(-) diff --git a/source b/source index 4c8bb77a6da..d213021dcc1 100644 --- a/source +++ b/source @@ -53459,16 +53459,16 @@ interface HTMLButtonElement : HTMLElement { submit - Submit Button + Submit Button Submits the form. reset - Reset Button + Reset Button Resets the form. button - Button + Button Does nothing. @@ -53477,8 +53477,16 @@ interface HTMLButtonElement : HTMLElement { data-x="attr-button-type-submit-state">Submit Button state.

                                    If the type attribute is in the Submit Button state, the element is specifically a - submit button.

                                    + data-x="attr-button-type-submit-state">Submit Button state, and the + type, command, + and commandfor content attributes are not present, + then the element is specifically a submit button.

                                    + +

                                    If the type attribute is in the Submit Button state, and the + command, or commandfor content attributes are present, then the + element is specifically not a submit button.

                                    Constraint validation: If the type attribute is in the Reset Button state or the @@ -53547,30 +53555,17 @@ interface HTMLButtonElement : HTMLElement {

                                  6. If element's node document is not fully active, then return.

                                  7. -
                                  8. If element has a form owner and element's commandfor or command attributes are present, - and the element's type attribute is not in - the button state, then return.

                                  9. - -
                                  10. -

                                    If element has a form owner then switch on element's type attribute's state, then:

                                    - -
                                    -
                                    Submit Button
                                    -

                                    Submit element's form - owner from element with userInvolvement set to event's user navigation involvement.

                                    +
                                  11. If element has a form owner and is a submit button, then Submit element's form owner from + element with userInvolvement set to + event's user navigation involvement and return.

                                    -
                                    Reset Button
                                    -

                                    Reset element's form - owner.

                                    - -
                                    Button -

                                    Do nothing.

                                    -
                                  12. -
                                  13. +
                                  14. If element has a form owner and element's type attribute is in the Reset Button state, then Reset element's form owner and + return.

                                  15. Run the popover target attribute activation behavior given element and event's target.

                                  16. From 7a1fe7d22f72b32e739c5ed980fba9ee2d91cef8 Mon Sep 17 00:00:00 2001 From: Keith Cirkel Date: Sun, 10 Nov 2024 17:13:40 +0000 Subject: [PATCH 19/73] expand command getter steps into a list, always return string --- source | 50 +++++++++++++++++++++++++++++++++++--------------- 1 file changed, 35 insertions(+), 15 deletions(-) diff --git a/source b/source index d213021dcc1..ec167ec36e1 100644 --- a/source +++ b/source @@ -53752,21 +53752,41 @@ interface HTMLButtonElement : HTMLElement { content attribute.

                                    The command IDL attribute, on getting, must return - the string "toggle-popover" if the content attribute is set to the Toggle Popover state, "show-popover" if the content attribute is set to the Show Popover state, "hide-popover" if the content attribute is set to the Hide Popover state, "close" if the content attribute is set to the close state, "show-modal" if the content attribute is set to the show-modal state, the - command attribute if the content attribute is set to - the unknown state and the attribute is a - valid custom command; and null otherwise. On setting, must set the command content attribute to the given new value.

                                    + data-x="dom-button-command">command
                                    getter steps are:

                                    + +
                                      +
                                    1. Let command be this's command attribute.

                                    2. + +
                                    3. If command is in the Toggle Popover state, return the string + "toggle-popover".

                                    4. + +
                                    5. If command is in the Show Popover state, return the string + "show-popover".

                                    6. + +
                                    7. If command is in the Hide Popover state, return the string + "hide-popover".

                                    8. + +
                                    9. If command is in the Close state, return the string "close".

                                    10. + +
                                    11. If command is in the Close state, return the string "show-modal".

                                    12. + +
                                    13. If command is in the unknown state and command's value + is a valid custom command; return command's value.

                                    14. + +
                                    15. Return the empty string.

                                    16. +
                                    + +

                                    The command setter steps are to set the command content attribute to the given value.

                                    The value IDL attribute must reflect the content attribute of the same name.

                                    From 871c076a9576bf2c216d26c7db77a8a11f421d0e Mon Sep 17 00:00:00 2001 From: Keith Cirkel Date: Sun, 10 Nov 2024 17:19:51 +0000 Subject: [PATCH 20/73] expand type getter steps to ensure "submit" is only returned for valid submit buttons --- source | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/source b/source index ec167ec36e1..f54e74ab05d 100644 --- a/source +++ b/source @@ -53791,9 +53791,31 @@ interface HTMLButtonElement : HTMLElement {

                                    The value IDL attribute must reflect the content attribute of the same name.

                                    -

                                    The type IDL - attribute must reflect the content attribute of the same name, limited to only - known values.

                                    +

                                    The type + getter steps are:

                                    + + +

                                    The type + getter steps are:

                                    + +
                                      +
                                    1. Let type be this's type attribute.

                                    2. + +
                                    3. If type is in the Submit state, and this is a submit button, return the string + "submit".

                                    4. + +
                                    5. If type is in the Reset state, return the string + "reset".

                                    6. + +
                                    7. Return the string "button".

                                    8. +
                                    + +

                                    The type setter steps are to set the type content attribute to the given value.

                                    The willValidate, validity, and Date: Sun, 10 Nov 2024 17:24:49 +0000 Subject: [PATCH 21/73] remove duplicate statement --- source | 4 ---- 1 file changed, 4 deletions(-) diff --git a/source b/source index f54e74ab05d..69f63b162c8 100644 --- a/source +++ b/source @@ -53791,10 +53791,6 @@ interface HTMLButtonElement : HTMLElement {

                                    The value IDL attribute must reflect the content attribute of the same name.

                                    -

                                    The type - getter steps are:

                                    - -

                                    The type getter steps are:

                                    From 9f60688bee603763e459f8ba1282b08ec480581b Mon Sep 17 00:00:00 2001 From: Keith Cirkel Date: Mon, 18 Nov 2024 22:30:03 +0000 Subject: [PATCH 22/73] s/DOMString?/DOMString/ --- source | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source b/source index 69f63b162c8..045a52c68c8 100644 --- a/source +++ b/source @@ -53414,7 +53414,7 @@ You cannot submit this form when the field is incorrect. interface HTMLButtonElement : HTMLElement { [HTMLConstructor] constructor(); - [CEReactions] attribute DOMString? command; + [CEReactions] attribute DOMString command; [CEReactions] attribute Element? commandForElement; [CEReactions] attribute boolean disabled; readonly attribute HTMLFormElement? form; From ec6514f6a02f4e77a9126981cf5b37516978236a Mon Sep 17 00:00:00 2001 From: Keith Cirkel Date: Mon, 18 Nov 2024 22:33:07 +0000 Subject: [PATCH 23/73] s/Submit/submit --- source | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source b/source index 045a52c68c8..420d80211f4 100644 --- a/source +++ b/source @@ -53557,7 +53557,7 @@ interface HTMLButtonElement : HTMLElement {
                                  17. If element has a form owner and is a submit button, then Submit element's form owner from + data-x="concept-form-submit">submit element's form owner from element with userInvolvement set to event's user navigation involvement and return.

                                    From a3e56e441fe52e193f5458af71f57793788504d6 Mon Sep 17 00:00:00 2001 From: Keith Cirkel Date: Mon, 18 Nov 2024 22:33:29 +0000 Subject: [PATCH 24/73] use then over commas --- source | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source b/source index 420d80211f4..0fa8fce1d88 100644 --- a/source +++ b/source @@ -53800,11 +53800,11 @@ interface HTMLButtonElement : HTMLElement {
                                  18. If type is in the Submit state, and this is a submit button, return the string + data-x="concept-submit-button">submit button then return the string "submit".

                                  19. If type is in the Reset state, return the string + data-x="attr-button-type-reset-state">Reset state then return the string "reset".

                                  20. Return the string "button".

                                  21. From b13fc3f00e8804a32edc90786aef4c6840104165 Mon Sep 17 00:00:00 2001 From: Keith Cirkel Date: Mon, 18 Nov 2024 22:48:00 +0000 Subject: [PATCH 25/73] simplify button type steps, avoiding redundant state checks --- source | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/source b/source index 0fa8fce1d88..f3b3aac5e44 100644 --- a/source +++ b/source @@ -53795,16 +53795,11 @@ interface HTMLButtonElement : HTMLElement { getter steps are:

                                      -
                                    1. Let type be this's type attribute.

                                    2. +
                                    3. If this is a submit button then + return the string "submit".

                                    4. -
                                    5. If type is in the Submit state, and this is a submit button then return the string - "submit".

                                    6. - -
                                    7. If type is in the Reset state then return the string +

                                    8. If this's type attribute is in the + Reset state then return the string "reset".

                                    9. Return the string "button".

                                    10. From 0790c3374915bbdd3e566d627d948f7a932a3182 Mon Sep 17 00:00:00 2001 From: Keith Cirkel Date: Mon, 18 Nov 2024 22:49:04 +0000 Subject: [PATCH 26/73] switch from or to and for not-submit-button clause --- source | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source b/source index f3b3aac5e44..845b333f17a 100644 --- a/source +++ b/source @@ -53484,7 +53484,7 @@ interface HTMLButtonElement : HTMLElement {

                                      If the type attribute is in the Submit Button state, and the - command, or command and commandfor content attributes are present, then the element is specifically not a submit button.

                                      From 74949fe60da1037650350cd533ec2ed668a080f5 Mon Sep 17 00:00:00 2001 From: Keith Cirkel Date: Mon, 25 Nov 2024 16:59:08 +0000 Subject: [PATCH 27/73] backlink dom#1328 to the CommandEvent source getter steps --- source | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source b/source index 845b333f17a..6f9536ab7e2 100644 --- a/source +++ b/source @@ -79941,6 +79941,11 @@ dictionary CommandEventInit : EventInit { data-x="dom-CommandEvent-source">source
                                      against this's currentTarget.

                                      +

                                      Issue #1328 tracks how to + better standardize associated event data in a way which makes sense on Events. Currently an event + attribute initialized to a value cannot also have a getter, and so an internal slot (or map of + additional fields) is required to properly specify this.

                                      +

                                      Focus

                                      From 8779da9ffbc3d6efa9df9954120c8613886d938b Mon Sep 17 00:00:00 2001 From: Keith Cirkel Date: Tue, 26 Nov 2024 11:02:13 +0000 Subject: [PATCH 28/73] revert eager line wrapping --- source | 35 +++++++++++++++++------------------ 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/source b/source index 6f9536ab7e2..766655918ea 100644 --- a/source +++ b/source @@ -53715,14 +53715,13 @@ interface HTMLButtonElement : HTMLElement {

                                      The form attribute is used to explicitly associate the button element with its form owner. The name attribute represents the element's name. The disabled attribute is used to make the control non-interactive - and to prevent its value from being submitted. The formaction, formenctype, disabled attribute is used to make the control non-interactive and + to prevent its value from being submitted. The formaction, + formenctype, formmethod, formnovalidate, and formtarget attributes are - attributes for form submission.

                                      + data-x="attr-fs-formtarget">formtarget attributes are attributes for form + submission.

                                      The formnovalidate attribute can be used to make submit buttons that do not trigger the constraint validation.

                                      @@ -53744,6 +53743,8 @@ interface HTMLButtonElement : HTMLElement {

                                      A button (and its value) is only included in the form submission if the button itself was used to initiate the form submission.

                                      +
                                      +

                                      The HTMLDialogElement : HTMLElement {

                                    11. If removedNode's node document's top layer contains removedNode, then - remove an element from the top layer immediately given removedNode.

                                      -
                                    12. + data-x="list contains">contains removedNode, then remove an element from + the top layer immediately given removedNode.

                                    13. Set the is modal flag of removedNode to false.

                                    @@ -62391,8 +62391,8 @@ interface HTMLDialogElement : HTMLElement {
                                  22. Close the dialog this with returnValue.

                                  -

                                  When a dialog element subject is to be closed, with null or a string result, run these +

                                  When a dialog element subject is to be closed, with null or a string result, run these steps:

                                    @@ -62414,12 +62414,11 @@ interface HTMLDialogElement : HTMLElement {
                                  1. Remove subject's open attribute.

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

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

                                  6. -
                                  7. Let wasModal be the value of subject's - is modal flag.

                                  8. +
                                  9. Let wasModal be the value of subject's is + modal flag.

                                  10. Set the is modal flag of subject to false.

                                  11. @@ -62448,8 +62447,8 @@ interface HTMLDialogElement : HTMLElement { close at subject.

                                  12. -

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

                                    +

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

                                    1. Destroy subject's Date: Tue, 26 Nov 2024 11:02:32 +0000 Subject: [PATCH 29/73] remove erroneous rebase artefact --- source | 1 - 1 file changed, 1 deletion(-) diff --git a/source b/source index 766655918ea..983f7363a3c 100644 --- a/source +++ b/source @@ -53703,7 +53703,6 @@ interface HTMLButtonElement : HTMLElement {

                                    2. Otherwise, run the popover target attribute activation behavior given element.

                                    3. ->>>>>>> ece6a7a9 (Add commandfor & command attributes to HTMLButtonElement)

                                    An HTML element can have specific From aa804b61a0b742d40666ea97569ca19cb3fc253b Mon Sep 17 00:00:00 2001 From: Keith Cirkel Date: Tue, 26 Nov 2024 11:02:41 +0000 Subject: [PATCH 30/73] properly close li --- source | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source b/source index 983f7363a3c..4f735871424 100644 --- a/source +++ b/source @@ -53756,7 +53756,7 @@ interface HTMLButtonElement : HTMLElement {

                                    1. Let command be this's command attribute.

                                    2. + data-x="attr-button-command">command attribute.

                                    3. If command is in the Toggle Popover state, return the string From 729674c8be0b391a1e97ba3e1a3499dbfb441035 Mon Sep 17 00:00:00 2001 From: Keith Cirkel Date: Tue, 26 Nov 2024 11:03:13 +0000 Subject: [PATCH 31/73] fixup "; return" to ", then return" --- source | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/source b/source index 4f735871424..e349d357d98 100644 --- a/source +++ b/source @@ -53780,7 +53780,7 @@ interface HTMLButtonElement : HTMLElement {

                                    4. If command is in the unknown state and command's value - is a valid custom command; return command's value.

                                    5. + is a valid custom command, then return command's value.

                                    6. Return the empty string.

                                    @@ -53795,14 +53795,14 @@ interface HTMLButtonElement : HTMLElement { getter steps are:

                                      -
                                    1. If this is a submit button then - return the string "submit".

                                    2. +
                                    3. If this is a submit button, then + return "submit".

                                    4. If this's type attribute is in the - Reset state then return the string - "reset".

                                    5. + Reset state, then return "reset".

                                      -
                                    6. Return the string "button".

                                    7. +
                                    8. Return "button".

                                    The type setter steps are to set the Date: Tue, 26 Nov 2024 11:03:32 +0000 Subject: [PATCH 32/73] rephase examples to say "the following code shows" --- source | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/source b/source index e349d357d98..814f96649d2 100644 --- a/source +++ b/source @@ -53833,7 +53833,8 @@ interface HTMLButtonElement : HTMLElement {

                            -

                            The following buttons use commandfor to show and hide a popover box when activated:

                            +

                            The following code shows how buttons can use commandfor to show and hide a popover box when + activated:

                            <button type=button
                                     commandfor="the-popover"
                            @@ -53851,8 +53852,8 @@ interface HTMLButtonElement : HTMLElement {
                               
                            -

                            The following buttons use commandfor with a custom command on an element, demonstrating how - one could utilise custom commands for unspecified behavior:

                            +

                            The following code shows how buttons use commandfor with a custom command on an element, + demonstrating how one could utilise custom commands for unspecified behavior:

                            <button type=button
                                     commandfor="the-image"
                            
                            From 4757ab1cfd14f74e0e30cfb7e192c3b5038a200e Mon Sep 17 00:00:00 2001
                            From: Keith Cirkel 
                            Date: Tue, 26 Nov 2024 11:03:54 +0000
                            Subject: [PATCH 33/73] s/Issue/DOM Standard Issue/
                            
                            ---
                             source | 2 +-
                             1 file changed, 1 insertion(+), 1 deletion(-)
                            
                            diff --git a/source b/source
                            index 814f96649d2..3db184397da 100644
                            --- a/source
                            +++ b/source
                            @@ -79940,7 +79940,7 @@ dictionary CommandEventInit : EventInit {
                               data-x="dom-CommandEvent-source">source against this's currentTarget.

                            -

                            Issue #1328 tracks how to +

                            DOM Standard Issue #1328 tracks how to better standardize associated event data in a way which makes sense on Events. Currently an event attribute initialized to a value cannot also have a getter, and so an internal slot (or map of additional fields) is required to properly specify this.

                            From 23dac086acaa1f7da16c93a8f606804aa805470f Mon Sep 17 00:00:00 2001 From: Keith Cirkel Date: Tue, 26 Nov 2024 11:04:11 +0000 Subject: [PATCH 34/73] add note for developers, explaining the concept of custom commands --- source | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/source b/source index 3db184397da..77126f7c4f6 100644 --- a/source +++ b/source @@ -53543,6 +53543,13 @@ interface HTMLButtonElement : HTMLElement {

                            A valid custom command is a string whose first two code points are the U+002D HYPHEN-MINUS character.

                            +

                            The command attribute can be a + predefined value (one of the values in the table above) or start with two dashes, + allowing for developers to build custom commands. Custom commands will dispatch the + command event, but will never execute other pre-defined + behavior. Values which are not pre-defined and do not start with two dashes will not dispatch + the command event and are to be avoided.

                            +

                            A button element element's activation behavior given From 7d5fc66a3fe1a9a97b27736e554abc1f7ac6f20d Mon Sep 17 00:00:00 2001 From: Keith Cirkel Date: Tue, 26 Nov 2024 11:05:23 +0000 Subject: [PATCH 35/73] fixup button activation steps to return early for Reset/Submit non-form owners --- source | 37 ++++++++++++++++++++++++++----------- 1 file changed, 26 insertions(+), 11 deletions(-) diff --git a/source b/source index 77126f7c4f6..c805b1a5007 100644 --- a/source +++ b/source @@ -53562,17 +53562,32 @@ interface HTMLButtonElement : HTMLElement {

                          3. If element's node document is not fully active, then return.

                          4. -
                          5. If element has a form owner and is a submit button, then submit element's form owner from - element with userInvolvement set to - event's user navigation involvement and return.

                            - -
                          6. If element has a form owner and element's type attribute is in the Reset Button state, then Reset element's form owner and - return.

                          7. +
                          8. +

                            If element is a submit button:

                            + +
                              +
                            1. If element has a form owner then submit element's form owner from + element with userInvolvement set to + event's user navigation involvement and + return.

                            2. + +
                            3. Otherwise, return.

                            4. +
                            +
                          9. + +
                          10. +

                            If element's type attribute is in the + Reset Button state:

                            + +
                              +
                            1. If element has a form owner then Reset element's form owner and + return.

                            2. + +
                            3. Otherwise, return.

                            4. +
                            +
                          11. Run the popover target attribute activation behavior given element and event's target.

                          12. From bba308540624383274c76bcd8b13cc43fb066694 Mon Sep 17 00:00:00 2001 From: Keith Cirkel Date: Tue, 26 Nov 2024 11:05:34 +0000 Subject: [PATCH 36/73] apply issue note to event initialisation too --- source | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/source b/source index c805b1a5007..b8df8cede9a 100644 --- a/source +++ b/source @@ -53635,13 +53635,20 @@ interface HTMLButtonElement : HTMLElement {
                        3. -
                        4. Let continue be the result of firing an - event named command at invokee, using - CommandEvent, with its command - attribute initialized to command's value, its source attribute initialized to element, - and its cancelable and composed attributes initialized to true.

                        5. +
                        6. +

                          Let continue be the result of firing an + event named command at invokee, using + CommandEvent, with its command + attribute initialized to command's value, its source attribute initialized to element, + and its cancelable and composed attributes initialized to true.

                          + +

                          DOM Standard Issue + #1328 tracks how to better standardize associated event data in a way which makes sense on + Events. Currently an event attribute initialized to a value cannot also have a getter, and so + an internal slot (or map of additional fields) is required to properly specify this.

                          +
                        7. If continue is false, then return.

                        8. From 8e2d7a6443a09009c039d7c18a9a1cf8c5dcc23d Mon Sep 17 00:00:00 2001 From: Keith Cirkel Date: Tue, 26 Nov 2024 11:11:23 +0000 Subject: [PATCH 37/73] re-word concept submit button states to include type content-attribute presence --- source | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source b/source index b8df8cede9a..95c958acf06 100644 --- a/source +++ b/source @@ -53482,11 +53482,11 @@ interface HTMLButtonElement : HTMLElement { and commandfor content attributes are not present, then the element is specifically a submit button.

                          -

                          If the type attribute is in the Submit Button state, and the +

                          If the type content attribute is present and in the + Submit Button state, and the command and commandfor content attributes are present, then the - element is specifically not a submit button.

                          + element is specifically a submit button.

                          Constraint validation: If the type attribute is in the Reset Button state or the From a3bbc4a38ec83bd15becb7cd9ab551591777f99d Mon Sep 17 00:00:00 2001 From: Keith Cirkel Date: Tue, 26 Nov 2024 12:38:53 +0000 Subject: [PATCH 38/73] remove erroneous step from rebase --- source | 3 --- 1 file changed, 3 deletions(-) diff --git a/source b/source index 95c958acf06..73d91d7e6b6 100644 --- a/source +++ b/source @@ -53589,9 +53589,6 @@ interface HTMLButtonElement : HTMLElement {

                      3. -
                      4. Run the popover target attribute activation behavior given element - and event's target.

                      5. -
                      6. Let invokee be the result of running element's get the commandfor associated element.

                      7. From 4dbb892b5e5a1763372dc027bd9996797e9f0c68 Mon Sep 17 00:00:00 2001 From: Keith Cirkel Date: Tue, 26 Nov 2024 14:44:56 +0000 Subject: [PATCH 39/73] add missing "not" --- source | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source b/source index 73d91d7e6b6..9e656637041 100644 --- a/source +++ b/source @@ -53485,7 +53485,7 @@ interface HTMLButtonElement : HTMLElement {

                        If the type content attribute is present and in the Submit Button state, and the command and commandfor content attributes are present, then the + data-x="attr-button-commandfor">commandfor content attributes are not present, then the element is specifically a submit button.

                        Constraint validation: If the type From 21fefc6eab22164ba38146357b6801a22620b90a Mon Sep 17 00:00:00 2001 From: Keith Cirkel Date: Tue, 26 Nov 2024 14:49:47 +0000 Subject: [PATCH 40/73] reintroduce accidentally remove event target to popover activation step --- source | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source b/source index 9e656637041..1d6aee37105 100644 --- a/source +++ b/source @@ -53727,8 +53727,8 @@ interface HTMLButtonElement : HTMLElement {

                      8. Otherwise, run the popover target attribute activation behavior given - element.

                      9. - + element and event's target.

                      An HTML element can have specific From 767c4c3436891a28bb081582227e09f661977d10 Mon Sep 17 00:00:00 2001 From: Keith Cirkel Date: Tue, 26 Nov 2024 14:58:03 +0000 Subject: [PATCH 41/73] introduce the "custom" state on command attribute table --- source | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/source b/source index 1d6aee37105..6b0f3233f91 100644 --- a/source +++ b/source @@ -53534,6 +53534,11 @@ interface HTMLButtonElement : HTMLElement { data-x="attr-button-command-show-modal">show-modal Show Modal Opens the targeted dialog element as modal. + + (valid custom command) + Custom + Only dispatches the command event.

                      The attribute's missing value default and HTMLButtonElement : HTMLElement { data-x="attr-button-command">command attribute.

                    3. Let isCustom be true if the command attribute is in the - unknown state and command's + custom state and command's value is a valid custom command; otherwise false.

                    4. If the command attribute is in the HTMLButtonElement : HTMLElement { data-x="">show-modal".

                    5. If command is in the unknown state and command's value + data-x="attr-button-command-custom-state">custom state and command's value is a valid custom command, then return command's value.

                    6. Return the empty string.

                    7. @@ -142961,7 +142966,6 @@ interface External { "close"; "show-modal"; a valid custom command; - the empty string commandfor button From a033ef8320d48f6a3301b45e13e1164bc369bc37 Mon Sep 17 00:00:00 2001 From: Keith Cirkel Date: Wed, 27 Nov 2024 11:01:07 +0000 Subject: [PATCH 42/73] rename "valid custom command" to "custom command keyword" --- source | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source b/source index 6b0f3233f91..bacb7d62a27 100644 --- a/source +++ b/source @@ -53536,7 +53536,7 @@ interface HTMLButtonElement : HTMLElement { Opens the targeted dialog element as modal. (valid custom command) + data-x="attr-button-command-custom">(Custom command keyword) Custom Only dispatches the command event. @@ -53545,7 +53545,7 @@ interface HTMLButtonElement : HTMLElement { data-x="invalid value default">invalid value default
                      are both the unknown state.

                      -

                      A valid custom command is a string whose first two code points are the U+002D +

                      A custom command keyword is a string whose first two code points are the U+002D HYPHEN-MINUS character.

                      The command attribute can be a @@ -142965,7 +142965,7 @@ interface External { "hide-popover"; "close"; "show-modal"; - a valid custom command; + a (Custom command keyword) commandfor button From 8e6b74e7a04865ae965568f6c4953809aa725a6e Mon Sep 17 00:00:00 2001 From: Keith Cirkel Date: Wed, 27 Nov 2024 11:01:18 +0000 Subject: [PATCH 43/73] drop redundant note --- source | 7 ------- 1 file changed, 7 deletions(-) diff --git a/source b/source index bacb7d62a27..836b4343425 100644 --- a/source +++ b/source @@ -53548,13 +53548,6 @@ interface HTMLButtonElement : HTMLElement {

                      A custom command keyword is a string whose first two code points are the U+002D HYPHEN-MINUS character.

                      -

                      The command attribute can be a - predefined value (one of the values in the table above) or start with two dashes, - allowing for developers to build custom commands. Custom commands will dispatch the - command event, but will never execute other pre-defined - behavior. Values which are not pre-defined and do not start with two dashes will not dispatch - the command event and are to be avoided.

                      -

                      A button element element's activation behavior given From 8d2a17bbc8076054d1e8ba4dfa132dc89d7d723d Mon Sep 17 00:00:00 2001 From: Keith Cirkel Date: Wed, 27 Nov 2024 11:02:46 +0000 Subject: [PATCH 44/73] use Custom state instead of isCustom bool --- source | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/source b/source index 836b4343425..e25221f8876 100644 --- a/source +++ b/source @@ -53602,20 +53602,16 @@ interface HTMLButtonElement : HTMLElement {

                    8. Let command be element's command attribute.

                    9. -
                    10. Let isCustom be true if the command attribute is in the - custom state and command's - value is a valid custom command; otherwise false.

                    11. - -
                    12. If the command attribute is in the unknown state and isCustom is - false, then return.

                    13. +
                    14. If command is in the Unknown state, then return.

                    15. Let isPopover be true if invokee's popover attribute is not in the no popover state; otherwise false.

                    16. -

                      If isPopover is false and isCustom is false:

                      +

                      If isPopover is false and the command attribute is not in the Custom state:

                      1. Assert: invokee's @@ -53647,7 +53643,8 @@ interface HTMLButtonElement : HTMLElement {

                      2. If continue is false, then return.

                      3. -
                      4. If isCustom is true, then return.

                      5. +
                      6. If command is in the Custom state, then return.

                      7. Let shouldShowPopover be false.

                      8. @@ -53799,12 +53796,12 @@ interface HTMLButtonElement : HTMLElement { data-x="">close
                        ".

                      9. If command is in the Close state, return the string "Show modal state, return the string "show-modal".

                      10. If command is in the custom state and command's value - is a valid custom command, then return command's value.

                      11. + data-x="attr-button-command-custom-state">Custom state, return command's + value.

                      12. Return the empty string.

                      From 8e6ae5b7d11bdaba282edc7eb11495f1a86478a5 Mon Sep 17 00:00:00 2001 From: Keith Cirkel Date: Wed, 27 Nov 2024 11:03:28 +0000 Subject: [PATCH 45/73] title case all states --- source | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/source b/source index e25221f8876..07e21cd925a 100644 --- a/source +++ b/source @@ -53543,7 +53543,7 @@ interface HTMLButtonElement : HTMLElement {

                      The attribute's missing value default and invalid value default are both the unknown state.

                      + data-x="attr-button-command-unknown-state">Unknown state.

                      A custom command keyword is a string whose first two code points are the U+002D HYPHEN-MINUS character.

                      @@ -53652,7 +53652,7 @@ interface HTMLButtonElement : HTMLElement {
                    17. If command is in the hidepopover state:

                      + data-x="attr-button-command-hide-popover-state">Hide popover state:

                      1. If invokee's popover visibility state is HTMLButtonElement : HTMLElement {

                      2. If command is in the showpopover state:

                        + data-x="attr-button-command-show-popover-state">Show popover state:

                        1. If invokee's popover visibility state is HTMLDialogElement : HTMLElement { subject and state command, are:

                            -
                          1. If command is the close - state or the show modal state, then +

                          2. If command is the Close + state or the Show modal state, then return true.

                          3. Return false.

                          4. @@ -62329,7 +62329,7 @@ interface HTMLDialogElement : HTMLElement { state, then return.

                          5. -

                            If command is the close +

                            If command is the Close state:

                              @@ -62347,7 +62347,7 @@ interface HTMLDialogElement : HTMLElement {
                            1. If command is the show modal state:

                              + data-x="attr-button-command-show-modal-state">Show modal state:

                              1. If invokee does not have an open From d6536f1cff73685035954992c651107c153f1b47 Mon Sep 17 00:00:00 2001 From: Keith Cirkel Date: Wed, 27 Nov 2024 11:05:15 +0000 Subject: [PATCH 46/73] drop redundant check --- source | 4 ---- 1 file changed, 4 deletions(-) diff --git a/source b/source index 07e21cd925a..dedf0788e0f 100644 --- a/source +++ b/source @@ -53595,10 +53595,6 @@ interface HTMLButtonElement : HTMLElement {

                                If invokee is not null, then:

                                  -
                                1. If element has a form owner and element's type attribute is not in the button state, then return.

                                2. -
                                3. Let command be element's command attribute.

                                4. From 25d8c9bc90eed55627cbb7c450d7f1b8ebe0e147 Mon Sep 17 00:00:00 2001 From: Keith Cirkel Date: Wed, 27 Nov 2024 11:05:31 +0000 Subject: [PATCH 47/73] properly reference commandfor in code examples --- source | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/source b/source index dedf0788e0f..19daa6d2a81 100644 --- a/source +++ b/source @@ -53850,7 +53850,8 @@ interface HTMLButtonElement : HTMLElement {
                    18. -

                      The following code shows how buttons can use commandfor to show and hide a popover box when +

                      The following shows how buttons can use commandfor to show and hide a popover box when activated:

                      <button type=button
                      @@ -53869,8 +53870,10 @@ interface HTMLButtonElement : HTMLElement {
                         
                      -

                      The following code shows how buttons use commandfor with a custom command on an element, - demonstrating how one could utilise custom commands for unspecified behavior:

                      +

                      The following shows how buttons can use commandfor with a (Custom command keyword) on an element, demonstrating + how one could utilise custom commands for unspecified behavior:

                      <button type=button
                               commandfor="the-image"
                      
                      From eb62a522dd903f7983b593091af18d0a8e05846e Mon Sep 17 00:00:00 2001
                      From: Keith Cirkel 
                      Date: Wed, 27 Nov 2024 11:06:19 +0000
                      Subject: [PATCH 48/73] remove uneccessary parens
                      
                      ---
                       source | 2 +-
                       1 file changed, 1 insertion(+), 1 deletion(-)
                      
                      diff --git a/source b/source
                      index 19daa6d2a81..42bd4475efc 100644
                      --- a/source
                      +++ b/source
                      @@ -53872,7 +53872,7 @@ interface HTMLButtonElement : HTMLElement {
                         

                      The following shows how buttons can use commandfor with a (Custom command keyword) on an element, demonstrating + data-x="attr-button-command-custom">Custom command keyword on an element, demonstrating how one could utilise custom commands for unspecified behavior:

                      <button type=button
                      
                      From 8621f0a213382ad8dc6b80580f74fc7014966860 Mon Sep 17 00:00:00 2001
                      From: Keith Cirkel 
                      Date: Wed, 27 Nov 2024 14:39:08 +0000
                      Subject: [PATCH 49/73] suggestions from recent code review
                      
                      ---
                       source | 59 +++++++++++++++++++++++++++++-----------------------------
                       1 file changed, 29 insertions(+), 30 deletions(-)
                      
                      diff --git a/source b/source
                      index 42bd4475efc..44f6c0a9fb4 100644
                      --- a/source
                      +++ b/source
                      @@ -53512,17 +53512,17 @@ interface HTMLButtonElement : HTMLElement {
                           
                            toggle-popover
                      -     Toggle Popover
                      +     Toggle popover
                            Shows or hides the targeted popover element.
                           
                            show-popover
                      -     Show Popover
                      +     Show popover
                            Shows the targeted popover element.
                           
                            hide-popover
                      -     Hide Popover
                      +     Hide popover
                            Hides the targeted popover element.
                           
                            HTMLButtonElement : HTMLElement {
                            Show Modal
                            Opens the targeted dialog element as modal.
                           
                      -     (Custom command keyword)
                      +     A Custom command keyword
                            Custom
                      -     Only dispatches the command event.
                      +     Only dispatches the command event on the targeted
                      +     element.
                         
                       
                         

                      The attribute's missing value default and invalid value default are both the Unknown state.

                      -

                      A custom command keyword is a string whose first two code points are the U+002D - HYPHEN-MINUS character.

                      +

                      A custom command keyword is a string whose first two code points are U+002D + (-).

                      @@ -53567,10 +53567,9 @@ interface HTMLButtonElement : HTMLElement {
                    19. If element has a form owner then submit element's form owner from element with userInvolvement set to - event's user navigation involvement and - return.

                    20. + event's user navigation involvement.

                      -
                    21. Otherwise, return.

                    22. +
                    23. Return.

                  3. @@ -53580,10 +53579,10 @@ interface HTMLButtonElement : HTMLElement {
                    1. If element has a form owner then Reset element's form owner and - return.

                    2. + data-x="concept-form-reset">Reset element's + form owner.

                      -
                    3. Otherwise, return.

                    4. +
                    5. Return.

                    @@ -53776,23 +53775,23 @@ interface HTMLButtonElement : HTMLElement { data-x="attr-button-command">command attribute.

                  4. If command is in the Toggle Popover state, return the string - "toggle-popover".

                  5. + data-x="attr-button-command-toggle-popover-state">Toggle popover state, return "toggle-popover".

                  6. If command is in the Show Popover state, return the string - "show-popover".

                  7. + data-x="attr-button-command-show-popover-state">Show popover state, return "show-popover".

                  8. If command is in the Hide Popover state, return the string - "hide-popover".

                  9. + data-x="attr-button-command-hide-popover-state">Hide popover state, return "hide-popover".

                  10. If command is in the Close state, return the string "Close state, return "close".

                  11. If command is in the Show modal state, return the string "Show modal state, return "show-modal".

                  12. If command is in the HTMLDialogElement : HTMLElement {

                  When a dialog element subject is to be closed, with null or a string result, run these - steps:

                  + dialog">closed, with null or a string result, run these steps:

                  1. If subject does not have an open @@ -62462,8 +62460,8 @@ interface HTMLDialogElement : HTMLElement {

                2. -
                3. Queue an element task on the user interaction task source given - the subject element to fire an event named +

                4. Queue an element task on the user interaction task source given the + subject element to fire an event named close at subject.

                5. @@ -79960,10 +79958,11 @@ dictionary CommandEventInit : EventInit { data-x="dom-CommandEvent-source">source against this's currentTarget.

                  -

                  DOM Standard Issue #1328 tracks how to - better standardize associated event data in a way which makes sense on Events. Currently an event - attribute initialized to a value cannot also have a getter, and so an internal slot (or map of - additional fields) is required to properly specify this.

                  +

                  DOM standard issue #1328 + tracks how to better standardize associated event data in a way which makes sense on Events. + Currently an event attribute initialized to a value cannot also have a getter, and so an internal + slot (or map of additional fields) is required to properly specify this.

                  +

                  Focus

                  From 44a398d5bb282973bc29c24229d5607b58fbcda1 Mon Sep 17 00:00:00 2001 From: Keith Cirkel Date: Wed, 27 Nov 2024 14:41:14 +0000 Subject: [PATCH 50/73] add definition to attr-button-command-custom --- source | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source b/source index 44f6c0a9fb4..ccab0fca62c 100644 --- a/source +++ b/source @@ -53535,7 +53535,7 @@ interface HTMLButtonElement : HTMLElement { Show Modal Opens the targeted dialog element as modal. - A Custom command keyword + A Custom command keyword Custom Only dispatches the command event on the targeted element. @@ -53545,8 +53545,8 @@ interface HTMLButtonElement : HTMLElement { data-x="invalid value default">invalid value default are both the Unknown state.

                  -

                  A custom command keyword is a string whose first two code points are U+002D - (-).

                  +

                  A custom command keyword is a string whose + first two code points are U+002D (-).

                  From 0c1dd192593d6bf102a83573894c3604007f392d Mon Sep 17 00:00:00 2001 From: Keith Cirkel Date: Wed, 27 Nov 2024 14:45:29 +0000 Subject: [PATCH 51/73] link to buttons and popovers in example --- source | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/source b/source index ccab0fca62c..f707429a687 100644 --- a/source +++ b/source @@ -53849,9 +53849,10 @@ interface HTMLButtonElement : HTMLElement {
                  -

                  The following shows how buttons can use commandfor to show and hide a popover box when - activated:

                  + +

                  The following shows how Buttons can use commandfor to show and hide an element with + the popover attribute when activated:

                  <button type=button
                           commandfor="the-popover"
                  
                  From e47a66c2e347458ddb2a0bb3f8b2de706987c810 Mon Sep 17 00:00:00 2001
                  From: Keith Cirkel 
                  Date: Wed, 27 Nov 2024 14:47:00 +0000
                  Subject: [PATCH 52/73] fix casing
                  
                  ---
                   source | 2 +-
                   1 file changed, 1 insertion(+), 1 deletion(-)
                  
                  diff --git a/source b/source
                  index f707429a687..f8123a8fbe6 100644
                  --- a/source
                  +++ b/source
                  @@ -53535,7 +53535,7 @@ interface HTMLButtonElement : HTMLElement {
                        Show Modal
                        Opens the targeted dialog element as modal.
                       
                  -     A Custom command keyword
                  +     A custom command keyword
                        Custom
                        Only dispatches the command event on the targeted
                        element.
                  
                  From c1c8f42d5ae48ee52e7eec724491186230439d39 Mon Sep 17 00:00:00 2001
                  From: Keith Cirkel 
                  Date: Thu, 28 Nov 2024 09:44:32 +0000
                  Subject: [PATCH 53/73] make "custom command keyword" consistent
                  
                  ---
                   source | 4 ++--
                   1 file changed, 2 insertions(+), 2 deletions(-)
                  
                  diff --git a/source b/source
                  index f8123a8fbe6..5a9ffef8833 100644
                  --- a/source
                  +++ b/source
                  @@ -53872,7 +53872,7 @@ interface HTMLButtonElement : HTMLElement {
                     

                  The following shows how buttons can use commandfor with a Custom command keyword on an element, demonstrating + data-x="attr-button-command-custom">custom command keyword on an element, demonstrating how one could utilise custom commands for unspecified behavior:

                  <button type=button
                  @@ -142954,7 +142954,7 @@ interface External {
                             "hide-popover";
                             "close";
                             "show-modal";
                  -          a (Custom command keyword)
                  +          a custom command keyword
                       
                         commandfor
                         button
                  
                  From 34e7de821f76d173ed8ec73d1aa34fa145d50955 Mon Sep 17 00:00:00 2001
                  From: Keith Cirkel 
                  Date: Thu, 28 Nov 2024 09:45:15 +0000
                  Subject: [PATCH 54/73] consitently use span for "custom command keyword"
                  
                  ---
                   source | 2 +-
                   1 file changed, 1 insertion(+), 1 deletion(-)
                  
                  diff --git a/source b/source
                  index 5a9ffef8833..eda4da27525 100644
                  --- a/source
                  +++ b/source
                  @@ -142954,7 +142954,7 @@ interface External {
                             "hide-popover";
                             "close";
                             "show-modal";
                  -          a custom command keyword
                  +          a custom command keyword
                       
                         commandfor
                         button
                  
                  From b5c402a82f78bbd76f8094fd7b6dd368a75b131a Mon Sep 17 00:00:00 2001
                  From: Keith Cirkel 
                  Date: Thu, 28 Nov 2024 16:32:56 +0000
                  Subject: [PATCH 55/73] use code not span
                  
                  ---
                   source | 4 ++--
                   1 file changed, 2 insertions(+), 2 deletions(-)
                  
                  diff --git a/source b/source
                  index eda4da27525..9a205d4b516 100644
                  --- a/source
                  +++ b/source
                  @@ -53600,8 +53600,8 @@ interface HTMLButtonElement : HTMLElement {
                        
                6. If command is in the Unknown state, then return.

                7. -
                8. Let isPopover be true if invokee's popover attribute is not in the

                  Let isPopover be true if invokee's popover attribute is not in the no popover state; otherwise false.

                9. From 8b6b4db6413959a7b2ba24aa2e89633bb4b5bcfa Mon Sep 17 00:00:00 2001 From: Keith Cirkel Date: Thu, 28 Nov 2024 16:33:05 +0000 Subject: [PATCH 56/73] s/not false/true --- source | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source b/source index 9a205d4b516..b2db71c3cd3 100644 --- a/source +++ b/source @@ -53617,7 +53617,7 @@ interface HTMLButtonElement : HTMLElement { return.

                10. Otherwise, if the result of running invokee's corresponding is valid - invoker command steps given command is not true, then return.

                11. + invoker command steps given command is false, then return.

              3. From 15142b89f17cbfd7c0d35483d42906854169a1ca Mon Sep 17 00:00:00 2001 From: Keith Cirkel Date: Thu, 28 Nov 2024 16:33:31 +0000 Subject: [PATCH 57/73] simplify the show/hidepopover command steps --- source | 68 +++++++++++----------------------------------------------- 1 file changed, 13 insertions(+), 55 deletions(-) diff --git a/source b/source index b2db71c3cd3..ad3a150e905 100644 --- a/source +++ b/source @@ -53641,78 +53641,36 @@ interface HTMLButtonElement : HTMLElement {
              4. If command is in the Custom state, then return.

              5. -
              6. Let shouldShowPopover be false.

              7. - -
              8. Let shouldHidePopover be false.

              9. -
              10. If command is in the Hide popover state:

                1. If invokee's popover visibility state is showing, then set shouldHidePopover to - true.

                2. - -
                3. Otherwise return.

                4. + data-x="popover-showing-state">Showing, and the result of running + check popover validity given invokee, true, false, and null is + true, then run the hide popover algorithm given invokee, true, + true, and false.

              11. -

                If command is in the Otherwise, if command is in the Show popover state:

                1. If invokee's popover visibility state is hidden, then set shouldShowPopover to - true.

                2. - -
                3. Otherwise return.

                4. -
                -
              12. - -
              13. -

                If shouldShowPopover is true and the result of running - check popover validity given invokee, false, false, and null is true, - then:

                - -
                  -
                1. Assert: shouldHidePopover is false.

                2. - -
                3. Assert: isPopover is true.

                4. - -
                5. Run the show popover given invokee, false, and - element.

                6. + data-x="popover-hidden-state">Hidden, and the result of running + check popover validity given invokee, false, false, and null is + true, then run the show popover algorithm give + invokee, true, true, and false.

              14. -
              15. -

                Otherwise, if shouldHidePopover is true and the result of running - check popover validity given invokee, true, false, and null is true, - then:

                - -
                  -
                1. Assert: shouldShowPopover is false.

                2. - -
                3. Assert: isPopover is true.

                4. - -
                5. Run the hide popover algorithm given invokee, true, true, and - false.

                6. -
                -
              16. - -
              17. -

                Otherwise, if this standard defines invoker command steps for - invokee's local name:

                - -
                  -
                1. Assert: shouldShowPopover is false and - shouldHidePopover is false.

                2. - -
                3. Run the corresponding invoker command steps given invokee, - element and command.

                4. -
                -
              18. +
              19. Otherwise, if this standard defines invoker command steps for + invokee's local name, then run the + corresponding invoker command steps given invokee, element + and command.

            3. From 397c4902629477ea6eece6d26fff34edf021daa3 Mon Sep 17 00:00:00 2001 From: Keith Cirkel Date: Thu, 28 Nov 2024 16:33:47 +0000 Subject: [PATCH 58/73] f code --- source | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source b/source index ad3a150e905..b4ea5dc50cf 100644 --- a/source +++ b/source @@ -53810,7 +53810,7 @@ interface HTMLButtonElement : HTMLElement {

              The following shows how Buttons can use commandfor to show and hide an element with - the popover attribute when activated:

              + the popover attribute when activated:

              <button type=button
                       commandfor="the-popover"
              
              From f07be5ac7b40bab75ae03baa6327629901a9050f Mon Sep 17 00:00:00 2001
              From: Keith Cirkel 
              Date: Thu, 28 Nov 2024 16:33:56 +0000
              Subject: [PATCH 59/73] comma
              
              ---
               source | 2 +-
               1 file changed, 1 insertion(+), 1 deletion(-)
              
              diff --git a/source b/source
              index b4ea5dc50cf..1804e0bc1d7 100644
              --- a/source
              +++ b/source
              @@ -62279,7 +62279,7 @@ interface HTMLDialogElement : HTMLElement {
                 

            The invoker command steps, given a dialog element - invokee, an element invoker and a state command, are:

            + invokee, an element invoker, and a state command, are:

            1. If invokee is the popover showing From 224c61d64980808c67e5447a440375c651d130c7 Mon Sep 17 00:00:00 2001 From: Keith Cirkel Date: Thu, 28 Nov 2024 16:34:16 +0000 Subject: [PATCH 60/73] s/is the .*state/is in the .*state --- source | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source b/source index 1804e0bc1d7..1905e1e0451 100644 --- a/source +++ b/source @@ -62282,11 +62282,11 @@ interface HTMLDialogElement : HTMLElement { invokee, an element invoker, and a state command, are:

                -
              1. If invokee is the popover showing - state, then return.

              2. +
              3. If invokee is in the popover showing state, then return.

              4. -

                If command is the Close +

                If command is in the Close state:

                  @@ -62303,7 +62303,7 @@ interface HTMLDialogElement : HTMLElement {
                1. -

                  If command is the If command is in the Show modal state:

                    From 0ce6b7e47250bb5caaf36d25b48df1f542bfcfb1 Mon Sep 17 00:00:00 2001 From: Keith Cirkel Date: Thu, 28 Nov 2024 17:59:19 +0000 Subject: [PATCH 61/73] more casing fixes --- source | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source b/source index 1905e1e0451..017ecca12b4 100644 --- a/source +++ b/source @@ -53532,7 +53532,7 @@ interface HTMLButtonElement : HTMLElement { show-modal - Show Modal + Show modal Opens the targeted dialog element as modal. A custom command keyword @@ -53630,7 +53630,7 @@ interface HTMLButtonElement : HTMLElement { and its cancelable and composed attributes initialized to true.

                    -

                    DOM Standard Issue +

                    DOM standard issue #1328 tracks how to better standardize associated event data in a way which makes sense on Events. Currently an event attribute initialized to a value cannot also have a getter, and so an internal slot (or map of additional fields) is required to properly specify this.

                    From c71a1fbc24a2f71018a07bbe513c9c38eccd9062 Mon Sep 17 00:00:00 2001 From: Keith Cirkel Date: Thu, 28 Nov 2024 17:59:35 +0000 Subject: [PATCH 62/73] link example commandfor attribute and dialog --- source | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source b/source index 017ecca12b4..b0b90ec106c 100644 --- a/source +++ b/source @@ -62314,8 +62314,8 @@ interface HTMLDialogElement : HTMLElement {
                  -

                  The following buttons use commandfor to open and close a "confirm" dialog as modal when - activated:

                  +

                  The following buttons use commandfor to open and + close a "confirm" dialog as modal when activated:

                  <button type=button
                           commandfor="the-dialog"
                  
                  From 2cf379afb1136cb0dc033adec0adbda4db9b6a5b Mon Sep 17 00:00:00 2001
                  From: Keith Cirkel 
                  Date: Thu, 28 Nov 2024 17:59:54 +0000
                  Subject: [PATCH 63/73] rework state & attribute value to be a snapshot
                  
                  ---
                   source | 36 ++++++++++++++++++++++--------------
                   1 file changed, 22 insertions(+), 14 deletions(-)
                  
                  diff --git a/source b/source
                  index b0b90ec106c..21a349c08d9 100644
                  --- a/source
                  +++ b/source
                  @@ -53595,9 +53595,10 @@ interface HTMLButtonElement : HTMLElement {
                   
                       
                  1. Let command be element's command attribute.

                  2. + data-x="attr-button-command">command
                    attribute value. -
                  3. If command is in the

                    If the state of command of corresponding to + command is in the Unknown state, then return.

                  4. Let isPopover be true if invokee's HTMLButtonElement : HTMLElement { data-x="attr-popover-none-state">no popover state; otherwise false.

                  5. -

                    If isPopover is false and the command attribute is not in the Custom state:

                    +

                    If isPopover is false and the state of command corresponding to command is in the + Custom state:

                    1. Assert: invokee's @@ -53625,7 +53627,7 @@ interface HTMLButtonElement : HTMLElement {

                      Let continue be the result of firing an event named command at invokee, using CommandEvent, with its command - attribute initialized to command's value, its command, its source attribute initialized to element, and its cancelable and composed attributes initialized to true.

                      @@ -53638,11 +53640,13 @@ interface HTMLButtonElement : HTMLElement {
                    2. If continue is false, then return.

                    3. -
                    4. If command is in the Custom state, then return.

                    5. +
                    6. If the state of command corresponding to + command is in the Custom + state, then return.

                    7. -

                      If command is in the If the state of command corresponding to + command is in the Hide popover state:

                        @@ -53655,7 +53659,8 @@ interface HTMLButtonElement : HTMLElement {
                      1. -

                        Otherwise, if command is in the Otherwise, if the state of command of corresponding to + command is in the Show popover state:

                          @@ -53670,7 +53675,8 @@ interface HTMLButtonElement : HTMLElement {
                        1. Otherwise, if this standard defines invoker command steps for invokee's local name, then run the corresponding invoker command steps given invokee, element - and command.

                        2. + and the state of command of corresponding to + command.

                      2. @@ -62268,7 +62274,8 @@ interface HTMLDialogElement : HTMLElement {

                      The is valid invoker command steps, given a dialog element - subject and state command, are:

                      + subject and state command, + are:

                      1. If command is the Close @@ -62279,14 +62286,15 @@ interface HTMLDialogElement : HTMLElement {

                      The invoker command steps, given a dialog element - invokee, an element invoker, and a state command, are:

                      + invokee, an element invoker, and a state command, are:

                      1. If invokee is in the popover showing state, then return.

                      2. -

                        If command is in the Close +

                        If command is the Close state:

                          @@ -62303,7 +62311,7 @@ interface HTMLDialogElement : HTMLElement {
                        1. -

                          If command is in the If command is the Show modal state:

                            From d2eb8df889dff6a1b5830dd107d6c979e9942e0f Mon Sep 17 00:00:00 2001 From: Keith Cirkel Date: Fri, 29 Nov 2024 09:39:10 +0000 Subject: [PATCH 64/73] redo title casing --- source | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/source b/source index 21a349c08d9..6b301ab438e 100644 --- a/source +++ b/source @@ -53512,17 +53512,17 @@ interface HTMLButtonElement : HTMLElement { toggle-popover - Toggle popover + Toggle Popover Shows or hides the targeted popover element. show-popover - Show popover + Show Popover Shows the targeted popover element. hide-popover - Hide popover + Hide Popover Hides the targeted popover element. HTMLButtonElement : HTMLElement { show-modal - Show modal + Show Modal Opens the targeted dialog element as modal. A custom command keyword @@ -53647,7 +53647,7 @@ interface HTMLButtonElement : HTMLElement {
                          1. If the state of command corresponding to command is in the Hide popover state:

                            + data-x="attr-button-command-hide-popover-state">Hide Popover state:

                            1. If invokee's popover visibility state is HTMLButtonElement : HTMLElement {

                            2. Otherwise, if the state of command of corresponding to command is in the Show popover state:

                              + data-x="attr-button-command-show-popover-state">Show Popover state:

                              1. If invokee's popover visibility state is HTMLButtonElement : HTMLElement { data-x="attr-button-command">command attribute.

                              2. If command is in the Toggle popover state, return "Toggle Popover state, return "toggle-popover".

                              3. If command is in the Show popover state, return "Show Popover state, return "show-popover".

                              4. If command is in the HTMLButtonElement : HTMLElement { data-x="">close".

                              5. If command is in the Show modal state, return "Show Modal state, return "show-modal".

                              6. If command is in the HTMLDialogElement : HTMLElement {

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

                                2. Return false.

                                3. @@ -62312,7 +62312,7 @@ interface HTMLDialogElement : HTMLElement {
                                4. If command is the Show modal state:

                                  + data-x="attr-button-command-show-modal-state">Show Modal state:

                                  1. If invokee does not have an open From 0a57503abbf898e9c3e22622a8a0c8b9c1d03424 Mon Sep 17 00:00:00 2001 From: Keith Cirkel Date: Fri, 29 Nov 2024 18:12:42 +0000 Subject: [PATCH 65/73] remove accidental ofs --- source | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source b/source index 6b301ab438e..7cf7ca06bc9 100644 --- a/source +++ b/source @@ -53597,7 +53597,7 @@ interface HTMLButtonElement : HTMLElement {

                                  2. Let command be element's command attribute value.

                                  3. -
                                  4. If the state of command of corresponding to +

                                  5. If the state of command corresponding to command is in the Unknown state, then return.

                                  6. @@ -53659,7 +53659,7 @@ interface HTMLButtonElement : HTMLElement {
                                  7. -

                                    Otherwise, if the state of command of corresponding to +

                                    Otherwise, if the state of command corresponding to command is in the Show Popover state:

                                    @@ -53675,7 +53675,7 @@ interface HTMLButtonElement : HTMLElement {
                                  8. Otherwise, if this standard defines invoker command steps for invokee's local name, then run the corresponding invoker command steps given invokee, element - and the state of command of corresponding to + and the state of command corresponding to command.

                                5. From d02a649dd2065137be539cc79c47d2b0baec68f5 Mon Sep 17 00:00:00 2001 From: Keith Cirkel Date: Wed, 4 Dec 2024 09:15:53 +0000 Subject: [PATCH 66/73] rephrase "corresponding to" state values --- source | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source b/source index 7cf7ca06bc9..0aa63d2a525 100644 --- a/source +++ b/source @@ -53597,8 +53597,8 @@ interface HTMLButtonElement : HTMLElement {
                                6. Let command be element's command attribute value.

                                7. -
                                8. If the state of command corresponding to - command is in the

                                  If the state of the command attribute with + value command is the Unknown state, then return.

                                9. Let isPopover be true if invokee's HTMLButtonElement : HTMLElement { data-x="attr-popover-none-state">no popover state; otherwise false.

                                10. -

                                  If isPopover is false and the state of command corresponding to command is in the +

                                  If isPopover is false and the state of the command attribute with value command is the Custom state:

                                    From 9aa71093f51ee816f9b1ebb783d9625665e3b717 Mon Sep 17 00:00:00 2001 From: Keith Cirkel Date: Wed, 4 Dec 2024 09:16:03 +0000 Subject: [PATCH 67/73] s/, return/, then return --- source | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/source b/source index 0aa63d2a525..a9b5f997b4f 100644 --- a/source +++ b/source @@ -53739,27 +53739,27 @@ interface HTMLButtonElement : HTMLElement { data-x="attr-button-command">command attribute.

                                  1. If command is in the Toggle Popover state, return "toggle-popover".

                                  2. + data-x="attr-button-command-toggle-popover-state">Toggle Popover state, then return + "toggle-popover".

                                  3. If command is in the Show Popover state, return "Show Popover state, then return "show-popover".

                                  4. If command is in the Hide popover state, return "Hide popover state, then return "hide-popover".

                                  5. If command is in the Close state, return "Close state, then return "close".

                                  6. If command is in the Show Modal state, return "Show Modal state, then return "show-modal".

                                  7. If command is in the Custom state, return command's + data-x="attr-button-command-custom-state">Custom state, then return command's value.

                                  8. Return the empty string.

                                  9. From 463df2426760f12e7e990d0274d60ecf95caac12 Mon Sep 17 00:00:00 2001 From: Keith Cirkel Date: Wed, 4 Dec 2024 09:21:21 +0000 Subject: [PATCH 68/73] line wrapping pass --- source | 35 +++++++++++++++++------------------ 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/source b/source index a9b5f997b4f..fd99b93bb0d 100644 --- a/source +++ b/source @@ -53477,14 +53477,14 @@ interface HTMLButtonElement : HTMLElement { data-x="attr-button-type-submit-state">Submit Button state.

                                    If the type attribute is in the Submit Button state, and the - type, command, - and commandfor content attributes are not present, - then the element is specifically a submit button.

                                    + data-x="attr-button-type-submit-state">Submit Button state, and the type, command, and + commandfor content attributes are not present, then + the element is specifically a submit button.

                                    If the type content attribute is present and in the - Submit Button state, and the - command and Submit Button state, and the command and commandfor content attributes are not present, then the element is specifically a submit button.

                                    @@ -53545,8 +53545,8 @@ interface HTMLButtonElement : HTMLElement { data-x="invalid value default">invalid value default are both the Unknown state.

                                    -

                                    A custom command keyword is a string whose - first two code points are U+002D (-).

                                    +

                                    A custom command keyword is a string whose first + two code points are U+002D (-).

                                    @@ -53574,13 +53574,12 @@ interface HTMLButtonElement : HTMLElement {
                                  10. -

                                    If element's type attribute is in the - Reset Button state:

                                    +

                                    If element's type attribute is in the Reset Button state:

                                    1. If element has a form owner then Reset element's - form owner.

                                    2. + data-x="concept-form-reset">Reset element's form owner.

                                    3. Return.

                                    @@ -53652,22 +53651,22 @@ interface HTMLButtonElement : HTMLElement {
                                    1. If invokee's popover visibility state is Showing, and the result of running - check popover validity given invokee, true, false, and null is - true, then run the hide popover algorithm given invokee, true, + check popover validity given invokee, true, false, and null is true, + then run the hide popover algorithm given invokee, true, true, and false.

                                  11. -

                                    Otherwise, if the state of command corresponding to - command is in the Otherwise, if the state of command corresponding + to command is in the Show Popover state:

                                    1. If invokee's popover visibility state is Hidden, and the result of running - check popover validity given invokee, false, false, and null is - true, then run the show popover algorithm give + check popover validity given invokee, false, false, and null is true, + then run the show popover algorithm give invokee, true, true, and false.

                                  12. From c37596b2d521f35540692fbaa3ad87ccb010dea6 Mon Sep 17 00:00:00 2001 From: Anne van Kesteren Date: Wed, 4 Dec 2024 17:22:43 +0100 Subject: [PATCH 69/73] address various issues --- source | 63 +++++++++++++++++++++++++++------------------------------- 1 file changed, 29 insertions(+), 34 deletions(-) diff --git a/source b/source index fd99b93bb0d..9f962e3f000 100644 --- a/source +++ b/source @@ -53545,8 +53545,8 @@ interface HTMLButtonElement : HTMLElement { data-x="invalid value default">invalid value default are both the Unknown state.

                                    -

                                    A custom command keyword is a string whose first - two code points are U+002D (-).

                                    +

                                    A custom command keyword is a string that + starts with "--".

                                    @@ -53590,7 +53590,7 @@ interface HTMLButtonElement : HTMLElement { element.

                                  13. -

                                    If invokee is not null, then:

                                    +

                                    If invokee is not null:

                                    1. Let command be element's HTMLButtonElement : HTMLElement {

                                  14. - -

                                    The following shows how Buttons can use The following shows how buttons can use commandfor to show and hide an element with the popover attribute when activated:

                                    @@ -62134,14 +62133,10 @@ interface HTMLDialogElement : HTMLElement {

                                  The showModal() method steps are:

                                  + data-x="dom-dialog-showModal">showModal()
                                  method steps are to show a modal + dialog given this.

                                  -
                                    -
                                  1. Show this as modal.

                                  2. -
                                  - -

                                  When a dialog element subject is to be shown as modal, run these steps:

                                  +

                                  To show a modal dialog given a dialog element subject:

                                  1. If subject has an open attribute and @@ -62156,9 +62151,9 @@ interface HTMLDialogElement : HTMLElement {

                                  2. If subject is not connected, then throw an "InvalidStateError" DOMException.

                                  3. -
                                  4. If subject is in the popover showing state, then throw an - "InvalidStateError" DOMException.

                                  5. +
                                  6. If subject is in the popover showing + state, then throw an "InvalidStateError" + DOMException.

                                  7. If the result of firing an event named beforetoggle, using ToggleEvent, with the HTMLDialogElement : HTMLElement {

                                  8. If subject is not connected, then return.

                                  9. -
                                  10. If subject is in the popover showing state, then return.

                                  11. +
                                  12. If subject is in the popover showing + state, then return.

                                  13. Queue a dialog toggle event task given subject, "closed", and "open".

                                  14. @@ -62185,8 +62180,8 @@ interface HTMLDialogElement : HTMLElement {
                                  15. Set the is modal flag of subject to true.

                                  16. -

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

                                    +

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

                                    This will cause the focused area of the document to become inert (unless that currently focused area is a @@ -142611,6 +142606,21 @@ interface External { th Number of columns that the cell is to span Valid non-negative integer greater than zero + + command + button + Indicates to the targeted element which action to take. + "toggle-popover"; + "show-popover"; + "hide-popover"; + "close"; + "show-modal"; + a custom command keyword + + commandfor + button + Targets another element to be invoked. + ID* content meta @@ -142910,21 +142920,6 @@ interface External { script Integrity metadata used in Subresource Integrity checks SRI Text - - command - button - Indicates to the targeted element which action to take. - "toggle-popover"; - "show-popover"; - "hide-popover"; - "close"; - "show-modal"; - a custom command keyword - - commandfor - button - Targets another element to be invoked. - ID* is HTML elements From 35849e782d8aac06fcb519a0fc5d46015a2c6b36 Mon Sep 17 00:00:00 2001 From: Anne van Kesteren Date: Wed, 4 Dec 2024 17:42:33 +0100 Subject: [PATCH 70/73] CI found another place that got improved --- source | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source b/source index 9f962e3f000..84bd8e52704 100644 --- a/source +++ b/source @@ -62310,7 +62310,7 @@ interface HTMLDialogElement : HTMLElement {

                                    1. If invokee does not have an open - attribute, then show modal dialog invokee.

                                    2. + attribute, then show a modal dialog given invokee.

                                  From d27d5149bfb3280d5d10fb73da14cfbf03b22377 Mon Sep 17 00:00:00 2001 From: Keith Cirkel Date: Fri, 6 Dec 2024 10:13:31 +0000 Subject: [PATCH 71/73] fix implicit submit/commandfor button logic --- source | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/source b/source index 84bd8e52704..aa2c355a106 100644 --- a/source +++ b/source @@ -53483,10 +53483,8 @@ interface HTMLButtonElement : HTMLElement { the element is specifically a submit button.

                                  If the type content attribute is present and in the - Submit Button state, and the command and commandfor content attributes are not present, then the - element is specifically a submit button.

                                  + Submit Button state, then the element is + specifically a submit button.

                                  Constraint validation: If the type attribute is in the Reset Button state or the @@ -53593,6 +53591,10 @@ interface HTMLButtonElement : HTMLElement {

                                  If invokee is not null:

                                    +
                                  1. If element has a form owner and element's type attribute is in the Submit Button state, then return.

                                    +
                                  2. Let command be element's command attribute value.

                                  3. From 7c44d2b66842270b708967d68bba899675b0c19c Mon Sep 17 00:00:00 2001 From: Keith Cirkel Date: Sun, 2 Feb 2025 12:34:32 +0000 Subject: [PATCH 72/73] sync changes from #10960 --- source | 59 +++++++++++++++++++++++++++++++++++----------------------- 1 file changed, 36 insertions(+), 23 deletions(-) diff --git a/source b/source index 75bf08ba3b8..aad65373cf6 100644 --- a/source +++ b/source @@ -53506,20 +53506,20 @@ interface HTMLButtonElement : HTMLElement { data-x="invalid value default">invalid value default are both the Submit Button state.

                                    -

                                    If the type attribute is in the Submit Button state, and the type, command, and - commandfor content attributes are not present, then - the element is specifically a submit button.

                                    +

                                    An element is said to be a submit button if any of + the following are true:

                                    -

                                    If the type content attribute is present and in the - Submit Button state, then the element is - specifically a submit button.

                                    +
                                      +
                                    • The type attribute is in the Submit Button state; or

                                    • -

                                      Constraint validation: If the type - attribute is in the Reset Button state or the - Button state, the element is barred from - constraint validation.

                                      +
                                    • The type content attribute is present, and in the + Submit Button state.

                                    • +
                                    + +

                                    Constraint validation: If the element is not a submit button, the element is barred from constraint + validation.

                                    If specified, the commandfor attribute value must be the HTMLButtonElement : HTMLElement {

                                  4. If element is a submit button:

                                    -
                                      +
                                    1. If element has a form owner then submit element's form owner from - element with userInvolvement set to - event's user navigation involvement.

                                    2. + data-x="concept-form-submit">Submit element's form + owner from element with userInvolvement set to event's user navigation involvement.

                                    3. Return.

                                    @@ -53606,7 +53607,7 @@ interface HTMLButtonElement : HTMLElement { data-x="attr-button-type-reset-state">Reset Button state:

                                      -
                                    1. If element has a form owner then

                                      If element has a form owner, then Reset element's form owner.

                                    2. Return.

                                    3. @@ -53740,9 +53741,8 @@ interface HTMLButtonElement : HTMLElement { data-x="attr-fs-formenctype">formenctype
                                      , formmethod, formnovalidate, and formtarget must not be specified if the element's type attribute is not in the Submit Button state.

                                      + data-x="attr-fs-formtarget">formtarget
                                      must not be specified if the element is not a submit button.

                                      The commandForElement IDL attribute must @@ -53802,9 +53802,22 @@ interface HTMLButtonElement : HTMLElement {

                                      The value IDL attribute must reflect the content attribute of the same name.

                                      -

                                      The type IDL - attribute must reflect the content attribute of the same name, limited to only - known values.

                                      +

                                      The type + getter steps are:

                                      + +
                                        +
                                      1. If this is a submit button, then + return "submit".

                                      2. + +
                                      3. If this's type attribute is in the + Reset state, then return "reset".

                                      4. + +
                                      5. Return "button".

                                      6. +
                                      + +

                                      The type setter steps are to set the type content attribute to the given value.

                                      The willValidate, validity, and Date: Thu, 6 Feb 2025 20:31:00 +0000 Subject: [PATCH 73/73] ensure button submit state is submit only when command/commandfor aren't present --- source | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source b/source index 7aec90585b1..5e8972d9826 100644 --- a/source +++ b/source @@ -53511,7 +53511,10 @@ interface HTMLButtonElement : HTMLElement {

                                      • The type attribute is in the Submit Button state; or

                                      • + data-x="attr-button-type-submit-state">Submit Button state and both the command and commandfor content attributes are not present; + or

                                      • The type content attribute is present, and in the Submit Button state.