This documentation is available as Markdown for AI agents and LLMs. See the full Markdown index at /llms.txt, or add .md to any page's URL.
Tabs and stacks
On iPad a tab keeps a pushed stack by default. Write navigationSplit="split"
on the first keyed route in the tabpanel to keep that route beside its detail.
On a tab’s keyed route the value must be the literal "split" or "none", or absent.
To offer both presentations, declare two tabs or two routes. An untabbed route
can still bind the value or specify a column width, a whole number of px from 1 to 999999 in digits with no leading zero (a bare number is written as its text first).
UIKit keeps the tab bar and collapses the columns in a compact window.
On iPad this also works on an untabbed first route. UIKit chooses the column
width, including for a custom primary without a list.
Use navigationSplit="none" to keep a stack at every width. Navigation stack
On the web, a fold moves the columns to it and back on UIKit's spring, as UIKit moves its own, and the detail
scrolls the page beside its list. Write -exact-layout-transition="0s" on the route that asks for the split to
place the columns at once, or a curve to move them on it.
On iOS, overflow="auto" or "scroll" on the navigation root keeps the native
container inside that scroller, sized to the root's box. Otherwise the native
container fills the session view.
Tabs with a stack each have one layout that works on web, macOS and iOS
(the tabs fixture, driven by
host/web-js/conformance/tabs.steps):
text
main navigationKey=`${top(nav).id}` navigationBack="close" navigate=follow display="flex" flex-direction="column" height="100%"
column flex=1 min-height=0 position="relative"
for t in nav.tabs key=t.name
column role="tabpanel" id=`panel-${t.name}` position="absolute" inset=0
for e in t.stack key=e.id
column navigationKey=`${e.id}` navigationScroll=`content-${e.id}` position="absolute" inset=0 display="flex" flex-direction="column"
header
if e.name == "item"
button id="close" press=back
text "Home"
text e.name role="heading" aria-level=(e.name == "item" ? 2 : 1)
scroll id=`content-${e.id}` flex=1 min-height=0
…
row role="tablist" display=(top(nav).name == "full" ? "none" : "flex")
button role="tab" aria-controls="panel-home" aria-selected=(nav.tab == "home") press=pick("home")
image "symbol:home"
text "Home"
if toast != ""
button position="absolute" … // a root overlay: after the tablist, over everything
•
A tab is built the first time it is selected, as UIKit and SwiftUI load a tab: until
then its panel is empty (unopened in tree), and the components in it have no
state yet. Once built it stays, with its stack, drafts and scroll. Resources and tasks
are the root component's and run whichever tab shows. A drive or a test taps a tab
before it reads or presses anything inside it; a target in an unopened tab is
refused with the tap that opens it (LLP 1075.003 §9.14).
•
Each route starts with a header (its heading, and on a pushed route the
id="close" control), which iOS makes the navigation bar. Leave the tablist's and the
routes' backgrounds, heights and colours unsaid: the platform draws the bars and the
page. For an authored design, put appearance="none" on the header or root
tablist to keep that bar's layout, colours and type on iOS too. A header
button with appearance="none" stays authored in place while the rest
of the header still projects. A title button keeps its contents; an authored Back
replaces UIKit’s Back. Search or a header tablist can opt out on that element
(a tab button alone does not opt its parent out of segments). Tabs retain their
panels and stacks; other styling alone does not opt a header out. On iOS 26 and
later neighbouring bar items share one glass capsule, as UIKit groups them;
buttonStyle="glass" on a header button gives that item a capsule of its own
(sharesBackground = false).
•
A header button (or link) is UIKit's own bar item (LLP 1141.004 D1). Its own children
are one symbol, one text, or a symbol and a text, and they write only where they sit
(a size, flex, a margin or padding): the symbol is the item's image and the text its
title, in the bar's type, the platform's; with both, the symbol is the image and the
text its spoken name, as a hand-built bar's item has them. Write its colour on the
button (color, the item's tint), and on a native button its font-size or
font-weight (buttonStyle="glass" font-size=12 is a small "● Clock" chip, its glass
fitting the words). The button's own fill, border and padding give way to the bar's
glass. A button whose one child is a filled box holding one text, one symbol or one
picture (an avatar, a badge) is UIKit's item too, drawn from the box without the
capsule. The box writes its fill, border-radius, size and layout. Text takes
font-size and font-weight, and text and symbols take color. On a button that says
backgroundMaterial="glass" (or "glass-clear") the
badge sits in a glass capsule of its own. A picture (image url, an avatar's photo)
fills the box by its object-fit, clipped to its corners; until it loads the face is
the box's fill. Leave the font unsaid for an ordinary Edit or Done.
•
A readout (role="status") of words, symbols, dots and one progress, holding nothing
that presses, is an item on its side of the heading: its own views in a custom view,
laid out as written and following the state in place, so its progress turns there
(LLP 1141.004 D3). It sits on the bar with no glass; backgroundMaterial written on it
is drawn as its own. VoiceOver speaks a change of it, its texts are never the subtitle,
and where the bar is too narrow UIKit's "⋯" menu lists it by its accessible name,
dimmed (give it an aria-label). (A button disabled=true is a dimmed bar item,
UIKit's disabled one, which VoiceOver reads as a button that cannot be pressed, not as
a status.) A row after the heading that is a symbol and words is the subtitle; one
that changes says role="status" to be a readout.
•
The iOS bar holds a closed set, and the compiler refuses the rest. In an app that
ships iOS, a route's header that is the bar holds its heading; the first text after
it as the subtitle (or the first text in a plain box after it, or a line of symbols and
words); an avatar before an inline heading (aria-level=2) in a wrapper box around the
heading (UIKit's public UINavigationItem API has no picture beside an expanded
aria-level=1 large title — put a brand mark below the header in the scrollable page
head, or an account avatar in a trailing badge button); buttons, links and badges as above;
readouts; one search field; and one tablist of titled tabs. Plain boxes around them,
or empty between them, lay them out. Anything else (a spinner or a picture beside the
heading, a second text, a switch, a pressed row of more than words, a button with a
dot beside its label or a coloured text, a button inside a readout) fails the build
(lower-header-item), and the error names the repair: make it one of those, move it
below the header into the route's content, or say navigationBar="none" on the
route's element and draw the header yourself. The compiler reads each arm of an if
or a match as if taken, so a branch does not get past it. An app that does not ship
iOS, and a header that is not the bar (no heading, two headings, appearance="none"
on it), draw the header as written. What the compiler cannot see (a value computed as
the app runs) iOS keeps out of the bar.
•
On the other targets:
•
Android's top app bar and tvOS's bar leave out a readout, and Android also leaves
out the title's avatar, glyph-line subtitles and tap on the title (plain-text subtitles
after the heading project into Material's small top app bar, LLP 1115.001 D11).
Projected bars own their container height on every projecting host (UIKit's bar on iOS,
AppKit's toolbar and 48 pt sheet title row on macOS, and Material 3's 64 dp small app
bar expanding with font_scale on Android pushed and modal sheet routes) and ignore
height or min-height written on header. When a route needs a specific authored bar
height (such as a 56 dp compact sheet toolbar), set navigationBar="none" on the route
or appearance="none" on header and size it in flow (for example min-height=56, so
large text still grows the header while keeping the sheet's native container, scrim,
detents, drag gestures and TalkBack pane title).
The Mac's toolbar takes a header only when it has a place for every part: the heading, the first text
after it (in a box or not) as the window's subtitle, buttons whose face is words,
symbols, dots and at most one picture, readouts of words, symbols and dots, one
search field and a tablist of two or more tabs that each show a title alone.
Anything else (a readout holding a spinner, a pressable title, a tablist of one tab,
a second search field) sends the whole header to the page. For the targets your app
ships, the compiler names each readout Android or tvOS leaves out and the first part
the Mac has no place for, once a header (header-item-left-out, information); it
does not name the title's own parts, and where an if or a match decides which
text is the subtitle or which search field is the second, it gives it the benefit.
The web and desktop Linux draw the header as written. To show something on every
target, put it below the header, in the route's content.
•
A readout's automatic size is held to a third of the bar's width and 44 points of
height, and UIKit shrinks or hides the title before the items; a width, height
or minimum you write wins, and the item takes that size. A trailing or bottom
margin on it is not kept; use padding.
•
Inside the heading's own box only the title shows: the rest is hidden
(lower-header-unplaced). Put an item outside that box.
•
On iOS, leave a readout's type and colour unsaid for the bar's own: a bar button
title's size and weight, the label colour, and UIKit's grey spinner. It grows with the
text size only as far as the bar's own titles do; at the accessibility sizes a long
press shows it larger. Write color="-exact-secondary-label" for a quiet label. What
you write on the readout or inside it wins as written; a color, font, spacing or
case on the header or the page does not reach it. A rem or a text style there
follows the root font size, so it grows with the person's text size or your
setRootFontSize; min(-exact-footnote, 20px) holds one near the bar's size if you
want that.
text
header display="flex" align-items="center"
button id="back" press=back
text "Settings"
text "Activity Log" role="heading" aria-level=2
row role="status" aria-label=(live ? "Clock, receiving" : "Clock") display="flex" align-items="center" gap=6
column width=7 height=7 border-radius=3.5 background-color=(live ? "c.cyan" : "c.dim")
text "Clock" font-family="Menlo" font-size=12 color=(live ? "c.cyan" : "c.dim")
if refreshing
row role="status" aria-label="Getting latest status" align-items="center" gap=6
progress
text "Updating" color="-exact-secondary-label"
•
Each tab names its panel with aria-controls; the panels are the stacks, and every
tab's stack stays mounted, so a pushed screen, a draft and a scroll offset survive
a visit to another tab. A tab is select(nav, name); selecting the shown tab
again pops it to its first visit. A sheet is a route of the tab's stack, rendered in the
panel's for e in t.stack like the others, and is presented over the tabs; with
tabs the root's own children are no routes, and one with a navigationKey is refused.
•
On iOS the panels become a UITabBarController: a tab of one symbol over its label
is its bar item, a filled box holding a text is the item's badge (the tab stays the
platform's tab; the web draws the box as a badge on the symbol), and the
tablist's accent-color (inherited, as in CSS) tints the selected item; the unselected
colour, the label's font and the badge's colour and size are UIKit's, and nothing
authored reaches them. tap tab-… works on every host. An app's bun exact.mjs agent ios and test ios drive what a
person sees (--chrome platform; --chrome agent paints the authored tablist and
header instead, as scripts/agent.mjs does by default): UIKit's tab bar, navigation bars and sheets show,
screenshot "file" window draws them (display reads the simulator's screen as it
is, a system alert over the app included), and a tap naming a tab or a header control
presses it through its bar (native: "tab-bar-item", "bar-button-item"). The
bars' own motion runs on real time (clock +300 real before a screenshot).
The software keyboard belongs to the system and is outside the app's drawing.
•
On the Mac a root tablist placed as above (the root column's last child) is the
window's sidebar: AppKit's source list, one row a tab, with its button in the
toolbar and View ▸ Show Sidebar. Under the agent on macos the authored tablist
paints (on iOS only when scripts/agent.mjs runs alone: exact.mjs shows UIKit's
bars); --chrome platform on macos shows the sidebar, and a tap naming a tab
presses its row (native: "sidebar-row").
•
For a footer pinned below the scrolling tabs, put the root tablist and a footer
together as the only children of a nav directly inside the navigation root. The Mac,
iPadOS 18 and later, and the wide web layout show the footer in the sidebar. It can
contain an account button or other controls. The bottom bar hides the footer on iPhone,
Android and the narrow web layout. An app-drawn tablist keeps its footer in the page.
•
On an iPad (iPadOS 18 and later) the same root tablist, placed as above, is UIKit's
sidebar-adaptable tab bar (UITabBarController.mode = .tabSidebar): a sidebar of the
tabs where the window is regular-width and wide enough (an iPad in landscape), the
floating tab bar with its sidebar button otherwise, and the bottom tab bar in a compact
width. UIKit switches between them as the window changes; the routes clear the
sidebar as they clear any bar, so their content is laid out beside it. A tablist the
author places elsewhere, or draws (appearance="none"), stays a tab bar, and so,
for now, does a bar of six or more tabs.
•
The search tab: the root tab that says rel="search" (HTML's link type for "an
interface for searching"; keep role="tab") is the app's search tab, and is written
last. On iOS 18 and later, in a bar of five tabs or fewer, it is a UISearchTab with
the tab's own symbol and label (none: UIKit's magnifying glass and "Search"); the first input type="search" in its
root route's header is its field, which UIKit moves into the bar when the tab is
selected. autofocus on that field is automaticallyActivatesSearch: iOS 26 sets the
tab apart at the trailing end of the bar and opens the field on every selection;
without it the tab is one among the others. The web, the Mac's sidebar, Android and
the other hosts keep it where it is written. A header field on a list is that list's
filter; a search tab searches the app. contract vocab search has the details;
Expo's role="search" trigger and SwiftUI's Tab(role: .search) are rel="search".
•
A mini player above the tab bar (docs/recipes/mini-player.md):
navigationTabAccessory="now-playing" on the root tablist names an element, written
after every tab panel the tablist links (usually just before the tablist), that iOS 26
and later show as UIKit's tab bar accessory (bottomAccessory): a glass capsule on
every tab, on an iPhone above the bar and inline where the bar was while it hides, on
an iPad at the bottom of the page. UIKit places and sizes it (48 points high on an
iPhone 18 Pro with iOS 27), the element's box is UIKit's whatever height it says,
and the routes clear it. Show and remove it with if or display. The web, the Mac
and Android lay the element out where CSS puts it, above the tab strip; iOS 17 to 25,
which have no accessory, leave it there, hidden under the shown tab bar. Where the
compiler can prove it, a literal id that names nothing, or an element inside the
tablist, a tab panel, a route, a list, a popover or a dialog, a run of text or a
part of an svg or a select, is refused (lower-tab-accessory, for example
"navigationTabAccessory="player" names an element inside a tab panel, but the tab
bar's accessory is shared by every tab"); its message says what to change. On the
live tree, where the compiler cannot tell (an element written before a panel the
tablist links, in the footer the sidebar shows, or a radio or a tab of its group), a
development build on iOS 26 and later writes the reason to logs while Exact's own
tab container shows the tabs. To see it, drive iOS with --chrome platform.
•
A row of your own above the tab bar: a row written between the panels and the root
tablist that the tablist does not name keeps its own box and look, and on iOS sits on
the shown tab bar where the web puts it above the tab strip, with the routes' content
ending at its top. Write the tablist in flow at the end of a flex column whose child
holding the panels grows (flex=1), and the row in that column between the two, or
after the panels inside that child where it is itself such a column. Elsewhere, such
as a column beside the tablist, a tablist placed with position="absolute" or moved
first with order, iOS leaves the row under the shown bar (LLP 1083.000 D4).
•
A tab bar that minimizes as content scrolls (tabBarMinimizeBehavior) is not a
Contract word: unsaid, the bar is UIKit's default, and an app that wants it sets it
from the tabs hatch, which hands it the UITabBarController (docs/reference.md,
"Access hatches"). The routes follow the safe area a minimizing bar changes, and an
accessory goes inline beside the minimized bar. The hatch owns bottomAccessory
while Exact shows no accessory.
•
A box written beside the routes in the navigation root (a column the routes are offset
past) shows on iOS as on the web: the native container that stands for the routes
paints under a child no route's box meets, and UIKit lays the navigation bar's title
and buttons out past such a column. For a sidebar of sections beside the content,
prefer the root tablist above, which an iPad shows as its sidebar.
•
On the Mac a route's header is the window's title bar and toolbar: its heading the
window's title (under a head title, over the app's name; there is no large title),
the first text after the heading the window's subtitle, its buttons toolbar items, a
button whose popovertarget is a menu a menu item, a tablist of text tabs the
centred segments, its input type="search" the toolbar's search field, and the
id="back" control the bar's own Back, which is the back/forward pair where the
navigation root offers Forward (its navigationHistory, both when it says nothing).
A header holding anything else (a picture, a text before the heading or a second one
after the subtitle, a pressable title, a button holding a spinner or a second picture) stays in the page as
written, whole, and logs says what it was. Under the agent
the authored header paints; --chrome platform on macos shows the bar, tap and
type naming a header's button, tab or search input go through it
(native: "NSToolbarItem"), and state window.toolbar.header names its title, its
items by test id and which are in the overflow menu. Its search field arrives with
AppKit's own animation (clock +1200 real before a screenshot). In a list beside its
detail the window's title and subtitle are the detail's, as in System Settings, and
the list's heading stays over its rows; beside a sidebar (three columns) the list's
heading is the title and the detail's stays in its pane, as in Mail.
•
In the Mac's list column, a sectioned list uses an inset AppKit table.
Each section header is a group row. A link in the section body selects its
row and opens the detail. The footer has no table row. When a virtualized
list repeats sections, AppKit can address every row while Exact keeps a
window of sections mounted.
•
On the Mac a window toolbar the app declares (row role="toolbar" toolbarPlacement="window" of action buttons and at most one heading) has Customize
Toolbar when every button in it has an id of its own: the ids are the items'
identities, the written order the default, and AppKit keeps the person's arrangement
across launches and in every window. A button hidden there keeps its place, hidden.
A route's header is not customizable: its buttons change with the route, as a
hand-built window's that changes with its content are.
•
Hide the tab bar on a route with display="none" on the tablist. Never remove the
tablist with if: without it the root has no tabs and the panels' routes are
found by no host.
•
Root children after the panels box (a toast, a timer strip, a full-screen menu) paint
over the routes and the native bars on every host, as later siblings do in CSS.
•
A modal route (navigationPresentation="modal") is opaque: its unsaid
background-color is -exact-background (the grouped one when it scrolls a grouped
list), so the route under it, dimmed, never shows through; write one to say another.
On iOS that unsaid ground is the sheet's: below its large detent the sheet is
UIKit's glass, as a hand-built one is, and at the large detent the system
background. A background-color="transparent" is clear at every detent.
Its corners are UIKit's: on iOS 26 and later a large sheet is rounded like the
display and inset from the bottom edge, as Apple's own are. A border-radius on the
route is the sheet's corner radius (its top-left one; preferredCornerRadius), which
also seats a large sheet flat on the bottom edge.
A modal route opened over a sheet (a confirmation over a dialog)
is a sheet over that sheet, on iOS presented from it; Back returns to the sheet
under it, and popping both closes both. An ordinary route pushed while a sheet
is on top is shown inside that sheet, which keeps its detents (on iOS and macOS
in its own navigation stack, on the web and Android in the sheet's box, on
desktop Linux in the box the sheet's route was laid out in); Back returns to
the route before it in the sheet, and on iOS and Android dismissing the sheet
closes them all. Over a fullscreen route a push is a page of its own. On Android a
modal route is Material's bottom sheet at its detents, over a scrim, dragged
between them or down to dismiss; pushes and pops cross on Material's shared
axis, and Back is previewed from Android 14 (host/android/README.md, "Sheets
and route motion"). Both move on the agent's clock there: clock settle before
reading where a sheet or a route is. Under the agent's frozen timing (the
default) on iOS, a tap, back or type that opens or closes a sheet, or pushes
or pops a route, waits up to two seconds for UIKit to finish it, its answer's
then included. A reply with settled: false, reason: "transition" says the
transition had not ended, or Exact had not followed it yet. --timing platform
leaves that to clock settle.
•
A full-screen route (navigationPresentation="fullscreen") that paints nothing
stands on the platform's background. One whose author wrote a background-color
(transparent included) or a background-image stands on nothing else: the page it
covers stays under it, inert, and shows through where its background is translucent
or while it fades out, as in CSS (a photo viewer's black fading to the chat it came
from).
•
A sheet's heights are navigationDetent, space-separated words: large,
medium, a point height, a percentage of the sheet's maximum height ("45%",
React Native's sheetAllowedDetents: [0.45]; above 0% and at most 100%) or
fit-content (the route's content height; a menu or
a short dialog), which goes alone, as "fit-content large", or last after
ascending stops below large as a content-height ceiling (e.g.
"medium fit-content", "50% fit-content", "300 fit-content": preceding
stops at or above content height are omitted, so short content opens fitted
and tall content opens at the preceding stop and expands to content height
within the available screen). Write a share of
the screen as a percentage, never points computed from a measure. Heights go
shortest to tallest on every screen, as UIKit takes them: before large, which
goes last, use one kind (points, or percentages with medium as half), each
taller than the one before; "300 45%" crosses on a small screen. "100%" is
large, and a point height a screen's maximum reaches, with a taller detent after
it, is left out there. A percentage, like a point height, leaves out the bottom
safe area, which UIKit adds below. A literal with
another word or order is refused; a bound one iOS cannot use is journaled (logs)
with the route, and the sheet keeps its other detents or opens large.
fit-content measures the route laid out alone, its
height left to its children, so nothing sized from the sheet counts; on iOS every
viewport unit (vw, vh, vmin, vmax, and kin) is the window's in every sheet, never the
sheet's, so min-height: 100vh opens the sheet at its maximum. A scrolling
route is measured the same way; its rows can keep the default flex-shrink: 1.
The route does not pad env(safe-area-inset-bottom): UIKit adds that band
below the detent.
iOS sizes a sheet, and so does the web on a window narrower than 840 px: it opens
at the same height, its foot on the window's, and stays there (no grabber, no
drag between heights), with the bottom safe area below, and a route pushed inside
it stays in it at that height. There it is the tallest sheet in a window under 480 px tall
(UIKit's compact height) and on a touch screen while a text field in it has the
focus, as UIKit raises one over the keyboard; a wider window draws the card. macOS
and Linux ignore the detent (LLP 1075.003 §9.11, LLP 1115.000 D4.8).
•
A sheet's width on an iPad is its route's navigationSizing: automatic, the
default, the platform's own sheet (UIKit's .automatic, SwiftUI's
.presentationSizing(.automatic)), a form sheet centred at a standard size on
iPadOS 18 and later and a page sheet before; page, the window's full width, for
content that needs the room (a camera, an editor); form, a form sheet on every
version. On an iPhone the three are the same full-width sheet; macOS, the web,
Android and Linux ignore it. It is read as the sheet is presented.
•
A sheet opens at its first height, the shortest, as UIKit opens one, unless the
route says navigationInitialDetent, one of its navigationDetent words:
navigationDetent="medium large" navigationInitialDetent="large" opens tall with a
half-height stop (React Navigation's sheetInitialDetentIndex). It is read when
the detents are set, so changing it alone does not move an open sheet.
•
A sheet's grabber is the platform's unless the route says navigationGrabber:
iOS draws one on a sheet with several detents, which it resizes, and none on a
sheet of one height; "visible" or "hidden" says otherwise (UIKit's
prefersGrabberVisible). Draw no grabber of your own.
•
Without tabs, the routes are the root's own children, laid out the same way.
•
Tests reach a tab by tap, or deliver a location as type <root> "/saved" (LLP
1038 D11), which calls the root's navigate. back, an operation and a test
step, is the platform's Back on every host (LLP 1116.006 D4): an open dialog's
cancel, else the top sheet dismissed, else the pushed route popped, as iOS's Back
button, the browser's Back or ⌘[ goes; with nothing to go back from it fails. On
the web tap <root> history -1 is the browser's history alone (native hosts
refuse it).
A head node supplies document metadata. The innermost active value wins for
each field. head edited=dirty marks a document with unsaved changes (the dot in
a Mac window's close button; nothing elsewhere). Before a window closes or the app
quits, every element with a beforeunload handler hears it, DOM's event: an action
that calls preventDefault() keeps the window open — the browser asks "Leave
site?", a Mac or Windows app asks its own question — and close() closes the window once
it is answered (studio diary R17). Any other element's title is HTML's tooltip. scroll document declares page scrolling; on the web it locks document scroll automatically behind an open modal dialog, alertdialog popover, navigationPresentation="modal" sheet, or inert subtree while keeping the reader's scroll position (do not toggle scroll document=(not open) to lock scrolling). Route render/activate
policy belongs to the site's renderer/build pipeline; follow
the document fixture and
LLP 1048.003. Do not claim SEO,
streaming, or deployment correctness from a client-only screenshot.
app.json's host.web.head lists tags the web build writes into the <head> of every
document: the shell, each page rendered at build or per request, and the 404 page. It is
for what a site says once to the browser: an analytics script, a preconnect, site-wide
JSON-LD. A page's own title and metas stay its head element's.
json
"host": { "web": { "head": [
{ "link": { "rel": "preconnect", "href": "https://www.google-analytics.com" } },
{ "script": { "async": true, "src": "https://www.googletagmanager.com/gtag/js?id=G-XXXXXXXXXX" } },
{ "script": { "text": "window.dataLayer = window.dataLayer || []; function gtag() { dataLayer.push(arguments); } gtag('js', new Date()); gtag('config', 'G-XXXXXXXXXX');" } },
{ "script": { "type": "application/ld+json", "text": { "@context": "https://schema.org", "@type": "WebSite", "name": "Euxy", "url": "https://euxy.example/" } } }
] } }
•
An entry is one script, link or meta, whose value is its attributes: a string, or
true for a bare one such as async. A script's text is its content; an object or a
list is written as JSON, with <!--, and </script before whitespace, / or >,
written \u003C…, which JSON reads alike. A text that is a string is written as it is,
and one holding either sequence is refused, since the page's HTML parser reads it there:
write "\x3C!--" or '<' + '!--' inside a string, or a space after < in code.
•
The build refuses another tag, a malformed entry or attribute name, and what Exact
writes or reads itself (the charset, the viewport, the head element's fields, the icon,
manifest, theme colour and colour scheme, a meta named exact-…, a script or preload
of its own app.js, glue.js or app.wasm however its URL is spelt, and a script or
link of an application/vnd.exact.… type such as its checkpoint), naming the entry. A
rel is read as its words, so "shortcut icon" is an icon.
•
A script runs once per document. When the runtime changes the route in place, the tags
stay and do not run again, so an analytics tag counts that change only if it watches the
browser history. A page that loads no runtime (an interaction page with no handlers)
follows a link as a new document, which runs them again.
•
A script does not write inside #exact-root: the runtime owns that tree, and the page's
sheet keeps the rules there only for what Exact writes (LLP 1047.003 D1). What a script
adds elsewhere, such as a banner on body, meets every rule of the sheet.
•
The dev loop and serve send them too, so a tag there reports local visits. serve and a
static host send no Content-Security-Policy, so the scripts run as on any page. The Rust
render server (<app>-render --serve) sends one. It admits each inline script here by its
hash and each script src by its origin; a JSON-LD block needs neither.
•
What those scripts load or contact in turn is the app's to allow there, in
host.web.csp. A list adds sources to Exact's for that directive. A string replaces
Exact's value, and the word exact in it stands for Exact's sources. false sends no
policy. host.web.cspReportOnly takes the same shape and is sent as
Content-Security-Policy-Report-Only. Google's tag, for example, loads its script and
sends its hits from other origins:
json
"host": { "web": { "csp": {
"script-src": ["https://www.googletagmanager.com"],
"connect-src": ["https://*.google-analytics.com", "https://*.analytics.google.com", "https://*.googletagmanager.com"]
} } }
A directive Exact does not write starts from the one CSP falls back to ('self', through
default-src), so a list never refuses what the page could load before. Directive names
are lower case. The build refuses a ,, a ;, a line break, or a list item with a space
in it, since each would end a source, a directive or the policy; the browser reads the rest.
•
Two keywords do not add. Exact's script-src holds hashes, and beside a hash the browser
ignores 'unsafe-inline'; 'strict-dynamic' makes it ignore 'self' and every host
source, so Exact's own app.js stops loading. Either goes in a string without exact
("script-src": "'self' 'unsafe-inline' https://www.googletagmanager.com"), which also
admits Exact's inline scripts.
•
A report-only policy reports to a report-uri. report-to needs a Reporting-Endpoints
header, which the server does not send, so its reports reach only the console.
•
A static host sends no CSP. A page that wants one there says it in host.web.head as
{"meta": {"http-equiv": "Content-Security-Policy", "content": "…"}}, or the host sends
it as a header. The runtime and the page module (modules/web/index.js) load from the
page's origin and inject no inline script, so script-src 'self' admits them. The
policy must still admit what the render server's does: 'unsafe-inline' in
style-src (without it the runtime's style sheets are refused and the app does not
start), data: and blob: in img-src, and 'wasm-unsafe-eval' in script-src when
the page runs WebAssembly (a Rust data module, Markdown, text flow and motion do). A
page rendered at build carries inline scripts, the one that activates it among them:
under script-src 'self' add each one's hash, which the browser's refusal names
('sha256-…'), or the page stays as rendered.
Is this helpful
Last updated November 30, 2026