Custom HTML Page
A resource type for a sandboxed HTML page with schema-defined URL input.

Extends · open

typehm://hyper.media/page
html
UnixFS folder containing index.html for this custom HTML page.
inputSchema
Published HM struct schema defining this page's URL input fields.

A custom HTML page is a resource with type: hm://hyper.media/page. Its html attribute points to an IPFS folder containing index.html; its inputSchema points to a published Hypermedia schema. This is a page, rather than a larger application.

The input schema is an HM struct: one property for each input field. Publish the schema blob and optionally bind it to a readable type resource through schemaDefinition. Other tools can discover the contract by reading the page's inputSchema reference. A page without inputs uses page-input.

Input lives in the page URL. Each field name becomes the query parameter p.name, whose value is JSON encoded and then URL encoded. For example ?p.prompt=%22Hello%22&p.count=3. Seed's own version and panel parameters are separate. Input is public URL state: do not place secrets in it.

The SDK provides seed.input.get(), seed.input.push(values), seed.input.replace(values) and seed.input.onChange(listener). Push adds a history entry; replace updates the current one. Both take the complete input object and validate it against the declared schema before changing the URL. Browser and desktop Back/Forward restore the input without restarting the page. Invalid incoming URLs are reported as input errors so the page can show a correction UI.

See custom HTML pages for sandboxing, permissions, publishing and schema-backed data storage.

Do you like what you are reading? Subscribe to receive updates.

Unsubscribe anytime

Connections0

Connections show where other documents or comments link to this document.

Related documents

Loading connections…