The problem that runs in the parent window when you try to run a function in a new window after you open a new window

Asked 2 years ago, Updated 2 years ago, 44 views

After window.open() runs, I ordered focus() with my child's song I tried append() the function in the head part of the child window.

Still, the function is realized in the parent window. The function I'm trying to do is to go to a specific page It's an asynchronous method that moves in one page, so it can't move to a specific url I'm thinking about the following ways.

What's the problem? I've been wrestling for days ㅠ<

javascript jquery

2022-09-20 15:58

1 Answers

Are you solving problems on a specific war game site?

If so, please release the payload or

If you are asking for the purpose of developing the website, I think it would be a direct answer to share the code under development

var theWindow = window.open('/user','_blank'),
    theDoc = theWindow.document,
    theScript = document.createElement('script');
theScript.innerHTML = 'window.onload = function(){location = `/uri?${^_^;;}`;};'
theDoc.head.appendChild(theScript);

https://stackoverflow.com/questions/29909927/inject-an-opened-window-with-script


2022-09-20 15:58

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.