logoalt Hacker News

Invoker Commands API

70 pointsby maqniuslast Sunday at 8:16 AM12 commentsview on HN

Comments

OkayPhysicistyesterday at 11:00 PM

This is remarkably useful. Even ignoring the built-in commands (which are handy in their own right), I find the button's action being self-described in the html ("tell this element to do this") far more pleasant to read than the normal see button -> /document.getElementById("buttonID") -> scroll back up to the html to figure out what elements are referred to in the script.

show 1 reply
maqniuslast Sunday at 8:16 AM

I just noticed, that Invoker Commands are available across all major browsers. Good to see that HTML progresses to make Javascript redundant for basic UX.

show 2 replies
wild_eggyesterday at 11:35 PM

Oh awesome. I wanted to use this last year but safari hadn't shipped support yet and I hit some problem with the polyfill.

Looks like safari shipped support in December though so now I can go nuts

gitowieclast Sunday at 5:06 PM

I don't get it. They say it doesn't need JavaScript. But how command is declared? And they show example rotating img with JS

show 1 reply
mifydevyesterday at 11:47 PM

nice, htmx is infiltrating into the browser standards