HTML5 how to communicate between the "game" and html code of containing page?

Hello everyone !

My project is to allow people to customize a product ( sofa in this case ) and visualize it in 3D in a web browser. I thought I can use Unreal Engine functionalities to export a “game” to HTML5, thus I can offer the customizable functionality and visualization in realistic graphics all in unreal.
But later when they have made their choice about the product and edited everything they wanted. How can I communicate their choices to the website containing it, I mean like when they hit a button inside the “game” some form in HTML is filled with these choices and validated or something like that.

My question is : how to communicate between the “game” and the website containing it, or simply inject some HTML to the current page, or maybe redirect to a new page containing the same choices in an HTML format … anything that memorizes their choices to continue to a proper product shopping.

A simple solution that came to my mind is maybe to create an external file ( or cookies ) and fill it with these choices, then the website reads from that file to get the choices. but still I don’t know how to create a file or create cookies.

Thanks a lot for your advices !

Good question. Since 4.15 I am waiting for some web browser fix but it is still failing on iOS. When I try to insert a small window into my app where should appear www.google.com (for example) it appears blank. There is a bug since long time ago and we are lot of people waiting for some kind of solution. But still nothing. Not even answer this kind of matter.

Check out this thread HTML5 Content: Control Browser From inside UE4 - Platform & Builds - Epic Developer Community Forums for a conversation on how to interact with HTML/JS page and the UE4 web export running inside it. This allows you to do function calls across both sides and marshall data over. Perhaps that might help here as well?