Skip to main content

Module browser

Module browser 

Source
Expand description

The chrome around an embedded web view.

This crate draws no web pages. It cannot: rendering one means an engine — wry, CEF, WebKit — and a component library that pulled a browser engine into every binary that wanted a button would be charging every host for a feature almost none of them use. So this is the shell only. The host owns the engine, the navigation and the surface the page is painted on, and hands the panel a ViewportState saying what is actually there.

That split is the point rather than a limitation. The states a web view spends its life in — loading, empty, unavailable, failed, ready — are the part a design system should get right and the part every host otherwise reimplements differently. What is left is a rectangle.

§What an empty panel means

A shell with no engine behind it draws ViewportState::Unavailable, not a blank page. The two look similar and mean opposite things: one is a site that served nothing, the other is a build that cannot ask. A reader who cannot tell them apart will retry the wrong one.

Structs§

BrowserPanel
A framed web view: address, controls, and the rectangle a page goes in.

Enums§

ViewportState
What is behind the panel right now.