日本語

Page

Page is the full HTML document for a page, with its title, its initial signals, and the runtime.

Page

Page::render evaluates every binding with the initial signals, so the first HTML already contains the values the runtime would compute.

ItemSummary
Page::newStarts a page with its title and initial signal values.
childAppends a node to <body>.
on_keyRuns stmt when shortcut is pressed anywhere on the page.
computedKeeps signal equal to value, recomputed when a signal value reads changes.
bind_titleKeeps the document's title, the text of the browser tab, equal to title.
themeSets token values for the whole page.
globalAdds rules for elements by their tag, and fonts, to the page.
styleAdds sheet to <head> as a <style> block.
stylesheetAdds a <link rel="stylesheet"> for the file at href to <head>.
scriptAdds a <script type="module"> for the file at src to <head>.
langSets the language of the page, the lang attribute of <html>, to the BCP 47 tag tag.
runtime_srcLoads the runtime from src instead of RUNTIME_PATH, for a page served as a static file.
csp_noncePuts nonce on the page's <style> and <script> elements, for a Content-Security-Policy that allows styles by nonce.
renderRenders the document.
value_ofThe value signal starts at in the browser, for a test of a page handler.
RUNTIME_PATHThe path Page loads the runtime from, which names a hash of RUNTIME_JS.
RUNTIME_JSThe browser runtime, built from runtime/ in the repository.

A canonical URL and the image of a card are absolute, so they join a path to an Origin. Navigation loads the next document, so each page writes its own tags.

ItemSummary
descriptionSets the summary of the page that search results and link previews show.
canonicalNames url on origin as the page's one address.
alternateNames url on origin as the same page in the language hreflang.
alternate_defaultNames url on origin as the version for a visitor whose language no alternate matches.
noindexAsks search engines to leave the page out of their results.
nofollowAsks search engines not to follow the links on the page.
framed_byLets pages served from origin show this page in a frame.
framed_anywhereLets a page of any site show this page in a frame.
json_ldAdds data to <head> as JSON-LD, the structured data search engines read.
iconUses the file at href as the page's icon in tabs and bookmarks.
open_graphAdds the card a link to the page shows in chat apps and social sites.
OriginThe scheme, host, and optional path prefix a site is served from.
Origin::underThe same origin with the site served under prefix, such as /blog.
Origin::parseReads an origin and an optional prefix from configuration, such as https://example.com/blog.
OriginErrorText that Origin::parse refused, with the rule it broke.
OpenGraphThe card a chat app or a social site shows for a link to the page.
OpenGraphTypeWhat a page shows, the og:type of its OpenGraph card.
OpenGraphLocaleA language and territory in the ja_JP form that og:locale takes.