Warning
THIS IS AN AUTOGENERATED FILE. DO NOT EDIT.
Please edit the corresponding file in /packages/mermaid/src/docs/config/setup/mermaid/interfaces/RenderResult.md.
Interface: RenderResult
Defined in: packages/mermaid/src/types.ts:136
Properties
bindFunctions()?
optionalbindFunctions: (element) =>void
Defined in: packages/mermaid/src/types.ts:154
Bind function to be called after the svg has been inserted into the DOM. This is necessary for adding event listeners to the elements in the svg.
1const { svg, bindFunctions } = await mermaid.render('id1', 'graph TD;A-->B');
2div.innerHTML = svg;
3bindFunctions?.(div); // To call bindFunctions only if it's present.
Parameters
element
Element
Returns
void
diagramType
diagramType:
string
Defined in: packages/mermaid/src/types.ts:144
The diagram type, e.g. 'flowchart', 'sequence', etc.
svg
svg:
string
Defined in: packages/mermaid/src/types.ts:140
The svg code for the rendered graph.