Skip to content

React DOM: Add support for Invoker Commands API#36493

Open
MaxwellCohen wants to merge 1 commit into
facebook:mainfrom
MaxwellCohen:feat/invoker-command-api
Open

React DOM: Add support for Invoker Commands API#36493
MaxwellCohen wants to merge 1 commit into
facebook:mainfrom
MaxwellCohen:feat/invoker-command-api

Conversation

@MaxwellCohen
Copy link
Copy Markdown

Summary

This includes support for commandfor, command, and oncommand event. The events are only triggered by elements that match the invoker command API.

The Invoker Commands API is currently supported in all major browsers (Chrome, Safari, Firefox)

I designed this PR to match React DOM: Add support for Popover API #27981 as closely as possible, with as few changes as possible.

fixes: #32478

How did you test this change?

  1. Created tests, and all relevant tests passed (locally on node v20.19.0, but 1 unrelated snapshot fails on node v24.15.0 )
  2. build locally and create a repo to demo of this feature. (I would like to move to online once I can get some guidance on how to create a build based on a commit)

Open Questions/Concerns

  1. I tried my best to place the invoker command code in the proper places in large relevant files; if they are not, please let me know so I can match coding standards.
  2. This is adding a new synthetic event. I want to make sure I am adding all necessary code, types, and other things to support React synthetic events. If I am missing something, please let me know so I can add it.
  3. What is the process for updating the definitely typed package for Rect to add support for Invoker Commands?
  4. How to create an online sandbox demo of this so people can test it.

I leverage Composer 2.5 LLM to help me create this PR and reviewed every line

@meta-cla meta-cla Bot added the CLA Signed label May 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: Support command event

1 participant