JavaScript and window.postMessage()

added by JavaScript Kicks
1/11/2020 1:07:55 PM

252 Views

The two required components are, window.postMessage() - to send the message window.addEventListener("message",callback) - to receive and process the message The syntax for the postMessage() method is, targetWindow.postMessage(message, targetOrigin, [transfer]); There is a optional third parameter, [transfer], that we will not be using. You may want to read more about on the MDN.


0 comments