Embedded Anvil(python) app in Xojo

I discover Anvil and it really want to look for the possibility to use it with my xojo webapps eg incorporating AI capabilities.
In the tutorial, I made a published little ‘Hello World’ app.

In order to embedded this first app in a a web-page, the istructions are

Paste this HTML into your page to include your Anvil application

Is anybody knows how to do it in a xojo web-app, where i have to put it? I know the showurl method but I think that this is not want i want to do?

I think you should have a look at the web plugin API. It should be fairly easy to create a plugin control that includes that script and the iFrame. You won’t even initially need but a tiny fraction of what you can do with it. And these are not plugins in the must be compiled sense, but just special custom classes you create in the web project and return the raw HTML and scripts and such that you want included in the project.

I would write a custom web control using the WebSDK. You find the documentation in your local xojo directory.

It uses the webcontrolwrapper class, which provides the communication between frontend and backend.

yes, what he said :wink: WebSDK not the web plugin API which isn’t actually a thing :wink:

thanks to all, we will look on webcontrolwrapper class. Is there any relevant example around?

There is a webSDK documentation folder in the “Extras” folder that comes with the download. It’s very good and has some simple controls as example projects that are very similar to what you’re going to want to do. The only downside to the timing of this is that Web2.0 will be released momentarily (or at least soon :wink: I’m getting itchy to get ahold of it!) and there have been some changes to the web SDK. Nobody is sure yet what they are :wink: The overall idea should be similar, but there are going to be some specifics that are changing. If you’re going to be releasing something in the near future then you should use the older version anyway and convert once the newer Xojo versions have shipped so perhaps it’s not a big problem right now.