Skip to content

Commit

Permalink
Handle document.domain
Browse files Browse the repository at this point in the history
  • Loading branch information
domenic committed Jun 11, 2020
1 parent 7c56e2d commit 1b727c6
Showing 1 changed file with 27 additions and 18 deletions.
45 changes: 27 additions & 18 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -79513,7 +79513,8 @@ interface <dfn>BarProp</dfn> {
<p>Can be set to a value that removes subdomains, to change the <span>origin</span>'s <span
data-x="concept-origin-domain">domain</span> to allow pages on other subdomains of the same
domain (if they do the same thing) to access each other. (Can't be set in sandboxed
<code>iframe</code>s.)</p>
<code>iframe</code>s, and setting it will do nothing if the <code>Document</code> is <a
href="#origin-isolation">origin-isolated</a>.)</p>
</dd>
</dl>

Expand Down Expand Up @@ -79558,38 +79559,34 @@ interface <dfn>BarProp</dfn> {
<li><p>Return true.</p></li>
</ol>

<p>The <dfn><code data-x="dom-document-domain">domain</code></dfn> attribute's getter must run
these steps:</p>
<p>The <dfn><code data-x="dom-document-domain">domain</code></dfn> getter steps are:</p>

<ol>
<li><p>Let <var>effectiveDomain</var> be this <code>Document</code> object's
<span>origin</span>'s <span data-x="concept-origin-effective-domain">effective domain</span>.
<li><p>Let <var>effectiveDomain</var> be <span>this</span>'s <span>origin</span>'s <span
data-x="concept-origin-effective-domain">effective domain</span>.

<li><p>If <var>effectiveDomain</var> is null, then return the empty string.</p></li>

<li><p>Return <var>effectiveDomain</var>, <span data-x="host
serializer">serialized</span>.</p></li>
</ol>

<p>The <code data-x="dom-document-domain">domain</code> attribute's setter must run these
steps:</p>
<p>The <code data-x="dom-document-domain">domain</code> setter steps are:</p>

<ol>
<li><p>If this <code>Document</code> object's <span data-x="concept-document-bc">browsing
context</span> is null, then throw a <span>"<code>SecurityError</code>"</span>
<code>DOMException</code>.</p></li>
<li><p>If <span>this</span>'s <span data-x="concept-document-bc">browsing context</span> is null,
then throw a <span>"<code>SecurityError</code>"</span> <code>DOMException</code>.</p></li>

<li><p>If this <code>Document</code> object's <span>active sandboxing flag set</span> has its
<span>sandboxed <code data-x="dom-document-domain">document.domain</code> browsing context
flag</span> set, then throw a <span>"<code>SecurityError</code>"</span>
<code>DOMException</code>.</p></li>
<li><p>If <span>this</span>'s <span>active sandboxing flag set</span> has its <span>sandboxed
<code data-x="dom-document-domain">document.domain</code> browsing context flag</span> set, then
throw a <span>"<code>SecurityError</code>"</span> <code>DOMException</code>.</p></li>

<li><p>If this <code>Document</code> object is not <span>allowed to use</span> the "<code
<li><p>If <span>this</span> is not <span>allowed to use</span> the "<code
data-x="document-domain-feature">document-domain</code>" feature, then throw a
<span>"<code>SecurityError</code>"</span> <code>DOMException</code>.</p></li>

<li><p>Let <var>effectiveDomain</var> be this <code>Document</code> object's
<span>origin</span>'s <span data-x="concept-origin-effective-domain">effective domain</span>.
<li><p>Let <var>effectiveDomain</var> be <span>this</span>'s <span>origin</span>'s <span
data-x="concept-origin-effective-domain">effective domain</span>.

<li><p>If <var>effectiveDomain</var> is null, then throw a
<span>"<code>SecurityError</code>"</span> <code>DOMException</code>.</p></li>
Expand All @@ -79598,7 +79595,19 @@ interface <dfn>BarProp</dfn> {
a registrable domain suffix of and is not equal to</span> <var>effectiveDomain</var>, then throw
a <span>"<code>SecurityError</code>"</span> <code>DOMException</code>.</p></li>

<li><p>Set this <code>Document</code> object's <span>origin</span>'s <span
<li>
<p>If <span>this</span>'s <span data-x="concept-document-bc">browsing context</span>'s <span
data-x="tlbc group">group</span>'s <span>historical agent cluster key
map</span>[<var>origin</var>] is <var>origin</var>, then return.</p>

<p class="note">In this case the <code>Document</code> is <a
href="#origin-isolation">origin-isolated</a>, either explicitly by using the `<code
data-x="http-origin-isolation">Origin-Isolation</code>` header, or automatically because a
previous same-origin <code>Document</code> in the same <span>browsing context group</span> used
the header.</p>
</li>

<li><p>Set <span>this</span>'s <span>origin</span>'s <span
data-x="concept-origin-domain">domain</span> to the result of <span data-x="host
parser">parsing</span> the given value.</p></li>
</ol>
Expand Down

0 comments on commit 1b727c6

Please sign in to comment.