Skip to content
Permalink
Browse files

[giow] (3) Make window.open() match browsers better

Fixing https://www.w3.org/Bugs/Public/show_bug.cgi?id=26830
Affected topics: DOM APIs

git-svn-id: https://svn.whatwg.org/webapps@8816 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Sep 24, 2014
1 parent d562022 commit 722e66f8fd5043c811656a3050ea95a9f3b757b2
Showing with 9 additions and 14 deletions.
  1. +4 −5 complete.html
  2. +4 −5 index
  3. +1 −4 source
<p>When the method is invoked, the user agent must run the following steps:</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>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>If <var>target</var> is the empty string, let it be the string "<code>_blank</code>" instead.<li>
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>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>entry settings</var>.<li><p>If <var>target</var> is the empty string, let it be the string "<code>_blank</code>" instead.<li>

<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>
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-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-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
<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-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>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-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=#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
<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=#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-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
9 index
<p>When the method is invoked, the user agent must run the following steps:</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>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>If <var>target</var> is the empty string, let it be the string "<code>_blank</code>" instead.<li>
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>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>entry settings</var>.<li><p>If <var>target</var> is the empty string, let it be the string "<code>_blank</code>" instead.<li>

<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>
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-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-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
<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-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>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-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=#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
<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=#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-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
5 source
<li><p>Let <var>entry settings</var> be the <span>entry settings object</span> when the method
was invoked.</p></li>

<li><p>Let <var>incumbent settings</var> be the <span>incumbent settings object</span> when the
method was invoked.</p></li>

<li><p>Let <var>url</var> be the first argument.</p></li>

<li><p>Let <var>target</var> be the second argument.</p></li>
<li><p>Let <var>replace</var> be the fourth argument.</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>
specified by <var>entry settings</var>.</p></li>

<li><p>If <var>target</var> is the empty string, let it be the string "<code
data-x="">_blank</code>" instead.</p></li>

0 comments on commit 722e66f

Please sign in to comment.
You can’t perform that action at this time.