Line

You are reading the unreleased docs (next). See latest (v0.9)

ui/client/features/live-preview/services/PreviewReachability

Is anything answering at the preview address?

Cockpit client (features), next. Source: ui/client/features/live-preview/services/PreviewReachability.ts.

Functions#

probePreview()#

probePreview(url): Promise<boolean>

Defined in: ui/client/features/live-preview/services/PreviewReachability.ts:9

Is anything answering at the preview address?

A no-cors request tells us only whether the connection succeeded — which is the point: the Cockpit never reads the app under development, it only asks whether its dev server is up, so a stopped server gets a plain explanation instead of a blank white rectangle. Anything but a clear refusal counts as reachable: a preview that works must never be withheld because this probe was unlucky.

Parameters#

url

string

Returns#

Promise<boolean>