Chrome 135 introduces Invoker Commands, allowing buttons to perform actions on dialogs and popovers declaratively using commandfor and command attributes, eliminating the need for JavaScript onclick handlers. The feature supports built-in commands like show-modal, close, and toggle-popover that mirror their JavaScript counterparts, plus custom commands prefixed with double dashes that can be handled via the toggle event. A polyfill is available for broader browser support.

•1m read time•From una.im
Post cover image
Table of contents
# Invoker Commands
7 Comments

Sort: