foldkit-ssr 0.1.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -22,7 +22,7 @@ const Post = SSR.plan(App, {
22
22
  // Server: render, and write that slice into the page.
23
23
  const html = SSR.page(template, await Effect.runPromise(SSR.render(config, Post, { buildId, url })))
24
24
 
25
- // Browser: take the page over from the slice, without running init.
25
+ // Browser (from 'foldkit-ssr/client'): take the page over from the slice, without running init.
26
26
  SSR.hydrate(config, Post, { buildId })
27
27
  ```
28
28
 
@@ -69,7 +69,7 @@ and the checks that the browser can start from it.
69
69
  ## The mental model
70
70
 
71
71
  ```text
72
- server init ──▶ Model ──┬── plan.state ──▶ slice ──▶ envelope (JSON in the page)
72
+ server init ──▶ Model ──┬── plan.state ──▶ slice ──▶ envelope (JSON on the stamped root)
73
73
  └── view ──▶ HTML (checked, see below)
74
74
 
75
75
  browser envelope ──▶ baseline with the slice set on it ──▶ Model
@@ -89,40 +89,64 @@ silently rebuilt in the browser.
89
89
  The examples in this README share one application, a post page, sketched [at
90
90
  the end](#the-application-in-these-examples). `App` is its Surface application
91
91
  from `foldkit-surface`, and `config` is what you would pass to
92
- `makeApplication`, the same object on both sides.
92
+ `makeApplication`, the same object on both sides: any of its four shapes, with
93
+ Flags or routing or neither, and `routing`'s callbacks typed from `update`'s
94
+ Message as Foldkit types them.
95
+
96
+ The code is in three modules, because the server and the browser import
97
+ different things:
93
98
 
94
99
  ```ts
95
- import { Effect } from 'effect'
100
+ // post.ts, read by both: the plan. Which part of the Model the browser owns;
101
+ // the rest starts from the baseline, by default the application's initial Model.
96
102
  import { Projection } from 'foldkit-surface'
97
- import { SSR } from 'foldkit-ssr'
103
+ import { SSR } from 'foldkit-ssr/client'
98
104
 
99
- // Which part of the Model the browser owns. The rest starts from the
100
- // baseline, by default the application's initial Model.
101
105
  export const Post = SSR.plan(App, {
102
106
  id: 'post',
103
107
  state: Projection.pick(App.model.route, App.model.draft),
104
108
  })
109
+ ```
110
+
111
+ ```ts
112
+ // server.ts, per request.
113
+ import { Effect } from 'effect'
114
+ import { SSR } from 'foldkit-ssr'
105
115
 
106
- // On the server, per request.
107
116
  const result = await Effect.runPromise(SSR.render(config, Post, { buildId, url: request.url }))
108
117
  const html = SSR.page(template, result)
118
+ ```
119
+
120
+ ```ts
121
+ // client.ts, the page's script, instead of Runtime.hydrate.
122
+ import { SSR } from 'foldkit-ssr/client'
109
123
 
110
- // In the browser, instead of Runtime.hydrate.
111
124
  SSR.hydrate(config, Post, { buildId })
112
125
  ```
113
126
 
127
+ `foldkit-ssr/client` is the browser's part: `SSR.plan`, `SSR.resume`,
128
+ `SSR.hydrate`, `SSR.static`, `SSR.serving`, `Resume`, and the attribute names,
129
+ Foldkit's root stamp (`FOLDKIT_APP_ATTRIBUTE`) among them. It imports nothing
130
+ of `foldkit/experimental/server`, whose renderer and HTML parser `foldkit-ssr`
131
+ brings along: about 200 kB minified (60 kB gzipped) off a page's script in the
132
+ [SSR example](../../examples/foldkit/ssr). `foldkit-ssr` has all of it and the
133
+ server's calls, the same functions, so a plan made from either works with
134
+ both. Import `foldkit-ssr/client` in every module the page loads, the plan and
135
+ the view included, and `foldkit-ssr` only where the server alone runs.
136
+
114
137
  What each call does:
115
138
 
116
139
  - **`SSR.plan`** is a declaration. It does no I/O and holds no state. It
117
140
  throws only for a plan that could never work, such as two parts with one id.
118
141
  - **`SSR.render`** is an Effect. It runs `init` once, renders the view twice,
119
- checks the plan, and returns the rendered application and the envelope
120
- script. It fails with `ResumeUnsafe` when the browser could not start where
142
+ checks the plan, and returns the rendered application and the envelope it
143
+ carries on the stamped root. It fails with `ResumeUnsafe` when the browser could not start where
121
144
  the server did; [the refusals](#when-a-page-is-refused) say why and how to
122
145
  fix each.
123
- - **`SSR.page`** is pure: the template with the application and the envelope in
124
- it. The envelope goes before the template's last `</body>`, and a template
125
- without one is refused, by `SSR.page` and by `SSR.entry` when it is made.
146
+ - **`SSR.page`** is pure: the rendered application in the template, through
147
+ Foldkit's `injectIntoTemplate`. The envelope rides on the rendered root, so
148
+ the template needs no place for it. An optional `head` adds markup before
149
+ `</head>`, given what was rendered.
126
150
  - **`SSR.hydrate`** reads the envelope, starts Foldkit's runtime from the
127
151
  resumed Model, and runs the plan's `boot` Commands. `init` does not run. A
128
152
  page with no server render at all starts on the client as usual.
@@ -151,6 +175,35 @@ Commands, which is where a `Mirror.kv` restores what the user saved:
151
175
  boot: model => assembly.init(model).commands ?? []
152
176
  ```
153
177
 
178
+ ### Styles in the first paint
179
+
180
+ A generated page styled with `foldkit-mixins` can ship the CSS its markup uses
181
+ in the head, so it is styled before any script runs. `head` is given the rendered
182
+ application; `Style.usedIn` returns the CSS of every compiled class the markup
183
+ carries. In the browser, Styles bring their rules as they draw and skip what
184
+ this sheet already carries, so nothing is added twice.
185
+
186
+ ```ts
187
+ import { Style } from 'foldkit-mixins'
188
+
189
+ const html = SSR.page(template, result, {
190
+ head: rendered => `<style>${Style.usedIn(rendered.html)}</style>`,
191
+ })
192
+ ```
193
+
194
+ A served page has no template head to write to, so `SSR.render`, `SSR.entry`
195
+ and `SSR.handle` take the same function as `styles` instead, carried as the
196
+ rendered root's last child. Keep it to `<style>`: hydration adopts the nodes
197
+ around it and drops it on its first patch, and the browser's Styles skip what
198
+ it already carries. A void root holds no children, so styles for one are
199
+ refused with `VoidRootWithStyles`, naming the tag. Anything a head owns
200
+ (`meta`, links) stays with `SSR.generate`.
201
+
202
+ `SSR.generate` takes the same `head`, and answers a `head` that throws `500`,
203
+ as it does a render that fails. `SSR.entry` takes no `head`: the host owns
204
+ the template in dynamic serving, so a served page carries no per-page head
205
+ markup, and the script brings what the first paint needs.
206
+
154
207
  ### The head is part of the view
155
208
 
156
209
  `title`, `lang`, `dir`, `canonical` and `ogUrl` are checked like the body.
@@ -158,19 +211,56 @@ Since Foldkit 0.163 nothing gives `canonical` a default from the URL, so a page
158
211
  that wants one derives it from the route in its Model, as it does its `title`,
159
212
  and sends the route in `state`.
160
213
 
214
+ Foldkit fills `canonical` and `og:url` only into tags the template already has
215
+ and adds none, so a render that sets either into a template without
216
+ `<link rel="canonical" href="">` or `<meta property="og:url" content="">` is
217
+ refused, naming the tag.
218
+
219
+ ### What a page says of itself: `meta`
220
+
221
+ A search result and a link preview read more than Foldkit's `Document`: a
222
+ description, an image, Open Graph, a post's dates and structured data. The
223
+ plan's `meta` gives them from the Model:
224
+
225
+ ```ts
226
+ const Post = SSR.plan(App, {
227
+ id: 'post',
228
+ state: Projection.pick(App.model.route, App.model.post),
229
+ meta: model => ({
230
+ description: model.post.excerpt,
231
+ type: 'article',
232
+ article: { published: model.post.publishedAt },
233
+ jsonLd: [{ '@context': 'https://schema.org', '@type': 'BlogPosting', headline: model.post.title }],
234
+ }),
235
+ })
236
+ ```
237
+
238
+ `SSR.page` and `SSR.generate` write the tags (`description`, `og:*`,
239
+ `twitter:card`, `article:*`, `robots`, `link rel="alternate"`, and one JSON-LD
240
+ script per entry) before `</head>`, every value escaped, and `SSR.render`
241
+ checks them like the view: a `meta` that reads a field `state` does not send
242
+ is `ViewDependsOnUnsentState`. `SSR.hydrate` keeps them in step with the Model,
243
+ so a move to another post replaces the description too. Each carries
244
+ `data-foldkit-meta` (`META_ATTRIBUTE`), which is how the browser finds the
245
+ ones to replace; leave such tags out of the template.
246
+
161
247
  ## Serving pages
162
248
 
163
249
  ### Through Foldkit's fetch handler
164
250
 
165
251
  Foldkit's server entry is one function, `renderPage(request)`, which
166
252
  `handleRequest` calls for every request that is not a static file, on Node and
167
- on Workers alike. `SSR.entry` is that function for a plan:
253
+ on Workers alike. `SSR.entry` is that function for a plan. The host owns the
254
+ template: the entry answers `Rendered`, with the envelope on the rendered
255
+ root, and the host injects it into its own template, in development through
256
+ the `foldkit` Vite plugin and in production through the fetch handler a
257
+ `vite build` emits.
168
258
 
169
259
  ```ts
170
260
  import { handleRequest } from 'foldkit/experimental/server'
171
261
 
172
262
  // The server entry.
173
- export const { renderPage } = SSR.entry(config, Post, { buildId, template })
263
+ export const { renderPage } = SSR.entry(config, Post, { buildId })
174
264
 
175
265
  // A Worker, or any host that hands you a Web Request.
176
266
  export default {
@@ -178,19 +268,58 @@ export default {
178
268
  }
179
269
  ```
180
270
 
271
+ ```ts
272
+ // vite.config.ts, for the dev server and the build id both entries compile in.
273
+ import { foldkit } from '@foldkit/vite-plugin'
274
+
275
+ export default defineConfig({
276
+ plugins: [foldkit({ ssr: { serverEntry: '/src/entry.server.ts' } })],
277
+ })
278
+ ```
279
+
280
+ ```ts
281
+ // entry.server.ts and the browser's entry.ts alike.
282
+ buildId: import.meta.env.FOLDKIT_BUILD_ID,
283
+ ```
284
+
285
+ `FOLDKIT_BUILD_ID` names the deployment, from the environment: a commit or a
286
+ release tag, public and unique per deployment. The plugin compiles it into
287
+ both bundles; a script outside Vite, such as a prerender, reads
288
+ `process.env.FOLDKIT_BUILD_ID`, the same value the build saw.
289
+
290
+ Set it even though `@foldkit/vite-plugin` can now generate an id on its own.
291
+ The generated one is compiled into Foldkit alone, where `foldkit-ssr` cannot
292
+ read it, and the client must compare builds before it reads a page's payload,
293
+ so a Model serialized by another deployment is never decoded. Asking Foldkit
294
+ to expose that id is [proposal 4](../../docs/upstream-foldkit-ssr.md#proposal-4-expose-the-compiled-build-id).
295
+
181
296
  `GET` and `HEAD` render the page for the request's URL; an application with
182
297
  Flags passes `flags: request => ...`. `POST` is handled only for a plan with a
183
- [server fallback](#forms-that-work-without-scripts), and any other method is
184
- answered `405`. A render that fails or throws, `flags` that reject, and a plan
185
- the render refuses are answered `500` with the reason logged, never with a page
298
+ [server fallback](#forms-that-work-without-scripts). `OPTIONS` is answered
299
+ `204` and any other method `405`, each with the methods the entry answers in
300
+ `allow`. A render that fails or throws, `flags` that reject, and a plan the
301
+ render refuses are answered `500` with the reason logged, never with a page
186
302
  the browser could not resume.
187
303
 
188
- The page comes back whole, as Foldkit's `Responded`, built by Foldkit's own
189
- `toResponse`. A `Rendered` result has no room for the envelope, which is why
190
- the entry takes the template itself, and why Foldkit's built-in `prerender`
191
- cannot generate these pages; `SSR.generate` below does.
304
+ `headers: request => ...` rides on the `Rendered` result, set over the host's
305
+ own: a cache policy for a page that is one visitor's, or the CORS answer to a
306
+ preflight, which reaches the entry and not the host.
307
+
308
+ ```ts
309
+ SSR.entry(config, Post, {
310
+ buildId,
311
+ headers: () => ({ 'cache-control': 'private, no-store', vary: 'cookie' }),
312
+ })
313
+ ```
314
+
315
+ A `headers` that throws is answered `500`, as a failed render is.
316
+
317
+ What the page says of itself (`meta`) and per-page `head` markup are written
318
+ into a template's head, which the host owns here: a plan with `meta` is
319
+ refused when the entry is made, and served with `SSR.generate` below, which
320
+ owns its template.
192
321
  [foldkit#1448](https://github.com/foldkit/foldkit/issues/1448) asks Foldkit
193
- for that room.
322
+ for a per-request head channel beside the envelope.
194
323
 
195
324
  ### At build time
196
325
 
@@ -223,6 +352,70 @@ alike, so a generated page records its path alone: `/about?ref=mail` resumes
223
352
  the page generated for `/about`, and `/other` is refused. A server-rendered page
224
353
  records its path and query, and resumes only there.
225
354
 
355
+ A generated site also wants a sitemap and a `robots.txt` that names it.
356
+ `SSR.sitemap` takes the pages, with a `modified` date where one is known, and
357
+ `SSR.robots` the origin:
358
+
359
+ ```ts
360
+ await writeFile(
361
+ 'dist/sitemap.xml',
362
+ SSR.sitemap(
363
+ pages.map(page => ({ path: page.path, modified: '2026-09-27' })),
364
+ { origin: 'https://example.com' },
365
+ ),
366
+ )
367
+ await writeFile('dist/robots.txt', SSR.robots({ origin: 'https://example.com' }))
368
+ ```
369
+
370
+ `modified` is any date `Date` reads, written as its UTC day. A path listed
371
+ twice, one not starting with `/`, or a date `Date` cannot read is refused
372
+ rather than written into a sitemap a search engine would reject. `robots`
373
+ takes `disallow` paths and a `sitemap` path other than `/sitemap.xml`.
374
+
375
+ ### As a Vite plugin: `foldkit-ssr/vite`
376
+
377
+ `foldkit-ssr/vite` runs the same static build as a `closeBundle` step on the
378
+ application's own `vite build`, so a site is generated without a second script.
379
+ The application describes its site in a module (`src/site.ts`) and the plugin
380
+ evaluates it through a server, so `vite.config.ts` names a file, never
381
+ application code:
382
+
383
+ ```ts
384
+ // vite.config.ts
385
+ import { staticSite } from 'foldkit-ssr/vite'
386
+ export default defineConfig({
387
+ plugins: [foldkit(), staticSite({ site: { module: '/src/site.ts' } })],
388
+ })
389
+ ```
390
+
391
+ `src/site.ts` exports a `SiteModule`: what `SSR.generate` takes, plus where the
392
+ pages land. `config` may be one config or a function of the path (a site whose
393
+ Model is prepared per page returns its own); `paths` may be a thunk that seeds
394
+ and lists; `head` is the same `head`; and `sitemap`/`robots` write their files
395
+ from the generated pages. `files` is the host's layout — `'directory'`
396
+ (`/about` as `about/index.html`, the default) or `'flat'` (`about.html`, for a
397
+ host with clean addresses and no directory indexes):
398
+
399
+ ```ts
400
+ // src/site.ts
401
+ import type { SiteModule } from 'foldkit-ssr/vite'
402
+ export const site = {
403
+ origin: 'https://example.com',
404
+ paths: ['/', '/about'],
405
+ config: { Model, init, update, view, container: null, routing },
406
+ plan,
407
+ head: rendered => `<style>${Style.usedIn(rendered.html)}</style>`,
408
+ files: 'directory',
409
+ sitemap: true,
410
+ robots: true,
411
+ } satisfies SiteModule
412
+ ```
413
+
414
+ `generateStaticSite(site)` is the same build without Vite: it renders every
415
+ path and returns `{ pages, sitemap?, robots? }`. `fileFor(path, layout)` maps
416
+ one path to the file a host serves it from, so a caller writes the files
417
+ itself; `generateStaticSite` refuses two paths that would claim one file.
418
+
226
419
  ## Checking what the browser will read
227
420
 
228
421
  The view check sees what the first render shows. A Surface can read a field the
@@ -307,6 +500,15 @@ content a Message should change belongs in a Surface. A region the browser
307
500
  needs that is not in the page, say after a Message shows one, is logged and
308
501
  rendered in the browser.
309
502
 
503
+ ### Markup the browser adopts: `SSR.serving`
504
+
505
+ `SSR.serving()` is true while the view call in progress is the server rendering a page (both
506
+ of `render`'s passes), and false while the browser resumes and outside any render. It is for
507
+ a view whose element hydration leaves alone, such as a custom element's light DOM, and which
508
+ sends markup there that the browser's own code then takes over. The rich-text editor's host is
509
+ one: pass `serverRendered: SSR.serving` to `foldkit-richtext-dom`'s `editorAt`, and the page
510
+ carries the document instead of an empty editor until the script runs.
511
+
310
512
  ## Resumable pages: answering before the runtime boots
311
513
 
312
514
  Everything above boots Foldkit's runtime as soon as the page loads. A resumable
@@ -318,7 +520,7 @@ code to start.
318
520
  server each handler ──▶ its Message, encoded ──▶ a marker on the element + an entry in the envelope
319
521
 
320
522
  browser event ──▶ the markers name its Messages ──▶ queued ──▶ the runtime boots
321
- ──▶ the queue replays through update
523
+ ──▶ update runs the queue first
322
524
  ```
323
525
 
324
526
  It rests on the fact that a Foldkit handler is already a Message value.
@@ -351,6 +553,7 @@ it leaves open. The types check it where it is written: the member must be one
351
553
  of the view's Messages, and leave exactly one string field, or exactly `key`
352
554
  and `modifiers`. A closure still works. It is not data, so the page cannot
353
555
  answer that event itself and boots on it instead, letting the live page answer.
556
+ `SSR.render` names each such element and event in its result's `unnamed`.
354
557
  So does a hole form whose field has checks the empty placeholder fails, such
355
558
  as `Schema.isMinLength(1)`: it cannot be written into the page as data, so it
356
559
  is treated as a closure.
@@ -377,10 +580,12 @@ const Post = SSR.plan(App, {
377
580
  })
378
581
  ```
379
582
 
380
- The event that boots the page is not lost and does not count twice. Messages
381
- answered before boot replay in order through the same `update`, so the Model
382
- ends where an eager boot would have taken it, and the input typed into is
383
- adopted, not rebuilt.
583
+ The event that boots the page is not lost and does not count twice. The
584
+ runtime starts from the resumed Model, so its first render is the served
585
+ markup and every node is adopted, the input typed into included. The Messages
586
+ answered before boot then go through the same `update`, in order, ahead of
587
+ anything the live page answers, even an event dispatched in the task that
588
+ boots it, so the Model ends where an eager boot would have taken it.
384
589
 
385
590
  ### What a resumable page must declare
386
591
 
@@ -496,14 +701,16 @@ of:
496
701
  | `UndeclaredSurfaces` | The page has bindings and the plan no `surfaces` | Name the Surfaces the page may activate |
497
702
  | `UnencodableBinding` | The plan has no Message Schema, or a binding's Message does not encode through it | Make the plan from the application; build the Message with its constructor |
498
703
  | `EagerStartRequired` | A deferred plan would start a Subscription or Managed Resource late | Declare it in `deferrable`, or start `'now'` |
704
+ | `VoidRootWithStyles` | `styles` were given for a view whose root is void and holds nothing | Put the styles in the template's head with `SSR.generate`, or return an element root |
499
705
  | `UngeneratablePath` | `SSR.generate` was given a path no file can be served at | Leave out the query and fragment; keep paths to distinct files |
500
706
 
501
707
  In the browser, `SSR.hydrate` checks in Foldkit's order: the build id first,
502
- then the envelope. `SSR.resume` returns the envelope's refusal as
503
- `ResumeRefused`: `Missing` or `Duplicate` envelope, `Unreadable` JSON, another
504
- `Protocol` version or `Plan`, state, parts or bindings that are `Invalid`, or a
505
- `Route` other than the one the page was rendered for. A page is resumed whole or
506
- not at all.
708
+ then the envelope. `SSR.resume` reads the envelope off the stamped root and
709
+ returns its refusal as `ResumeRefused`: a page with no stamped root or more
710
+ than one, a root with no envelope (`Missing`, also for a second root as
711
+ `Duplicate`), `Unreadable` JSON, another `Protocol` version or `Plan`, state,
712
+ parts or bindings that are `Invalid`, or a `Route` other than the one the page
713
+ was rendered for. A page is resumed whole or not at all.
507
714
 
508
715
  ## Costs and limits
509
716
 
@@ -515,32 +722,43 @@ not at all.
515
722
  fail the day Foldkit changes.
516
723
  [foldkit#1449](https://github.com/foldkit/foldkit/issues/1449) asks whether
517
724
  Foldkit would support this directly.
518
- - **A resumable page leans on three Foldkit behaviours,** each pinned by a test
519
- here and two by Foldkit's own: the first patch removes attributes the
520
- browser's view does not assert, a control's value is re-asserted to the
521
- Model's, and `Runtime.hydrate` renders its first frame before it returns.
725
+ - **A resumable page leans on two Foldkit behaviours,** each pinned by a test
726
+ here and by Foldkit's own: the first patch removes attributes the browser's
727
+ view does not assert, and a control's value is re-asserted to the Model's.
728
+ It does not depend on `Runtime.hydrate` rendering its first frame before
729
+ it returns, which Foldkit does today without promising it: until that
730
+ frame commits (`Render.afterCommit`), the page keeps answering from its
731
+ markers and sends the live page what only it can answer.
522
732
  - **Development is not production.** Under Vite's dev server, Foldkit's model
523
733
  preservation restores the previous Model after a reload and skips adoption.
524
- - **A closure handler makes its event wait for boot,** with no warning yet
525
- naming the element.
734
+ - **A closure handler makes its event wait for boot.** `SSR.render`'s result
735
+ lists each under `unnamed` (`{ element: 'button#point', event:
736
+ 'pointerdown' }`), and on a page that waits to boot `SSR.entry` and
737
+ `SSR.generate` warn about each once per process, naming the fix.
526
738
 
527
739
  ## Lower-level API
528
740
 
529
741
  `SSR.render` and `SSR.hydrate` are built from pieces usable on their own:
530
742
 
531
- - **`SSR.envelope(plan, model, { route? })`** returns the envelope script for a
532
- Model, and **`SSR.resume(plan, document, { route? })`** reads it back as a
533
- `Result`. The envelope escapes `<` as Foldkit escapes its Flags, and U+2028
534
- and U+2029, so no string in the Model can close the script.
743
+ - **`SSR.envelope(plan, model, { route? })`** returns the envelope for a
744
+ Model, as JSON, and **`SSR.resume(plan, document, { route? })`** reads it back
745
+ as a `Result`. `SSR.render` carries it on the stamped root, beside Foldkit's
746
+ own stamps; the JSON escapes `<` as Foldkit escapes its Flags, and U+2028
747
+ and U+2029, and the attribute escapes `&` and `"` besides, so no string in
748
+ the Model can break out of the value. Hydration drops the attribute on its
749
+ first patch, so the browser reads it before it boots.
535
750
  - **`SSR.inspect(plan, model)`**: the plan's coverage as data.
536
751
  - **`Resume.bindings(plan, document, root, model)`** decodes and checks a
537
- page's bindings, and **`Resume.listen(root, { bindings, onAnswer })`**
752
+ page's bindings, and **`Resume.listen(root, { bindings, onAnswer, events? })`**
538
753
  answers events from the markers, one `{ event, messages, unnamed? }` per
539
- event. `SSR.hydrate` uses both; they are there for a custom boot.
754
+ event. `events` is the envelope's list of every event the markers name;
755
+ without it `listen` reads every element's attributes to find them.
756
+ `SSR.hydrate` uses both, passing the list; they are there for a custom
757
+ boot.
540
758
  - **Attribute names**, for tools and tests: `RESUME_ATTRIBUTE` (the envelope
541
- script), `STATIC_ATTRIBUTE`, `BINDING_ATTRIBUTE` (a prefix, followed by the
542
- event), `SLOT_ATTRIBUTE` (a placement's root while the server renders) and
543
- `FALLBACK_FIELD` (the posted Message).
759
+ on the stamped root), `STATIC_ATTRIBUTE`, `BINDING_ATTRIBUTE` (a prefix,
760
+ followed by the event), `SLOT_ATTRIBUTE` (a placement's root while the server
761
+ renders) and `FALLBACK_FIELD` (the posted Message).
544
762
 
545
763
  ## The application in these examples
546
764