Hugs › Reference
A hug’s page and its host (the Hub page, or cliqd’s local page) talk only through postMessage. Every message is a
JSON object { v, type, id?, … }, checked against its schema on both sides. The runtime API sends and receives these
for you; this page is for reading traffic, or writing a host.
Version: v: 1. The page lists the versions it speaks in ready, the host lists its own in init, and both use
the highest they share — or the page fails with protocol_unsupported.
Host → page
Page → host
In view mode the host ignores
values, upload and Submit.
Not in the protocol, on purpose: submitting (the host’s button), network, navigation, storage, other people’s
answers.
The host’s checks
CliqHub checks uploads, reads and answers again.