- From: Anne van Kesteren <notifications@github.com>
- Date: Thu, 12 Jan 2023 07:24:58 -0800
- To: whatwg/xhr <xhr@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <whatwg/xhr/pull/366/review/1245812575@github.com>
@annevk commented on this pull request.
This will require some minor export tweaks to the HTML Standard. I'd be willing to help with that. Making this change still seems reasonable.
> + <p>If <var>submitter</var> is not null, then:
+ <ol>
+ <li><p>If <var>submitter</var> is not a submit button, then throw a {{TypeError}}.
+ <li><p>If <var>submitter</var>'s form owner is not <var>form</var>, then throw a "{{NotFoundError!!exception}}" {{DOMException}}.
+ </ol>
```suggestion
<p>If <var>submitter</var> is non-null, then:
<ol>
<li><p>If <var>submitter</var> is not a <a>submit button</a>, then <a>throw</a> a
{{TypeError}}.
<li><p>If <var>submitter</var>'s <a>form owner</a> is not <var>form</var>, then <a>throw</a> a
"{{NotFoundError!!exception}}" {{DOMException}}.
</ol>
```
This will require changing the HTML Standard to export "concept-submit-button" and "form owner" ("form owner" maybe also needs a suitable for attribute value).
Good call on using a `TypeError` and making that check first. That allows some flexibility between enforcing that through Web IDL and an algorithm.
--
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/xhr/pull/366#pullrequestreview-1245812575
You are receiving this because you are subscribed to this thread.
Message ID: <whatwg/xhr/pull/366/review/1245812575@github.com>
Received on Thursday, 12 January 2023 15:25:10 UTC