Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 20 additions & 5 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -3400,6 +3400,8 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
<dfn data-x="document-custom-element-registry" data-x-href="https://dom.spec.whatwg.org/#document-custom-element-registry">custom element registry</dfn>,
<dfn data-x="concept-document-allow-declarative-shadow-roots" data-x-href="https://dom.spec.whatwg.org/#concept-document-allow-declarative-shadow-roots">allow declarative shadow roots</dfn>, and
<dfn data-x="concept-document-content-type" data-x-href="https://dom.spec.whatwg.org/#concept-document-content-type">content type</dfn> of a <code>Document</code></li>
<li>The <dfn data-x-href="https://dom.spec.whatwg.org/#get-the-base-url">get the base URL</dfn> algorithm and
<dfn data-x-href="https://dom.spec.whatwg.org/#base-url-override">base URL override</dfn> of a <code>Document</code></li>
<li>The distinction between <dfn data-x-href="https://dom.spec.whatwg.org/#xml-document">XML documents</dfn> and
<dfn data-x-href="https://dom.spec.whatwg.org/#html-document">HTML documents</dfn></li>
<li>The terms <dfn data-x-href="https://dom.spec.whatwg.org/#concept-document-quirks">quirks mode</dfn>,
Expand Down Expand Up @@ -7755,16 +7757,29 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
<span>URL record</span> obtained by running these steps:</p>

<ol>
<li><p>If <var>document</var> has no <span>descendant</span> <code>base</code> element that has
an <code data-x="attr-base-href">href</code> attribute, then return <var>document</var>'s
<span>fallback base URL</span>.</p></li>
<li>
<p>If <var>document</var> has no <span>descendant</span> <code>base</code> element that has an
<code data-x="attr-base-href">href</code> attribute:</p>

<ol>
<li><p>If <var>document</var>'s <span>base URL override</span> is non-null, then return
<var>document</var>'s <span>base URL override</span>.</p></li>

<li><p>Otherwise, return the <span>frozen base URL</span> of the first <code>base</code> element
in <var>document</var> that has an <code data-x="attr-base-href">href</code> attribute, in
<li><p>Return <var>document</var>'s <span>fallback base URL</span>.</p></li>
</ol>
</li>

<li><p>Return the <span>frozen base URL</span> of the first <code>base</code> element in
<var>document</var> that has an <code data-x="attr-base-href">href</code> attribute, in
<span>tree order</span>.</p></li>
</ol>
</div>

<div algorithm>
<p>A <code>Document</code> <var>document</var>'s <span>get the base URL</span> algorithm returns
<var>document</var>'s <span>document base URL</span>.</p>
</div>

<div algorithm>
<p>The <dfn>fallback base URL</dfn> of a <code>Document</code> object <var>document</var> is the
<span>URL record</span> obtained by running these steps:</p>
Expand Down
Loading