webview_elixir
A module for interacting with a single-instance WebView in Elixir. It is implemented as a set of bindings for the webview library. It enables access to webview functionality from within Elixir.
Installation
If available in Hex, the package can be installed
by adding webview_elixir to your list of dependencies in mix.exs:
def deps do
[
{:webview_elixir, "~> 0.1.1"}
]
end
Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/webview_elixir.
Depending on the system, the following dependencies must be installed in order to compile the webview NIF code:
Ubuntu
make pkg-config libwebkitgtk-6.0-dev libgtk-4-dev g++ gcc
Darwin
clang make
Windows
mingw-w64-gcc (MSYS2)
Add the MS WebView2.h header from Nuget into the c_src/include directory.
Getting Started
WebView.create()
WebView.set_title(~c"App Window")
WebView.set_size(800, 600, WebView.Hint.none)
WebView.set_html(~c"<p>Example Webview</p>")
WebView.run()
WebView.destroy()
License
Apache-2.0, MIT