Racket Webview
1 Overview
Racket Webview is a class-oriented webview library built on top of a Qt-based native runtime.
The library is layered. At the lowest level a native FFI layer is used. On top of that, racket-webview provides a functional API. The class-oriented API described in this manual is built from smaller modules on top of that layer.
2 Core Concepts
The library is structured around two main concepts:
a context, representing an isolated runtime with its own local HTTPS server
a window, representing a webview instance within such a context
A context manages local file serving, certificates, and settings. A window loads content, handles events, and provides access to DOM elements.
3 Modules
The public API is divided into the following modules:
wv-context — context creation and settings access
wv-window — window lifecycle, events, navigation, and dialogs
wv-element — DOM element wrapper
wv-input — typed input-element wrappers
wv-dialog — dialog windows
wv-settings — settings wrapper
rgba — RGBA color values
mimetypes — MIME type lookup
4 Typical Usage
A typical application creates a wv-context% object and then creates one or more wv-window% objects within that context. DOM elements are retrieved using (send window element 'id), after which their state can be read or modified using the element and input wrapper classes. Interaction with the browser is handled through event callbacks and bindings.