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?

<button clickaction=open
17.1%
<button invokeaction=open
42.1%
<button command=open
26.3%
Other (comment ideas)
14.5%
Poll ended at .

@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)

@AmeliaBR the reason it to allow for totally arbitrary values, so `type=frob` and so on. Ideally it should be named separately to avoid us clobbering the existing attribute name.
@keithamus @AmeliaBR but a button can only do one thing, right? If it’s a button type=prod then it can’t be a button type=open, and that’s good. I mean, what would button type=submit command=frob do? That feels weird.
@sil @AmeliaBR it's more that if we allow `type=whatever`, and your website implements `type=toggle`, the platform can never add `type=toggle` because it'd break your website.

@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.