v0.9.0
Changes
- feat: emit explicit submitter on the wire (livetemplate#237 Phase 2) (1385a5e)
This release implements the client-side half of the explicit-submitter contract documented in livetemplate/livetemplate's docs/proposals/explicit-submitter.md. The server-side acceptance shipped in livetemplate/livetemplate v0.9.0; this release lets the client populate it.
Wire-format changes
- WebSocket action message now carries
submitter: <name>whenSubmitEvent.submitter.nameis non-empty. Additive to the existing inline action resolution; the field is omitted when there's no named submitter. - HTTP Tier 1 multipart submissions include an
lvt-submitterform key alongsidelvt-action. - New
lvt-form:emit-submitterdirective (opt-in, paired withlvt-form:no-intercept): for forms that submit natively rather than via fetch, injects a hidden<input type="hidden" name="lvt-submitter">populated fromSubmitEvent.submitter.namebefore the browser serializes the form. Wrapper-delegated so DOM swaps preserve the behavior. Emits a one-shotconsole.warnper form when used on a GET form (URL-pollution caveat — the field gets serialized into the query string). On follow-up submits with no named submitter, the directive clears the stale hidden input so the server doesn't see leaked state from an earlier named submit.
Reserved field name
lvt-submitter is now a reserved form field name (same shape as the existing lvt-action reservation). Apps that previously used a field named lvt-submitter for user data will see that value routed as the action; rename the field to avoid the collision.
Installation
npm
npm install @livetemplate/client@0.9.0CDN
<script src="https://cdn.jsdelivr.net/npm/@livetemplate/client@0.9.0/dist/livetemplate-client.browser.js"></script>Related Releases
This release aligns to the LiveTemplate core library version v0.9.0.