Re: [WICG/webcomponents] Form-associated custom elements: being a submit button (#814)

Agreed on continuing to use the internal equivalent of `click()`.

I'm not convinced we need to support the case of a form without a submit button that essentially has a single control. I suspect that behavior is there largely for `isindex`. Do you have a use case?

Implicit submission can be implemented as follows, though this is not very ergonomic:
```js
const submitButton = control.form.querySelector(":default");
if (submitButton) {
  submitButton.click();
}
```
Offering a shortcut for that might be reasonable, though it should probably go on `<form>`. It would still be good to have some tests around this to see what implementations do here today.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/WICG/webcomponents/issues/814#issuecomment-1429847178
You are receiving this because you are subscribed to this thread.

Message ID: <WICG/webcomponents/issues/814/1429847178@github.com>

Received on Tuesday, 14 February 2023 14:37:10 UTC