Skip to content

Commit

Permalink
Throw for new FormData() when "constructing the entry list" returns null
Browse files Browse the repository at this point in the history
  • Loading branch information
tkent-google authored and annevk committed Jan 8, 2019
1 parent b7c1875 commit 7f602dc
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions xhr.bs
Original file line number Diff line number Diff line change
Expand Up @@ -1776,8 +1776,18 @@ constructor must run these steps:
<ol>
<li><p>Let <var>fd</var> be a new {{FormData}} object.

<li><p>If <var>form</var> is given, then set <var>fd</var>'s <a for=FormData>entry list</a> to the
result of <a>constructing the entry list</a> for <var>form</var>.
<li>
<p>If <var>form</var> is given, then:

<ol>
<li><p>Let <var>list</var> be the result of <a>constructing the entry list</a> for
<var>form</var>.

<li><p>If <var>list</var> is null, then <a>throw</a> an "{{InvalidStateError!!exception}}"
{{DOMException}}.

<li><p>Set <var>fd</var>'s <a for=FormData>entry list</a> to <var>list</var>.
</ol>

<li><p>Return <var>fd</var>.
</ol>
Expand Down

0 comments on commit 7f602dc

Please sign in to comment.