Motus

Playground

A template and its data, compiled and rendered by the server as you type, under a store's rules.

Template 64 KB at most
The preview follows your typing: the form is sent as you type (submit-on), the page answered with what changed. No script of the site's.
Preview · sandboxed, no scripts200

Compiled and rendered: no problems.

Instructions
39
Run
58
Strings
10
Components
2
Extracted CSS · 0 bytes
/* no styles */
The HTML it rendered · 1029 bytes
<h2>Templates that know your types</h2>
<ul id="comments">
  <li data-jw-item><b>Rui</b> <span>The build error on a typo saved me a deploy.</span>
    <form action="/play?_a=Comments.erase%3Fid%3D11.preview" method="post" data-jw-optimistic="remove">
      <button>Remove</button>
    </form>
  </li>
  <li data-jw-item><b>Mia</b> <span>And the error says which members exist. &lt;3</span>
    <form action="/play?_a=Comments.erase%3Fid%3D12.preview" method="post" data-jw-optimistic="remove">
      <button>Remove</button>
    </form>
  </li>
</ul>
<form action="/play?_a=Comments.add%3Fpost%3D1.preview" method="post" data-jw-placeholder="#comments +> motus-add-37"><input required maxlength="40" name="name" placeholder="Your name" aria-label="Your name"><input required maxlength="500" name="text" placeholder="Say something kind" aria-label="Comment">
  <button>Comment</button>
</form>
<template id="motus-add-37">
  <li><b><jw-field name="name"></jw-field></b> <span><jw-field name="text"></jw-field></span>
    <form optimistic="remove">
      <button>Remove</button>
    </form>
  </li>
</template>
  • Compiled as a store's template: no <script>, no event handlers, no frames, forms post to the site, CSS checked.
  • Rendered within limits: 250,000 instructions, 512 KB of output, components 32 deep. The template 64 KB at most, the data 32 KB.
  • Yours to use: the kit's <Badge> and <Price>, the actions Comments.add and Comments.erase, Post_Params for a route's params.