Open a new page in a HTML5 Game exported by Godot

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Dibbla

I want to implement a Bruno Simon(https://bruno-simon.com) style homepage with Godot, and want to do it with Godot because it’s more lightweight for custom web pages. I’ve built a full website and can run the Godot game, how should I trigger an in-game event to open a new web page? I know Godot can access html and get JSON return value, but this issue seems to be modified on export html5.

:bust_in_silhouette: Reply From: Calinou

This should be feasible by calling JavaScript from GDScript when the project is exported to HTML5.

and want to do it with Godot because it’s more lightweight for custom web pages

While size-optimized builds can be fairly small on the wire, a Three.js-based solution will often result in a smaller download compared to an exported Godot project. You’ll lose on development convenience, but if having the smallest possible download is a goal, frameworks are still valuable.