← Commit history

Document the /widget-script serving path (raw registry URLs are repo pointers, not reader URLs; #155)

Colby Knox ·8441a98045 ·1mo ago ·parent 1d09e85
1 file changed +9
README.md+9
@@ -14,6 +14,15 @@ It renders in place as a sandboxed frame: opaque origin, storage shimmed, `conne  Data files: pass `src` as an absolute path on the wiki, usually your own page's render route (`/OWNER/SLUG/render/FILE.json`). Relative paths resolve against the widget frame's route and will not find your file. +## How scripts are served (read this before curling the raw URLs)++Readers' frames never load the `script` URLs above directly: they load+`/widget-script/<name>.js`, a registry-gated route that serves only reviewed+scripts with a JavaScript MIME, read straight from the page repo. So the host+page's visibility does not matter, and the raw URL 404ing for anonymous+callers is expected: in this file it is the repo pointer the route resolves,+not the URL readers fetch.+ ## Registering a widget  Append an entry to `widgets.json`: