Function: tryRenderSvg()
ts
function tryRenderSvg(dotSource: string, engine: EngineName): RenderResult;Defined in: index.ts:115
Result-style render: returns { svg } on success or { errors: [one] } on the first failure (svg XOR errors). Errors are plain JSON-serializable GvError data objects.
Parameters
dotSource
string
engine
Returns
Remarks
Security: same untrusted-input caveat as renderSvg — the returned svg is attacker-controlled markup for untrusted dotSource; apply a CSP or sanitize before embedding. See the README "Security" section.