Skip to content

Commit

Permalink
Editorial: centralize nested browsing context creation
Browse files Browse the repository at this point in the history
  • Loading branch information
annevk authored Jan 30, 2019
1 parent a48895e commit f75a7b2
Showing 1 changed file with 26 additions and 50 deletions.
76 changes: 26 additions & 50 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -29812,15 +29812,7 @@ interface <dfn>HTMLIFrameElement</dfn> : <span>HTMLElement</span> {
context</span>, the user agent must run these steps:

<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>.</p></li>

<li><p>Set the element's <span>nested browsing context</span> to
<var>browsingContext</var>.</p></li>

<li><p>If <var>element</var> has a <code data-x="attr-iframe-name">name</code> attribute, then
set <var>browsingContext</var>'s <span data-x="browsing context name">name</span> to the value of
this attribute.</p></li>
<li><p><span>Create a new nested browsing context</span> for <var>element</var>.</p></li>

<li><p><span>Process the <code>iframe</code> attributes</span> for the "first time".</p></li>
</ol>
Expand Down Expand Up @@ -30294,7 +30286,7 @@ interface <dfn>HTMLIFrameElement</dfn> : <span>HTMLElement</span> {
embedded content has specific dimensions (e.g. ad units have well-defined dimensions).</p>

<p>An <code>iframe</code> element never has <span>fallback content</span>, as it will always
<span data-x="creating a new browsing context">create</span> a nested <span>browsing context</span>, regardless of whether the specified initial
<span>create a new nested browsing context</span>, regardless of whether the specified initial
contents are successfully used.</p>

<hr> <!-- REFERRERPOLICY ATTRIBUTE -->
Expand Down Expand Up @@ -30556,23 +30548,10 @@ interface <dfn>HTMLEmbedElement</dfn> : <span>HTMLElement</span> {
<dt><code>image/svg+xml</code></dt>
<dd>
<ol>
<li>
<p>If <var>element</var>'s <span>nested browsing context</span> is null, then:</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>.</p></li>

<li><p>Set <var>element</var>'s <span>nested browsing context</span> to
<var>browsingContext</var>.</p></li>

<li><p>If <var>element</var> has a <code data-x="attr-embed-name">name</code>
attribute, then set <var>browsingContext</var>'s <span data-x="browsing context
name">name</span> to the value of this attribute.</p></li>
<!-- https://software.hixie.ch/utilities/js/live-dom-viewer/?saved=2291 - dynamic
changes to 'name' don't do anything -->
</ol>
</li>
<li><p>If <var>element</var>'s <span>nested browsing context</span> is null, then
<span>create a new nested browsing context</span> for <var>element</var>.</p></li>
<!-- https://software.hixie.ch/utilities/js/live-dom-viewer/?saved=2291 - dynamic changes
to 'name' don't do anything -->

<li>
<p><span>Navigate</span> <var>element</var>'s <span>nested browsing context</span> to
Expand All @@ -30586,7 +30565,7 @@ interface <dfn>HTMLEmbedElement</dfn> : <span>HTMLElement</span> {
locations.</p>
</li>

<li><p><var>embed</var> element now <span>represents</span> its <span>nested browsing
<li><p><var>element</var> now <span>represents</span> its <span>nested browsing
context</span>.</p></li>

<li><p>When the <code>Document</code> of the <span>nested browsing context</span> is
Expand Down Expand Up @@ -31347,13 +31326,8 @@ interface <dfn>HTMLObjectElement</dfn> : <span>HTMLElement</span> {

<dd>

<p>If the <code>object</code> element's <span>nested browsing context</span> is null, set
the element's <span>nested browsing context</span> to a <span data-x="creating a new
browsing context">newly-created browsing context</span> with the element's <span>node
document</span>.</p>

<p>The <code>object</code> element must be associated with a newly created <span>nested
browsing context</span>, if it does not already have one.</p>
<p>If the <code>object</code> element's <span>nested browsing context</span> is null, then
<span>create a new nested browsing context</span> for the element.</p>

<p>If the <span>URL</span> of the given resource is not <code>about:blank</code>, the
element's <span>nested browsing context</span> must then be <span
Expand All @@ -31374,11 +31348,6 @@ interface <dfn>HTMLObjectElement</dfn> : <span>HTMLElement</span> {
<p>The <code>object</code> element <span>represents</span> the <span>nested browsing
context</span>.</p>

<p>If the <code data-x="attr-object-name">name</code> attribute is present, the
<code>object</code> element's <span>nested browsing context</span>'s <span>browsing context
name</span> must be set to the value of this attribute; otherwise, the <span>browsing
context name</span> must be set to the empty string.</p>

<p class="note">In certain situations, e.g., if the resource was fetched from an
<span>application cache</span> but it is an HTML file with a <code
data-x="attr-html-manifest">manifest</code> attribute that points to a different <span
Expand Down Expand Up @@ -77133,7 +77102,7 @@ dictionary <dfn>DragEventInit</dfn> : <span>MouseEventInit</span> {
<p class="note">This creates a <span>top-level browsing context</span>.</p>

<p>To <dfn data-x="creating a new auxiliary browsing context">create a new auxiliary browsing
context</dfn>, given a <span>browsing context</span> <var>opener</var>:
context</dfn>, given a <span>browsing context</span> <var>opener</var>:</p>

<ol>
<li><p>Let <var>browsingContext</var> be the result of <span>creating a new browsing
Expand All @@ -77160,6 +77129,21 @@ dictionary <dfn>DragEventInit</dfn> : <span>MouseEventInit</span> {
<p class="note">This creates a <span>top-level browsing context</span> that is also an
<span>auxiliary browsing context</span>.</p>

<p>To <dfn id="creating-a-new-nested-browsing-context">create a new nested browsing context</dfn>,
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>.</p></li>

<li><p>Set <var>element</var>'s <span>nested browsing context</span> to
<var>browsingContext</var>.</p></li>

<li><p>If <var>element</var> has a <code data-x="">name</code> attribute, then set
<var>browsingContext</var>'s <span data-x="browsing context name">name</span> to the value of
this attribute.</p></li>
</ol>

</div>


Expand Down Expand Up @@ -115303,15 +115287,7 @@ interface <dfn>HTMLFrameSetElement</dfn> : <span>HTMLElement</span> {
after not having been one, the user agent must run these steps:</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>.</p></li>

<li><p>Set <var>element</var>'s <span>nested browsing context</span> to
<var>browsingContext</var>.</p></li>

<li><p>If <var>element</var> has a <code undefined data-x="attr-frame-name">name</code>
attribute, then set <var>browsingContext</var>'s <span data-x="browsing context name">name</span>
to the value of this attribute.</p></li>
<li><p><span>Create a new nested browsing context</span> for <var>element</var>.</p></li>

<li><p><span>Process the <code>frame</code> attributes</span> for the first time.</p></li>
</ol>
Expand Down

0 comments on commit f75a7b2

Please sign in to comment.