Web (DOM)
Tier 3 · ExperimentalDay’s Web target runs Rust app code as WebAssembly and presents its interface with HTML elements in a browser. It is experimental, with browser permissions and API limits that differ from installed apps.
web-dom is a Tier 3 · Experimental target. Use the Web
guide to build, run, test, and publish an app.
Requirements
A UI-only app needs the wasm32-unknown-unknown Rust target, which Day installs when missing.
Persistence also needs a WebAssembly-capable C compiler and a host with the required response
headers. See System requirements and
Persistence.
Browser limitations
- Browser permissions, secure-context rules, and user-activation requirements apply to clipboard, location, sensors, file pickers, and fullscreen requests.
- Additional app windows use covers within the page. Desktop window placement and content protection are unavailable.
- Lists build visible rows plus overscan; previously visited rows retain their elements. Test memory use with the size of collection your app displays.
- HTTP is asynchronous and subject to CORS. Synchronous data-file reads and blocking HTTP calls are unavailable.
- Optional pieces and parts have their own browser support. Consult the individual component pages, including Web view, Media, and Lottie.
HTML semantics and Day’s accessibility annotations supply the browser accessibility tree. Check keyboard operation and assistive technology with the controls and browser combinations your app uses; a native build does not validate the browser experience.
What each piece becomes
The generated coverage matrix, checked in CI, covers every toolkit; this table adds links and notes.
| Day piece | HTML |
|---|---|
column / row / nav_stack / section | <div> |
label | <div> (not a <label>) |
button | <button type="button"> |
toggle | <input type="checkbox"> styled as a switch |
slider | <input type="range"> |
text_field | <input type="text"> |
secure_field | <input type="password"> |
text_area | <textarea> |
picker().menu() | <select> with <option>s |
picker().segmented() / .inline() | a <div> of <button>s |
progress(f) | <progress max="1"> |
spinner() | a CSS-animated <div> |
divider | <div> |
scroll | <div> with overflow:auto |
list | scrolling <div> of absolutely positioned cells |
nav / nav_menu / tabs | <div>s (with <button>s for the tab strip and back control) |
image | <img> |
vector | <img> loading the staged SVG: day-toolkit-dom requests .svg for names in the page’s vector list, and the browser renders it at display size; the raster PNG sits beside it as the older-host fallback |
canvas | <canvas>, display list replayed on a 2-D context |
| dialogs / alerts / prompts | <dialog> via showModal() |
external media() | <video> |
Text uses browser font preferences and the toolkit’s desktop or touch-device scale. Page zoom applies as usual. Canvas text remains in drawing coordinates. Scrolling uses browser scroll containers, and browser-managed panes report their sizes to Day’s layout system.