Skip to content

Commit

Permalink
[e] (0) Simplify window.open even further
Browse files Browse the repository at this point in the history
Affected topics: DOM APIs

git-svn-id: https://svn.whatwg.org/webapps@8778 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Sep 16, 2014
1 parent 8a31542 commit d13463e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 13 deletions.
9 changes: 4 additions & 5 deletions complete.html
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -57636,9 +57636,8 @@ <h4 id=apis-for-creating-and-navigating-browsing-contexts-by-name>7.2.2 APIs for


<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 <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>, 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 let the <var>source browsing context</var> be set as <var>target browsing context</var>'s
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 <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>
navigator</a>.</ol>


<p class=example>For example, suppose there is a user agent that supports control-clicking a <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, 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,
Expand Down Expand Up @@ -57686,8 +57685,8 @@ <h4 id=apis-for-creating-and-navigating-browsing-contexts-by-name>7.2.2 APIs for
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>: 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 <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 <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
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 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-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> context</a> <var>A</var>.</ul>


Expand Down
9 changes: 4 additions & 5 deletions index
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -57636,9 +57636,8 @@ dictionary <dfn id=drageventinit>DragEventInit</dfn> : <a href=#mouseeventinit i


<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 <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>, 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 let the <var>source browsing context</var> be set as <var>target browsing context</var>'s
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 <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>
navigator</a>.</ol>


<p class=example>For example, suppose there is a user agent that supports control-clicking a <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, 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,
Expand Down Expand Up @@ -57686,8 +57685,8 @@ dictionary <dfn id=drageventinit>DragEventInit</dfn> : <a href=#mouseeventinit i
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>: 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 <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 <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
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 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-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> context</a> <var>A</var>.</ul>


Expand Down
5 changes: 2 additions & 3 deletions source
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -77629,9 +77629,8 @@ dictionary <dfn>DragEventInit</dfn> : <span>MouseEventInit</span> {
the user.</p></li> the user.</p></li>


<li><p>If <var>target browsing context</var> is a new <span>top-level browsing context</span>, <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 let the <var>source browsing context</var> be set as <var>target browsing context</var>'s
set as <var>target browsing context</var>'s <span>one permitted sandboxed <span>one permitted sandboxed navigator</span>.</p></li>
navigator</span>.</p></li>


</ol> </ol>


Expand Down

0 comments on commit d13463e

Please sign in to comment.