Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use HTML's 'document base URL' concept. #258

Merged
merged 1 commit into from
Jun 1, 2016
Merged
Show file tree
Hide file tree
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
9 changes: 4 additions & 5 deletions dom.bs
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ urlPrefix: https://html.spec.whatwg.org/multipage/
text: origin; url: concept-origin
urlPrefix: infrastructure.html
text: in parallel
text: document base URL
url: https://w3c.github.io/DOM-Parsing/#widl-Range-createContextualFragment-DocumentFragment-DOMString-fragment
type: method; text: createContextualFragment(); for: Range;
type: interface
Expand Down Expand Up @@ -3607,11 +3608,11 @@ the first matching statement, switching on the <a>context object</a>:

<dl class=domintro>
<dt><code><var>node</var> . {{Node/baseURI}}</code>
<dd>Returns <var>node</var>'s <a>node document</a>'s <a>base URL</a>.
<dd>Returns <var>node</var>'s <a>node document</a>'s <a>document base URL</a>.
</dl>

The <dfn attribute for=Node><code>baseURI</code></dfn> attribute's getter must return
<a>node document</a>'s <a>base URL</a>, <a lt="URL serializer" spec=url>serialized</a>.
<a>node document</a>'s <a>document base URL</a>, <a lt="URL serializer" spec=url>serialized</a>.

<hr>

Expand Down Expand Up @@ -4546,7 +4547,6 @@ dictionary ElementCreationOptions {
known as <dfn export id=concept-document lt="document">documents</dfn>.

Each <a>document</a> has an associated
<dfn export for=Document id=concept-document-base-url>base URL</dfn> (a <a for=url>URL</a>),
<dfn export for=Document id=concept-document-encoding>encoding</dfn> (an <a for="/">encoding</a>),
<dfn export for=Document id=concept-document-content-type>content type</dfn> (a string),
<dfn export for=Document id=concept-document-url>URL</dfn> (a <a for=url>URL</a>),
Expand All @@ -4555,8 +4555,7 @@ Each <a>document</a> has an associated
[[!ENCODING]]
[[!URL]]

Unless stated otherwise, a <a>document</a>'s <a for=Document>base URL</a> is
"<code>about:blank</code>", <a for=Document>encoding</a> is the <a>utf-8</a>
Unless stated otherwise, a <a>document</a>'s <a for=Document>encoding</a> is the <a>utf-8</a>
<a for="/">encoding</a>, <a for=Document>content type</a> is
"<code>application/xml</code>", <a for=Document>URL</a> is "<code>about:blank</code>",
<a for=Document>type</a> is "<code>xml</code>", and its
Expand Down
9 changes: 4 additions & 5 deletions dom.html
Original file line number Diff line number Diff line change
Expand Up @@ -2341,9 +2341,9 @@ <h3 class="heading settled" data-level="4.4" id="interface-node"><span class="se
<hr>
<dl class="domintro">
<dt><code><var>node</var> . <code class="idl"><a data-link-type="idl" href="#dom-node-baseuri">baseURI</a></code></code>
<dd>Returns <var>node</var>’s <a data-link-type="dfn" href="#concept-node-document">node document</a>’s <a data-link-type="dfn" href="#concept-document-base-url">base URL</a>.
<dd>Returns <var>node</var>’s <a data-link-type="dfn" href="#concept-node-document">node document</a>’s <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/infrastructure.html#document-base-url">document base URL</a>.
</dl>
<p>The <dfn class="idl-code" data-dfn-for="Node" data-dfn-type="attribute" data-export="" id="dom-node-baseuri"><code>baseURI</code><a class="self-link" href="#dom-node-baseuri"></a></dfn> attribute’s getter must return <a data-link-type="dfn" href="#concept-node-document">node document</a>’s <a data-link-type="dfn" href="#concept-document-base-url">base URL</a>, <a data-link-type="dfn" href="https://url.spec.whatwg.org/#concept-url-serializer">serialized</a>.</p>
<p>The <dfn class="idl-code" data-dfn-for="Node" data-dfn-type="attribute" data-export="" id="dom-node-baseuri"><code>baseURI</code><a class="self-link" href="#dom-node-baseuri"></a></dfn> attribute’s getter must return <a data-link-type="dfn" href="#concept-node-document">node document</a>’s <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/infrastructure.html#document-base-url">document base URL</a>, <a data-link-type="dfn" href="https://url.spec.whatwg.org/#concept-url-serializer">serialized</a>.</p>
<hr>
<dl class="domintro">
<dt><code><var>node</var> . <code class="idl"><a data-link-type="idl" href="#dom-node-isconnected">isConnected</a></code></code>
Expand Down Expand Up @@ -2803,9 +2803,8 @@ <h3 class="heading settled" data-level="4.5" id="interface-document"><span class
</pre>
<p><code class="idl"><a data-link-type="idl" href="#document">Document</a></code> <a data-link-type="dfn" href="#concept-node">nodes</a> are simply
known as <dfn data-dfn-type="dfn" data-export="" data-lt="document" id="concept-document">documents<a class="self-link" href="#concept-document"></a></dfn>.</p>
<p>Each <a data-link-type="dfn" href="#concept-document">document</a> has an associated <dfn data-dfn-for="Document" data-dfn-type="dfn" data-export="" id="concept-document-base-url">base URL<a class="self-link" href="#concept-document-base-url"></a></dfn> (a <a data-link-type="dfn" href="https://url.spec.whatwg.org/#concept-url">URL</a>), <dfn data-dfn-for="Document" data-dfn-type="dfn" data-export="" id="concept-document-encoding">encoding<a class="self-link" href="#concept-document-encoding"></a></dfn> (an <a data-link-type="dfn" href="https://encoding.spec.whatwg.org/#encoding">encoding</a>), <dfn data-dfn-for="Document" data-dfn-type="dfn" data-export="" id="concept-document-content-type">content type<a class="self-link" href="#concept-document-content-type"></a></dfn> (a string), <dfn data-dfn-for="Document" data-dfn-type="dfn" data-export="" id="concept-document-url">URL<a class="self-link" href="#concept-document-url"></a></dfn> (a <a data-link-type="dfn" href="https://url.spec.whatwg.org/#concept-url">URL</a>), <dfn data-dfn-for="Document" data-dfn-type="dfn" data-export="" id="concept-document-type">type<a class="self-link" href="#concept-document-type"></a></dfn> ("<code>xml</code>" or "<code>html</code>"), and <dfn data-dfn-for="Document" data-dfn-type="dfn" data-export="" id="concept-document-mode">mode<a class="self-link" href="#concept-document-mode"></a></dfn> ("<code>no-quirks</code>", "<code>quirks</code>", or "<code>limited-quirks</code>"). <a data-link-type="biblio" href="#biblio-encoding">[ENCODING]</a> <a data-link-type="biblio" href="#biblio-url">[URL]</a></p>
<p>Unless stated otherwise, a <a data-link-type="dfn" href="#concept-document">document</a>’s <a data-link-type="dfn" href="#concept-document-base-url">base URL</a> is
"<code>about:blank</code>", <a data-link-type="dfn" href="#concept-document-encoding">encoding</a> is the <a data-link-type="dfn" href="https://encoding.spec.whatwg.org/#utf-8">utf-8</a> <a data-link-type="dfn" href="https://encoding.spec.whatwg.org/#encoding">encoding</a>, <a data-link-type="dfn" href="#concept-document-content-type">content type</a> is
<p>Each <a data-link-type="dfn" href="#concept-document">document</a> has an associated <dfn data-dfn-for="Document" data-dfn-type="dfn" data-export="" id="concept-document-encoding">encoding<a class="self-link" href="#concept-document-encoding"></a></dfn> (an <a data-link-type="dfn" href="https://encoding.spec.whatwg.org/#encoding">encoding</a>), <dfn data-dfn-for="Document" data-dfn-type="dfn" data-export="" id="concept-document-content-type">content type<a class="self-link" href="#concept-document-content-type"></a></dfn> (a string), <dfn data-dfn-for="Document" data-dfn-type="dfn" data-export="" id="concept-document-url">URL<a class="self-link" href="#concept-document-url"></a></dfn> (a <a data-link-type="dfn" href="https://url.spec.whatwg.org/#concept-url">URL</a>), <dfn data-dfn-for="Document" data-dfn-type="dfn" data-export="" id="concept-document-type">type<a class="self-link" href="#concept-document-type"></a></dfn> ("<code>xml</code>" or "<code>html</code>"), and <dfn data-dfn-for="Document" data-dfn-type="dfn" data-export="" id="concept-document-mode">mode<a class="self-link" href="#concept-document-mode"></a></dfn> ("<code>no-quirks</code>", "<code>quirks</code>", or "<code>limited-quirks</code>"). <a data-link-type="biblio" href="#biblio-encoding">[ENCODING]</a> <a data-link-type="biblio" href="#biblio-url">[URL]</a></p>
<p>Unless stated otherwise, a <a data-link-type="dfn" href="#concept-document">document</a>’s <a data-link-type="dfn" href="#concept-document-encoding">encoding</a> is the <a data-link-type="dfn" href="https://encoding.spec.whatwg.org/#utf-8">utf-8</a> <a data-link-type="dfn" href="https://encoding.spec.whatwg.org/#encoding">encoding</a>, <a data-link-type="dfn" href="#concept-document-content-type">content type</a> is
"<code>application/xml</code>", <a data-link-type="dfn" href="#concept-document-url">URL</a> is "<code>about:blank</code>", <a data-link-type="dfn" href="#concept-document-type">type</a> is "<code>xml</code>", and its <a data-link-type="dfn" href="#concept-document-mode">mode</a> is "<code>no-quirks</code>".</p>
<p>Unless stated otherwise, a <a data-link-type="dfn" href="#concept-document">document</a>’s <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/browsers.html#concept-origin">origin</a> is a new <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/browsers.html#concept-origin-opaque">opaque origin</a>. <a data-link-type="biblio" href="#biblio-html">[HTML]</a></p>
<p>A <a data-link-type="dfn" href="#concept-document">document</a> is said to be an <dfn data-dfn-type="dfn" data-export="" id="xml-document">XML document<a class="self-link" href="#xml-document"></a></dfn> if its <a data-link-type="dfn" href="#concept-document-type">type</a> is "<code>xml</code>", and an <dfn data-dfn-type="dfn" data-export="" id="html-document">HTML document<a class="self-link" href="#html-document"></a></dfn> otherwise. Whether a <a data-link-type="dfn" href="#concept-document">document</a> is an <a data-link-type="dfn" href="#html-document">HTML document</a> or an <a data-link-type="dfn" href="#xml-document">XML document</a> affects the behavior of certain APIs.</p>
Expand Down