Playcanvas iframe inside an iframe, why?

In trying to get web application to embedded iframe communication working, the communication has to go 2 levels down and up. Atleast that’s how I’m able to get it working (exkuisite.surge.sh)

I notice that the primary build url of playcanvas project (https://playcanv.as/p/vdA21o18/) has an iframe embedded in it, which is the one that actually displays the UI in HTML canvas element.

My question is this is highly inconvenient because each time you make a change and build, I have to change the iframe source url form my source code. I’m extracting the

nested iframe url and using that in my source code (react app). Is there an easier way of getting this communication going ?

Also I think this document (https://developer.playcanvas.com/en/user-manual/publishing/web/communicating-webpage/) is misleading since it only links the level 1 url from outside.

You can get rid of one of the iframes by adding an ‘e’ before the ‘p’ in the url.

Eg https://playcanv.as/p/Od14fRLI/ => https://playcanv.as/e/p/Od14fRLI/

2 Likes

Ah, cool thanks.
I think someone from playcanvas team should update this link (https://developer.playcanvas.com/en/user-manual/publishing/web/communicating-webpage/) to have this correction since the example mentioned there won’t work without prepending the ‘e’ character.