Faihan
Faihan

Reputation: 141

Window reference got from window.open() gets closed automatically in Browsers

Steps to reproduce:

  1. Open wikipidia.org in a chrome tab and open the devtools.
  2. Enter the following command

p = window.open('https://www.google.com')

Once the window opens, entering p.closed returns true.

But, If we replace the url of target window from https://www.google.com to https://www.yahoo.com, p.closed returns false

Am I missing something?

Upvotes: 0

Views: 17

Answers (0)

Related Questions