Skip to content

Add Invoker Commands, command & commandfor (previously: Invokers, invoketarget & invokeaction) #6856

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Schweinepriester opened this issue Oct 10, 2023 · 2 comments

Comments

@Schweinepriester
Copy link
Contributor

Adding invoketarget and invokeaction attributes to <button> and <input type="button"> / <input type="reset"> elements would allow authors to assign behaviour to buttons in a more accessible and declarative way, while reducing bugs and simplifying the amount of JavaScript pages are required to ship for interactivity. Buttons with invoketarget will - when clicked, touched, or enacted via keypress - dispatch an InvokeEvent on the element referenced by invoketarget, with some default behaviours.

🤩

@Schweinepriester Schweinepriester changed the title Add Invokers, currently invoketarget & invokeaction Add Invoker Commands, command & commandfor (previously: Invokers, invoketarget & invokeaction) Mar 23, 2025
@Schweinepriester
Copy link
Contributor Author

they've been renamed to command & commandfor:

  • https://adactio.com/journal/21803

  • https://open-ui.org/components/invokers.explainer/

    Adding commandfor and command attributes to <button> and elements would allow authors to assign behaviour to buttons in a more accessible and declarative way, while reducing bugs and simplifying the amount of JavaScript pages are required to ship for interactivity. Buttons with command will - when clicked, touched, or enacted via keypress - dispatch a CommandEvent on the element referenced by commandfor, with some default behaviours.

@westonruter
Copy link

Has this been implemented? I do see https://caniuse.com/mdn-html_elements_button_commandfor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants