Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Webview within a gio layout #52

Open
gedw99 opened this issue Jul 15, 2023 · 1 comment
Open

Webview within a gio layout #52

gedw99 opened this issue Jul 15, 2023 · 1 comment
Labels
enhancement New or improved feature for existent plugins

Comments

@gedw99
Copy link

gedw99 commented Jul 15, 2023

i am experimenting with having a gio webview with in larger gio App.

The middle par is a gio web view.
The left and right pane is any gio layout.

this is probably a petty common UX use case I think and so would be good to make it a demo in the web view folder.

From the main gio App we should be able to:

  • load up new web pages via URL in the Webview
  • Access the JS / window / DOM contebt of the web page running in the gio webview.

for the deno web psge (s),
i plan to make a simple web App example in golang that uses go templates for rendering and htmx for manipulating the contents of the web page. Here are many examples of htmx and golang so it’s clearly very popular with golang developers that also want a clean way to be interactive web sites.

so then from the gio app, we can manipulate the web page via communication with either the web server , or the web client.

This will I hope be a useful demo for many users.

@inkeliz feel free to add comments to this issue that also match whatever your needs are for the Gio Webview

@gedw99 gedw99 added the enhancement New or improved feature for existent plugins label Jul 15, 2023
@inkeliz
Copy link
Contributor

inkeliz commented Jul 15, 2023

Currently, I use https://github.com/gioui-plugins/gio-plugins/tree/main/webviewer, the demo already display one webview inside an Gio. It's possible to communicate between Go <-> JS, but it's not very efficient.

I use webview to display external content (social-media profiles/posts and ToS/Privacy Terms). Honestly, I don't think makes sense to mix Gio + HTML. If the goal is to create one app using HTML I would choose Tauri (https://tauri.app) or Wails (https://github.com/wailsapp/wails), or even Electron (https://github.com/asticode/go-astilectron) might be better than use WebView + Gio.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New or improved feature for existent plugins
Projects
None yet
Development

No branches or pull requests

2 participants