I wanna send form data to test.html by using asynchronous communication. I wrote in index.html
If the document originates from same origin as original document and is opened by user action you can pass the parameters as a query string.
document.querySelector("input[type=button]").onclick = e => {
// pass key, value pairs to `test.html`
const test = window.open(`test.html?${key}=${value}`, "_blank");
}
at opened window get and parse location.search
onload = () => {
// do stuff with key, value pairs passed from `window.opener`
console.log([...new URLSearchParams(location.search).entries()])
}
plnkr http://plnkr.co/edit/MlCQZpkfBXFwxdR6gz5x?p=preview