Warning
Please edit the corresponding file in /packages/mermaid/src/docs/config/setup/interfaces/mermaidAPI.RenderResult.md.
mermaidAPI.RenderResult
• Optional bindFunctions: (element: Element) => void
▸ (element): void
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.
const { svg, bindFunctions } = mermaidAPI.render('id1', 'graph TD;A-->B');
div.innerHTML = svg;
bindFunctions?.(div); // To call bindFunctions only if it's present.| Name | Type |
|---|---|
element |
Element |
void
• svg: string
The svg code for the rendered graph.