Thanks so much for your interest!
-
The current APIs of
Webviews.jl
are designed as closely as what the original webview library does, but I’m considering changing some of it. Right now, awebview
is not exactly awindow
, because you can initialize the webview to be embedded into a previously-created parent window by passingunsafe_window_handle
in the constructor.
So the original library doesn’t haveclose
, and itsterminate
function means to end the webview instance instead of closing the window or ending the whole program. But actually, the original library also has many problems (e.g.terminate
doesn’t work on macOS), that are resolved in our implementation.
I think extendingBase.close
does make sense right now since the webview and window are closely related to each other. I’ll add it in a future version. Distinguishing closing a window and closing a webview might make sense if I decide to realize the idea in the PS above, though. -
run(w)
will automatically calldestroy
once the webview is terminated. So you cannot rerun aWebview
instance. In fact, it is also recommended in the main context (instead of@async
). I may also change the API in the future to make it more flexible to integrate with Julia’s event loop. One idea I have right now is to export something likerun_one_iteration
, but it’s also like reinventingtao
/winit
that handles event loops and window management. -
For widgets like navigation arrows, since they should be part of the window instead of the webview, they won’t be included in this package, but maybe some extension package can be implemented in the future (still, like what I mentioned above, something similar to
tauri
). By the way, in this specific case, you can right-click the empty area in the website to go back/forward/reload/stop.