Rendering gallery
The Player bundles the example gallery of its rendering engine —
modernc.org/webview, the pure-Go HTML / CSS
/ JavaScript engine behind the WebView widget. It is a
curated showcase of what the engine renders, from CSS Level 1 through CSS 3,
HTML 5, international text, and live JavaScript — all from content bundled inside
the Player, with no network access.
In-app link. In the Player's built-in docs viewer (
scriptweaver --help), this opens directly in the app. There is nothing to open on the web.
What it shows
- CSS — the box model, flexbox, CSS Grid, 2-D transforms, opacity and
filters (blur, grayscale, sepia, hue-rotate …), transitions and
@keyframesanimations, custom properties,calc(), sticky positioning, and@font-faceweb fonts. - Tables & layout —
border-collapse,table-layout, floats, relative / absolute / fixed positioning withz-indexstacking, and nested overflow scrollers. - HTML 5 — semantic elements, form input types,
<progress>/<meter>gauges, inline SVG, and WebP images. - International text — bidirectional Arabic / Hebrew and CJK line breaking, with per-run script shaping and system-font fallback.
- JavaScript — a live clock (timers), DOM building and mutation, events,
fetchover the local loader, ES modules, and the browser object model — each page interactive, running on the Player's own QuickJS.
How it works
The gallery opens in a WebView in navigation mode: link
clicks browse between pages, the ◀ / ▶ / ⌂ toolbar walks history, and the
JavaScript pages are live. It is a genuine mini-browser — but only over the
bundled gallery: a navigation allowlist pins it to the gallery's own pages, so it
never reaches the network.
This is the same widget your app gets from app.WebView(...). To build your own
gallery-style viewer, point one at the bundled gallery:
const wv = app.WebView({ navigate: sw.app.galleryBase, script: true });
wv.pack.configure({ fill: 'both', expand: true });
wv.loadUrl(sw.app.galleryBase + '/index.html');
See the WebView reference for the full API — navigation mode
({navigate: …}, back() / forward(), onNavigate), scripting, and
sw.app.galleryBase.
Checking your own pages
The gallery shows what the engine does render. For the other half of the question — what happens to a page you wrote — the Player's repository ships pageview, a small viewer that opens your HTML in this same engine:
scriptweaver apps/pageview/main.js path/to/page.html
It reloads the page as you edit it, emulates narrower viewports so @media
breakpoints fire, and — reading the source back — names the constructs the page
asked for that the engine does not implement. That last part is the point: the
engine fails silently, so an <iframe> or a <canvas> renders nothing at
all rather than an error. A browser cannot tell you this, because it renders
them. See apps/pageview/README.md in the repository for the full description.