|
In fact, wp has been closed, but why is wp.closed equal to true, and typeof(wp)="object", why? ? ?
It seems that I have already practiced Hug, and the above results are understandable. I just throw the bricks indiscriminately and the master will continue.
wp = window.parent.opener;
WP is a reference to a window. Generally, if the window is closed, the window itself has been destroyed, and in principle the corresponding object does not exist. But this is only in the case of a single page.
And here the child page of wp still exists, so the window object of the child page still exists, and this window object also saves the reference to wp (ie window.parent.opener), although in the environment object of wp, it has already It is undefined, but window.parent.opener still exists in the child page. It should be a null object (maybe not null), so wp.closed is true.
The explanation is a bit far-fetched. |
|