File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -76323,6 +76323,25 @@ dictionary <dfn>DragEventInit</dfn> : <span>MouseEventInit</span> {
76323
76323
from a document">removed from the document</span>, has no associated browsing context, since that
76324
76324
browsing context was <span data-x="a browsing context is discarded">discarded</span>.</p>
76325
76325
76326
+ <div class="example">
76327
+ <p>The following example illustrates the various possibilities of a <span>browsing context</span>.
76328
+ It can be <span>disowned</span>, <span>is closing</span>, neither, or both.</p>
76329
+
76330
+ <pre><code class="js">// Neither disowned nor is closing:
76331
+ const popup1 = window.open();
76332
+
76333
+ // Disowned, but not is closing:
76334
+ const popup2 = window.open();
76335
+ popup2.opener = null;
76336
+
76337
+ // Not disowned, but is closing:
76338
+ const popup3 = window.open();
76339
+ popup3.close();
76340
+
76341
+ // Disowned, is closing:
76342
+ const popup4 = window.open();
76343
+ popup4.opener = null;
76344
+ popup4.close();</code></pre></div>
76326
76345
76327
76346
76328
76347
<h4>Creating browsing contexts</h4>
You can’t perform that action at this time.
0 commit comments