Skip to content

Commit 47a6ce4

Browse files
committed
Update docs
1 parent c7eaee0 commit 47a6ce4

File tree

2 files changed

+341
-332
lines changed

2 files changed

+341
-332
lines changed

docs/config/setup/interfaces/mermaidAPI.RenderResult.md

+9
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,15 @@
1414

1515
`Optional` **bindFunctions**: (`element`: `Element`) => `void`
1616

17+
Bind function to be called after the svg has been inserted into the DOM.
18+
This is necessary for adding event listeners to the elements in the svg.
19+
20+
```js
21+
const { svg, bindFunctions } = mermaidAPI.render('id1', 'graph TD;A-->B');
22+
div.innerHTML = svg;
23+
bindFunctions?.(div); // To call bindFunctions only if it's present.
24+
```
25+
1726
#### Type declaration
1827
1928
▸ (`element`): `void`

0 commit comments

Comments
 (0)