Communicating with web page

Does someone have a running example of communication with an Iframe ?
I would love to take a look at it, cause i can’t get it to work.

Thanks in advance.
Best Dennis

hi Dennis, i guess this is because of account limitations, with free account i tried it & had

Refused to display ‘’ in a frame because it set ‘X-Frame-Options’ to ‘deny’.

in the console. ( codepen test , & open console ), i just cant get the playcanvas in an iframe.

the manual page goes for people with upgrade account i guess too

1 Like

I got this working with a few caveats:

Codepen: (click button in the top left of the page)
PlayCanvas project:

  1. You have to use a published build (e.g
  2. You have to use the non iframe version of the published build (e.g Notice the extra e in the URL.

The reason for this is that the normal published build link is wrapped in an iframe of its own so you end up with an iframe in iframe issue and therefore can’t post a message in the right window instance due to it crossing domains from CodePen to PlayCanvas.

The extra e gives you un frame app so it can be embedded directly into a webpage and post messages without crossing domains.


Hi Yaustar,
I was making it way to complex.
Thanks for your straigth on answer. you solved it.
Many many thanks

Hi Borbor,
It actualy works with a published project.
Please take a look at Yaustar anwer.
Anyhow, thanks for the help. You guys are awesome.

I connected the app with Ninjaforms in wordpress.
Works very good.

1 Like