You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/* * In window A's scripts, with A being on http://example.com:8080: */constpopup=window.open(/* popup details */);// When the popup has fully loaded, if not blocked by a popup blocker:// This does nothing, assuming the window hasn't changed its location.popup.postMessage("The user is 'bob' and the password is 'secret'","https://secure.example.net");// This will successfully queue a message to be sent to the popup, assuming// the window hasn't changed its location.popup.postMessage("hello there!","http://example.com");window.addEventListener("message",(event)=>{// Do we trust the sender of this message? (might be// different from what we originally opened, for example).if(event.origin!=="http://example.com")return;// event.source is popup// event.data is "hi there yourself! the secret response is: rheeeeet!"},false);
The text was updated successfully, but these errors were encountered:
https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage
The text was updated successfully, but these errors were encountered: