Asynchronous communication cross pages
问题 I have a page addin.html . It can popup another page editor (which is not necessarily in the same domain) by popup = window.open("https://localhost:3000/#/posts/editor/", "popup") Then, the two pages have each one listener inside, and can send data to each other by // listen: function receiveMessage(event) { document.getElementById("display").innerHTML = JSON.stringify(event.data); } window.addEventListener("message", receiveMessage, false); // send: function sendMessage() { popup.postMessage