Skip to content

Commit

Permalink
Define the top-level origin of an environment settings object
Browse files Browse the repository at this point in the history
This will provide the foundation for
whatwg/fetch#943 and other related changes
discussed in whatwg/fetch#904.
  • Loading branch information
shivanigithub authored Mar 11, 2020
1 parent 400de44 commit 916a923
Showing 1 changed file with 55 additions and 10 deletions.
65 changes: 55 additions & 10 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -79269,8 +79269,8 @@ dictionary <dfn>DragEventInit</dfn> : <span>MouseEventInit</span> {
</ol>

<p>To <dfn data-x="creating a new browsing context">create a new browsing context</dfn>, given
null or a <code>Document</code> object <var>creator</var> and <span>browsing context group</span>
<var>group</var>:</p>
null or a <code>Document</code> object <var>creator</var>, <span>browsing context group</span>
<var>group</var>, and an optional <var>intendedTopLevelOrigin</var>:</p>

<!-- Note: Do not append the new browsing context to group as we might be creating a nested
browsing context and not a top level browsing context -->
Expand Down Expand Up @@ -79315,8 +79315,12 @@ dictionary <dfn>DragEventInit</dfn> : <span>MouseEventInit</span> {
</ul>
</li>

<li><p><span>Set up a window environment settings object</span> with <var>realm execution
context</var>, and let <var>settingsObject</var> be the result.</p></li>
<li><p>Let <var>topLevelOrigin</var> be <var>intendedTopLevelOrigin</var>, if present, otherwise
let <var>topLevelOrigin</var> be <var>origin</var>.

<li><p>Let <var>settingsObject</var> be the result of <span data-x="set up a window environment
settings object">setting up a window environment settings object</span> given <var>realm
execution context</var> and <var>topLevelOrigin</var>.</p></li>

<li><p>Let <var>document</var> be a new <code>Document</code>, marked as an <span data-x="HTML
documents">HTML document</span> in <span>quirks mode</span>, whose <span
Expand Down Expand Up @@ -79399,10 +79403,16 @@ dictionary <dfn>DragEventInit</dfn> : <span>MouseEventInit</span> {
given an element <var>element</var>:</p>

<ol>
<li><p>Let <var>browsingContext</var> be the result of <span>creating a new browsing
context</span> with <var>element</var>'s <span>node document</span> and <var>element</var>'s
<li><p>Let <var>topLevelBrowsingContext</var> be <var>element</var>'s
<span>node document</span>'s <span data-x="concept-document-bc">browsing context</span>'s
<span>top-level browsing context</span>'s <span data-x="tlbc group">group</span>.</p></li>
<span>top-level browsing context</span>.</p></li>

<li><p>Let <var>topLevelOrigin</var> be <var>topLevelBrowsingContext</var>'s
<span>active document</span>'s <span>origin</span>.</p></li>

<li><p>Let <var>browsingContext</var> be the result of <span>creating a new browsing
context</span> with <var>topLevelBrowsingContext</var>'s <span data-x="tlbc group">group</span>
and <var>topLevelOrigin</var>.</p></li>

<li><p>Set <var>element</var>'s <span>nested browsing context</span> to
<var>browsingContext</var>.</p></li>
Expand Down Expand Up @@ -81437,7 +81447,8 @@ interface <dfn>BarProp</dfn> {
<h4>Script settings for <code>Window</code> objects</h4>

<p>When the user agent is required to <dfn>set up a window environment settings object</dfn>,
given a <span>JavaScript execution context</span> <var>execution context</var> and an optional
given a <span>JavaScript execution context</span> <var>execution context</var>, a
<span>top-level origin</span> <var>top-level origin</var>, and an optional
<span>environment</span> <var>reserved environment</var>, it must run the following steps:</p>

<ol>
Expand Down Expand Up @@ -81517,6 +81528,13 @@ interface <dfn>BarProp</dfn> {

</dd>

<dt>The <span>top-level origin</span></dt>
<dd>

<p>Return <var>top-level origin</var>.</p>

</dd>

<dt>The <span>HTTPS state</span></dt>
<dd>

Expand Down Expand Up @@ -85130,8 +85148,14 @@ interface <dfn>Location</dfn> { // but see also <a href="#the-location-interface
</ul>
</li>

<li><p>Let <var>topLevelOrigin</var> be <var>origin</var> if <var>browsingContext</var> is
<span>top-level browsing context</span>, otherwise let <var>topLevelOrigin</var> be
<var>browsingContext</var>'s <span>top-level browsing context</span>'s
<span>active document</span>'s <span>origin</span>.</p></li>

<li><p><span>Set up a window environment settings object</span> with <var>realm execution
context</var> and <var>reservedEnvironment</var>, if present.</p></li>
context</var>, <var>topLevelOrigin</var>, and <var>reservedEnvironment</var>, if
present.</p></li>
</ol>
</li>

Expand Down Expand Up @@ -89305,6 +89329,15 @@ interface <dfn>ApplicationCache</dfn> : <span>EventTarget</span> {

</dd>

<dt>A <dfn data-export="" data-dfn-for="environment settings object">top-level origin</dfn></dt>

<dd>

<p>The <span>origin</span> of the <span>top-level browsing context</span> at the time
this settings object was set up.</p>

</dd>

<dt>An <dfn data-export="" data-dfn-for="environment settings object">HTTPS state</dfn></dt>

<dd><p>An <span>HTTPS state value</span> representing the security properties of the network
Expand Down Expand Up @@ -91713,7 +91746,7 @@ import "https://example.com/foo/../module2.mjs";</code></pre>

<ol>
<li><p>Let <var>clusterKey</var> be the result of <span
data-x="obtain-agent-cluster-key">obtaining an agent cluster key</span> given
data-x="obtain-agent-cluster-key" data-export="">obtaining an agent cluster key</span> given
<var>origin</var>.</p></li>

<li><p>Let <var>agentCluster</var> be the result of <span
Expand Down Expand Up @@ -101859,6 +101892,18 @@ interface <dfn>SharedWorkerGlobalScope</dfn> : <span>WorkerGlobalScope</span> {

</dd>

<dt>The <span>top-level origin</span></dt>
<dd>

<p>Return <var>outside settings</var>'s <span>top-level origin</span> for a dedicated
worker.</p>

<p class="XXX">For shared and service workers this is still undefined and is being worked on,
since such workers could be associated with multiple <span data-x="top-level browsing
context">top-level browsing contexts</span>.</p>

</dd>

<dt>The <span>HTTPS state</span></dt>
<dd>

Expand Down

0 comments on commit 916a923

Please sign in to comment.