Skip to content

Commit

Permalink
Clarify HTMLHyperlinkElementUtils set the url for absent attribute cases
Browse files Browse the repository at this point in the history
In the event that the href content attribute is missing, it will be set
to null and it will no longer try to parse the missing attribute.

Fixes #1340.
  • Loading branch information
WillRay authored and domenic committed Jun 30, 2016
1 parent 2381476 commit 5f1afb9
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -21494,12 +21494,18 @@ interface <dfn>HTMLHyperlinkElementUtils</dfn> {
data-x="concept-hyperlink-url">url</dfn> (null or a <span>URL</span>). It is initially null.

<p>An element implementing the <code>HTMLHyperlinkElementUtils</code> mixin has an associated <dfn
data-noexport="" data-x="concept-hyperlink-url-set">set the url</dfn> algorithm, which sets this
element's <span data-x="concept-hyperlink-url">url</span> to the <span>resulting URL record</span>
of <span data-x="parse a url">parsing</span> this element's <code
data-x="attr-hyperlink-href">href</code> content attribute value relative to this element's
<span>node document</span>. If <span data-x="parse a url">parsing</span> was aborted with an
error, set this element's <span data-x="concept-hyperlink-url">url</span> to null.</p>
data-noexport="" data-x="concept-hyperlink-url-set">set the url</dfn> algorithm, which runs these
steps:</p>

<ol>
<li><p>If this element's <code data-x="attr-hyperlink-href">href</code> content attribute is
absent, set this element's <span data-x="concept-hyperlink-url">url</span> to null.</p></li>
<li><p>Otherwise, parse this element's <code data-x="attr-hyperlink-href">href</code> content
attribute value relative to this element's <span>node document</span>. If <span data-x="parse a
url">parsing</span> is successful, set this element's <span
data-x="concept-hyperlink-url">url</span> to the result; otherwise, set this element's
<span data-x="concept-hyperlink-url">url</span> to null.</li>
</ol>

<p>When elements implementing the <code>HTMLHyperlinkElementUtils</code> mixin are created, and
whenever those elements have their <code data-x="attr-hyperlink-href">href</code> content
Expand Down Expand Up @@ -119918,6 +119924,7 @@ INSERT INTERFACES HERE
Weston Ruter,
Wilhelm Joys Andersen,
Will Levine,
Will Ray,
William Chen,
William Swanson,
Wladimir Palant,
Expand Down

0 comments on commit 5f1afb9

Please sign in to comment.