Status: future · Priority: medium
Note: This is a future plan, not a commitment. The syntax and API shown here are proposals — they can be completely different when actually implemented.
A <morph-webview> element: render real HTML/CSS/JS content inside a Morph window — powered by the OS's default webview engine, exactly like Tauri. No Chromium bundled, no browser shipped with your app.
| Platform | Engine |
|---|---|
| Linux | WebKitGTK |
| Windows | WebView2 (Edge) |
| macOS | WKWebView |
{/* a full web page inside a native window */}
<morph-webview src="https://example.com" width="100%" height="100%" />
{/* or local HTML shipped with your app */}
<morph-webview src="./docs/index.html" width="640" height="480" />The exact tag may differ (<webview>, <morph-webview>, …) — the design is what matters: a native element that hosts the OS webview and treats it like any other node in the layout tree.
src — URL or local file to loadwidth / height — layout, like any elementsandbox — restrict scripts, forms, popups, same-origin rulesuserAgent — override the user agenttransparent — let the webview background be transparent over the appA handle to control the webview from component logic, two-way:
const web = useRef<morph-webview>() // or however handles resolve
web.loadURL("https://example.com")
web.loadHTML("<h1>Hello from Morph</h1>")
const title = await web.evaluate("document.title") // run JS inside the webview
web.on('navigate', (url) => { ... }) // webview → app events
web.on('message', (msg) => { ... }) // content posts a message to the app
web.goBack() / web.goForward() / web.reload()App → webview: loadURL, loadHTML, evaluate (run arbitrary JS inside the page).
Webview → app: events — navigation, page load, and a message bridge so the HTML page can talk to your Morph logic.
The webview is a complement, not the product. Building your whole app in a webview means you're back to shipping a browser experience — the exact thing Morph exists to avoid. Morph's selling point is that your UI is compiled native; the webview is for the parts that are genuinely web.
| Piece | State |
|---|---|
| OS webview integration (WebKitGTK / WebView2 / WKWebView) | ❌ Not built |
<morph-webview> element + layout integration |
❌ Not built |
loadURL / loadHTML / evaluate / events |
❌ Not built |
| Sandbox + message bridge | ❌ Not built |
evaluate results come back (async)?morph-webview element: native node hosting the OS webviewsrc loading (URL + local file) with layout integrationloadURL / loadHTML / reload + navigation eventsevaluate + message bridge (two-way)