I'm using tampermonkey and doing some client side scripting and I'm wondering how I could apply and use the existing functions/objects and apply them when opening a new window with window.open (The page is in the same domain)
In this case I would need to change the values in the child window.
I am able to successfully get an alert on the new window that opens but I wouldn't know how to transfer a value from the parent window to the child once the page has loaded or with some delay.
var exampleParentWindowObject1 = 'example';
exampleParentWindowfunction(); {
CODE
}
var NewWindow = window.open('https://webpage.com',"MsgWindow", "width=2000,height=1000");
a.focus();
NewWindow.addEventListener('load', function(){
NewWindow.alert('test');
}, 1000);
});
}