| Thanks for sharing The idea of declarative UI actions without JS is appealing The good: * Killing boilerplate for popovers/modals (no more aria-expanded juggling). * Built-in commands like show-modal bake accessibility into markup. * Custom commands (e.g., --rotate-landscape) let components expose APIs via HTML. My doubts: * Abstraction vs. magic: Is this just shifting complexity from JS to HTML? Frameworks already abstract state—how does this coexist? * Shadow DOM friction: Needing JS to set .commandForElement across shadow roots feels like a half-solved problem. * Future-proofing: If OpenUI adds 20+ commands (e.g., show-picker, toggle-details), will this bloat the platform with niche syntax? |
Very well said. This is the problem.
There's an old adage that every "scripting" language starts out small, but then ultimately needs all the features of a full programming language. If we start putting programming features into HTML, we'll eventually turn it into a full turing-complete programming language, with loops, conditionals, variables, and function calls. We'll have recreated javascript, outside of javascript.