Get the latest tech news

Invoker Commands (Explainer)


Open UI

Buttons with command will - when clicked, touched, or enacted via keypress - dispatch a CommandEvent on the element referenced by commandfor, with some default behaviours. Some frameworks attempt to reintroduce the developer experience of inline handlers by introducing new JavaScript or HTML shorthands, such as React’s onClick={...}, Vue’s@click=".." or HTMX’s hx-trigger="click". While popovertarget sufficiently captured the use case for popovers, it fell short of providing the same developer & user experience for other interactive elements such as<dialog>.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of Explainer

Explainer

Photo of Invoker Commands

Invoker Commands

Related news:

News photo

Explainer: What's r1 and everything else?

News photo

Transformer Explainer

News photo

Leaked Microsoft Memo Tells Managers Not To Use Budget Cuts as Explainer for Lack of Pay Rises