I open a website in a new tab through javascript by writing the following code in the browser console:
var win = window.open("http://staging.redefinewebs.in/wildgoose-const/wp-admin/post-new.php", "mywin", '');
Now I want to add text in a field in the newly opened tab. But for that I need the access to win.document
. When I write win.document
in the console I get the following error:
Error: Permission denied to access property "document"
This error doesn't appear if I open other websites in new tab. So,
How to get access of document object of a window opened in a new tab with window.open?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…