[html5] r8777 - [e] (0) Recast window.open() in terms of an algorithm. Fixing https://www.w3.org [...]

whatwg at whatwg.org whatwg at whatwg.org
Tue Sep 16 14:23:52 PDT 2014


Author: ianh
Date: 2014-09-16 14:23:48 -0700 (Tue, 16 Sep 2014)
New Revision: 8777

Modified:
   complete.html
   index
   source
Log:
[e] (0) Recast window.open() in terms of an algorithm.
Fixing https://www.w3.org/Bugs/Public/show_bug.cgi?id=26317
Affected topics: DOM APIs

Modified: complete.html
===================================================================
--- complete.html	2014-09-16 20:32:51 UTC (rev 8776)
+++ complete.html	2014-09-16 21:23:48 UTC (rev 8777)
@@ -57617,77 +57617,64 @@
 
   
 
-  
-
   <p>The <dfn id=dom-open><code>open()</code></dfn> method on <code id=apis-for-creating-and-navigating-browsing-contexts-by-name:window><a href=#window>Window</a></code> objects
   provides a mechanism for <a href=#navigate id=apis-for-creating-and-navigating-browsing-contexts-by-name:navigate>navigating</a> an existing <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context>browsing
   context</a> or opening and navigating an <a href=#auxiliary-browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:auxiliary-browsing-context>auxiliary browsing context</a>.</p>
 
-  <p>The method has four arguments, though they are all optional.</p>
+  <p>When the method is invoked, the user agent must run the following steps:</p>
 
-  <p>The first argument, <var>url</var>, must be a <a href=#valid-non-empty-url id=apis-for-creating-and-navigating-browsing-contexts-by-name:valid-non-empty-url>valid non-empty URL</a> for a
-  page to load in the browsing context. If the first argument is the empty string, then the <var>url</var> argument must be interpreted as "<code id=apis-for-creating-and-navigating-browsing-contexts-by-name:about:blank-2><a href=#about:blank>about:blank</a></code>". Otherwise, the
-  argument must be <a href=#resolve-a-url id=apis-for-creating-and-navigating-browsing-contexts-by-name:resolve-a-url>resolved</a> to an <a href=#absolute-url id=apis-for-creating-and-navigating-browsing-contexts-by-name:absolute-url>absolute URL</a> (or
-  an error), relative to the <a href=#api-base-url id=apis-for-creating-and-navigating-browsing-contexts-by-name:api-base-url>API base URL</a> specified by the <a href=#entry-settings-object id=apis-for-creating-and-navigating-browsing-contexts-by-name:entry-settings-object>entry settings
-  object</a> when the method was invoked.</p>
+  <ol><li><p>Let <var>entry settings</var> be the <a href=#entry-settings-object id=apis-for-creating-and-navigating-browsing-contexts-by-name:entry-settings-object>entry settings object</a> when the method
+   was invoked.<li><p>Let <var>incumbent settings</var> be the <a href=#incumbent-settings-object id=apis-for-creating-and-navigating-browsing-contexts-by-name:incumbent-settings-object>incumbent settings object</a> when the
+   method was invoked.<li><p>Let <var>url</var> be the first argument.<li><p>Let <var>target</var> be the second argument.<li><p>Let <var id=apis-for-creating-and-navigating-browsing-contexts-by-name:dom-open-features-2><a data-x-internal=dom-open-features href=http://dev.w3.org/csswg/cssom-view/#the-features-argument-to-the-open()-method>features</a></var> be the third argument.<li><p>Let <var>replace</var> be the fourth argument.<li><p>If <var>url</var> is the empty string, set <var>url</var> to
+   "<code id=apis-for-creating-and-navigating-browsing-contexts-by-name:about:blank-2><a href=#about:blank>about:blank</a></code>".<li><p><a href=#resolve-a-url id=apis-for-creating-and-navigating-browsing-contexts-by-name:resolve-a-url>Resolve</a> <var>url</var> relative to the <a href=#api-base-url id=apis-for-creating-and-navigating-browsing-contexts-by-name:api-base-url>API base
+   URL</a> specified by <var>entry settings</var>.<li><p>Let <var>resource</var> be the <a href=#resulting-absolute-url id=apis-for-creating-and-navigating-browsing-contexts-by-name:resulting-absolute-url>resulting absolute URL</a>, if any, or else an
+   error.<li><p>Let <var>source browsing context</var> be the <a href=#responsible-browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:responsible-browsing-context>responsible browsing context</a>
+   specified by <var>incumbent settings</var>.<li>
 
-  <p>The second argument, <var>target</var>, specifies the <a href=#browsing-context-name id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-name>name</a> of the browsing context that is to be navigated. It must be a <a href=#valid-browsing-context-name-or-keyword id=apis-for-creating-and-navigating-browsing-contexts-by-name:valid-browsing-context-name-or-keyword>valid
-  browsing context name or keyword</a>.</p>
+    <p>If the user has indicated a preference for which <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-2>browsing context</a> to navigate,
+    follow these substeps:</p>
 
-  <p>The third argument, <var id=apis-for-creating-and-navigating-browsing-contexts-by-name:dom-open-features-2><a data-x-internal=dom-open-features href=http://dev.w3.org/csswg/cssom-view/#the-features-argument-to-the-open()-method>features</a></var>, must be interpreted as
-  defined in the CSSOM View specification. <a href=#refsCSSOMVIEW>[CSSOMVIEW]</a></p>
+    <ol><li><p>Let <var>target browsing context</var> be the <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-3>browsing context</a> indicated by
+     the user.<li><p>If <var>target browsing context</var> is a new <a href=#top-level-browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:top-level-browsing-context>top-level browsing context</a>,
+     let the <a href=#responsible-browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:responsible-browsing-context-2>responsible browsing context</a> specified by <var>incumbent settings</var> be
+     set as <var>target browsing context</var>'s <a href=#one-permitted-sandboxed-navigator id=apis-for-creating-and-navigating-browsing-contexts-by-name:one-permitted-sandboxed-navigator>one permitted sandboxed
+     navigator</a>.</ol>
 
-  <p>The fourth argument, <var>replace</var>, specifies whether or not the new page will
-  <a href=#replacement-enabled id=apis-for-creating-and-navigating-browsing-contexts-by-name:replacement-enabled>replace</a> the page currently loaded in the browsing
-  context, when <var>target</var> identifies an existing browsing context (as opposed to
-  leaving the current page in the browsing context's <a href=#session-history id=apis-for-creating-and-navigating-browsing-contexts-by-name:session-history>session history</a>).</p>
+    <p class=example>For example, suppose there is a user agent that supports control-clicking a
+    link to open it in a new tab. If a user clicks in that user agent on an element whose <code id=apis-for-creating-and-navigating-browsing-contexts-by-name:handler-onclick><a href=#handler-onclick>onclick</a></code> handler uses the <code id=apis-for-creating-and-navigating-browsing-contexts-by-name:dom-open-2><a href=#dom-open>window.open()</a></code> API to open a page in an iframe, but, while doing so,
+    holds the control key down, the user agent could override the selection of the target browsing
+    context to instead target a new tab.</p>
 
-  <p>When the method is invoked, the user agent must first select a <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-2>browsing context</a> to
-  navigate by applying <a href=#the-rules-for-choosing-a-browsing-context-given-a-browsing-context-name id=apis-for-creating-and-navigating-browsing-contexts-by-name:the-rules-for-choosing-a-browsing-context-given-a-browsing-context-name>the rules for choosing a browsing context given a browsing context
-  name</a> using the <var>target</var> argument as the name and the <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-3>browsing
-  context</a> of the script as the context in which the algorithm is executed, unless the user
-  has indicated a preference, in which case the browsing context to navigate may instead be the one
-  indicated by the user, and, if this is a new <a href=#top-level-browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:top-level-browsing-context>top-level browsing context</a>, the
-  <a href=#responsible-browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:responsible-browsing-context>responsible browsing context</a> specified by the <a href=#incumbent-settings-object id=apis-for-creating-and-navigating-browsing-contexts-by-name:incumbent-settings-object>incumbent settings object</a>
-  must be set as the new <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-4>browsing context</a>'s <a href=#one-permitted-sandboxed-navigator id=apis-for-creating-and-navigating-browsing-contexts-by-name:one-permitted-sandboxed-navigator>one permitted sandboxed
-  navigator</a></p>
+    <p>Otherwise, apply <a href=#the-rules-for-choosing-a-browsing-context-given-a-browsing-context-name id=apis-for-creating-and-navigating-browsing-contexts-by-name:the-rules-for-choosing-a-browsing-context-given-a-browsing-context-name>the rules for choosing a browsing context given a browsing context
+    name</a> using <var>target</var> as the name and <var>source browsing context</var> as the
+    context in which the algorithm is executed. If this results in there not being a chosen browsing
+    context, then throw an <code id=apis-for-creating-and-navigating-browsing-contexts-by-name:invalidaccesserror><a href=#invalidaccesserror>InvalidAccessError</a></code> exception and abort these steps.
+    Otherwise, let <var>target browsing context</var> be the <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-4>browsing context</a> so
+    obtained.</p>
 
-  <p class=example>For example, suppose there is a user agent that supports control-clicking a
-  link to open it in a new tab. If a user clicks in that user agent on an element whose <code id=apis-for-creating-and-navigating-browsing-contexts-by-name:handler-onclick><a href=#handler-onclick>onclick</a></code> handler uses the <code id=apis-for-creating-and-navigating-browsing-contexts-by-name:dom-open-2><a href=#dom-open>window.open()</a></code> API to open a page in an iframe, but, while doing so, holds
-  the control key down, the user agent could override the selection of the target browsing context
-  to instead target a new tab.</p>
+   <li><p>If <var>target browsing context</var> was just created, either as part of <a href=#the-rules-for-choosing-a-browsing-context-given-a-browsing-context-name id=apis-for-creating-and-navigating-browsing-contexts-by-name:the-rules-for-choosing-a-browsing-context-given-a-browsing-context-name-2>the rules
+   for choosing a browsing context given a browsing context name</a> or due to the user
+   indicating a preference for navigating a new <a href=#top-level-browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:top-level-browsing-context-2>top-level browsing context</a>, then let
+   <var>new</var> be true. Otherwise, let it be false.<li><p>Interpret <var>features</var> as defined in the CSSOM View specification. <a href=#refsCSSOMVIEW>[CSSOMVIEW]</a><li><p>If <var>resource</var> is an error, then, optionally, set it to the <a href=#url id=apis-for-creating-and-navigating-browsing-contexts-by-name:url>URL</a>
+   "<code id=apis-for-creating-and-navigating-browsing-contexts-by-name:about:blank-3><a href=#about:blank>about:blank</a></code>". Otherwise, let it be a resource representing an inline error
+   page.<li><p>If <var>resource</var> is "<code id=apis-for-creating-and-navigating-browsing-contexts-by-name:about:blank-4><a href=#about:blank>about:blank</a></code>" and <var>new</var> is true,
+   <a href=#queue-a-task id=apis-for-creating-and-navigating-browsing-contexts-by-name:queue-a-task>queue a task</a> to <a href=#fire-a-simple-event id=apis-for-creating-and-navigating-browsing-contexts-by-name:fire-a-simple-event>fire a simple event</a> named <code id=apis-for-creating-and-navigating-browsing-contexts-by-name:event-load><a href=#event-load>load</a></code> at <var>target browsing context</var>'s <code id=apis-for-creating-and-navigating-browsing-contexts-by-name:window-2><a href=#window>Window</a></code>
+   object, with <i id=apis-for-creating-and-navigating-browsing-contexts-by-name:concept-event-target-override><a href=#concept-event-target-override>target override</a></i> set to <var>target
+   browsing context</var>'s <a href=#concept-document-window id=apis-for-creating-and-navigating-browsing-contexts-by-name:concept-document-window><code>Window</code> object's
+   <code>Document</code></a> object.<li><p>Otherwise, <var>resource</var> is either a <a href=#url id=apis-for-creating-and-navigating-browsing-contexts-by-name:url-2>URL</a> other than
+   "<code id=apis-for-creating-and-navigating-browsing-contexts-by-name:about:blank-5><a href=#about:blank>about:blank</a></code>" or a resource representing an inline error page, or <var>new</var> is
+   false. <a href=#navigate id=apis-for-creating-and-navigating-browsing-contexts-by-name:navigate-2>Navigate</a> <var>target browsing
+   context</var> to <var>resource</var>, with <a href=#exceptions-enabled id=apis-for-creating-and-navigating-browsing-contexts-by-name:exceptions-enabled>exceptions enabled</a>. If <var>new</var> is
+   true, then <a href=#replacement-enabled id=apis-for-creating-and-navigating-browsing-contexts-by-name:replacement-enabled>replacement must be enabled</a> also. The
+   <a href=#source-browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:source-browsing-context>source browsing context</a> is <var>source browsing context</var>.<li><p>Return the <code id=apis-for-creating-and-navigating-browsing-contexts-by-name:windowproxy><a href=#windowproxy>WindowProxy</a></code> object of <var>target browsing
+   context</var>.</ol>
 
-  <p>If applying <a href=#the-rules-for-choosing-a-browsing-context-given-a-browsing-context-name id=apis-for-creating-and-navigating-browsing-contexts-by-name:the-rules-for-choosing-a-browsing-context-given-a-browsing-context-name-2>the rules for choosing a browsing context given a browsing context
-  name</a> using the <var>target</var> argument results in there not being a chosen
-  browsing context, then throw an <code id=apis-for-creating-and-navigating-browsing-contexts-by-name:invalidaccesserror><a href=#invalidaccesserror>InvalidAccessError</a></code> exception and abort these
-  steps. (If the user agent used a user-specified browsing context, then this paragraph is skipped.)</p>
-
-  <p>Otherwise, if <var>url</var> is not "<code id=apis-for-creating-and-navigating-browsing-contexts-by-name:about:blank-3><a href=#about:blank>about:blank</a></code>", the user agent must
-  <a href=#navigate id=apis-for-creating-and-navigating-browsing-contexts-by-name:navigate-2>navigate</a> the selected <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-5>browsing context</a> to the
-  <a href=#absolute-url id=apis-for-creating-and-navigating-browsing-contexts-by-name:absolute-url-2>absolute URL</a> obtained from <a href=#resolve-a-url id=apis-for-creating-and-navigating-browsing-contexts-by-name:resolve-a-url-2>resolving</a> <var>url</var> earlier, with <a href=#exceptions-enabled id=apis-for-creating-and-navigating-browsing-contexts-by-name:exceptions-enabled>exceptions enabled</a>. If the <var>replace</var> is true or if the <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-6>browsing context</a> was just created as part
-  of <a href=#the-rules-for-choosing-a-browsing-context-given-a-browsing-context-name id=apis-for-creating-and-navigating-browsing-contexts-by-name:the-rules-for-choosing-a-browsing-context-given-a-browsing-context-name-3>the rules for choosing a browsing context given a browsing context name</a>, then
-  <a href=#replacement-enabled id=apis-for-creating-and-navigating-browsing-contexts-by-name:replacement-enabled-2>replacement must be enabled</a> also. The navigation must be
-  done with the <a href=#responsible-browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:responsible-browsing-context-2>responsible browsing context</a> specified by the <a href=#incumbent-settings-object id=apis-for-creating-and-navigating-browsing-contexts-by-name:incumbent-settings-object-2>incumbent settings
-  object</a> as the <a href=#source-browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:source-browsing-context>source browsing context</a>. If the <a href=#resolve-a-url id=apis-for-creating-and-navigating-browsing-contexts-by-name:resolve-a-url-3>resolve a URL</a>
-  algorithm failed, then the user agent may either instead <a href=#navigate id=apis-for-creating-and-navigating-browsing-contexts-by-name:navigate-3>navigate</a> to an inline error
-  page, with <a href=#exceptions-enabled id=apis-for-creating-and-navigating-browsing-contexts-by-name:exceptions-enabled-2>exceptions enabled</a> and using the same replacement behavior and source
-  browsing context behavior as described earlier in this paragraph; or treat the <var>url</var> as "<code id=apis-for-creating-and-navigating-browsing-contexts-by-name:about:blank-4><a href=#about:blank>about:blank</a></code>", acting as described in the next paragraph.</p>
-
-  <p>If <var>url</var> <em>is</em> "<code id=apis-for-creating-and-navigating-browsing-contexts-by-name:about:blank-5><a href=#about:blank>about:blank</a></code>", and the <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-7>browsing
-  context</a> was just created as part of <a href=#the-rules-for-choosing-a-browsing-context-given-a-browsing-context-name id=apis-for-creating-and-navigating-browsing-contexts-by-name:the-rules-for-choosing-a-browsing-context-given-a-browsing-context-name-4>the rules for choosing a browsing context given a
-  browsing context name</a>, then the user agent must instead <a href=#queue-a-task id=apis-for-creating-and-navigating-browsing-contexts-by-name:queue-a-task>queue a task</a> to
-  <a href=#fire-a-simple-event id=apis-for-creating-and-navigating-browsing-contexts-by-name:fire-a-simple-event>fire a simple event</a> named <code id=apis-for-creating-and-navigating-browsing-contexts-by-name:event-load><a href=#event-load>load</a></code> at the selected
-  <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-8>browsing context</a>'s <code id=apis-for-creating-and-navigating-browsing-contexts-by-name:window-2><a href=#window>Window</a></code> object, with <i id=apis-for-creating-and-navigating-browsing-contexts-by-name:concept-event-target-override><a href=#concept-event-target-override>target override</a></i> set to the selected <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-9>browsing context</a>'s <a href=#concept-document-window id=apis-for-creating-and-navigating-browsing-contexts-by-name:concept-document-window><code>Window</code> object's <code>Document</code></a> object.</p>
-
-  <p>The method must return the <code id=apis-for-creating-and-navigating-browsing-contexts-by-name:windowproxy><a href=#windowproxy>WindowProxy</a></code> object of the <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-10>browsing context</a>
-  that was navigated, or null if no browsing context was navigated.</p>
-
   <hr>
 
   <p>The <dfn id=dom-name><code>name</code></dfn> attribute of the <code id=apis-for-creating-and-navigating-browsing-contexts-by-name:window-3><a href=#window>Window</a></code> object
-  must, on getting, return the current <a href=#browsing-context-name id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-name-2>name</a> of the
-  <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-11>browsing context</a>, if one is set, or the empty string otherwise; and, on setting, set
-  the <a href=#browsing-context-name id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-name-3>name</a> of the <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-12>browsing context</a> to the
+  must, on getting, return the current <a href=#browsing-context-name id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-name>name</a> of the
+  <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-5>browsing context</a>, if one is set, or the empty string otherwise; and, on setting, set
+  the <a href=#browsing-context-name id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-name-2>name</a> of the <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-6>browsing context</a> to the
   new value.</p>
 
   <p class=note>The name <a href=#resetBCName>gets reset</a> when the browsing context is
@@ -57696,27 +57683,27 @@
   <hr>
 
   <p>The <dfn id=dom-window-close><code>close()</code></dfn> method on <code id=apis-for-creating-and-navigating-browsing-contexts-by-name:window-4><a href=#window>Window</a></code>
-  objects should, if all the following conditions are met, <a href=#close-a-browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:close-a-browsing-context>close</a> the <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-13>browsing context</a> <var>A</var>:
+  objects should, if all the following conditions are met, <a href=#close-a-browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:close-a-browsing-context>close</a> the <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-7>browsing context</a> <var>A</var>:
 
-  <ul class=brief><li>The corresponding <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-14>browsing context</a> <var>A</var> is
-   <a href=#script-closable id=apis-for-creating-and-navigating-browsing-contexts-by-name:script-closable>script-closable</a>.<li>The <a href=#responsible-browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:responsible-browsing-context-3>responsible browsing context</a> specified by the <a href=#incumbent-settings-object id=apis-for-creating-and-navigating-browsing-contexts-by-name:incumbent-settings-object-3>incumbent settings
-   object</a> is <a href=#familiar-with id=apis-for-creating-and-navigating-browsing-contexts-by-name:familiar-with>familiar with</a> the <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-15>browsing context</a> <var>A</var>.<li id=sandboxClose>The <a href=#responsible-browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:responsible-browsing-context-4>responsible browsing context</a> specified by the
-   <a href=#incumbent-settings-object id=apis-for-creating-and-navigating-browsing-contexts-by-name:incumbent-settings-object-4>incumbent settings object</a> is <a href=#allowed-to-navigate id=apis-for-creating-and-navigating-browsing-contexts-by-name:allowed-to-navigate>allowed to navigate</a> the <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-16>browsing
+  <ul class=brief><li>The corresponding <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-8>browsing context</a> <var>A</var> is
+   <a href=#script-closable id=apis-for-creating-and-navigating-browsing-contexts-by-name:script-closable>script-closable</a>.<li>The <a href=#responsible-browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:responsible-browsing-context-3>responsible browsing context</a> specified by the <a href=#incumbent-settings-object id=apis-for-creating-and-navigating-browsing-contexts-by-name:incumbent-settings-object-2>incumbent settings
+   object</a> is <a href=#familiar-with id=apis-for-creating-and-navigating-browsing-contexts-by-name:familiar-with>familiar with</a> the <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-9>browsing context</a> <var>A</var>.<li id=sandboxClose>The <a href=#responsible-browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:responsible-browsing-context-4>responsible browsing context</a> specified by the
+   <a href=#incumbent-settings-object id=apis-for-creating-and-navigating-browsing-contexts-by-name:incumbent-settings-object-3>incumbent settings object</a> is <a href=#allowed-to-navigate id=apis-for-creating-and-navigating-browsing-contexts-by-name:allowed-to-navigate>allowed to navigate</a> the <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-10>browsing
    context</a> <var>A</var>.</ul>
 
-  <p>A <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-17>browsing context</a> is <dfn id=script-closable>script-closable</dfn> if it is an <a href=#auxiliary-browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:auxiliary-browsing-context-2>auxiliary
+  <p>A <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-11>browsing context</a> is <dfn id=script-closable>script-closable</dfn> if it is an <a href=#auxiliary-browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:auxiliary-browsing-context-2>auxiliary
   browsing context</a> that was created by a script (as opposed to by an action of the user), or
-  if it is a <a href=#top-level-browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:top-level-browsing-context-2>top-level browsing context</a> whose <a href=#session-history id=apis-for-creating-and-navigating-browsing-contexts-by-name:session-history-2>session history</a> contains
+  if it is a <a href=#top-level-browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:top-level-browsing-context-3>top-level browsing context</a> whose <a href=#session-history id=apis-for-creating-and-navigating-browsing-contexts-by-name:session-history>session history</a> contains
   only one <code id=apis-for-creating-and-navigating-browsing-contexts-by-name:document><a href=#document>Document</a></code>.</p>
 
   <p>The <dfn id=dom-window-closed><code>closed</code></dfn> attribute on <code id=apis-for-creating-and-navigating-browsing-contexts-by-name:window-5><a href=#window>Window</a></code>
-  objects must return true if the <code id=apis-for-creating-and-navigating-browsing-contexts-by-name:window-6><a href=#window>Window</a></code> object's <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-18>browsing context</a> has
+  objects must return true if the <code id=apis-for-creating-and-navigating-browsing-contexts-by-name:window-6><a href=#window>Window</a></code> object's <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-12>browsing context</a> has
   been <a href=#a-browsing-context-is-discarded id=apis-for-creating-and-navigating-browsing-contexts-by-name:a-browsing-context-is-discarded>discarded</a>, and false otherwise.</p>
 
   <p>The <dfn id=dom-window-stop><code>stop()</code></dfn> method on <code id=apis-for-creating-and-navigating-browsing-contexts-by-name:window-7><a href=#window>Window</a></code>
-  objects should, if there is an existing attempt to <a href=#navigate id=apis-for-creating-and-navigating-browsing-contexts-by-name:navigate-4>navigate</a> the <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-19>browsing
+  objects should, if there is an existing attempt to <a href=#navigate id=apis-for-creating-and-navigating-browsing-contexts-by-name:navigate-3>navigate</a> the <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-13>browsing
   context</a> and that attempt is not currently running the <a href=#unload-a-document id=apis-for-creating-and-navigating-browsing-contexts-by-name:unload-a-document>unload a document</a>
-  algorithm, cancel that <a href=#navigate id=apis-for-creating-and-navigating-browsing-contexts-by-name:navigate-5>navigation</a>; then, it must <a href=#abort-a-document id=apis-for-creating-and-navigating-browsing-contexts-by-name:abort-a-document>abort</a> the <a href=#active-document id=apis-for-creating-and-navigating-browsing-contexts-by-name:active-document>active document</a> of the <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-20>browsing
+  algorithm, cancel that <a href=#navigate id=apis-for-creating-and-navigating-browsing-contexts-by-name:navigate-4>navigation</a>; then, it must <a href=#abort-a-document id=apis-for-creating-and-navigating-browsing-contexts-by-name:abort-a-document>abort</a> the <a href=#active-document id=apis-for-creating-and-navigating-browsing-contexts-by-name:active-document>active document</a> of the <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-14>browsing
   context</a> of the <code id=apis-for-creating-and-navigating-browsing-contexts-by-name:window-8><a href=#window>Window</a></code> object on which it was invoked.</p>
 
   

Modified: index
===================================================================
--- index	2014-09-16 20:32:51 UTC (rev 8776)
+++ index	2014-09-16 21:23:48 UTC (rev 8777)
@@ -57617,77 +57617,64 @@
 
   
 
-  
-
   <p>The <dfn id=dom-open><code>open()</code></dfn> method on <code id=apis-for-creating-and-navigating-browsing-contexts-by-name:window><a href=#window>Window</a></code> objects
   provides a mechanism for <a href=#navigate id=apis-for-creating-and-navigating-browsing-contexts-by-name:navigate>navigating</a> an existing <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context>browsing
   context</a> or opening and navigating an <a href=#auxiliary-browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:auxiliary-browsing-context>auxiliary browsing context</a>.</p>
 
-  <p>The method has four arguments, though they are all optional.</p>
+  <p>When the method is invoked, the user agent must run the following steps:</p>
 
-  <p>The first argument, <var>url</var>, must be a <a href=#valid-non-empty-url id=apis-for-creating-and-navigating-browsing-contexts-by-name:valid-non-empty-url>valid non-empty URL</a> for a
-  page to load in the browsing context. If the first argument is the empty string, then the <var>url</var> argument must be interpreted as "<code id=apis-for-creating-and-navigating-browsing-contexts-by-name:about:blank-2><a href=#about:blank>about:blank</a></code>". Otherwise, the
-  argument must be <a href=#resolve-a-url id=apis-for-creating-and-navigating-browsing-contexts-by-name:resolve-a-url>resolved</a> to an <a href=#absolute-url id=apis-for-creating-and-navigating-browsing-contexts-by-name:absolute-url>absolute URL</a> (or
-  an error), relative to the <a href=#api-base-url id=apis-for-creating-and-navigating-browsing-contexts-by-name:api-base-url>API base URL</a> specified by the <a href=#entry-settings-object id=apis-for-creating-and-navigating-browsing-contexts-by-name:entry-settings-object>entry settings
-  object</a> when the method was invoked.</p>
+  <ol><li><p>Let <var>entry settings</var> be the <a href=#entry-settings-object id=apis-for-creating-and-navigating-browsing-contexts-by-name:entry-settings-object>entry settings object</a> when the method
+   was invoked.<li><p>Let <var>incumbent settings</var> be the <a href=#incumbent-settings-object id=apis-for-creating-and-navigating-browsing-contexts-by-name:incumbent-settings-object>incumbent settings object</a> when the
+   method was invoked.<li><p>Let <var>url</var> be the first argument.<li><p>Let <var>target</var> be the second argument.<li><p>Let <var id=apis-for-creating-and-navigating-browsing-contexts-by-name:dom-open-features-2><a data-x-internal=dom-open-features href=http://dev.w3.org/csswg/cssom-view/#the-features-argument-to-the-open()-method>features</a></var> be the third argument.<li><p>Let <var>replace</var> be the fourth argument.<li><p>If <var>url</var> is the empty string, set <var>url</var> to
+   "<code id=apis-for-creating-and-navigating-browsing-contexts-by-name:about:blank-2><a href=#about:blank>about:blank</a></code>".<li><p><a href=#resolve-a-url id=apis-for-creating-and-navigating-browsing-contexts-by-name:resolve-a-url>Resolve</a> <var>url</var> relative to the <a href=#api-base-url id=apis-for-creating-and-navigating-browsing-contexts-by-name:api-base-url>API base
+   URL</a> specified by <var>entry settings</var>.<li><p>Let <var>resource</var> be the <a href=#resulting-absolute-url id=apis-for-creating-and-navigating-browsing-contexts-by-name:resulting-absolute-url>resulting absolute URL</a>, if any, or else an
+   error.<li><p>Let <var>source browsing context</var> be the <a href=#responsible-browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:responsible-browsing-context>responsible browsing context</a>
+   specified by <var>incumbent settings</var>.<li>
 
-  <p>The second argument, <var>target</var>, specifies the <a href=#browsing-context-name id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-name>name</a> of the browsing context that is to be navigated. It must be a <a href=#valid-browsing-context-name-or-keyword id=apis-for-creating-and-navigating-browsing-contexts-by-name:valid-browsing-context-name-or-keyword>valid
-  browsing context name or keyword</a>.</p>
+    <p>If the user has indicated a preference for which <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-2>browsing context</a> to navigate,
+    follow these substeps:</p>
 
-  <p>The third argument, <var id=apis-for-creating-and-navigating-browsing-contexts-by-name:dom-open-features-2><a data-x-internal=dom-open-features href=http://dev.w3.org/csswg/cssom-view/#the-features-argument-to-the-open()-method>features</a></var>, must be interpreted as
-  defined in the CSSOM View specification. <a href=#refsCSSOMVIEW>[CSSOMVIEW]</a></p>
+    <ol><li><p>Let <var>target browsing context</var> be the <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-3>browsing context</a> indicated by
+     the user.<li><p>If <var>target browsing context</var> is a new <a href=#top-level-browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:top-level-browsing-context>top-level browsing context</a>,
+     let the <a href=#responsible-browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:responsible-browsing-context-2>responsible browsing context</a> specified by <var>incumbent settings</var> be
+     set as <var>target browsing context</var>'s <a href=#one-permitted-sandboxed-navigator id=apis-for-creating-and-navigating-browsing-contexts-by-name:one-permitted-sandboxed-navigator>one permitted sandboxed
+     navigator</a>.</ol>
 
-  <p>The fourth argument, <var>replace</var>, specifies whether or not the new page will
-  <a href=#replacement-enabled id=apis-for-creating-and-navigating-browsing-contexts-by-name:replacement-enabled>replace</a> the page currently loaded in the browsing
-  context, when <var>target</var> identifies an existing browsing context (as opposed to
-  leaving the current page in the browsing context's <a href=#session-history id=apis-for-creating-and-navigating-browsing-contexts-by-name:session-history>session history</a>).</p>
+    <p class=example>For example, suppose there is a user agent that supports control-clicking a
+    link to open it in a new tab. If a user clicks in that user agent on an element whose <code id=apis-for-creating-and-navigating-browsing-contexts-by-name:handler-onclick><a href=#handler-onclick>onclick</a></code> handler uses the <code id=apis-for-creating-and-navigating-browsing-contexts-by-name:dom-open-2><a href=#dom-open>window.open()</a></code> API to open a page in an iframe, but, while doing so,
+    holds the control key down, the user agent could override the selection of the target browsing
+    context to instead target a new tab.</p>
 
-  <p>When the method is invoked, the user agent must first select a <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-2>browsing context</a> to
-  navigate by applying <a href=#the-rules-for-choosing-a-browsing-context-given-a-browsing-context-name id=apis-for-creating-and-navigating-browsing-contexts-by-name:the-rules-for-choosing-a-browsing-context-given-a-browsing-context-name>the rules for choosing a browsing context given a browsing context
-  name</a> using the <var>target</var> argument as the name and the <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-3>browsing
-  context</a> of the script as the context in which the algorithm is executed, unless the user
-  has indicated a preference, in which case the browsing context to navigate may instead be the one
-  indicated by the user, and, if this is a new <a href=#top-level-browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:top-level-browsing-context>top-level browsing context</a>, the
-  <a href=#responsible-browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:responsible-browsing-context>responsible browsing context</a> specified by the <a href=#incumbent-settings-object id=apis-for-creating-and-navigating-browsing-contexts-by-name:incumbent-settings-object>incumbent settings object</a>
-  must be set as the new <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-4>browsing context</a>'s <a href=#one-permitted-sandboxed-navigator id=apis-for-creating-and-navigating-browsing-contexts-by-name:one-permitted-sandboxed-navigator>one permitted sandboxed
-  navigator</a></p>
+    <p>Otherwise, apply <a href=#the-rules-for-choosing-a-browsing-context-given-a-browsing-context-name id=apis-for-creating-and-navigating-browsing-contexts-by-name:the-rules-for-choosing-a-browsing-context-given-a-browsing-context-name>the rules for choosing a browsing context given a browsing context
+    name</a> using <var>target</var> as the name and <var>source browsing context</var> as the
+    context in which the algorithm is executed. If this results in there not being a chosen browsing
+    context, then throw an <code id=apis-for-creating-and-navigating-browsing-contexts-by-name:invalidaccesserror><a href=#invalidaccesserror>InvalidAccessError</a></code> exception and abort these steps.
+    Otherwise, let <var>target browsing context</var> be the <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-4>browsing context</a> so
+    obtained.</p>
 
-  <p class=example>For example, suppose there is a user agent that supports control-clicking a
-  link to open it in a new tab. If a user clicks in that user agent on an element whose <code id=apis-for-creating-and-navigating-browsing-contexts-by-name:handler-onclick><a href=#handler-onclick>onclick</a></code> handler uses the <code id=apis-for-creating-and-navigating-browsing-contexts-by-name:dom-open-2><a href=#dom-open>window.open()</a></code> API to open a page in an iframe, but, while doing so, holds
-  the control key down, the user agent could override the selection of the target browsing context
-  to instead target a new tab.</p>
+   <li><p>If <var>target browsing context</var> was just created, either as part of <a href=#the-rules-for-choosing-a-browsing-context-given-a-browsing-context-name id=apis-for-creating-and-navigating-browsing-contexts-by-name:the-rules-for-choosing-a-browsing-context-given-a-browsing-context-name-2>the rules
+   for choosing a browsing context given a browsing context name</a> or due to the user
+   indicating a preference for navigating a new <a href=#top-level-browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:top-level-browsing-context-2>top-level browsing context</a>, then let
+   <var>new</var> be true. Otherwise, let it be false.<li><p>Interpret <var>features</var> as defined in the CSSOM View specification. <a href=#refsCSSOMVIEW>[CSSOMVIEW]</a><li><p>If <var>resource</var> is an error, then, optionally, set it to the <a href=#url id=apis-for-creating-and-navigating-browsing-contexts-by-name:url>URL</a>
+   "<code id=apis-for-creating-and-navigating-browsing-contexts-by-name:about:blank-3><a href=#about:blank>about:blank</a></code>". Otherwise, let it be a resource representing an inline error
+   page.<li><p>If <var>resource</var> is "<code id=apis-for-creating-and-navigating-browsing-contexts-by-name:about:blank-4><a href=#about:blank>about:blank</a></code>" and <var>new</var> is true,
+   <a href=#queue-a-task id=apis-for-creating-and-navigating-browsing-contexts-by-name:queue-a-task>queue a task</a> to <a href=#fire-a-simple-event id=apis-for-creating-and-navigating-browsing-contexts-by-name:fire-a-simple-event>fire a simple event</a> named <code id=apis-for-creating-and-navigating-browsing-contexts-by-name:event-load><a href=#event-load>load</a></code> at <var>target browsing context</var>'s <code id=apis-for-creating-and-navigating-browsing-contexts-by-name:window-2><a href=#window>Window</a></code>
+   object, with <i id=apis-for-creating-and-navigating-browsing-contexts-by-name:concept-event-target-override><a href=#concept-event-target-override>target override</a></i> set to <var>target
+   browsing context</var>'s <a href=#concept-document-window id=apis-for-creating-and-navigating-browsing-contexts-by-name:concept-document-window><code>Window</code> object's
+   <code>Document</code></a> object.<li><p>Otherwise, <var>resource</var> is either a <a href=#url id=apis-for-creating-and-navigating-browsing-contexts-by-name:url-2>URL</a> other than
+   "<code id=apis-for-creating-and-navigating-browsing-contexts-by-name:about:blank-5><a href=#about:blank>about:blank</a></code>" or a resource representing an inline error page, or <var>new</var> is
+   false. <a href=#navigate id=apis-for-creating-and-navigating-browsing-contexts-by-name:navigate-2>Navigate</a> <var>target browsing
+   context</var> to <var>resource</var>, with <a href=#exceptions-enabled id=apis-for-creating-and-navigating-browsing-contexts-by-name:exceptions-enabled>exceptions enabled</a>. If <var>new</var> is
+   true, then <a href=#replacement-enabled id=apis-for-creating-and-navigating-browsing-contexts-by-name:replacement-enabled>replacement must be enabled</a> also. The
+   <a href=#source-browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:source-browsing-context>source browsing context</a> is <var>source browsing context</var>.<li><p>Return the <code id=apis-for-creating-and-navigating-browsing-contexts-by-name:windowproxy><a href=#windowproxy>WindowProxy</a></code> object of <var>target browsing
+   context</var>.</ol>
 
-  <p>If applying <a href=#the-rules-for-choosing-a-browsing-context-given-a-browsing-context-name id=apis-for-creating-and-navigating-browsing-contexts-by-name:the-rules-for-choosing-a-browsing-context-given-a-browsing-context-name-2>the rules for choosing a browsing context given a browsing context
-  name</a> using the <var>target</var> argument results in there not being a chosen
-  browsing context, then throw an <code id=apis-for-creating-and-navigating-browsing-contexts-by-name:invalidaccesserror><a href=#invalidaccesserror>InvalidAccessError</a></code> exception and abort these
-  steps. (If the user agent used a user-specified browsing context, then this paragraph is skipped.)</p>
-
-  <p>Otherwise, if <var>url</var> is not "<code id=apis-for-creating-and-navigating-browsing-contexts-by-name:about:blank-3><a href=#about:blank>about:blank</a></code>", the user agent must
-  <a href=#navigate id=apis-for-creating-and-navigating-browsing-contexts-by-name:navigate-2>navigate</a> the selected <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-5>browsing context</a> to the
-  <a href=#absolute-url id=apis-for-creating-and-navigating-browsing-contexts-by-name:absolute-url-2>absolute URL</a> obtained from <a href=#resolve-a-url id=apis-for-creating-and-navigating-browsing-contexts-by-name:resolve-a-url-2>resolving</a> <var>url</var> earlier, with <a href=#exceptions-enabled id=apis-for-creating-and-navigating-browsing-contexts-by-name:exceptions-enabled>exceptions enabled</a>. If the <var>replace</var> is true or if the <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-6>browsing context</a> was just created as part
-  of <a href=#the-rules-for-choosing-a-browsing-context-given-a-browsing-context-name id=apis-for-creating-and-navigating-browsing-contexts-by-name:the-rules-for-choosing-a-browsing-context-given-a-browsing-context-name-3>the rules for choosing a browsing context given a browsing context name</a>, then
-  <a href=#replacement-enabled id=apis-for-creating-and-navigating-browsing-contexts-by-name:replacement-enabled-2>replacement must be enabled</a> also. The navigation must be
-  done with the <a href=#responsible-browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:responsible-browsing-context-2>responsible browsing context</a> specified by the <a href=#incumbent-settings-object id=apis-for-creating-and-navigating-browsing-contexts-by-name:incumbent-settings-object-2>incumbent settings
-  object</a> as the <a href=#source-browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:source-browsing-context>source browsing context</a>. If the <a href=#resolve-a-url id=apis-for-creating-and-navigating-browsing-contexts-by-name:resolve-a-url-3>resolve a URL</a>
-  algorithm failed, then the user agent may either instead <a href=#navigate id=apis-for-creating-and-navigating-browsing-contexts-by-name:navigate-3>navigate</a> to an inline error
-  page, with <a href=#exceptions-enabled id=apis-for-creating-and-navigating-browsing-contexts-by-name:exceptions-enabled-2>exceptions enabled</a> and using the same replacement behavior and source
-  browsing context behavior as described earlier in this paragraph; or treat the <var>url</var> as "<code id=apis-for-creating-and-navigating-browsing-contexts-by-name:about:blank-4><a href=#about:blank>about:blank</a></code>", acting as described in the next paragraph.</p>
-
-  <p>If <var>url</var> <em>is</em> "<code id=apis-for-creating-and-navigating-browsing-contexts-by-name:about:blank-5><a href=#about:blank>about:blank</a></code>", and the <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-7>browsing
-  context</a> was just created as part of <a href=#the-rules-for-choosing-a-browsing-context-given-a-browsing-context-name id=apis-for-creating-and-navigating-browsing-contexts-by-name:the-rules-for-choosing-a-browsing-context-given-a-browsing-context-name-4>the rules for choosing a browsing context given a
-  browsing context name</a>, then the user agent must instead <a href=#queue-a-task id=apis-for-creating-and-navigating-browsing-contexts-by-name:queue-a-task>queue a task</a> to
-  <a href=#fire-a-simple-event id=apis-for-creating-and-navigating-browsing-contexts-by-name:fire-a-simple-event>fire a simple event</a> named <code id=apis-for-creating-and-navigating-browsing-contexts-by-name:event-load><a href=#event-load>load</a></code> at the selected
-  <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-8>browsing context</a>'s <code id=apis-for-creating-and-navigating-browsing-contexts-by-name:window-2><a href=#window>Window</a></code> object, with <i id=apis-for-creating-and-navigating-browsing-contexts-by-name:concept-event-target-override><a href=#concept-event-target-override>target override</a></i> set to the selected <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-9>browsing context</a>'s <a href=#concept-document-window id=apis-for-creating-and-navigating-browsing-contexts-by-name:concept-document-window><code>Window</code> object's <code>Document</code></a> object.</p>
-
-  <p>The method must return the <code id=apis-for-creating-and-navigating-browsing-contexts-by-name:windowproxy><a href=#windowproxy>WindowProxy</a></code> object of the <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-10>browsing context</a>
-  that was navigated, or null if no browsing context was navigated.</p>
-
   <hr>
 
   <p>The <dfn id=dom-name><code>name</code></dfn> attribute of the <code id=apis-for-creating-and-navigating-browsing-contexts-by-name:window-3><a href=#window>Window</a></code> object
-  must, on getting, return the current <a href=#browsing-context-name id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-name-2>name</a> of the
-  <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-11>browsing context</a>, if one is set, or the empty string otherwise; and, on setting, set
-  the <a href=#browsing-context-name id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-name-3>name</a> of the <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-12>browsing context</a> to the
+  must, on getting, return the current <a href=#browsing-context-name id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-name>name</a> of the
+  <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-5>browsing context</a>, if one is set, or the empty string otherwise; and, on setting, set
+  the <a href=#browsing-context-name id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-name-2>name</a> of the <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-6>browsing context</a> to the
   new value.</p>
 
   <p class=note>The name <a href=#resetBCName>gets reset</a> when the browsing context is
@@ -57696,27 +57683,27 @@
   <hr>
 
   <p>The <dfn id=dom-window-close><code>close()</code></dfn> method on <code id=apis-for-creating-and-navigating-browsing-contexts-by-name:window-4><a href=#window>Window</a></code>
-  objects should, if all the following conditions are met, <a href=#close-a-browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:close-a-browsing-context>close</a> the <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-13>browsing context</a> <var>A</var>:
+  objects should, if all the following conditions are met, <a href=#close-a-browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:close-a-browsing-context>close</a> the <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-7>browsing context</a> <var>A</var>:
 
-  <ul class=brief><li>The corresponding <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-14>browsing context</a> <var>A</var> is
-   <a href=#script-closable id=apis-for-creating-and-navigating-browsing-contexts-by-name:script-closable>script-closable</a>.<li>The <a href=#responsible-browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:responsible-browsing-context-3>responsible browsing context</a> specified by the <a href=#incumbent-settings-object id=apis-for-creating-and-navigating-browsing-contexts-by-name:incumbent-settings-object-3>incumbent settings
-   object</a> is <a href=#familiar-with id=apis-for-creating-and-navigating-browsing-contexts-by-name:familiar-with>familiar with</a> the <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-15>browsing context</a> <var>A</var>.<li id=sandboxClose>The <a href=#responsible-browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:responsible-browsing-context-4>responsible browsing context</a> specified by the
-   <a href=#incumbent-settings-object id=apis-for-creating-and-navigating-browsing-contexts-by-name:incumbent-settings-object-4>incumbent settings object</a> is <a href=#allowed-to-navigate id=apis-for-creating-and-navigating-browsing-contexts-by-name:allowed-to-navigate>allowed to navigate</a> the <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-16>browsing
+  <ul class=brief><li>The corresponding <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-8>browsing context</a> <var>A</var> is
+   <a href=#script-closable id=apis-for-creating-and-navigating-browsing-contexts-by-name:script-closable>script-closable</a>.<li>The <a href=#responsible-browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:responsible-browsing-context-3>responsible browsing context</a> specified by the <a href=#incumbent-settings-object id=apis-for-creating-and-navigating-browsing-contexts-by-name:incumbent-settings-object-2>incumbent settings
+   object</a> is <a href=#familiar-with id=apis-for-creating-and-navigating-browsing-contexts-by-name:familiar-with>familiar with</a> the <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-9>browsing context</a> <var>A</var>.<li id=sandboxClose>The <a href=#responsible-browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:responsible-browsing-context-4>responsible browsing context</a> specified by the
+   <a href=#incumbent-settings-object id=apis-for-creating-and-navigating-browsing-contexts-by-name:incumbent-settings-object-3>incumbent settings object</a> is <a href=#allowed-to-navigate id=apis-for-creating-and-navigating-browsing-contexts-by-name:allowed-to-navigate>allowed to navigate</a> the <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-10>browsing
    context</a> <var>A</var>.</ul>
 
-  <p>A <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-17>browsing context</a> is <dfn id=script-closable>script-closable</dfn> if it is an <a href=#auxiliary-browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:auxiliary-browsing-context-2>auxiliary
+  <p>A <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-11>browsing context</a> is <dfn id=script-closable>script-closable</dfn> if it is an <a href=#auxiliary-browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:auxiliary-browsing-context-2>auxiliary
   browsing context</a> that was created by a script (as opposed to by an action of the user), or
-  if it is a <a href=#top-level-browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:top-level-browsing-context-2>top-level browsing context</a> whose <a href=#session-history id=apis-for-creating-and-navigating-browsing-contexts-by-name:session-history-2>session history</a> contains
+  if it is a <a href=#top-level-browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:top-level-browsing-context-3>top-level browsing context</a> whose <a href=#session-history id=apis-for-creating-and-navigating-browsing-contexts-by-name:session-history>session history</a> contains
   only one <code id=apis-for-creating-and-navigating-browsing-contexts-by-name:document><a href=#document>Document</a></code>.</p>
 
   <p>The <dfn id=dom-window-closed><code>closed</code></dfn> attribute on <code id=apis-for-creating-and-navigating-browsing-contexts-by-name:window-5><a href=#window>Window</a></code>
-  objects must return true if the <code id=apis-for-creating-and-navigating-browsing-contexts-by-name:window-6><a href=#window>Window</a></code> object's <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-18>browsing context</a> has
+  objects must return true if the <code id=apis-for-creating-and-navigating-browsing-contexts-by-name:window-6><a href=#window>Window</a></code> object's <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-12>browsing context</a> has
   been <a href=#a-browsing-context-is-discarded id=apis-for-creating-and-navigating-browsing-contexts-by-name:a-browsing-context-is-discarded>discarded</a>, and false otherwise.</p>
 
   <p>The <dfn id=dom-window-stop><code>stop()</code></dfn> method on <code id=apis-for-creating-and-navigating-browsing-contexts-by-name:window-7><a href=#window>Window</a></code>
-  objects should, if there is an existing attempt to <a href=#navigate id=apis-for-creating-and-navigating-browsing-contexts-by-name:navigate-4>navigate</a> the <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-19>browsing
+  objects should, if there is an existing attempt to <a href=#navigate id=apis-for-creating-and-navigating-browsing-contexts-by-name:navigate-3>navigate</a> the <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-13>browsing
   context</a> and that attempt is not currently running the <a href=#unload-a-document id=apis-for-creating-and-navigating-browsing-contexts-by-name:unload-a-document>unload a document</a>
-  algorithm, cancel that <a href=#navigate id=apis-for-creating-and-navigating-browsing-contexts-by-name:navigate-5>navigation</a>; then, it must <a href=#abort-a-document id=apis-for-creating-and-navigating-browsing-contexts-by-name:abort-a-document>abort</a> the <a href=#active-document id=apis-for-creating-and-navigating-browsing-contexts-by-name:active-document>active document</a> of the <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-20>browsing
+  algorithm, cancel that <a href=#navigate id=apis-for-creating-and-navigating-browsing-contexts-by-name:navigate-4>navigation</a>; then, it must <a href=#abort-a-document id=apis-for-creating-and-navigating-browsing-contexts-by-name:abort-a-document>abort</a> the <a href=#active-document id=apis-for-creating-and-navigating-browsing-contexts-by-name:active-document>active document</a> of the <a href=#browsing-context id=apis-for-creating-and-navigating-browsing-contexts-by-name:browsing-context-14>browsing
   context</a> of the <code id=apis-for-creating-and-navigating-browsing-contexts-by-name:window-8><a href=#window>Window</a></code> object on which it was invoked.</p>
 
   

Modified: source
===================================================================
--- source	2014-09-16 20:32:51 UTC (rev 8776)
+++ source	2014-09-16 21:23:48 UTC (rev 8777)
@@ -77584,76 +77584,106 @@
 
   <div w-nodev>
 
-  <!-- This whole section should be rewritten to use algorithmic style -->
-
   <p>The <dfn><code data-x="dom-open">open()</code></dfn> method on <code>Window</code> objects
   provides a mechanism for <span data-x="navigate">navigating</span> an existing <span>browsing
   context</span> or opening and navigating an <span>auxiliary browsing context</span>.</p>
 
-  <p>The method has four arguments, though they are all optional.</p>
+  <p>When the method is invoked, the user agent must run the following steps:</p>
 
-  <p>The first argument, <var>url</var>, must be a <span>valid non-empty URL</span> for a
-  page to load in the browsing context. If the first argument is the empty string, then the <var>url</var> argument must be interpreted as "<code>about:blank</code>". Otherwise, the
-  argument must be <span data-x="resolve a url">resolved</span> to an <span>absolute URL</span> (or
-  an error), relative to the <span>API base URL</span> specified by the <span>entry settings
-  object</span> when the method was invoked.</p>
+  <ol>
 
-  <p>The second argument, <var>target</var>, specifies the <span data-x="browsing context
-  name">name</span> of the browsing context that is to be navigated. It must be a <span>valid
-  browsing context name or keyword</span>.</p>
+   <li><p>Let <var>entry settings</var> be the <span>entry settings object</span> when the method
+   was invoked.</p></li>
 
-  <p>The third argument, <var data-x="dom-open-features">features</var>, must be interpreted as
-  defined in the CSSOM View specification. <ref spec="CSSOMVIEW"></p>
+   <li><p>Let <var>incumbent settings</var> be the <span>incumbent settings object</span> when the
+   method was invoked.</p></li>
 
-  <p>The fourth argument, <var>replace</var>, specifies whether or not the new page will
-  <span data-x="replacement enabled">replace</span> the page currently loaded in the browsing
-  context, when <var>target</var> identifies an existing browsing context (as opposed to
-  leaving the current page in the browsing context's <span>session history</span>).</p>
+   <li><p>Let <var>url</var> be the first argument.</p></li>
 
-  <p>When the method is invoked, the user agent must first select a <span>browsing context</span> to
-  navigate by applying <span>the rules for choosing a browsing context given a browsing context
-  name</span> using the <var>target</var> argument as the name and the <span>browsing
-  context</span> of the script as the context in which the algorithm is executed, unless the user
-  has indicated a preference, in which case the browsing context to navigate may instead be the one
-  indicated by the user, and, if this is a new <span>top-level browsing context</span>, the
-  <span>responsible browsing context</span> specified by the <span>incumbent settings object</span>
-  must be set as the new <span>browsing context</span>'s <span>one permitted sandboxed
-  navigator</span></p>
+   <li><p>Let <var>target</var> be the second argument.</p></li>
 
-  <p class="example">For example, suppose there is a user agent that supports control-clicking a
-  link to open it in a new tab. If a user clicks in that user agent on an element whose <code
-  data-x="handler-onclick">onclick</code> handler uses the <code
-  data-x="dom-open">window.open()</code> API to open a page in an iframe, but, while doing so, holds
-  the control key down, the user agent could override the selection of the target browsing context
-  to instead target a new tab.</p>
+   <li><p>Let <var data-x="dom-open-features">features</var> be the third argument.</p></li>
 
-  <p>If applying <span>the rules for choosing a browsing context given a browsing context
-  name</span> using the <var>target</var> argument results in there not being a chosen
-  browsing context, then throw an <code>InvalidAccessError</code> exception and abort these
-  steps. (If the user agent used a user-specified browsing context, then this paragraph is skipped.)</p>
+   <li><p>Let <var>replace</var> be the fourth argument.</p></li>
 
-  <p>Otherwise, if <var>url</var> is not "<code>about:blank</code>", the user agent must
-  <span>navigate</span><!--DONAV window.open()--> the selected <span>browsing context</span> to the
-  <span>absolute URL</span> obtained from <span data-x="resolve a url">resolving</span> <var>url</var> earlier, with <span>exceptions enabled</span>. If the <var>replace</var> is true or if the <span>browsing context</span> was just created as part
-  of <span>the rules for choosing a browsing context given a browsing context name</span>, then
-  <span data-x="replacement enabled">replacement must be enabled</span> also. The navigation must be
-  done with the <span>responsible browsing context</span> specified by the <span>incumbent settings
-  object</span> as the <span>source browsing context</span>. If the <span>resolve a URL</span>
-  algorithm failed, then the user agent may either instead <span>navigate</span> to an inline error
-  page, with <span>exceptions enabled</span> and using the same replacement behavior and source
-  browsing context behavior as described earlier in this paragraph; or treat the <var>url</var> as "<code>about:blank</code>", acting as described in the next paragraph.</p>
+   <li><p>If <var>url</var> is the empty string, set <var>url</var> to
+   "<code>about:blank</code>".</p></li>
 
-  <p>If <var>url</var> <em>is</em> "<code>about:blank</code>", and the <span>browsing
-  context</span> was just created as part of <span>the rules for choosing a browsing context given a
-  browsing context name</span>, then the user agent must instead <span>queue a task</span> to
-  <span>fire a simple event</span> named <code data-x="event-load">load</code> at the selected
-  <span>browsing context</span>'s <code>Window</code> object, with <i
-  data-x="concept-event-target-override">target override</i> set to the selected <span>browsing context</span>'s <span
-  data-x="concept-document-window"><code>Window</code> object's <code>Document</code></span> object.</p>
+   <li><p><span data-x="resolve a url">Resolve</span> <var>url</var> relative to the <span>API base
+   URL</span> specified by <var>entry settings</var>.</p></li>
 
-  <p>The method must return the <code>WindowProxy</code> object of the <span>browsing context</span>
-  that was navigated, or null if no browsing context was navigated.</p>
+   <li><p>Let <var>resource</var> be the <span>resulting absolute URL</span>, if any, or else an
+   error.</p></li>
 
+   <li><p>Let <var>source browsing context</var> be the <span>responsible browsing context</span>
+   specified by <var>incumbent settings</var>.</p></li>
+
+   <li>
+
+    <p>If the user has indicated a preference for which <span>browsing context</span> to navigate,
+    follow these substeps:</p>
+
+    <ol>
+
+     <li><p>Let <var>target browsing context</var> be the <span>browsing context</span> indicated by
+     the user.</p></li>
+
+     <li><p>If <var>target browsing context</var> is a new <span>top-level browsing context</span>,
+     let the <span>responsible browsing context</span> specified by <var>incumbent settings</var> be
+     set as <var>target browsing context</var>'s <span>one permitted sandboxed
+     navigator</span>.</p></li>
+
+    </ol>
+
+    <p class="example">For example, suppose there is a user agent that supports control-clicking a
+    link to open it in a new tab. If a user clicks in that user agent on an element whose <code
+    data-x="handler-onclick">onclick</code> handler uses the <code
+    data-x="dom-open">window.open()</code> API to open a page in an iframe, but, while doing so,
+    holds the control key down, the user agent could override the selection of the target browsing
+    context to instead target a new tab.</p>
+
+    <p>Otherwise, apply <span>the rules for choosing a browsing context given a browsing context
+    name</span> using <var>target</var> as the name and <var>source browsing context</var> as the
+    context in which the algorithm is executed. If this results in there not being a chosen browsing
+    context, then throw an <code>InvalidAccessError</code> exception and abort these steps.
+    Otherwise, let <var>target browsing context</var> be the <span>browsing context</span> so
+    obtained.</p>
+
+   </li>
+
+   <li><p>If <var>target browsing context</var> was just created, either as part of <span>the rules
+   for choosing a browsing context given a browsing context name</span> or due to the user
+   indicating a preference for navigating a new <span>top-level browsing context</span>, then let
+   <var>new</var> be true. Otherwise, let it be false.</p></li>
+
+   <li><p>Interpret <var>features</var> as defined in the CSSOM View specification. <ref
+   spec="CSSOMVIEW"></p></li>
+
+   <li><p>If <var>resource</var> is an error, then, optionally, set it to the <span>URL</span>
+   "<code>about:blank</code>". Otherwise, let it be a resource representing an inline error
+   page.</p></li> <!-- XXX or empty string? -->
+
+   <li><p>If <var>resource</var> is "<code>about:blank</code>" and <var>new</var> is true,
+   <span>queue a task</span> to <span>fire a simple event</span> named <code
+   data-x="event-load">load</code> at <var>target browsing context</var>'s <code>Window</code>
+   object, with <i data-x="concept-event-target-override">target override</i> set to <var>target
+   browsing context</var>'s <span data-x="concept-document-window"><code>Window</code> object's
+   <code>Document</code></span> object.</p></li>
+
+   <!-- XXX if new is false and /url/ was the empty string, don't navigate -->
+
+   <li><p>Otherwise, <var>resource</var> is either a <span>URL</span> other than
+   "<code>about:blank</code>" or a resource representing an inline error page, or <var>new</var> is
+   false<!--XXX-->. <span>Navigate</span><!--DONAV window.open()--> <var>target browsing
+   context</var> to <var>resource</var>, with <span>exceptions enabled</span>. If <var>new</var> is
+   true, then <span data-x="replacement enabled">replacement must be enabled</span> also. The
+   <span>source browsing context</span> is <var>source browsing context</var>.</p></li>
+
+   <li><p>Return the <code>WindowProxy</code> object of <var>target browsing
+   context</var>.</p></li>
+
+  </ol>
+
   <hr>
 
   <p>The <dfn><code data-x="dom-name">name</code></dfn> attribute of the <code>Window</code> object



More information about the Commit-Watchers mailing list