>> I have been using Go to define programs that I compile to web assembly. >> This works well in general, but I do not yet understanding how to express >> mermaid graphs (https://mermaid-js.github.io/mermaid/) from Go. >> [...]
> I don't know mermaid but it sounded interesting so I took a look, and, > mermaid listens to the page load event and when fired (when the page > has loaded) it will locate the graphs on the page and transform them to > svg files. > (https://mermaid-js.github.io/mermaid/#/usage) > Presumably your code runs after the page load event, and mermaid has > already done its thing by then. You would need to tell mermaid to look > again for graphs after generating them. > https://mermaid-js.github.io/mermaid/#/usage?id=calling-mermaidinit > looks relevant. > (Not really Go related, but sending to the list anyway for clarity.) Exactly the insight I needed. I overlooked the timing of things, and calling js.Global().Get("mermaid").Call("init") at the end of my web assembly code does indeed fix my problem. Thank you for the quick response! -- Mike :wq -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/20200402181254.GC2193783%40imp.