Post
That was discussed as one idea, unfortunately it gets syntactically tricky. If you set .commandForElement to an element without an ID then it sets the attribute to an empty string. So you'd have to have a way to deal with that. It'd also be a novel syntax to parse, so we decided against it.
0 reposts1 like
are command and commandfor pretty solid or still subject to change? I see they’ve made it to MDN already. developer.mozilla.org/en-US/docs/W...
developer.mozilla.orgInvoker Commands API - Web APIs | MDNThe Invoker Commands API provides a way to declaratively assign behaviors to buttons, allowing control of interactive elements when the button is enacted (clicked or invoked via a keypress, such as th...