Invoker Commands API
Posted by maqnius 2 days ago
Comments
Comment by OkayPhysicist 2 hours ago
Comment by sheept 2 hours ago
I guess the stylistic choice of separating content, style, and interactivity eventually became a convention to keep JavaScript isolated from HTML, but nowadays with Tailwind and HTMX, it does seem like at least some developers want everything in HTML, for the strengths you mentioned.
Comment by maqnius 2 days ago
Comment by spartanatreyu 1 hour ago
It's not supported on the previous main version of Safari, so everyone following the "last two major versions" of browser support rule can't use them.
Also, it's currently limited to only dialogs and popovers (and custom events, but in those cases you need js anyway).
It'll be more useful once it can control:
- details (open, close, toggle)
- video (play, pause, toggle play state, set seek point, mute, set volume)
- select (open/close widget, set/unset value(s))
- input (open/close widget, set/unset value(s))
- all elements (add/remove/toggle/set a class/attribute)
Comment by jazzypants 1 hour ago
Comment by masfuerte 2 hours ago
It's never been easier to create a great site that doesn't require javascript, but hardly anyone is.
Comment by jazzypants 1 hour ago
Comment by Waterluvian 2 hours ago
People who disable JS are probably a very tiny minority and of those who consume ads, an even smaller one.
Comment by wild_egg 1 hour ago
Looks like safari shipped support in December though so now I can go nuts
Comment by gitowiec 2 days ago
Comment by maqnius 1 day ago
[0] https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/...
Comment by mifydev 1 hour ago