mirror of
				https://github.com/mermaid-js/mermaid.git
				synced 2025-11-04 12:54:08 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			67 lines
		
	
	
		
			1.5 KiB
		
	
	
	
		
			Markdown
		
	
	
	
	
	
			
		
		
	
	
			67 lines
		
	
	
		
			1.5 KiB
		
	
	
	
		
			Markdown
		
	
	
	
	
	
> **Warning**
 | 
						|
>
 | 
						|
> ## THIS IS AN AUTOGENERATED FILE. DO NOT EDIT.
 | 
						|
>
 | 
						|
> ## Please edit the corresponding file in [/packages/mermaid/src/docs/config/setup/interfaces/mermaid.RenderResult.md](../../../../packages/mermaid/src/docs/config/setup/interfaces/mermaid.RenderResult.md).
 | 
						|
 | 
						|
# Interface: RenderResult
 | 
						|
 | 
						|
[mermaid](../modules/mermaid.md).RenderResult
 | 
						|
 | 
						|
## Properties
 | 
						|
 | 
						|
### bindFunctions
 | 
						|
 | 
						|
• `Optional` **bindFunctions**: (`element`: `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.
 | 
						|
 | 
						|
```js
 | 
						|
const { svg, bindFunctions } = await mermaid.render('id1', 'graph TD;A-->B');
 | 
						|
div.innerHTML = svg;
 | 
						|
bindFunctions?.(div); // To call bindFunctions only if it's present.
 | 
						|
```
 | 
						|
 | 
						|
#### Type declaration
 | 
						|
 | 
						|
▸ (`element`): `void`
 | 
						|
 | 
						|
##### Parameters
 | 
						|
 | 
						|
| Name      | Type      |
 | 
						|
| :-------- | :-------- |
 | 
						|
| `element` | `Element` |
 | 
						|
 | 
						|
##### Returns
 | 
						|
 | 
						|
`void`
 | 
						|
 | 
						|
#### Defined in
 | 
						|
 | 
						|
[packages/mermaid/src/types.ts:103](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/types.ts#L103)
 | 
						|
 | 
						|
---
 | 
						|
 | 
						|
### diagramType
 | 
						|
 | 
						|
• **diagramType**: `string`
 | 
						|
 | 
						|
The diagram type, e.g. 'flowchart', 'sequence', etc.
 | 
						|
 | 
						|
#### Defined in
 | 
						|
 | 
						|
[packages/mermaid/src/types.ts:93](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/types.ts#L93)
 | 
						|
 | 
						|
---
 | 
						|
 | 
						|
### svg
 | 
						|
 | 
						|
• **svg**: `string`
 | 
						|
 | 
						|
The svg code for the rendered graph.
 | 
						|
 | 
						|
#### Defined in
 | 
						|
 | 
						|
[packages/mermaid/src/types.ts:89](https://github.com/mermaid-js/mermaid/blob/master/packages/mermaid/src/types.ts#L89)
 |