Skip to content

Commit a10dc52

Browse files
authored
Merge pull request #42 from mgiuca/spec-check-missing-url
spec: Check whether url is present before processing it.
2 parents 0be490e + 3386eb5 commit a10dc52

File tree

1 file changed

+20
-15
lines changed

1 file changed

+20
-15
lines changed

index.html

+20-15
Original file line numberDiff line numberDiff line change
@@ -117,21 +117,26 @@ <h4>
117117
<ol>
118118
<li>Let <var>p</var> be a newly created promise.
119119
</li>
120-
<li>Let <var>url</var> be the result of running the <a data-cite=
121-
"!URL#concept-url-parser">URL parser</a> on <var>data</var>'s
122-
<a for="ShareData">url</a>, with the document's <a data-cite=
123-
"!HTML#document-base-url">base URL</a>, and no <var>encoding
124-
override</var>.
125-
</li>
126-
<li>If <var>url</var> is failure, reject <var>p</var> with
127-
<a data-cite=
128-
"!WEBIDL#exceptiondef-typeerror"><code>TypeError</code></a>, and
129-
abort these steps.
130-
</li>
131-
<li>Set <var>data</var> to a copy of <var>data</var>, with its
132-
<a for="ShareData">url</a> field set to the result of running the
133-
<a data-cite="!URL#concept-url-serializer">URL serializer</a> on
134-
<var>url</var>.
120+
<li>If <var>data</var>'s <a for="ShareData">url</a> member is
121+
<a data-cite="!WEBIDL#dfn-present">present</a>:
122+
<ol>
123+
<li>Let <var>url</var> be the result of running the
124+
<a data-cite="!URL#concept-url-parser">URL parser</a> on <var>
125+
data</var>'s <a for="ShareData">url</a>, with the document's
126+
<a data-cite="!HTML#document-base-url">base URL</a>, and no
127+
<var>encoding override</var>.
128+
</li>
129+
<li>If <var>url</var> is failure, reject <var>p</var> with
130+
<a data-cite=
131+
"!WEBIDL#exceptiondef-typeerror"><code>TypeError</code></a>,
132+
and abort these steps.
133+
</li>
134+
<li>Set <var>data</var> to a copy of <var>data</var>, with its
135+
<a for="ShareData">url</a> field set to the result of running
136+
the <a data-cite="!URL#concept-url-serializer">URL
137+
serializer</a> on <var>url</var>.
138+
</li>
139+
</ol>
135140
</li>
136141
<li>If the method call was not <a data-cite=
137142
"!HTML#triggered-by-user-activation">triggered by user

0 commit comments

Comments
 (0)