Skip to content

startPreviewScript

startPreviewScript(options?): PreviewScriptHandle | null

The whole receiver for a site that never hydrates: pins, click-to-edit, and the v: 1 protocol, with no framework.

It is inert unless the page is genuinely being previewed — `isPreviewActivated` requires both the `?ebitex-preview=1` flag and a framing or opening counterpart — so a site may include the script tag unconditionally on every page and pay one cached request for it.

Returns `null` when inert, so a caller can tell "not previewing" from "previewing and wired up".

PreviewScriptOptions = {}

PreviewScriptHandle | null