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

Make Document origin alias its policy container's origin. #1142

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
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
23 changes: 17 additions & 6 deletions dom.bs
Original file line number Diff line number Diff line change
Expand Up @@ -4336,9 +4336,19 @@ dom-Range-extractContents, dom-Range-cloneContents -->

<dl class=switch>
<dt>{{Document}}
<dd><p>Set <var>copy</var>'s <a for=Document>encoding</a>, <a for=Document>content type</a>,
<a for=Document>URL</a>, <a for=Document>origin</a>, <a for=Document>type</a>, and
<a for=Document>mode</a> to those of <var>node</var>.
<dd><p>Set <var>copy</var>'s:
<ul>
<li><a for=Document>encoding</a> to <var>node</var>'s <a for=Document>encoding</a>;</li>
<li><a for=Document>content type</a> to <var>node</var>'s
<a for=Document>content type</a>;</li>
<li><a for=Document>URL</a> to <var>node</var>'s <a for=Document>URL</a>;</li>
<li><a for=Document>policy container</a>'s <a for="Policy Container">origin</a> to
<var>node</var>'s <a for=Document>policy container</a>'s
<a for="Policy Container">origin</a>;</li>
<li><a for=Document>type</a> to <var>node</var>'s <a for=Document>type</a>; and</li>
<li><a for=Document>mode</a> to <var>node</var>'s <a for=Document>mode</a>.</li>
</ul>
</dd>

<dt>{{DocumentType}}
<dd><p>Set <var>copy</var>'s <a for=DocumentType>name</a>, <a>public ID</a>, and
Expand Down Expand Up @@ -4880,8 +4890,8 @@ known as <dfn export id=concept-document lt="document">documents</dfn>.
<p>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>origin</a> is an <a>opaque origin</a>,
<a for=Document>type</a> is "<code>xml</code>", and its
<a for=Document>origin</a> is the <a>document</a>'s <a for=Document>policy container</a>'s
<a for="Policy Container">origin</a>, <a for=Document>type</a> is "<code>xml</code>", and its
<a for=Document>mode</a> is "<code>no-quirks</code>".

<p>A <a>document</a> is said to be an <dfn export>XML document</dfn> if its <a for=Document>type</a>
Expand Down Expand Up @@ -4940,7 +4950,8 @@ null if <var>event</var>'s {{Event/type}} attribute value is "<code>load</code>"
</dl>

<p>The <dfn constructor for=Document lt=Document()><code>new Document()</code></dfn> constructor
steps are to set <a>this</a>'s <a for=Document>origin</a> to the <a for=Document>origin</a> of
steps are to set <a>this</a>'s <a for=Document>policy container</a>'s
<a for="Policy Container">origin</a> to the <a for=Document>origin</a> of
<a>current global object</a>'s <a>associated <code>Document</code></a>. [[!HTML]]

<p class=note>Unlike {{DOMImplementation/createDocument()}}, this constructor does not
Expand Down