Expand description
Embeds a Servo webview inside an Iced application.
Servo renders into a SoftwareRenderingContext, the result is read
back via read_to_image, and a custom Widget
uploads the pixels to a persistent wgpu::Texture and draws it as
a regular iced widget. Input flows the other way: iced’s native
event loop delivers mouse, keyboard, touch, and IME events to the
widget, which translates and forwards them to Servo via
WebView::notify_input_event.
Structs§
- Frame
Widget - Generic iced widget that renders any
FrameSourcethrough a wgpu textured quad. - Servo
Runtime - Shared Servo engine + rendering context. Build one of these at app
startup and pass it into each
ServoWebViewController::newcall. Cheap to clone (Rcinside) — passing one to multiple tabs does not duplicate the underlying engine. - Servo
WebView Controller - Embedder handle for a single Servo webview. Cheap to clone — it’s
just an
Rcinternally. Each tab/view in an app owns one controller; they all share the sameServoRuntime. - WebView
Config - Construction-time configuration for a Servo webview.
Enums§
- Content
- What a webview should load on startup.
- JSValue
- JavaScript value returned from
ServoWebViewController::evaluate_javascriptand theTask-based variant. Covers primitives, arrays, objects, and opaque DOM-handle tokens (Element,Window,ShadowRoot,Frame). The DOM handles are WebDriver-style ID strings and cannot currently be round-tripped back into a later script — treat them as diagnostic. - Java
Script Evaluation Error - Error variant returned when a JavaScript evaluation fails. Covers
both compile-time and runtime failures plus a few “the webview
wasn’t ready” cases; the
Taskvariant also usesInternalErrorfor the case where the controller is dropped mid-evaluation. An error that happens when trying to evaluate JavaScript on aWebView. - Load
Status - Page load lifecycle status.
The status of the load in this
WebView. - Pref
Value
Traits§
- Frame
Source - Trait that a frame source must implement to be rendered by
FrameWidget.
Functions§
- frame
- Build a
FrameWidgetwith default settings (Fill,Center,Linear).