jshack1
setTimeout(() => { const win = parent["window"]; win.doc = win["document"]; win.w = win; });
Here is what the above code is Doing:
1. We are creating a new browser window.
2. We are setting the window’s document to the document of the parent window.
3. We are setting the window’s w to the window itself.
This is all we need to do to make the window work.
Now, we can use the window to execute JavaScript code.