Custom html Inside of an iFrame

I would like to run custom HTML inside of perspective, as I would like to use some open source libraries for viewing 3D models. The best solution I can find is to run a web server on the gateway, and have an iFrame link to the url running my html. The biggest issue with this is that I will not be able to have the page interactive/ link to tags, because it is running separately from Ignition. Is there a better way to do this? Are there security risks/issues that make this option a bad one?
Thanks

You have to use web dev module and with python endpoint you can inject dynamic html js code into your widget and send it to client (iframe)
Also use Ajax to request tag value by polling or event base in your js code. For this, create another account python endpoint with your custom API to response to the tag value reguest from your js code.
Do the same for writing value from your js code.
I use this method with three.js lib for creating interactive 3d view.

For interactive with perspective view in your web dev API use system.perspective.sendmessage with specific session ID to pass Ajax request to your view.

By best advise is create module but it forces you to learn Java :sob: and type script and also react but the result is compact and easy to use for others.
You can also protect your code with module.

2 Likes