ui/client/features/pages-editor/services/PreviewReachability
Is anything answering at the preview address?
Cockpit client (features), v0.9. Source: ui/client/features/pages-editor/services/PreviewReachability.ts.
Functions#
probePreview()#
probePreview(
url):Promise<boolean>
Defined in: ui/client/features/pages-editor/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>