Opinion poll!
You have a <button>, it makes a <foo> open. What would be the best declarative attribute for the button to control the foo?
Opinion poll!
You have a <button>, it makes a <foo> open. What would be the best declarative attribute for the button to control the foo?
@keithamus Is there a reason not to extend the existing `type` attribute?
type=submit
type=reset
type=open (or expand, maybe? if it's expanding something on the current page, to distinguish that from opening a new link)
@keithamus @sil If it's designed to be an arbitrary name of a function/event to trigger on the other element, then yes, that's a very different API than adding new button types!
I'd go with the `command` / `commandtarget` attributes in that case.
I like the idea of using `action` for consistency, but formaction is a URL, so different.
PS I do hope it will also be possible to use a built-in function as the specified command, like play with a video element target, or open with a dialog target.