We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6f50323 commit 38759ceCopy full SHA for 38759ce
web_src/js/markup/mermaid.js
@@ -48,8 +48,8 @@ export async function renderMermaid() {
48
iframe.classList.add('markup-render');
49
iframe.sandbox = 'allow-scripts allow-same-origin';
50
iframe.srcdoc = `<html><head><style>${iframeCss}</style></head><body>${svg}</body></html>`;
51
- iframe.addEventListener('load', (e) => {
52
- const height = e.target.contentWindow.document.body.clientHeight;
+ iframe.addEventListener('load', () => {
+ const height = iframe.contentWindow.document.body.clientHeight;
53
iframe.style.height = `${height}px`;
54
});
55
0 commit comments