Racket Webview - v0.1.4 - Introduction
| (require "racket-webview") | package: racket-webview |
1 Overview
This documentation is provided for version 0.1.4 of racket webview.
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/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:
racket-webview/wv-context — context creation and settings access
racket-webview/wv-window — window lifecycle, events, navigation, and dialogs
racket-webview/wv-element — DOM element wrapper
racket-webview/wv-input — typed input-element wrappers
racket-webview/wv-dialog — dialog windows
racket-webview/wv-settings — settings wrapper
racket-webview/rgba — RGBA color values
racket-webview/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.