Communicating with external sites via Iframe
const iframe = document.querySelector('.uniqueName > iframe').contentWindow;
iframe.postMessage('message', { foo: 'bar' })
Last updated
Was this helpful?
const iframe = document.querySelector('.uniqueName > iframe').contentWindow;
iframe.postMessage('message', { foo: 'bar' })
Last updated
Was this helpful?
Was this helpful?
const iframe = document.querySelector('.uniqueName > iframe').contentWindow;
iframe.on('message', (data) => {
console.log(data);
});