Skip to content

Commit

Permalink
Make Document origin alias its policy container's origin.
Browse files Browse the repository at this point in the history
This change depends on the changes in whatwg/html#8447
which adds origin to policy container.
  • Loading branch information
wanderview committed Jan 11, 2023
1 parent 4a6af79 commit 27ee644
Showing 1 changed file with 17 additions and 6 deletions.
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

0 comments on commit 27ee644

Please sign in to comment.