• 
      

    Add support for async click handlers for buttons.

    Review Request #14683 — Created Nov. 10, 2025 and submitted

    Information

    Ink
    master

    Reviewers

    A button's onClick can now be async. If a Promise is returned, the
    button will be in a busy state until the Promise is resolved. This
    ensures that the button can't be clicked a second time, and means the
    caller doesn't have to micro-manage this.

    Handlers that do need to micro-manage the state (such as setting the
    busy state for multiple buttons at once) simply don't need to be async.
    The button will work as before.

    The Ink stories have been updated to show off click handlers for both
    cases.

    Tested both async and standard onClick handlers.

    Summary ID
    Add support for async click handlers for buttons.
    A button's `onClick` can now be async. If a Promise is returned, the button will be in a busy state until the Promise is resolved. This ensures that the button can't be clicked a second time, and means the caller doesn't have to micro-manage this. Handlers that *do* need to micro-manage the state (such as setting the busy state for multiple buttons at once) simply don't need to be async. The button will work as before. The Ink stories have been updated to show off click handlers for both cases.
    f45fa42076513d092f241e9eb550a1fcbcaf8854
    Description From Last Updated

    I don't think we need/want the parens here.

    daviddavid
    chipx86
    david
    1. 
        
    2. Show all issues

      I don't think we need/want the parens here.

      1. Oh, nevermind, I see why.

    3. 
        
    chipx86
    Review request changed
    Status:
    Completed
    Change Summary:
    Pushed to master (d43b552)