Skip to content

Commit

Permalink
Remove the "replace" argument to window.open()
Browse files Browse the repository at this point in the history
As shown by
http://software.hixie.ch/utilities/js/live-dom-viewer/?saved=4320, this
has only ever been implemented in one browser (IE/Edge). In the many
years since it was added to the spec, no other engines have made a move
to support this feature. It is time to remove it.

Previous discussion at
https://www.w3.org/Bugs/Public/show_bug.cgi?id=12735.

Closes whatwg#1537.
  • Loading branch information
domenic authored and Alice Boxhall committed Jan 7, 2019
1 parent 1efe50b commit 3e87ca5
Showing 1 changed file with 16 additions and 25 deletions.
41 changes: 16 additions & 25 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -8686,7 +8686,7 @@ partial /*sealed*/ interface <dfn>Document</dfn> {

// <span>dynamic markup insertion</span>
[<span>CEReactions</span>] <span>Document</span> <span data-x="dom-document-open">open</span>(optional DOMString type = "text/html", optional DOMString replace = "");
<span>WindowProxy</span> <span data-x="dom-document-open">open</span>(USVString url, DOMString name, DOMString features, optional boolean replace = false);
<span>WindowProxy</span> <span data-x="dom-document-open">open</span>(USVString url, DOMString name, DOMString features);
[<span>CEReactions</span>] void <span data-x="dom-document-close">close</span>();
[<span>CEReactions</span>] void <span data-x="dom-document-write">write</span>(DOMString... text);
[<span>CEReactions</span>] void <span data-x="dom-document-writeln">writeln</span>(DOMString... text);
Expand Down Expand Up @@ -77979,7 +77979,7 @@ dictionary <dfn>DragEventInit</dfn> : <span>MouseEventInit</span> {
attribute any <span data-x="dom-opener">opener</span>;
[Replaceable] readonly attribute <span>WindowProxy</span> <span data-x="dom-parent">parent</span>;
readonly attribute <span>Element</span>? <span data-x="dom-frameElement">frameElement</span>;
<span>WindowProxy</span>? <span data-x="dom-open">open</span>(optional USVString url = "about:blank", optional DOMString target = "_blank", [TreatNullAs=EmptyString] optional DOMString features = "", optional boolean replace = false);
<span>WindowProxy</span>? <span data-x="dom-open">open</span>(optional USVString url = "about:blank", optional DOMString target = "_blank", [TreatNullAs=EmptyString] optional DOMString features = "");
<a href="#dom-window-nameditem">getter</a> <span data-x="idl-object">object</span> (DOMString name);
// Since this is the global object, the IDL named getter adds a NamedPropertiesObject exotic
// object on the prototype chain. Indeed, this does not make the global object an exotic object.
Expand Down Expand Up @@ -78078,15 +78078,14 @@ callback <dfn>FrameRequestCallback</dfn> = void (<span>DOMHighResTimeStamp</span

<dl class="domintro">

<dt><var>window</var> = <var>window</var> . <code subdfn data-x="dom-open">open</code>( [ <var>url</var> [, <var>target</var> [, <var>features</var> [, <var>replace</var> ] ] ] ] )</dt>
<dt><var>window</var> = <var>window</var> . <code subdfn data-x="dom-open">open</code>( [ <var>url</var> [, <var>target</var> [, <var>features</var> ] ] ] )</dt>

<dd>

<p>Opens a window to show <var>url</var> (defaults to <code>about:blank</code>), and
returns it. The <var>target</var> argument gives the name of the new window. If a
window exists with that name already, it is reused. The <var>replace</var> attribute,
if true, means that whatever page is currently open in that window will be removed from the
window's session history. The <var data-x="dom-open-features">features</var> argument can be used to influence the rendering of the new window.</p>
<p>Opens a window to show <var>url</var> (defaults to <code>about:blank</code>), and returns it.
The <var>target</var> argument gives the name of the new window. If a window exists with that
name already, it is reused. The <var data-x="dom-open-features">features</var> argument can be
used to influence the rendering of the new window.</p>

</dd>

Expand Down Expand Up @@ -78128,24 +78127,16 @@ callback <dfn>FrameRequestCallback</dfn> = void (<span>DOMHighResTimeStamp</span

<div w-nodev>

<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 <dfn><code data-x="dom-open">open(<var>url</var>, <var>target</var>,
<var>features</var>)</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>When the method is invoked, the user agent must run the following steps:</p>

<ol>

<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>url</var> be the first argument.</p></li>

<li><p>Let <var>target</var> be the second argument.</p></li>

<li><p>Let <var data-x="dom-open-features">features</var> be the third argument.</p></li>

<li><p>Let <var>replace</var> be the fourth argument.</p></li>
<li><p>Let <var>entry settings</var> be the <span>entry settings object</span>.</p></li>

<li><p>Let <var>source browsing context</var> be the <span>responsible browsing context</span>
specified by <var>entry settings</var>.</p></li>
Expand Down Expand Up @@ -78190,8 +78181,8 @@ callback <dfn>FrameRequestCallback</dfn> = void (<span>DOMHighResTimeStamp</span
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>Interpret <var>features</var> <span data-x="dom-open-features">as defined in the CSSOM
View specification</span>. <ref spec="CSSOMVIEW"></p></li>

<li>

Expand Down Expand Up @@ -89196,7 +89187,7 @@ document.body.appendChild(frame)</pre>

</dd>

<dt><var>window</var> = <var>document</var> . <code data-x="dom-document-open">open</code>( <var>url</var>, <var>name</var>, <var>features</var> [, <var>replace</var> ] )</dt>
<dt><var>window</var> = <var>document</var> . <code data-x="dom-document-open">open</code>( <var>url</var>, <var>name</var>, <var>features</var> )</dt>

<dd>

Expand Down Expand Up @@ -89436,7 +89427,7 @@ document.body.appendChild(frame)</pre>
whether a <code>Document</code> is <span>ready for post-load tasks</span> or <span>completely
loaded</span>.</p>

<p>When called with four arguments, the <code data-x="dom-document-open">open()</code> method on
<p>When called with three arguments, the <code data-x="dom-document-open">open()</code> method on
the <code>Document</code> object must call the <code data-x="dom-open">open()</code> method on the
<code>Window</code> object of the <code>Document</code> object, with the same arguments as the
original call to the <code data-x="dom-document-open">open()</code> method, and return whatever
Expand Down

0 comments on commit 3e87ca5

Please sign in to comment.