Translation in progress. This page is not yet translated to English. The full reference is available in Spanish — see the Spanish version until we ship the English copy.
Game progress/settings persistence, compatible with sandboxed iframes.
Why it exists: the platform serves uploaded games in a
<iframe sandbox="allow-scripts ...">WITHOUTallow-same-origin. That’s defense in depth — an external dev’s game can’t read parent cookies/localStorage or attack other players. But it also means directlocalStoragefrom the game fails withSecurityError. This module bridges viapostMessageto the parent, which stores data namespaced by slug. Same API works in local dev (no sandbox) — automagically.
The full API reference (storage.ready, set, get, remove, clear, keys, mode, slug) and the postMessage protocol are in the Spanish version.