*keys
Summary
*keys selects top-level keys from the current Sercrod data source for action directives.
Alias:
n-keys
The current data source is usually _data. When staged editing is active, request and save actions use _stage first.
Examples
<button *save.file="'backup.json'" *keys="profile settings">Save</button>
<button *load.file *keys="profile" *response="'draft'">Load</button>
<button *websocket.send="wsUrl" *keys="message">Send</button>
<button *post="'/api/save'" *keys="form" *response="'result'">Post</button>
<button *upload="'/api/upload'" *keys="profile">Upload with metadata</button>
Rules
- Keys are whitespace-separated.
- Keys are top-level names only.
- Nested paths such as
profile.nameare not interpreted. - If
*keysis omitted, each owning directive uses its own natural default.
Currently Used By
*save.file*save.session*save.store*load.file*load.session*load.store*websocket.send*post*upload
*api does not use *keys for JSON bodies. It uses body / payload so that the request body stays explicit.
Related
*response*params*dry-run