Send PostMessage to parent

Hi everyone,
i have a html page with iframe which source is the jitsi meet app and i add an eventListener to receive message from the iframe like

window.addEventListener( “message”,
function (e) {

On the index.html of the web container i want to send a message to parent like


but it doesn’t work. I tried with window.parent,

Can anyone help me please?

Thank you.

You can use theIframe.contentWindow and call postMessage on it.

sorry, i think i tried that.
on my html i have

<iframe name=“iframe_jitsi” src=“my_self_hosted_jitsi_url” ></*iframe>

on the index.html of the iframe i tried many things like

What’s the “theIframe” in this case?

Thank you

Ah, sorry, I told you the reverse :slight_smile: This should do: window.opener || window.parent. That’s how we do it for the external API ourselves.

on the iframe html

var w = window.opener || window.parent;

Uncaught DOMException: Blocked a frame with origin “https://jitsi_url” from accessing a cross-origin frame.
at console.log ()


Is this your own installation? You need to configure your webserver to allow the embedding origin in that case.

Yes, it is.
like this

Content-Security-Policy: frame-ancestors <source>;

in meet.conf ?