← Graph

Invoker Commands API

concept 2 connections

Standardized by the Open UI group. Adds command and commandfor attributes to buttons so native behaviors (like opening a dialog as a modal) fire without writing click handlers. Currently native commands cover the dialog element, with planned expansion to video play/pause, number field increment/decrement, menus, burger menus, cookie banners, sliding drawers, etc. Custom commands (prefixed with --) let apps remove click-handler boilerplate and just listen for command events on a target element. Shipping in all current browsers with a small polyfill available for legacy support.

category
pattern
Fourth of five APIs — HTML-native button/dialog interactivity.
related_to
Invoker Commands API concept
Companion APIs from Open UI — commands on buttons, interest for hover/long-press.

Provenance